8001922: Improve freetype handling

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2013-10-23 13:06:37 +02:00
parent ce42afa263
commit e4ff601011
2 changed files with 25 additions and 27 deletions

View File

@ -215,7 +215,8 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
##########################################################################################
# make sure freetype dll will be available at runtime as well as link time
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
@ -232,22 +233,19 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifdef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
$(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
COPY_FILES += $(FREETYPE_LIB)
COPY_FILES += $(FREETYPE_TARGET_LIB)
endif
##########################################################################################

View File

@ -780,9 +780,9 @@ ifndef OPENJDK
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
else
FONT_HEADERS := $(FREETYPE2_CFLAGS)
FONT_HEADERS := $(FREETYPE_CFLAGS)
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
endif
LIBFONTMANAGER_OPTIMIZATION := HIGH