make/copy/Copy-java.desktop.gmk

Print this page
rev 10871 : 8062312: OpenJDK build fails when bundling freetype libraries


  51   # used for adding dependencies to other objects
  52   # (e.g. libfontmanager.so).
  53   #
  54   # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
  55   # without overcomplicating logic here.
  56   # To workaround this we hardcode .6 suffix for now.
  57   #
  58   # Note that .so.6 library will not be found by System.loadLibrary()
  59   # but fortunately we need to load FreeType library explicitly
  60   # on windows only
  61   #
  62   #TODO: rework this to avoid hardcoding library name in the makefile
  63   #
  64   ifeq ($(OPENJDK_TARGET_OS), windows)
  65     FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
  66   else
  67     FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
  68   endif
  69 
  70   $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
  71         $(install-file)

  72         ifeq ($(OPENJDK_BUILD_OS), windows)
  73           $(CHMOD) +rx $@
  74         endif
  75 endif
  76 
  77 ################################################################################
  78 
  79 $(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
  80         $(call install-file)
  81 
  82 DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
  83 
  84 ################################################################################
  85 #
  86 # Copy property files from sun/print to LIB_DST_DIR
  87 #
  88 PSFONTPROPFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf
  89 PSFONTPROPFILE_SRCS := $(wildcard $(PSFONTPROPFILE_SRC_DIR)/psfont*.properties*)
  90 PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),$(PSFONTPROPFILE_SRCS))
  91 




  51   # used for adding dependencies to other objects
  52   # (e.g. libfontmanager.so).
  53   #
  54   # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
  55   # without overcomplicating logic here.
  56   # To workaround this we hardcode .6 suffix for now.
  57   #
  58   # Note that .so.6 library will not be found by System.loadLibrary()
  59   # but fortunately we need to load FreeType library explicitly
  60   # on windows only
  61   #
  62   #TODO: rework this to avoid hardcoding library name in the makefile
  63   #
  64   ifeq ($(OPENJDK_TARGET_OS), windows)
  65     FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
  66   else
  67     FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
  68   endif
  69 
  70   $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
  71         $(MKDIR) -p $(@D)
  72         $(CP) $< $@
  73         ifeq ($(OPENJDK_BUILD_OS), windows)
  74           $(CHMOD) +rx $@
  75         endif
  76 endif
  77 
  78 ################################################################################
  79 
  80 $(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
  81         $(call install-file)
  82 
  83 DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
  84 
  85 ################################################################################
  86 #
  87 # Copy property files from sun/print to LIB_DST_DIR
  88 #
  89 PSFONTPROPFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf
  90 PSFONTPROPFILE_SRCS := $(wildcard $(PSFONTPROPFILE_SRC_DIR)/psfont*.properties*)
  91 PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),$(PSFONTPROPFILE_SRCS))
  92