From: <har...@us...> - 2010-02-12 21:20:08
|
Revision: 4974 http://hugin.svn.sourceforge.net/hugin/?rev=4974&view=rev Author: harryvanderwolf Date: 2010-02-12 21:19:40 +0000 (Fri, 12 Feb 2010) Log Message: ----------- [OSX] Update libexiv2 script to be able to add the exiv2 binary to the tools as well Modified Paths: -------------- hugin/trunk/mac/ExternalPrograms/scripts/libexiv2.sh Modified: hugin/trunk/mac/ExternalPrograms/scripts/libexiv2.sh =================================================================== --- hugin/trunk/mac/ExternalPrograms/scripts/libexiv2.sh 2010-02-10 19:58:44 UTC (rev 4973) +++ hugin/trunk/mac/ExternalPrograms/scripts/libexiv2.sh 2010-02-12 21:19:40 UTC (rev 4974) @@ -86,7 +86,7 @@ CFLAGS="-isysroot $MACSDKDIR -arch $ARCH $ARCHARGs $OTHERARGs -O2 -dead_strip" \ CXXFLAGS="-isysroot $MACSDKDIR -arch $ARCH $ARCHARGs $OTHERARGs -O2 -dead_strip" \ CPPFLAGS="-I$REPOSITORYDIR/include" \ - LDFLAGS="-L$REPOSITORYDIR/lib -mmacosx-version-min=$OSVERSION -dead_strip -prebind" \ + LDFLAGS="-L$REPOSITORYDIR/lib -arch $ARCH -mmacosx-version-min=$OSVERSION -dead_strip -prebind" \ NEXT_ROOT="$MACSDKDIR" \ ./configure --prefix="$REPOSITORYDIR" --disable-dependency-tracking \ --host="$TARGET" --exec-prefix=$REPOSITORYDIR/arch/$ARCH \ @@ -106,10 +106,11 @@ cd ../../; cd src; - make $OTHERMAKEARGs lib; - make install-lib; +# make $OTHERMAKEARGs lib; +# make install-lib; + make $OTHERMAKEARGs; + make install cd ../; - done @@ -158,7 +159,52 @@ ln -sfn libexiv2.$EXIV2VER_M.dylib $REPOSITORYDIR/lib/libexiv2.dylib; fi +# merge execs +for program in bin/exiv2 +do + + if [ $NUMARCH -eq 1 ] ; then + if [ -f $REPOSITORYDIR/arch/$ARCHS/$program ] ; then + echo "Moving arch/$ARCHS/$program to $program" + mv "$REPOSITORYDIR/arch/$ARCHS/$program" "$REPOSITORYDIR/$program"; + strip -x "$REPOSITORYDIR/$program"; + continue + else + echo "Program arch/$ARCHS/$program not found. Aborting build"; + exit 1; + fi + fi + + LIPOARGs="" + + for ARCH in $ARCHS + do + if [ -f $REPOSITORYDIR/arch/$ARCH/$program ] ; then + echo "Adding arch/$ARCH/$program to bundle" + LIPOARGs="$LIPOARGs $REPOSITORYDIR/arch/$ARCH/$program" + else + echo "File arch/$ARCH/$program was not found. Aborting build"; + exit 1; + fi + done + + lipo $LIPOARGs -create -output "$REPOSITORYDIR/$program"; + strip -x "$REPOSITORYDIR/$program"; + +done + +# Last step for exiv2. exiv2 is linked during build against it's own libexiv2.dylib and therefore has an install_name +# based on the arch/$ARCH directory. We need to change that. Unfortunately we need to do it for every arch even +# though it is only mentioned once for one of the arc/$ARCHs. + +for ARCH in $ARCHS +do + install_name_tool -change $REPOSITORYDIR/arch/$ARCH/lib/libexiv2.$EXIV2VER_M.dylib $REPOSITORYDIR/lib/libexiv2.$EXIV2VER_M.dylib $REPOSITORYDIR/bin/exiv2 +done + + + #pkgconfig for ARCH in $ARCHS do This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |