summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorschmonz <schmonz>2007-05-23 19:41:05 +0000
committerschmonz <schmonz>2007-05-23 19:41:05 +0000
commit1030138fc14427cb4ed86c4baeeefbc514a4914e (patch)
tree698a393a40fb39af89f0540bc8ce5a0573f769ec /bootstrap
parentaefb188771fb08856a8827b8ae2afeba9c71ac0a (diff)
downloadpkgsrc-1030138fc14427cb4ed86c4baeeefbc514a4914e.tar.gz
Add a --universal switch to enable building Universal binaries on
Mac OS X (off by default).
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/mkbinarykit21
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