This commit is contained in:
Daniel Mierswa 2010-03-11 11:37:00 +01:00
parent 328561df3c
commit a055948a8a
10 changed files with 30 additions and 35 deletions

View file

@ -35,7 +35,7 @@ src_prepare() {
if [[ "${PV}" == scm ]] ; then if [[ "${PV}" == scm ]] ; then
if ${WANT_AUTOGEN} ; then if ${WANT_AUTOGEN} ; then
./autogen.sh || die "autogen.sh failed" edo ./autogen.sh
fi fi
fi fi
} }

View file

@ -18,35 +18,35 @@ djb_src_prepare() {
local basedir=$(dirname $(find -type f -name conf-cc)) local basedir=$(dirname $(find -type f -name conf-cc))
local ranlib_file=$(grep -r ranlib . | sed 's/:.*//') local ranlib_file=$(grep -r ranlib . | sed 's/:.*//')
sed \ edo sed \
-e "/^gcc/s:.*:& ${CPPFLAGS} ${CFLAGS}:" \ -e "/^gcc/s:.*:& ${CPPFLAGS} ${CFLAGS}:" \
-e "/^gcc/s:gcc:${CC}:" \ -e "/^gcc/s:gcc:${CC}:" \
-i "${basedir}/conf-cc" || die "sed ${basedir}/conf-cc failed" -i "${basedir}/conf-cc"
sed \ edo sed \
-e "/^gcc/s:.*:& ${LDFLAGS}:" \ -e "/^gcc/s:.*:& ${LDFLAGS}:" \
-e "/^gcc/s:gcc:${LD}:" \ -e "/^gcc/s:gcc:${LD}:" \
-i "${basedir}/conf-ld" || die "sed ${basedir}/conf-ld failed" -i "${basedir}/conf-ld"
sed \ edo sed \
-e "/echo 'ar cr/s:ar:${AR}:" \ -e "/echo 'ar cr/s:ar:${AR}:" \
-e "/*) echo 'ranlib \"\\$/s:ranlib:${RANLIB}:" \ -e "/*) echo 'ranlib \"\\$/s:ranlib:${RANLIB}:" \
-i "${ranlib_file}" || die "sed ${ranlib_file} failed" -i "${ranlib_file}"
if [ -f "${basedir}/auto-str.c" ] ; then if [ -f "${basedir}/auto-str.c" ] ; then
cat >> "${basedir}/auto-str" <<EOF edo cat >> "${basedir}/auto-str" <<EOF
#!/bin/bash #!/bin/bash
printf "const char \${1}[] = \"%s\";\n" \$(printf "\${2}" | od -A n -t o1 | tr ' ' '\\') printf "const char \${1}[] = \"%s\";\n" \$(printf "\${2}" | od -A n -t o1 | tr ' ' '\\')
EOF EOF
chmod u+x "${basedir}/auto-str" || die "chmod auto-str failed" edo chmod u+x "${basedir}/auto-str"
fi fi
if [ -f "${basedir}/hasshsgr.h1" ] ; then if [ -f "${basedir}/hasshsgr.h1" ] ; then
ln -s hasshsgr.h1 "${basedir}"/hasshsgr.h edo ln -s hasshsgr.h1 "${basedir}"/hasshsgr.h
fi fi
if [ -f "${basedir}/uint64.h1" ] ; then if [ -f "${basedir}/uint64.h1" ] ; then
cat >> "${basedir}/uint64.h" <<EOF edo cat >> "${basedir}/uint64.h" <<EOF
#ifndef UINT64_H #ifndef UINT64_H
#define UINT64_H #define UINT64_H
@ -60,8 +60,7 @@ EOF
fi fi
if [ -f "${basedir}/conf-home" ] ; then if [ -f "${basedir}/conf-home" ] ; then
echo /usr > "${basedir}/conf-home" \ edo echo /usr > "${basedir}/conf-home"
|| die "creating conf-home failed"
fi fi
default default

View file

@ -24,8 +24,7 @@ src_unpack() {
} }
src_compile() { src_compile() {
"${CC}" ${CFLAGS} ${LDFLAGS} -o "${SRC}.out" "${FETCHEDDIR}/${SRC}" \ edo "${CC}" ${CFLAGS} ${LDFLAGS} -o "${SRC}.out" "${FETCHEDDIR}/${SRC}"
|| die "compilation failed"
} }
src_install() { src_install() {

View file

@ -64,7 +64,7 @@ qemu_src_configure ()
option curl || myconf+=( --disable-curl ) option curl || myconf+=( --disable-curl )
[[ -n "${audio_drv[@]}" ]] && myconf+=( --enable-mixemu ) [[ -n "${audio_drv[@]}" ]] && myconf+=( --enable-mixemu )
./configure \ edo ./configure \
--prefix=/usr \ --prefix=/usr \
--host-cc="${BUILD_CC}" \ --host-cc="${BUILD_CC}" \
--cc="${CC}" \ --cc="${CC}" \
@ -74,16 +74,14 @@ qemu_src_configure ()
--audio-drv-list="$(echo ${audio_drv[@]} | tr ' ' ',')" \ --audio-drv-list="$(echo ${audio_drv[@]} | tr ' ' ',')" \
${myconf[@]} \ ${myconf[@]} \
${EXTRA_ECONF} \ ${EXTRA_ECONF} \
$@ \ $@
|| die "configure failed"
} }
qemu_src_prepare () qemu_src_prepare ()
{ {
sed \ edo sed \
-e '/^CFLAGS=/s:-O2 -g::' \ -e '/^CFLAGS=/s:-O2 -g::' \
-e '/^LDFLAGS=/s:-g::' \ -e '/^LDFLAGS=/s:-g::' \
-i configure \ -i configure
|| die "sed configure failed";
} }

View file

@ -20,7 +20,7 @@ vhba-module_src_compile() {
vhba-module_src_install() { vhba-module_src_install() {
dodir /usr/src dodir /usr/src
cp -pPR "${WORK}" "${IMAGE}/usr/src/${PNV}" edo cp -pPR "${WORK}" "${IMAGE}/usr/src/${PNV}"
insinto /etc/udev/rules.d insinto /etc/udev/rules.d
hereins 90-vhba.rules <<EOF hereins 90-vhba.rules <<EOF

View file

@ -23,12 +23,12 @@ WORK="$WORKBASE/$PN/src"
src_prepare() { src_prepare() {
default default
sed \ edo sed \
-e "/CC =/s:gcc:${CC}:" \ -e "/CC =/s:gcc:${CC}:" \
-e "/LD =/s:gcc:${CC}:" \ -e "/LD =/s:gcc:${CC}:" \
-e "/CFLAGS =/s:\$(CDEBUG):$CFLAGS:" \ -e "/CFLAGS =/s:\$(CDEBUG):$CFLAGS:" \
-e "/LDFLAGS =/s:\$(LDEBUG):$LDFLAGS:" \ -e "/LDFLAGS =/s:\$(LDEBUG):$LDFLAGS:" \
-i Makefile || die "sed Makefile failed" -i Makefile
} }
src_install() { src_install() {

View file

@ -30,15 +30,15 @@ UPSTREAM_CHANGELOG="http://tron.homeunix.org/ja2"
ja2_config() { ja2_config() {
until [ $# -eq 0 ] ; do until [ $# -eq 0 ] ; do
echo "$1" >> config.default edo echo "$1" >> config.default
shift shift
done done
} }
src_prepare() { src_prepare() {
sed -e "s:TILECACHE:[Tt][Ii][Ll][Ee][Cc][Aa][Cc][Hh][Ee]:g" \ edo sed -e "s:TILECACHE:[Tt][Ii][Ll][Ee][Cc][Aa][Cc][Hh][Ee]:g" \
-e '/^INSTALL_PROGRAM ?= /s: -s::' \ -e '/^INSTALL_PROGRAM ?= /s: -s::' \
-i Makefile || die "sed Makefile failed" -i Makefile
option debug && ja2_config _DEBUG=yes WITH_SOUND_DEBUG=yes option debug && ja2_config _DEBUG=yes WITH_SOUND_DEBUG=yes
option demo && ja2_config WITH_DEMO=yes option demo && ja2_config WITH_DEMO=yes
option editor && ja2_config JA2EDITOR=yes option editor && ja2_config JA2EDITOR=yes

View file

@ -32,8 +32,8 @@ DEFAULT_SRC_PREPARE_PATCHES+=(
DEFAULT_SRC_INSTALL_EXTRA_SUBDIRS+=( src ) DEFAULT_SRC_INSTALL_EXTRA_SUBDIRS+=( src )
src_compile() { src_compile() {
echo >src/rts.tests || "overwriting tests failed" edo echo >src/rts.tests
package/compile || die "compilation failed" edo package/compile
} }
src_install() { src_install() {

View file

@ -31,16 +31,15 @@ DEFAULT_SRC_CONFIGURE_OPTION_WITHS+=( 'tcpd tcp-wrappers' )
WORK="${WORK}/src" WORK="${WORK}/src"
src_prepare() { src_prepare() {
sed \ edo sed \
-e "/^AM_CFLAGS = /s:= := -DUSBIDS_FILE='\"@USBIDS_DIR@/usb.ids\"' :" \ -e "/^AM_CFLAGS = /s:= := -DUSBIDS_FILE='\"@USBIDS_DIR@/usb.ids\"' :" \
-i cmd/Makefile.am \ -i cmd/Makefile.am
|| die "sed cmd/Makefile.am failed"
autotools_src_prepare autotools_src_prepare
} }
src_install() { src_install() {
default default
rmdir "${IMAGE}/usr/share/usbip" edo rmdir "${IMAGE}/usr/share/usbip"
} }

View file

@ -21,11 +21,11 @@ DEFAULT_SRC_INSTALL_PARAMS+=( DIST_ROOT="$IMAGE" )
src_prepare() { src_prepare() {
default default
sed -e "/^PKG_DOC_DIR\t=/s:@pkg_name@:$PNV:" -i include/builddefs.in || die "sed failed" edo sed -e "/^PKG_DOC_DIR\t=/s:@pkg_name@:$PNV:" -i include/builddefs.in
} }
src_install() { src_install() {
default default
rm "$IMAGE/usr/share/doc/$PNV/release.sh" || die "failed to remove release.sh" edo rm "$IMAGE/usr/share/doc/$PNV/release.sh"
} }