pkgsrc/lang/openjdk7/patches/patch-jdk_make_sun_awt_Makefile
jperkin 8fb76ee717 Add SunOS/GCC support. With huge thanks to "jesse" from #SmartOS who did the
bulk of the porting work.  Tested on SmartOS 32-bit.  64-bit builds currently
fail, they should hopefully be fixed soon.
2013-06-15 09:31:05 +00:00

70 lines
2 KiB
Text

$NetBSD: patch-jdk_make_sun_awt_Makefile,v 1.1 2013/06/15 09:31:06 jperkin Exp $
GCC support.
--- jdk/make/sun/awt/Makefile.orig 2013-06-11 14:02:41.501545894 +0000
+++ jdk/make/sun/awt/Makefile
@@ -94,6 +94,7 @@ ifeq ($(PLATFORM), solaris)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
+ifneq ($(CC_VERSION), gcc)
ifeq ($(CC_VER), 5.8)
ifndef REMOVE_ALL_WORKAROUNDS
ifeq ($(ARCH_FAMILY), i586)
@@ -114,6 +115,7 @@ ifeq ($(CC_VER), 5.8)
endif
endif
endif
+endif # ! CC_VERSION
endif
ifeq ($(PLATFORM), linux)
@@ -427,7 +429,15 @@ FONTCONFIGS_SRC = $(PLATFORM_SRC)/classe
_FONTCONFIGS = \
fontconfig.properties
-FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
+ifndef DISTRO
+ DISTRO=$(PLATFORM)
+endif # DISTRO
+
+ifeq ($(DISTRO), pkgsrc)
+ FONTCONFIGS_SRC_PREFIX = pkgsrc.
+else
+ FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
+endif # DISTRO
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
endif # PLATFORM
@@ -543,12 +553,7 @@ ifneq ($(PLATFORM), windows)
# Other extra flags needed for compiling.
#
-ifeq ($(PLATFORM), linux)
-CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(OPENWIN_HOME)/include/X11/extensions \
- -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
-endif
-ifeq ($(PLATFORM), bsd)
+ifneq (,$(findstring $(PLATFORM), linux bsd solaris))
CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
endif
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
@@ -573,13 +578,10 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGD
$(EVENT_MODEL)
# include these last so we don't pick up unintentional includes
-ifeq ($(PLATFORM), bsd)
+ifneq (,$(findstring $(PLATFORM), linux bsd solaris))
CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(OPENWIN_HOME)/include/X11/extensions
-endif
-
-ifneq (,$(findstring $(PLATFORM), linux bsd))
-LDFLAGS += -L$(OPENWIN_LIB)
+ -I$(OPENWIN_HOME)/include/X11/extensions
+LDFLAGS += -L$(OPENWIN_LIB) -Wl,-R$(OPENWIN_LIB)
endif
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \