pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/bootstrap Add a --universal switch to enable building ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cf2acff57343
branches:  trunk
changeset: 529082:cf2acff57343
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed May 23 19:41:05 2007 +0000

description:
Add a --universal switch to enable building Universal binaries on
Mac OS X (off by default).

diffstat:

 bootstrap/mkbinarykit |  21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 4ee70f6e86e5 -r cf2acff57343 bootstrap/mkbinarykit
--- a/bootstrap/mkbinarykit     Wed May 23 18:59:46 2007 +0000
+++ b/bootstrap/mkbinarykit     Wed May 23 19:41:05 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $NetBSD: mkbinarykit,v 1.20 2007/05/23 13:54:15 schmonz Exp $
+# $NetBSD: mkbinarykit,v 1.21 2007/05/23 19:41:05 schmonz Exp $
 #
 # Make a binary bootstrap kit and place it in targetdir (or current
 # working directory if not specified). The mk.conf.example file is
@@ -8,6 +8,17 @@
 # by using --mkconf. Run this program from the pkgsrc/bootstrap
 # directory.
 
+setenv_universal()
+{
+       case "$opsys" in
+               Darwin)
+                       ospro=universal
+                       export CFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
+                       export LDFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
+               ;;
+       esac
+}
+
 mkbinarykit_macpkg()
 {
        local macdestdir
@@ -49,7 +60,7 @@
 usage="Usage: $0 "'
        [ --force ] [ --targetdir=<tar target dir> ] [ --mkconf=<target> ]
        [ --no-build ] [ --workdir=<work dir> ] [ bootstrap script arguments ]
-       [ --fetch-cmd=<ftp command> ]'
+       [ --fetch-cmd=<ftp command> ] [ --universal ]'
 
 opsys=`uname -s | tr -d /-`
 osrev=`uname -r`
@@ -74,11 +85,6 @@
 AIX)
        pkgdbdir=$prefix/pkgdb
        ;;
-Darwin)
-       ospro=universal
-       export CFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
-       export LDFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
-       ;;
 DragonFly)
        case "$osrev" in
        1.1[0-9]*)
@@ -126,6 +132,7 @@
         --ignore-case-check) ignorecasecheck=yes ;;
         --ignore-user-check) ignoreusercheck=yes ;;
        --workdir=*)    wrkdir=`echo $1 | $sedprog -e 's|--workdir=||'` ;;
+       --universal)    setenv_universal ;;
         --*)            echo "$usage"; exit 1 ;;
         esac
         shift



Home | Main Index | Thread Index | Old Index