diff options
author | schmonz <schmonz@pkgsrc.org> | 2007-05-23 19:41:05 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2007-05-23 19:41:05 +0000 |
commit | 956c7893585a607159feefddb47d5a8d9a969338 (patch) | |
tree | 698a393a40fb39af89f0540bc8ce5a0573f769ec /bootstrap | |
parent | b328843d3efa2f754981047946e1ed350a6bbe43 (diff) | |
download | pkgsrc-956c7893585a607159feefddb47d5a8d9a969338.tar.gz |
Add a --universal switch to enable building Universal binaries on
Mac OS X (off by default).
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/mkbinarykit | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/bootstrap/mkbinarykit b/bootstrap/mkbinarykit index eb03556c103..9eec318a4d2 100755 --- a/bootstrap/mkbinarykit +++ b/bootstrap/mkbinarykit @@ -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 @@ die() 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 @@ case "$opsys" in 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 @@ while [ $# -gt 0 ]; do --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 |