diff options
author | jkim <jkim@FreeBSD.org> | 2013-10-23 04:17:09 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-10-23 04:17:09 +0800 |
commit | 6a19c260412c65aa4406e90b4638471157469af1 (patch) | |
tree | 78e158475d454f5492368cd7f1a1939a4657e1ac /java | |
parent | 2f476e2b40ec5165b6c68a6fdceb7cba59006dba (diff) | |
download | freebsd-ports-gnome-6a19c260412c65aa4406e90b4638471157469af1.tar.gz freebsd-ports-gnome-6a19c260412c65aa4406e90b4638471157469af1.tar.zst freebsd-ports-gnome-6a19c260412c65aa4406e90b4638471157469af1.zip |
Allow overriding linker flags for standard C++ libraries and zlib.
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk6/Makefile | 13 | ||||
-rw-r--r-- | java/openjdk6/files/patch-set | 14 |
2 files changed, 18 insertions, 9 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile index 70d38215cd15..0d7b67e16321 100644 --- a/java/openjdk6/Makefile +++ b/java/openjdk6/Makefile @@ -189,6 +189,7 @@ ICONV_LIBS= ICONV_INCLUDE= -I${LOCALBASE}/include ICONV_LIBS= -L${LOCALBASE}/lib ${ICONV_LIB} .endif +ZLIB_LIBS?= -lz .if ${COMPILER_TYPE} == "clang" MAKE_ENV+= COMPILER_WARNINGS_FATAL=false @@ -224,12 +225,20 @@ post-extract: -e s/Linux/FreeBSD/g {} \; post-patch: - @${REINPLACE_CMD} \ - -e "s|%%ICONV_INC%%|${ICONV_INCLUDE}|" \ + @${REINPLACE_CMD} -e "s|%%CXX_LIBS%%|${CXX_LIBS}|" \ + ${WRKSRC}/corba/make/common/Defs-bsd.gmk \ + ${WRKSRC}/jdk/make/common/Defs-bsd.gmk + @${REINPLACE_CMD} -e "s|%%ICONV_INC%%|${ICONV_INCLUDE}|" \ -e "s|%%ICONV_LIB%%|${ICONV_LIBS}|" \ ${WRKSRC}/Makefile ${WRKSRC}/jdk/make/java/instrument/Makefile \ ${WRKSRC}/jdk/make/java/npt/Makefile \ ${WRKSRC}/jdk/make/sun/splashscreen/Makefile + @${REINPLACE_CMD} -e "s|%%ZLIB_LIBS%%|${ZLIB_LIBS}|" \ + ${WRKSRC}/jdk/make/com/sun/java/pack/Makefile \ + ${WRKSRC}/jdk/make/common/Program.gmk \ + ${WRKSRC}/jdk/make/java/jli/Makefile \ + ${WRKSRC}/jdk/make/java/zip/Makefile \ + ${WRKSRC}/jdk/make/tools/freetypecheck/Makefile @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|" \ ${WRKSRC}/hotspot/src/os/bsd/vm/os_bsd.cpp \ ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set index ea70b16ab96c..ecde6d1ba94e 100644 --- a/java/openjdk6/files/patch-set +++ b/java/openjdk6/files/patch-set @@ -128,7 +128,7 @@ override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic else -override LIBCXX = -lstdc++ -+override LIBCXX = ++override LIBCXX = %%CXX_LIBS%% endif override LIBPOSIX4 = override LIBSOCKET = @@ -1161,7 +1161,7 @@ OTHER_CXXFLAGS += $(ZINCLUDE) LDDFLAGS += $(ZIPOBJS) + else -+ LDDFLAGS += -lz ++ LDDFLAGS += %%ZLIB_LIBS%% + OTHER_CXXFLAGS += -DSYSTEM_ZLIB + endif else @@ -1400,7 +1400,7 @@ override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic else -override LIBCXX = -lstdc++ -+override LIBCXX = ++override LIBCXX = %%CXX_LIBS%% endif override LIBPOSIX4 = override LIBSOCKET = @@ -1515,7 +1515,7 @@ + LDFLAGS += -Wl,--export-dynamic + endif + ifeq ($(SYSTEM_ZLIB),true) -+ OTHER_LDLIBS += -lz ++ OTHER_LDLIBS += %%ZLIB_LIBS%% + endif +endif ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems @@ -2116,7 +2116,7 @@ +ifneq ($(SYSTEM_ZLIB),true) + OTHER_INCLUDES += -I$(ZIP_SRC) +else -+ LDLIBS += -lz ++ LDLIBS += %%ZLIB_LIBS%% +endif # @@ -2385,7 +2385,7 @@ # Link to JVM library for JVM_Zip* functions # +ifeq ($(SYSTEM_ZLIB),true) -+OTHER_LDLIBS = -lz ++OTHER_LDLIBS = %%ZLIB_LIBS%% +else OTHER_LDLIBS = $(JVMLIB) +endif @@ -2869,7 +2869,7 @@ - FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype + else + ifeq ($(PLATFORM), bsd) -+ FT_OPTIONS += -lfreetype -lz ++ FT_OPTIONS += -lfreetype %%ZLIB_LIBS%% + else # linux + FT_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype + endif |