Modify OS X universal binary creation process to give the user more control over the 32-bit fork (necessary for building universal binaries with libjpeg v7/v8b emulation, for instance)
This commit is contained in:
12
BUILDING.txt
12
BUILDING.txt
@@ -530,13 +530,15 @@ make dmg
|
|||||||
Create Macintosh package/disk image. This requires the PackageMaker
|
Create Macintosh package/disk image. This requires the PackageMaker
|
||||||
application, which must be installed in /Developer/Applications/Utilities.
|
application, which must be installed in /Developer/Applications/Utilities.
|
||||||
|
|
||||||
make udmg
|
make udmg [BUILDDIR32={32-bit build directory}]
|
||||||
|
|
||||||
On 64-bit OS X systems, this creates a version of the Macintosh package and
|
On 64-bit OS X systems, this creates a version of the Macintosh package and
|
||||||
disk image which contains universal i386/x86-64 binaries. The 32-bit fork of
|
disk image which contains universal i386/x86-64 binaries. You should first
|
||||||
these binaries is backward compatible with OS X 10.4 and later. The 64-bit
|
configure a 32-bit out-of-tree build of libjpeg-turbo, then configure a
|
||||||
fork can be made backward compatible as well by using the instructions in
|
64-bit out-of-tree build, then run 'make udmg' from the 64-bit build
|
||||||
the "Build Recipes" section. OS X 10.4 compatibility SDK required.
|
directory. The build system will look for the 32-bit build under
|
||||||
|
{source_directory}/osxx86 by default, but you can override this by setting
|
||||||
|
the BUILDDIR32 variable on the make command line as shown above.
|
||||||
|
|
||||||
make cygwinpkg
|
make cygwinpkg
|
||||||
|
|
||||||
|
|||||||
@@ -197,9 +197,11 @@ deb: all
|
|||||||
|
|
||||||
if X86_64
|
if X86_64
|
||||||
|
|
||||||
|
BUILDDIR32=${srcdir}/osxx86
|
||||||
|
|
||||||
udmg: all
|
udmg: all
|
||||||
sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
|
sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
|
||||||
${srcdir} universal
|
${srcdir} ${BUILDDIR32}
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ onexit()
|
|||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "$0 <package name> <version> <build> <source dir.> [universal]"
|
echo "$0 <package name> <version> <build> <source dir.> [32-bit build dir]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,8 @@ VERSION=$2
|
|||||||
BUILD=$3
|
BUILD=$3
|
||||||
SRCDIR=$4
|
SRCDIR=$4
|
||||||
if [ $# -gt 4 ]; then
|
if [ $# -gt 4 ]; then
|
||||||
if [ "$5" = "universal" ]; then UNIVERSAL=1; fi
|
BUILDDIR32=$5
|
||||||
|
UNIVERSAL=1
|
||||||
fi
|
fi
|
||||||
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||||
|
|
||||||
@@ -50,15 +51,16 @@ mkdir -p $PKGROOT/usr/include
|
|||||||
mv $PKGROOT/opt/$PACKAGE_NAME/include/turbojpeg.h $PKGROOT/usr/include
|
mv $PKGROOT/opt/$PACKAGE_NAME/include/turbojpeg.h $PKGROOT/usr/include
|
||||||
|
|
||||||
if [ $UNIVERSAL = 1 ]; then
|
if [ $UNIVERSAL = 1 ]; then
|
||||||
if [ ! -d $SRCDIR/osxx86 ]; then
|
if [ ! -d $BUILDDIR32 ]; then
|
||||||
mkdir -p $SRCDIR/osxx86
|
echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -f $BUILDDIR32/Makefile ]; then
|
||||||
|
echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
mkdir -p $TMPDIR/dist.x86
|
mkdir -p $TMPDIR/dist.x86
|
||||||
pushd $SRCDIR/osxx86
|
pushd $BUILDDIR32
|
||||||
sh $SRCDIR/configure --with-pic \
|
|
||||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
|
|
||||||
CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
|
|
||||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -m32'
|
|
||||||
make install DESTDIR=$TMPDIR/dist.x86
|
make install DESTDIR=$TMPDIR/dist.x86
|
||||||
popd
|
popd
|
||||||
if [ ! -h $TMPDIR/dist.x86/opt/$PACKAGE_NAME/lib/libjpeg.62.dylib -a \
|
if [ ! -h $TMPDIR/dist.x86/opt/$PACKAGE_NAME/lib/libjpeg.62.dylib -a \
|
||||||
|
|||||||
Reference in New Issue
Block a user