]> granicus.if.org Git - libjpeg-turbo/commitdiff
Add iOS architectures to the shared libraries generated by the Mac/iOS packaging...
authorDRC <dcommander@users.sourceforge.net>
Fri, 19 Dec 2014 10:44:09 +0000 (10:44 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 19 Dec 2014 10:44:09 +0000 (10:44 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1447 632fc199-4ca6-4c93-a231-07263d6284db

BUILDING.txt
release/makemacpkg.in

index 5b5b7a497de5cfe86ef5d90f626652a2a2c88753..a19d8ce6bc71a91680f9c8e98bde9a1d08797387 100644 (file)
@@ -368,7 +368,7 @@ Set the following shell variables for simplicity:
 
 Follow the procedure under "Building libjpeg-turbo" above, adding
 
-  --host arm-apple-darwin10 --enable-static --disable-shared \
+  --host arm-apple-darwin10 \
     CC="$IOS_GCC" LD="$IOS_GCC" \
     CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
     LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS"
index 16c18deb3ce71b4b62303e92721351c55dae59a2..d0edecb0ae605bb538231dde2df3938fed1f99c9 100644 (file)
@@ -173,14 +173,55 @@ if [ $BUILDARMV6 = 1 ]; then
        pushd $BUILDDIRARMV6
        make install DESTDIR=$TMPDIR/dist.armv6
        popd
+       if [ ! -h $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+       elif [ ! -h $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
+       fi
        lipo -create \
                $PKGROOT/$LIBDIR/libjpeg.a \
                -arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.a \
                -output $PKGROOT/$LIBDIR/libjpeg.a
+       lipo -create \
+               $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
+               -arch arm $TMPDIR/dist.armv6/$LIBDIR/libturbojpeg.0.dylib \
+               -output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
        lipo -create \
                $PKGROOT/$LIBDIR/libturbojpeg.a \
                -arch arm $TMPDIR/dist.armv6/$LIBDIR/libturbojpeg.a \
                -output $PKGROOT/$LIBDIR/libturbojpeg.a
+       lipo -create \
+               $PKGROOT/$BINDIR/cjpeg \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/cjpeg \
+               -output $PKGROOT/$BINDIR/cjpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/djpeg \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/djpeg \
+               -output $PKGROOT/$BINDIR/djpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/jpegtran \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/jpegtran \
+               -output $PKGROOT/$BINDIR/jpegtran
+       lipo -create \
+               $PKGROOT/$BINDIR/tjbench \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/tjbench \
+               -output $PKGROOT/$BINDIR/tjbench
+       lipo -create \
+               $PKGROOT/$BINDIR/rdjpgcom \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/rdjpgcom \
+               -output $PKGROOT/$BINDIR/rdjpgcom
+       lipo -create \
+               $PKGROOT/$BINDIR/wrjpgcom \
+               -arch arm $TMPDIR/dist.armv6/$BINDIR/wrjpgcom \
+               -output $PKGROOT/$BINDIR/wrjpgcom
 fi
 
 if [ $BUILDARMV7 = 1 ]; then
@@ -196,14 +237,55 @@ if [ $BUILDARMV7 = 1 ]; then
        pushd $BUILDDIRARMV7
        make install DESTDIR=$TMPDIR/dist.armv7
        popd
+       if [ ! -h $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+       elif [ ! -h $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
+       fi
        lipo -create \
                $PKGROOT/$LIBDIR/libjpeg.a \
                -arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.a \
                -output $PKGROOT/$LIBDIR/libjpeg.a
+       lipo -create \
+               $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
+               -arch arm $TMPDIR/dist.armv7/$LIBDIR/libturbojpeg.0.dylib \
+               -output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
        lipo -create \
                $PKGROOT/$LIBDIR/libturbojpeg.a \
                -arch arm $TMPDIR/dist.armv7/$LIBDIR/libturbojpeg.a \
                -output $PKGROOT/$LIBDIR/libturbojpeg.a
+       lipo -create \
+               $PKGROOT/$BINDIR/cjpeg \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/cjpeg \
+               -output $PKGROOT/$BINDIR/cjpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/djpeg \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/djpeg \
+               -output $PKGROOT/$BINDIR/djpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/jpegtran \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/jpegtran \
+               -output $PKGROOT/$BINDIR/jpegtran
+       lipo -create \
+               $PKGROOT/$BINDIR/tjbench \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/tjbench \
+               -output $PKGROOT/$BINDIR/tjbench
+       lipo -create \
+               $PKGROOT/$BINDIR/rdjpgcom \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/rdjpgcom \
+               -output $PKGROOT/$BINDIR/rdjpgcom
+       lipo -create \
+               $PKGROOT/$BINDIR/wrjpgcom \
+               -arch arm $TMPDIR/dist.armv7/$BINDIR/wrjpgcom \
+               -output $PKGROOT/$BINDIR/wrjpgcom
 fi
 
 if [ $BUILDARMV7S = 1 ]; then
@@ -219,14 +301,55 @@ if [ $BUILDARMV7S = 1 ]; then
        pushd $BUILDDIRARMV7S
        make install DESTDIR=$TMPDIR/dist.armv7s
        popd
+       if [ ! -h $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+       elif [ ! -h $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
+               ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
+               lipo -create \
+                       $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+                       -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
+       fi
        lipo -create \
                $PKGROOT/$LIBDIR/libjpeg.a \
                -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.a \
                -output $PKGROOT/$LIBDIR/libjpeg.a
+       lipo -create \
+               $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
+               -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libturbojpeg.0.dylib \
+               -output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
        lipo -create \
                $PKGROOT/$LIBDIR/libturbojpeg.a \
                -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libturbojpeg.a \
                -output $PKGROOT/$LIBDIR/libturbojpeg.a
+       lipo -create \
+               $PKGROOT/$BINDIR/cjpeg \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/cjpeg \
+               -output $PKGROOT/$BINDIR/cjpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/djpeg \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/djpeg \
+               -output $PKGROOT/$BINDIR/djpeg
+       lipo -create \
+               $PKGROOT/$BINDIR/jpegtran \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/jpegtran \
+               -output $PKGROOT/$BINDIR/jpegtran
+       lipo -create \
+               $PKGROOT/$BINDIR/tjbench \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/tjbench \
+               -output $PKGROOT/$BINDIR/tjbench
+       lipo -create \
+               $PKGROOT/$BINDIR/rdjpgcom \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/rdjpgcom \
+               -output $PKGROOT/$BINDIR/rdjpgcom
+       lipo -create \
+               $PKGROOT/$BINDIR/wrjpgcom \
+               -arch arm $TMPDIR/dist.armv7s/$BINDIR/wrjpgcom \
+               -output $PKGROOT/$BINDIR/wrjpgcom
 fi
 
 install_name_tool -id $LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
@@ -259,7 +382,7 @@ productbuild --distribution $SRCDIR/release/Distribution.xml \
        --package-path $TMPDIR/pkg/ --resources $TMPDIR/pkg/ \
        $TMPDIR/dmg/$PACKAGE_NAME.pkg
 hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
-       -srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg 
-cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg . 
+       -srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
 
 exit