Request for review : FreeType embedded in OSX packages

Andrew Hughes ahughes at redhat.com
Tue Oct 16 16:46:30 PDT 2012



----- Original Message -----
> 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
> 

Can you please not cross-post to multiple mailing lists?  This should be reviewed first
by macosx-port-dev for OpenJDK8, then a second proposal made for backport to 7u. I'm
receiving three copies of each post here.

As to the patch, from the point of view of building on GNU/Linux, from reading the patch, it won't
affect our builds so it's fine by me.  We definitely don't want freetype being copied into
trees on GNU/Linux.

Thanks,
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07



More information about the macosx-port-dev mailing list