2020-07-16 17:46:47 +00:00
|
|
|
diff --git openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk openjdk/jdk/make/lib/Awt2dLibraries.gmk
|
|
|
|
--- openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk
|
|
|
|
+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk
|
|
|
|
@@ -665,18 +665,35 @@
|
|
|
|
endif
|
|
|
|
endif
|
2013-07-23 09:56:16 +00:00
|
|
|
|
2016-01-20 13:03:36 +00:00
|
|
|
+LIBLCMS_DIR := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms
|
|
|
|
+
|
|
|
|
+ifeq ($(USE_EXTERNAL_LCMS), true)
|
|
|
|
+ # If we're using an external library, we'll just need the wrapper part.
|
|
|
|
+ # By including it explicitely, all other files will be excluded.
|
|
|
|
+ BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
|
|
|
|
+ BUILD_LIBLCMS_HEADERS :=
|
|
|
|
+else
|
|
|
|
+ BUILD_LIBLCMS_INCLUDE_FILES :=
|
|
|
|
+ # If we're using the bundled library, we'll need to include it in the
|
|
|
|
+ # include path explicitly. Otherwise the system headers will be used.
|
|
|
|
+ BUILD_LIBLCMS_HEADERS := -I$(LIBLCMS_DIR)
|
|
|
|
+endif
|
|
|
|
+
|
2013-11-15 03:45:09 +00:00
|
|
|
# TODO: Update awt lib path when awt is converted
|
2016-01-20 13:03:36 +00:00
|
|
|
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
|
|
|
|
LIBRARY := lcms, \
|
2013-11-15 03:45:09 +00:00
|
|
|
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
2016-01-20 13:03:36 +00:00
|
|
|
- SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
|
|
|
|
+ SRC := $(LIBLCMS_DIR), \
|
|
|
|
+ INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
|
2013-11-15 03:45:09 +00:00
|
|
|
LANG := C, \
|
2016-01-20 13:03:36 +00:00
|
|
|
OPTIMIZATION := HIGHEST, \
|
|
|
|
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
|
|
|
|
-DCMS_DONT_USE_FAST_FLOOR \
|
|
|
|
$(SHARED_LIBRARY_FLAGS) \
|
|
|
|
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
|
|
|
|
- -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
|
|
|
|
+ -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
|
|
|
|
+ $(BUILD_LIBLCMS_HEADERS) \
|
|
|
|
+ $(LCMS_CFLAGS), \
|
|
|
|
CFLAGS_solaris := -xc99=no_lib, \
|
|
|
|
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
|
|
|
|
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
|
2020-07-16 17:46:47 +00:00
|
|
|
@@ -684,10 +701,10 @@
|
2016-01-20 13:03:36 +00:00
|
|
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
|
|
|
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
|
2013-11-15 03:45:09 +00:00
|
|
|
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
|
2016-01-20 13:03:36 +00:00
|
|
|
- LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
|
|
|
|
- LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
|
2013-11-15 03:45:09 +00:00
|
|
|
- LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
|
2016-01-20 13:03:36 +00:00
|
|
|
- LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
|
|
|
|
+ LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
|
|
|
|
+ LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm $(LCMS_LIBS), \
|
|
|
|
+ LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm $(LCMS_LIBS), \
|
|
|
|
+ LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm $(LCMS_LIBS),\
|
2013-11-15 03:45:09 +00:00
|
|
|
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
|
|
|
RC_FLAGS := $(RC_FLAGS) \
|
2016-01-20 13:03:36 +00:00
|
|
|
-D "JDK_FNAME=lcms.dll" \
|
2020-07-16 17:46:47 +00:00
|
|
|
diff --git openjdk.orig/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c
|
|
|
|
--- openjdk.orig/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c
|
|
|
|
+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c
|
2016-01-20 13:03:36 +00:00
|
|
|
@@ -30,7 +30,7 @@
|
|
|
|
#include "jni_util.h"
|
|
|
|
#include "Trace.h"
|
|
|
|
#include "Disposer.h"
|
|
|
|
-#include "lcms2.h"
|
|
|
|
+#include <lcms2.h>
|
|
|
|
#include "jlong.h"
|
2013-07-23 09:56:16 +00:00
|
|
|
|
|
|
|
|