Split STAGING_BINDIR into CROSS and NATIVE versions. This means there is no need...
authorRichard Purdie <rpurdie@rpsys.net>
Sun, 31 Dec 2006 22:31:24 +0000 (22:31 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Sun, 31 Dec 2006 22:31:24 +0000 (22:31 +0000)
23 files changed:
classes/binconfig.bbclass
classes/e.bbclass
classes/efl.bbclass
conf/bitbake.conf
packages/efl/edje-native_0.5.0.036.bb
packages/efl/evas.inc
packages/fontconfig/fontconfig-native_2.2.95.bb
packages/fontconfig/fontconfig-native_2.3.91.bb
packages/gnupg/gnupg2.inc
packages/klibc/klibc.inc
packages/libidl/libidl_0.8.3.bb
packages/libidl/libidl_0.8.6.bb
packages/libtool/libtool-cross_1.5.10.bb
packages/libusb/libusb_0.1.10a.bb
packages/libusb/libusb_0.1.12.bb
packages/libxslt/libxslt_1.1.12.bb
packages/libxslt/libxslt_1.1.17.bb
packages/prboom/prboom_2.2.6.bb
packages/prboom/prboom_2.3.1.bb
packages/scummvm/scummvm_0.6.0.bb
packages/silo/silo_1.4.8.bb
packages/smpeg/smpeg_0.4.4+0.4.5cvs20040311.bb
packages/uae/e-uae_0.8.28.bb

index 317e080..dadf2dd 100644 (file)
@@ -20,11 +20,6 @@ def get_binconfig_mangle(d):
                s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'"
        return s
 
-# Native package configurations go in ${BINDIR}/<name>-config-native to prevent a collision with cross packages
-def is_native(d):
-       import bb.data
-       return ["","-native"][bb.data.inherits_class('native', d)]
-
 BINCONFIG_GLOB ?= "*-config"
 
 do_install_append() {
@@ -52,9 +47,9 @@ do_install_append() {
 
 do_stage_append() {
        for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
-               configname=`basename $config`${@is_native(d)}
-               install -d ${STAGING_BINDIR}
-               cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR}/$configname
-               chmod u+x ${STAGING_BINDIR}/$configname
+               configname=`basename $config`
+               install -d ${STAGING_BINDIR_CROSS}
+               cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR_CROSS}/$configname
+               chmod u+x ${STAGING_BINDIR_CROSS}/$configname
        done
 }
index ae8fea0..f20c1f8 100644 (file)
@@ -8,23 +8,19 @@ do_prepsources () {
 }
 addtask prepsources after do_fetch before do_unpack
 
-def binconfig_suffix(d):
-       import bb
-        return ["","-native"][bb.data.inherits_class('native', d)]
-
-export CURL_CONFIG             = "${STAGING_BINDIR}/curl-config${@binconfig_suffix(d)}"
-export EDB_CONFIG              = "${STAGING_BINDIR}/edb-config${@binconfig_suffix(d)}"
-export EET_CONFIG              = "${STAGING_BINDIR}/eet-config${@binconfig_suffix(d)}"
-export EVAS_CONFIG             = "${STAGING_BINDIR}/evas-config${@binconfig_suffix(d)}"
-export ECORE_CONFIG            = "${STAGING_BINDIR}/ecore-config${@binconfig_suffix(d)}"
-export EMBRYO_CONFIG           = "${STAGING_BINDIR}/embryo-config${@binconfig_suffix(d)}"
-export ENGRAVE_CONFIG          = "${STAGING_BINDIR}/engrave-config${@binconfig_suffix(d)}"
-export ENLIGHTENMENT_CONFIG    = "${STAGING_BINDIR}/enlightenment-config${@binconfig_suffix(d)}"
-export EPSILON_CONFIG          = "${STAGING_BINDIR}/epsilon-config${@binconfig_suffix(d)}"
-export EPEG_CONFIG             = "${STAGING_BINDIR}/epeg-config${@binconfig_suffix(d)}"
-export ESMART_CONFIG           = "${STAGING_BINDIR}/esmart-config${@binconfig_suffix(d)}"
-export FREETYPE_CONFIG         = "${STAGING_BINDIR}/freetype-config${@binconfig_suffix(d)}"
-export IMLIB2_CONFIG           = "${STAGING_BINDIR}/imlib2-config${@binconfig_suffix(d)}"
+export CURL_CONFIG             = "${STAGING_BINDIR_CROSS}/curl-config"
+export EDB_CONFIG              = "${STAGING_BINDIR_CROSS}/edb-config"
+export EET_CONFIG              = "${STAGING_BINDIR_CROSS}/eet-config"
+export EVAS_CONFIG             = "${STAGING_BINDIR_CROSS}/evas-config"
+export ECORE_CONFIG            = "${STAGING_BINDIR_CROSS}/ecore-config"
+export EMBRYO_CONFIG           = "${STAGING_BINDIR_CROSS}/embryo-config"
+export ENGRAVE_CONFIG          = "${STAGING_BINDIR_CROSS}/engrave-config"
+export ENLIGHTENMENT_CONFIG    = "${STAGING_BINDIR_CROSS}/enlightenment-config"
+export EPSILON_CONFIG          = "${STAGING_BINDIR_CROSS}/epsilon-config"
+export EPEG_CONFIG             = "${STAGING_BINDIR_CROSS}/epeg-config"
+export ESMART_CONFIG           = "${STAGING_BINDIR_CROSS}/esmart-config"
+export FREETYPE_CONFIG         = "${STAGING_BINDIR_CROSS}/freetype-config"
+export IMLIB2_CONFIG           = "${STAGING_BINDIR_CROSS}/imlib2-config"
 
 do_compile_prepend() {
        find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
index be5ef9d..9b0345a 100644 (file)
@@ -13,6 +13,10 @@ libdirectory = "src/lib"
 libraries = "lib${SRCNAME}"
 headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h"
 
+def efl_is_native(d):
+    import bb
+    return ["","-native"][bb.data.inherits_class('native', d)]
+
 do_stage_append () {
        for i in ${libraries}
        do
@@ -24,7 +28,7 @@ do_stage_append () {
        done
 
        # Install binaries automatically for native builds
-       if [ "${@binconfig_suffix(d)}" = "-native" ]
+       if [ "${@efl_is_native(d)}" = "-native" ]
        then
 
                # Most EFL binaries start with the package name
index 36e1287..6ddf8ec 100644 (file)
@@ -153,10 +153,9 @@ S = "${WORKDIR}/${P}"
 B = "${S}"
 
 STAGING_DIR = "${TMPDIR}/staging"
-STAGING_BINDIR = "${STAGING_DIR}/${BUILD_SYS}/bin"
-# Set these to the same a STAGING_BINDIR for now
+STAGING_BINDIR = "${STAGING_DIR}/${HOST_SYS}/bin"
+STAGING_BINDIR_CROSS = "${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}"
 STAGING_BINDIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/bin"
-STAGING_BINDIR_CROSS = "${STAGING_DIR}/${BUILD_SYS}/bin"
 STAGING_LIBDIR = "${STAGING_DIR}/${HOST_SYS}/lib"
 STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include"
 STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share"
@@ -217,7 +216,7 @@ EXTRA_IMAGEDEPENDS = ""
 
 CROSS_DIR = "${TMPDIR}/cross"
 CROSS_DATADIR = "${CROSS_DIR}/share"
-export PATH_prepend = "${STAGING_BINDIR}/${HOST_SYS}:${STAGING_BINDIR}:${CROSS_DIR}/bin:"
+export PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/bin:"
 
 ##################################################################
 # Build utility info.
index 9909811..c66639d 100644 (file)
@@ -6,11 +6,6 @@ inherit native
 DEPENDS = "evas-native ecore-native eet-native embryo-native"
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/edje"
 
-EXTRA_OECONF = "--with-evas-config=${STAGING_BINDIR}/evas-config-native        \
-  --with-ecore-config=${STAGING_BINDIR}/ecore-config-native    \
-  --with-eet-config=${STAGING_BINDIR}/eet-config-native                \
-  --with-embryo-config=${STAGING_BINDIR}/embryo-config-native"
-
 do_configure_prepend() {
        sed -i 's:EMBRYO_PREFIX"/bin:"${STAGING_BINDIR}:' ${S}/src/bin/edje_cc_out.c
        sed -i 's:cpp -I:/usr/bin/cpp -I:' ${S}/src/bin/edje_cc_parse.c
index 4577535..f065d94 100644 (file)
@@ -9,7 +9,7 @@ PROVIDES += "virtual/evas"
 
 inherit efl
 
-export FREETYPE_CONFIG         = "${STAGING_BINDIR}/freetype-config${@binconfig_suffix(d)}"
+export FREETYPE_CONFIG = "${STAGING_BINDIR_CROSS}/freetype-config"
 
 SRC_URI = "http://enlightenment.freedesktop.org/files/evas-${PV}.tar.gz \
            file://fix-configure.patch;patch=1 \
index 58589ae..541b746 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS = "freetype-native expat-native zlib-native"
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/fontconfig-${PV}"
 
 EXTRA_OEMAKE = ""
-EXTRA_OECONF = "${@[' --disable-docs',' --disable-docs --with-freetype-config=%s/freetype-config-native' % bb.data.getVar('STAGING_BINDIR', d, 1)][os.path.isfile('%s/freetype-config-native' % bb.data.getVar('STAGING_BINDIR', d, 1))]}"
+EXTRA_OECONF = "${@[' --disable-docs',' --disable-docs --with-freetype-config=%s/freetype-config' % bb.data.getVar('STAGING_BINDIR', d, 1)][os.path.isfile('%s/freetype-config' % bb.data.getVar('STAGING_BINDIR', d, 1))]}"
 
 do_stage () {
        oe_runmake install
index 58589ae..541b746 100644 (file)
@@ -6,7 +6,7 @@ DEPENDS = "freetype-native expat-native zlib-native"
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/fontconfig-${PV}"
 
 EXTRA_OEMAKE = ""
-EXTRA_OECONF = "${@[' --disable-docs',' --disable-docs --with-freetype-config=%s/freetype-config-native' % bb.data.getVar('STAGING_BINDIR', d, 1)][os.path.isfile('%s/freetype-config-native' % bb.data.getVar('STAGING_BINDIR', d, 1))]}"
+EXTRA_OECONF = "${@[' --disable-docs',' --disable-docs --with-freetype-config=%s/freetype-config' % bb.data.getVar('STAGING_BINDIR', d, 1)][os.path.isfile('%s/freetype-config' % bb.data.getVar('STAGING_BINDIR', d, 1))]}"
 
 do_stage () {
        oe_runmake install
index c4aadb5..d362981 100644 (file)
@@ -24,12 +24,6 @@ FILES_${PN} += "${datadir}/gnupg"
 
 EXTRA_OECONF = "--disable-ldap \
                --with-zlib=${STAGING_LIBDIR}/.. \
-               --with-gpg-error-prefix=${STAGING_BINDIR}/.. \
-               --with-libgcrypt-prefix=${STAGING_BINDIR}/.. \
-               --with-libassuan-prefix=${STAGING_BINDIR}/.. \
-               --with-pth-prefix=${STAGING_BINDIR}/.. \
-               --with-opensc-prefix=${STAGING_BINDIR}/.. \
-               --with-ksba-prefix=${STAGING_BINDIR}/.. \
                --disable-threads \
                --disable-gpgsm \
                --disable-scdaemon"
index 29ca168..4e86824 100644 (file)
@@ -66,6 +66,8 @@ do_stage() {
        # use the staged libraries and include files.
        sed -i -e 's@^\$prefix = .*$@\$prefix = "${STAGING_KLIBC_DIR}/lib/klibc";@' \
                '${STAGING_BINDIR}/${TARGET_PREFIX}klcc'
+        # Perhaps other binaries need to be moved to cross?
+       mv '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' '${STAGING_BINDIR_CROSS}'
 }
 
 do_install() {
index a405977..2ca114b 100644 (file)
@@ -23,6 +23,10 @@ do_stage() {
 
        cp ${STAGING_BINDIR}/libIDL-config-2 ${STAGING_BINDIR}/libIDL-config-2.orig
        cat ${STAGING_BINDIR}/libIDL-config-2.orig | sed -e 's:${includedir}:${STAGING_INCDIR}:' > ${STAGING_BINDIR}/libIDL-config-2
+
+       if [ "${STAGING_BINDIR}" != "${STAGING_BINDIR_CROSS}" ]; then
+               mv ${STAGING_BINDIR}/libIDL-config-2 ${STAGING_BINDIR_CROSS}/libIDL-config-2
+       fi
 }
 
 FILES_${PN} = "${libdir}/*.so.*"
index 048a5fb..916bfb6 100644 (file)
@@ -16,6 +16,11 @@ do_stage() {
        autotools_stage_all
 
        cat ${S}/libIDL-config-2 | sed -e 's:${includedir}:${STAGING_INCDIR}:' > ${STAGING_BINDIR}/libIDL-config-2
+
+       if [ "${STAGING_BINDIR}" != "${STAGING_BINDIR_CROSS}" ]; then
+               mv ${STAGING_BINDIR}/libIDL-config-2 ${STAGING_BINDIR_CROSS}/libIDL-config-2
+       fi
+                        
 }
 
 FILES_${PN} = "${libdir}/*.so.*"
index 81a4990..fdc8f6f 100644 (file)
@@ -13,6 +13,7 @@ S = "${WORKDIR}/libtool-${PV}"
 
 prefix = "${STAGING_DIR}"
 exec_prefix = "${prefix}/${BUILD_SYS}"
+bindir = "${STAGING_BINDIR_NATIVE}"
 
 do_compile () {
        :
index a62d9ae..8648f96 100644 (file)
@@ -22,6 +22,11 @@ do_stage() {
        install -m 755 ${S}/libusb-config ${STAGING_BINDIR}
        perl -pi -e 's:\-L${libdir} :-L${STAGING_LIBDIR} :' ${STAGING_BINDIR}/libusb-config
 
+       if [ "${STAGING_BINDIR}" != "${STAGING_BINDIR_CROSS}" ]; then
+               install -d ${STAGING_BINDIR_CROSS}/
+               mv ${STAGING_BINDIR}/libusb-config ${STAGING_BINDIR_CROSS}/libusb-config
+       fi
+
         install -d ${STAGING_INCDIR}/
         for X in usb.h
         do
index fea8e57..a2b80ec 100644 (file)
@@ -22,6 +22,11 @@ do_stage() {
        # can we get rid of that? wouldn't a sed statement do as well?
        perl -pi -e 's:\-L${libdir} :-L${STAGING_LIBDIR} :' ${STAGING_BINDIR}/libusb-config
 
+       if [ "${STAGING_BINDIR}" != "${STAGING_BINDIR_CROSS}" ]; then
+               install -d ${STAGING_BINDIR_CROSS}/
+               mv ${STAGING_BINDIR}/libusb-config ${STAGING_BINDIR_CROSS}/libusb-config
+       fi
+
         install -d ${STAGING_INCDIR}/
         for X in usb.h
         do
index 507b9ab..9c59407 100644 (file)
@@ -31,11 +31,11 @@ do_stage () {
                install -m 0644 ${S}/libexslt/$i ${STAGING_INCDIR}/libexslt/$i
        done
 
-       cat xslt-config | sed -e "s,^prefix=.*,prefix=${STAGING_BINDIR}/..," \
-                            -e "s,^exec_prefix=.*,exec_prefix=${STAGING_BINDIR}/..," \
+       cat xslt-config | sed -e "s,^prefix=.*,prefix=${STAGING_DIR}/${HOST_SYS}," \
+                            -e "s,^exec_prefix=.*,exec_prefix=${STAGING_DIR}/${HOST_SYS}," \
                             -e "s,^includedir=.*,includedir=${STAGING_INCDIR}," \
-                            -e "s,^libdir=.*,libdir=${STAGING_LIBDIR}," > ${STAGING_BINDIR}/xslt-config
-       chmod a+rx ${STAGING_BINDIR}/xslt-config
+                            -e "s,^libdir=.*,libdir=${STAGING_LIBDIR}," > ${STAGING_BINDIR_CROSS}/xslt-config
+       chmod a+rx ${STAGING_BINDIR_CROSS}/xslt-config
        install -m 0644 libxslt.m4 ${STAGING_DATADIR}/aclocal/
 }
 
index 507b9ab..9c59407 100644 (file)
@@ -31,11 +31,11 @@ do_stage () {
                install -m 0644 ${S}/libexslt/$i ${STAGING_INCDIR}/libexslt/$i
        done
 
-       cat xslt-config | sed -e "s,^prefix=.*,prefix=${STAGING_BINDIR}/..," \
-                            -e "s,^exec_prefix=.*,exec_prefix=${STAGING_BINDIR}/..," \
+       cat xslt-config | sed -e "s,^prefix=.*,prefix=${STAGING_DIR}/${HOST_SYS}," \
+                            -e "s,^exec_prefix=.*,exec_prefix=${STAGING_DIR}/${HOST_SYS}," \
                             -e "s,^includedir=.*,includedir=${STAGING_INCDIR}," \
-                            -e "s,^libdir=.*,libdir=${STAGING_LIBDIR}," > ${STAGING_BINDIR}/xslt-config
-       chmod a+rx ${STAGING_BINDIR}/xslt-config
+                            -e "s,^libdir=.*,libdir=${STAGING_LIBDIR}," > ${STAGING_BINDIR_CROSS}/xslt-config
+       chmod a+rx ${STAGING_BINDIR_CROSS}/xslt-config
        install -m 0644 libxslt.m4 ${STAGING_DATADIR}/aclocal/
 }
 
index 9133fb6..f20aae2 100644 (file)
@@ -14,7 +14,6 @@ inherit autotools
 EXTRA_OECONF = " --without-x --disable-sdltest --with-sdl-exec-prefix=${STAGING_DIR}/${BUILD_SYS} "
 
 do_configure() {
-       PATH=${STAGING_BINDIR}:$PATH
        gnu-configize
        oe_runconf
 }
index 062162e..88d1f6a 100644 (file)
@@ -19,7 +19,6 @@ inherit autotools
 EXTRA_OECONF = " --without-x --disable-sdltest --with-sdl-exec-prefix=${STAGING_DIR}/${BUILD_SYS} "
 
 do_configure() {
-       PATH=${STAGING_BINDIR}:$PATH
        gnu-configize
        oe_runconf
 }
index a2a28ce..1aecd20 100644 (file)
@@ -11,14 +11,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/scummvm/scummvm-${PV}.tar.bz2 \
 
 inherit autotools
 
+export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
+
 EXTRA_OECONF = "--host=${HOST_SYS} \
                --backend=sdl \
-               --with-sdl-prefix=${STAGING_BINDIR}/.. \
                --disable-alsa \
                --with-ogg-prefix=${STAGING_LIBDIR}/.. \
                --with-vorbis-prefix=${STAGING_LIBDIR}/.. \
                --with-mpeg2-prefix=${STAGING_LIBDIR}/.. \
-               --with-mad-prefix=${STAGING_BINDIR}/.. "
+               --with-mad-prefix=${STAGING_BINDIR_CROSS}/.. "
 
 do_configure() {
        ./configure ${EXTRA_OECONF}
index ee107ed..41a3d3a 100644 (file)
@@ -9,7 +9,8 @@ do_compile() {
        oe_runmake CC="${CC} -m32" LD="${LD}" HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" OECFLAGS="${CFLAGS}" OELDFLAGS="-L${STAGING_LIBDIR} -rpath-link ${STAGING_LIBDIR}" NM="${TARGET_SYS}-nm"
 }
 
+# Should this package be installing into native? - not good... RP 
 do_stage() {
-       install tilo/maketilo ${STAGING_BINDIR}
-       install tilo/tilo.sh ${STAGING_BINDIR}
+       install tilo/maketilo ${STAGING_BINDIR_NATIVE}
+       install tilo/tilo.sh ${STAGING_BINDIR_NATIVE}
 }
index cf0ffa0..af849a7 100644 (file)
@@ -12,11 +12,11 @@ S = "${WORKDIR}/smpeg"
 
 inherit autotools
 
+export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
+
 CFLAGS_append = " -I${STAGING_INCDIR}/SDL"
 EXTRA_OECONF = "--disable-gtktest --disable-opengl-player --without-x \
-               --without-gtk --disable-gtk-player \
-               --with-sdl-prefix=${STAGING_LIBDIR}/.. \
-               --with-sdl-exec-prefix=${STAGING_BINDIR}/.."
+               --without-gtk --disable-gtk-player"
 
 do_configure_prepend () {
        touch NEWS AUTHORS ChangeLog
@@ -35,8 +35,8 @@ do_stage() {
         cat smpeg-config | sed -e "s,-I/usr/include/SDL,-I${STAGING_INCDIR}/SDL," \
                          | sed -e "s,-I/usr/include/smpeg, ," \
                          | sed -e "s,libdirs ,mickey_is_cool ," \
-                         | sed -e "s,-lSDL ,-lSDL-1.2 , "> ${STAGING_BINDIR}/smpeg-config
-        chmod a+rx ${STAGING_BINDIR}/smpeg-config
+                         | sed -e "s,-lSDL ,-lSDL-1.2 , "> ${STAGING_BINDIR_CROSS}/smpeg-config
+        chmod a+rx ${STAGING_BINDIR_CROSS}/smpeg-config
 }
 
 PACKAGES =+ "plaympeg "
index 5d8e5bb..f8f95e8 100644 (file)
@@ -10,11 +10,11 @@ SRC_URI = "http://rcdrummond.net/uae/e-uae-${PV}/e-uae-${PV}.tar.bz2 \
 
 inherit autotools
 
+export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
+
 EXTRA_OECONF = "--with-hostcc=gcc --disable-ui --without-x \
                --without-gtk --enable-jit --disable-natmem \
-               --with-zlib=${STAGING_LIBDIR}/.. \
-               --with-sdl-exec-prefix=${STAGING_BINDIR}/.. \
-               --with-sdl-prefix=${STAGING_LIBDIR}/.."
+               --with-zlib=${STAGING_LIBDIR}/.."
 
 CFLAGS_append = " -DSTAT_STATFS2_BSIZE=1 "
 CXXFLAGS_append = " -DSTAT_STATFS2_BSIZE=1 "