RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 13-Aug-2008 13:18:09 Branch: HEAD Handle: 2008081311180900 Modified files: rpm devtool.conf Log: macosx: easier cross-compilation by separating development tools and platform binaries Summary: Revision Changes Path 2.237 +42 -36 rpm/devtool.conf ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/devtool.conf ============================================================================ $ cvs diff -u -r2.236 -r2.237 devtool.conf --- rpm/devtool.conf 7 Aug 2008 07:16:46 -0000 2.236 +++ rpm/devtool.conf 13 Aug 2008 11:18:09 -0000 2.237 @@ -1054,6 +1054,7 @@ UNIVERSAL_CFLAGS="-isystem ${UNIVERSAL_SDK}/usr/include -isystem ${UNIVERSAL_SDK}/usr/include/gcc/darwin/3.3 -arch ppc" UNIVERSAL_LDFLAGS="-Wl,-syslibroot,${UNIVERSAL_SDK} -arch ppc" UNIVERSAL_TARGET="--host powerpc-apple-darwin7 --target powerpc-apple-darwin7" + platform=Panther @source %macosx %tiger @@ -1067,6 +1068,7 @@ UNIVERSAL_CFLAGS="-isysroot ${UNIVERSAL_SDK} -arch ppc -arch i386" UNIVERSAL_LDFLAGS="-arch ppc -arch i386" UNIVERSAL_TARGET="--host i686-apple-darwin8 --target i686-apple-darwin8" + platform=Tiger @source %macosx %leopard @@ -1080,6 +1082,7 @@ UNIVERSAL_CFLAGS="-isysroot ${UNIVERSAL_SDK} -arch ppc -arch i386" UNIVERSAL_LDFLAGS="-arch ppc -arch i386" UNIVERSAL_TARGET="--host i686-apple-darwin9 --target i686-apple-darwin9" + platform=Leopard @source %macosx %macosx @@ -1130,11 +1133,12 @@ # third-party base directory basemac="${DEVTOOL_SRCDIR}/../mac" + test ".$platform" == "." && platform="MacOSX" # needs subdir # prepare build environment prepare () { echo "++ establishing third-party area under ($basemac)" - for dir in "" src bin run; do + for dir in "" src bin bin/$platform run; do if [ ! -d "$basemac/$dir" ]; then mkdir $basemac/$dir || exit $? fi @@ -1155,6 +1159,8 @@ PATH="$PATH:/bin:/usr/bin:/sbin:/usr/sbin" export PATH + ### development tools (host native) + # GNU m4 (installed development tool) if [ ! -d "$basemac/bin/m4-${v_m4}" ]; then echo "++ building third-party development tool m4-${v_m4}" @@ -1302,14 +1308,14 @@ ) || exit $? fi - # universal binaries + ### universal binaries (cross-compiled) # Expat (uninstalled third-party library) - if [ ! -d "$basemac/bin/expat-${v_expat}" ]; then + if [ ! -d "$basemac/bin/$platform/expat-${v_expat}" ]; then echo "++ building third-party library expat-${v_expat}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf expat-${v_expat} - gzip -d -c ../src/expat-${v_expat}.tar.gz | gnutar xf - + gzip -d -c ../../src/expat-${v_expat}.tar.gz | gnutar xf - ( cd expat-${v_expat} CC="$UNIVERSAL_CC" \ CPPFLAGS="$UNIVERSAL_CPPFLAGS" \ @@ -1323,11 +1329,11 @@ fi # Neon (uninstalled third-party library) - if [ ! -d "$basemac/bin/neon-${v_neon}" ]; then + if [ ! -d "$basemac/bin/$platform/neon-${v_neon}" ]; then echo "++ building third-party library neon-${v_neon}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf neon-${v_neon} - gzip -d -c ../src/neon-${v_neon}.tar.gz | gnutar xf - + gzip -d -c ../../src/neon-${v_neon}.tar.gz | gnutar xf - ( cd neon-${v_neon} ( echo "ac_cv_path_KRB5_CONFIG=" ) >config.cache @@ -1353,15 +1359,15 @@ fi # BeeCrypt (uninstalled third-party library) - if [ ! -d "$basemac/bin/beecrypt-${v_beecrypt}" ]; then + if [ ! -d "$basemac/bin/$platform/beecrypt-${v_beecrypt}" ]; then echo "++ building third-party library beecrypt-${v_beecrypt}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf beecrypt-${v_beecrypt} - gzip -d -c ../src/beecrypt-${v_beecrypt}.tar.gz | gnutar xf - + gzip -d -c ../../src/beecrypt-${v_beecrypt}.tar.gz | gnutar xf - ( cd beecrypt-${v_beecrypt} - patch -p0 <../../src/beecrypt-${v_beecrypt}.patch - cp ../../src/config.guess-${v_config} config.guess - cp ../../src/config.sub-${v_config} config.sub + patch -p0 <../../../src/beecrypt-${v_beecrypt}.patch + cp ../../../src/config.guess-${v_config} config.guess + cp ../../../src/config.sub-${v_config} config.sub $SHTOOL subst \ -e 's;^[ ][ ]*#;#;' \ aes.c base64.c blowfish.c entropy.c fips186.c fips186.h md5.c \ @@ -1398,13 +1404,13 @@ fi # SQLite (uninstalled third-party library) - if [ ! -d "$basemac/bin/sqlite-${v_sqlite}" ]; then + if [ ! -d "$basemac/bin/$platform/sqlite-${v_sqlite}" ]; then echo "++ building third-party library sqlite-${v_sqlite}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf sqlite-${v_sqlite} - gzip -d -c ../src/sqlite-${v_sqlite}.tar.gz | gnutar xf - + gzip -d -c ../../src/sqlite-${v_sqlite}.tar.gz | gnutar xf - ( cd sqlite-${v_sqlite} - patch -p0 <../../src/sqlite-${v_sqlite}.patch + patch -p0 <../../../src/sqlite-${v_sqlite}.patch CC="$UNIVERSAL_CC" \ CPPFLAGS="$UNIVERSAL_CPPFLAGS" \ CFLAGS="-O2 -g $UNIVERSAL_CFLAGS" \ @@ -1422,13 +1428,13 @@ fi # POPT (uninstalled third-party library) - if [ ! -d "$basemac/bin/popt-${v_popt}" ]; then + if [ ! -d "$basemac/bin/$platform/popt-${v_popt}" ]; then echo "++ building third-party library popt-${v_popt}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf popt-${v_popt} - gzip -d -c ../src/popt-${v_popt}.tar.gz | gnutar xf - + gzip -d -c ../../src/popt-${v_popt}.tar.gz | gnutar xf - ( cd popt-${v_popt} - patch -p0 <../../src/popt-${v_popt}.patch + patch -p0 <../../../src/popt-${v_popt}.patch CC="$UNIVERSAL_CC" \ CPPFLAGS="$UNIVERSAL_CPPFLAGS -DPOPT_fprintf=fprintf" \ CFLAGS="-O2 -g $UNIVERSAL_CFLAGS" \ @@ -1446,13 +1452,13 @@ fi # PCRE (uninstalled third-party library) - if [ ! -d "$basemac/bin/pcre-${v_pcre}" ]; then + if [ ! -d "$basemac/bin/$platform/pcre-${v_pcre}" ]; then echo "++ building third-party library pcre-${v_pcre}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf pcre-${v_pcre} - gzip -d -c ../src/pcre-${v_pcre}.tar.gz | gnutar xf - + gzip -d -c ../../src/pcre-${v_pcre}.tar.gz | gnutar xf - ( cd pcre-${v_pcre} - patch -p0 <../../src/pcre-${v_pcre}.patch + patch -p0 <../../../src/pcre-${v_pcre}.patch $SHTOOL subst \ -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ configure @@ -1472,11 +1478,11 @@ fi # OSSP uuid (uninstalled third-party library) - if [ ! -d "$basemac/bin/uuid-${v_uuid}" ]; then + if [ ! -d "$basemac/bin/$platform/uuid-${v_uuid}" ]; then echo "++ building third-party library uuid-${v_uuid}" - ( cd $basemac/bin + ( cd $basemac/bin/$platform rm -rf uuid-${v_uuid} - gzip -d -c ../src/uuid-${v_uuid}.tar.gz | gnutar xf - + gzip -d -c ../../src/uuid-${v_uuid}.tar.gz | gnutar xf - ( cd uuid-${v_uuid} $SHTOOL subst \ -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ @@ -1538,12 +1544,12 @@ --with-file=internal \ --with-xar=internal \ --with-lzma=internal \ - --with-neon="$basemac/bin/neon-${v_neon}" \ - --with-beecrypt="$basemac/bin/beecrypt-${v_beecrypt}" \ - --with-sqlite="$basemac/bin/sqlite-${v_sqlite}" \ - --with-popt="$basemac/bin/popt-${v_popt}" \ - --with-pcre="$basemac/bin/pcre-${v_pcre}" \ - --with-uuid="$basemac/bin/uuid-${v_uuid}" \ + --with-neon="$basemac/bin/$platform/neon-${v_neon}" \ + --with-beecrypt="$basemac/bin/$platform/beecrypt-${v_beecrypt}" \ + --with-sqlite="$basemac/bin/$platform/sqlite-${v_sqlite}" \ + --with-popt="$basemac/bin/$platform/popt-${v_popt}" \ + --with-pcre="$basemac/bin/$platform/pcre-${v_pcre}" \ + --with-uuid="$basemac/bin/$platform/uuid-${v_uuid}" \ --with-perl \ --with-python \ --with-apidocs=auto \ @@ -1669,7 +1675,7 @@ fi # copy required popt.h library header to internal headers - cp -p "$basemac/bin/popt-${v_popt}/popt.h" /tmp/rpm-root/usr/local/include/rpm + cp -p "$basemac/bin/$platform/popt-${v_popt}/popt.h" /tmp/rpm-root/usr/local/include/rpm # don't leak private search paths, libraries and arch'es perl -ni -e "print unless /^Libs.private/" /tmp/rpm-root/usr/local/lib/pkgconfig/rpm.pc @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org