> Does the JDK still build properly if you installed X11 and do not have your > own copy of libfreetype? I think that having the option of building with a > non-system-provided libfreetype.dylib is a good idea, but the main nightly > builds will continue to use X11 or XQuartz' library for the time being.
On my Lion build system, X11 is still installed but I activate my own copy of FreeType (2.4.10) by defining ALT_FREETYPE_LIB_PATH and ALT_FREETYPE_INCLUDE in old build, and it's this version who is used for build and embedding > To that end, a few comments. In: > > +++ jdk/make/common/Defs.gmk 2012-10-16 09:36:11.000000000 +0200 > @@ -180,7 +180,7 @@ > ifdef ALT_FREETYPE_LIB_PATH > FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) > ifeq ($(PLATFORM), macosx) > - USING_SYSTEM_FT_LIB=true > + USING_SYSTEM_FT_LIB=false > endif > -------- > > you could just get rid of the entire ifeq block, since USING_SYSTEM_FT_LIB > was initialized to false. > > In jdk/make/sun/font/Makefile: > -------- > - FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6 > + ifeq ($(PLATFORM), macosx) > + FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) > + OTHER_LDLIBS += -lfreetype > + else > + FREETYPE_LIB = > $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6 > + OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype > + endif > endif > - OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype > --------- When we set USING_SYSTEM_FT_LIB to false, provide FreeType lib (or dylib for OSX), will be copied and here I just set the correct name for freetypelib, ie libfreetype.dylib on OSX. I could eventually also be libfreetype.6.dylib but certainly not libfreetype.dylib.6 which is more Linux way to handle lib versions. > I don't think you want to remove '-L$(FREETYPE_LIB_PATH)' in the macosx case. > If it was overridden by ALT_FREETYPE_LIB_PATH the build won't be able to find > the pre-build libfreetype.dylib. And if you still want to use the > system-provided libfreetype you have to give it the path to the X11 libraries. Are you sure ? It's not found inside build lib like -ljava for example which is not deployed on system of course. I used install_name_tool in copy block to set @rpath to have libfreetype set as expected. > You need to create a bug at <http://bugreport.sun.com/bugreport/> describing > what you want to change, and then attach a new patch. Mike's review plus one > other will be enough to get it into JDK 8. JDK 7u will need two reviewers, > since I think the Java2D team owns this part of the code. (I cc'd Phil Race). Nobody ever created such bug ? I remember Phil Race and Mike discussed about embedding FreeType in OSX build in May 2012. I'm unsure other code/patch reviews for JDK7, 8 or MacOSXPort also have a bugreport associated but may be I miss something. If a bug ticket is absolutely required, I'll fill one. BTW, my own packages in openjdk-osx-build already use this patch so there is no more urgency for me, I provided them here to have them included in official repos but I could live with my own set of patches as I do for other parts.
