Request for review : FreeType embedded in OSX packages

Henri Gomez henri.gomez at gmail.com
Sun Oct 14 15:53:45 PDT 2012


Here is a second patch.

This patch a stock libfreetype.dylib (aka without install_name_tool hack)
which make sanity test pass.
install_name_tool is now done at build time.

I released an OpenJDK 7 with Freetype 2.4.10 embedded here :

OpenJDK-OSX-1.7-universal-u-jdk-u10-b09-20121015.dmg<http://openjdk-osx-build.googlecode.com/files/OpenJDK-OSX-1.7-universal-u-jdk-u10-b09-20121015.dmg>

Thanks for new patch review

2012/10/14 Henri Gomez <henri.gomez at gmail.com>

> Hi to all,
>
> libfontmanager requires freetype.
> In SnowLeopard and Lion, Freetype is  and since Mountain Lion
> Here's a patch for OpenJDK 7 and OSX to embed FreeType in build when
> ALT_FREETYPE_LIB_PATH is defined.
>
> Patch will get libfreetype.dylib under ALT_FREETYPE_LIB_PATH and copy it
> in jre/lib and libfontmanager.dylib will reference it via @rpath.
>
> Sample output here :
>
>
> build/macosx-universal/j2sdk-bundle/jdk1.7.0.jdk/Contents/Home/jre/lib/libfontmanager.dylib:
> @rpath/libfontmanager.dylib (compatibility version 1.0.0, current version
> 1.0.0)
> @rpath/libfreetype.dylib (compatibility version 16.0.0, current version
> 16.0.0)
> @rpath/libawt.dylib (compatibility version 1.0.0, current version 1.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 159.1.0)
> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
> 52.0.0)
> @rpath/libjava.dylib (compatibility version 1.0.0, current version 1.0.0)
> @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)
>
> I build FreeType 2.4.10 like this :
>
> ./configure --prefix=$DROP_DIR/freetype CC=/usr/bin/clang 'CFLAGS=-pipe
> -Os -arch i386 -arch x86_64' \
> 'LDFLAGS=-arch i386 -arch x86_64' CXX=/usr/bin/clang++ 'CXXFLAGS=-pipe -Os
> -arch i386 -arch x86_64' \
> --disable-static --with-old-mac-fonts
>
> cp $DROP_DIR/freetype/lib/libfreetype.6.dylib
> $DROP_DIR/freetype/lib/libfreetype.dylib
> install_name_tool -id @rpath/libfreetype.dylib
> $DROP_DIR/freetype/lib/libfreetype.dylib
>
> otool -L libfreetype.lib :
>
>
> build/macosx-universal/j2sdk-bundle/jdk1.7.0.jdk/Contents/Home/jre/lib/libfreetype.dylib:
> @rpath/libfreetype.dylib (compatibility version 16.0.0, current version
> 16.0.0)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version
> 1.0.5)
> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
> (compatibility version 1.0.0, current version 53.0.0)
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
> (compatibility version 1.0.0, current version 41.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 159.1.0)
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> (compatibility version 150.0.0, current version 635.21.0)
>
> Patch done against latest jdk7u.
>
> Thanks to review
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetype-osx.patch
Type: application/octet-stream
Size: 1739 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/jdk7u-dev/attachments/20121015/aaf907c3/freetype-osx.patch 


More information about the jdk7u-dev mailing list