mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
Add support for java/icedtea-web. Clean up some patches while I am here.
This commit is contained in:
parent
821f22db1d
commit
86dcea5c7a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354182
@ -1,6 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
PKGNAMESUFFIX= ${JDK_MAJOR_VERSION}-jre
|
||||
|
||||
COMMENT= Java Runtime Environment ${JDK_MAJOR_VERSION}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= openjdk
|
||||
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
|
||||
PORTREVISION?= 4
|
||||
PORTREVISION?= 5
|
||||
CATEGORIES= java devel
|
||||
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/:jdk \
|
||||
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
|
||||
@ -96,6 +96,8 @@ TZUPDATE_DESC= Update the time zone data
|
||||
POLICY_CONFIGURE_ENABLE=unlimited-crypto
|
||||
TZUPDATE_RUN_DEPENDS= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo
|
||||
|
||||
JAVAVMS_COMMENT= OpenJDK${JDK_MAJOR_VERSION}
|
||||
|
||||
.if !defined(BUILD_JRE)
|
||||
OPTIONS_DEFINE+= TEST
|
||||
OPTIONS_DEFAULT+= RELEASE
|
||||
@ -113,6 +115,7 @@ TEST_CONFIGURE_ON= --with-jtreg=${WRKDIR}/jtreg
|
||||
TEST_DISTFILES= jtreg${JTREG_VERSION}-${JTREG_BUILD_NUMBER}.tar.gz:jtreg
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-debug-symbols
|
||||
JAVAVMS_COMMENT+= JRE
|
||||
.endif
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
@ -197,6 +200,7 @@ post-patch:
|
||||
${WRKSRC}/jdk/src/bsd/doc/man/*.1
|
||||
@${REINPLACE_CMD} -e 's|%%ICONV_CPPFLAGS%%|${ICONV_CPPFLAGS}|' \
|
||||
-e 's|%%ICONV_LDFLAGS%%|${ICONV_LDFLAGS}|' \
|
||||
${WRKSRC}/jdk/make/lib/Awt2dLibraries.gmk \
|
||||
${WRKSRC}/jdk/make/lib/CoreLibraries.gmk \
|
||||
${WRKSRC}/jdk/make/lib/ServiceabilityLibraries.gmk
|
||||
@${CHMOD} 755 ${WRKSRC}/configure
|
||||
@ -237,10 +241,6 @@ do-install:
|
||||
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
|
||||
@${FIND} ${STAGEDIR}${INSTALLDIR} -type d | ${SORT} -r | \
|
||||
${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
||||
.if !defined(BUILD_JRE)
|
||||
@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}'" >> ${TMPPLIST}
|
||||
.else
|
||||
@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION} JRE'" >> ${TMPPLIST}
|
||||
.endif
|
||||
@${ECHO} "@exec ${LOCALBASE}/bin/registervm '${INSTALLDIR}/bin/java # ${JAVAVMS_COMMENT}'" >> ${TMPPLIST}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -141,33 +141,41 @@
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
|
||||
--- hotspot/make/bsd/makefiles/build_vm_def.sh
|
||||
+++ hotspot/make/bsd/makefiles/build_vm_def.sh
|
||||
@@ -1,12 +1,22 @@
|
||||
@@ -1,12 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
# If we're cross compiling use that path for nm
|
||||
-if [ "$CROSS_COMPILE_ARCH" != "" ]; then
|
||||
-NM=$ALT_COMPILER_PATH/nm
|
||||
+if [ "$CROSS_COMPILE_ARCH" != "" ]; then
|
||||
NM=$ALT_COMPILER_PATH/nm
|
||||
+ NM=$ALT_COMPILER_PATH/nm
|
||||
else
|
||||
NM=nm
|
||||
-NM=nm
|
||||
+ NM=nm
|
||||
fi
|
||||
|
||||
-$NM -Uj $* | awk '
|
||||
- { if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }
|
||||
- '
|
||||
+if [ "$(uname -s)" = Darwin ]; then
|
||||
+ $NM -Uj $* | awk '
|
||||
+ { if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }
|
||||
+ '
|
||||
+ exit
|
||||
+fi
|
||||
+$NM --defined-only $* \
|
||||
+ | awk '{
|
||||
+ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
|
||||
+ }' \
|
||||
+ | sort -u
|
||||
+case "$(uname -s)" in
|
||||
+Darwin )
|
||||
+ $NM -Uj $@ | awk '{
|
||||
+ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3
|
||||
+ }' ;;
|
||||
+OpenBSD )
|
||||
+ $NM $@ | awk '{
|
||||
+ if ($2 == "U") next
|
||||
+ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
|
||||
+ }' | sort -u ;;
|
||||
+* )
|
||||
+ $NM --defined-only $@ | awk '{
|
||||
+ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
|
||||
+ if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
|
||||
+ }' | sort -u ;;
|
||||
+esac
|
||||
--- hotspot/make/bsd/makefiles/debug.make
|
||||
+++ hotspot/make/bsd/makefiles/debug.make
|
||||
@@ -35,7 +35,10 @@
|
||||
@ -4408,6 +4416,15 @@
|
||||
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
@@ -1245,6 +1266,8 @@
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# Solaris still uses OPENWIN_LIB ..
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
|
||||
+ else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
+ LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -liconv -pthread
|
||||
else # .. all other Unixes can use X_LIBS
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
|
||||
endif
|
||||
--- jdk/make/lib/CoreLibraries.gmk
|
||||
+++ jdk/make/lib/CoreLibraries.gmk
|
||||
@@ -81,7 +81,7 @@
|
||||
@ -9990,14 +10007,3 @@
|
||||
|
||||
ifneq (,$$($1_BIN))
|
||||
$$(error BIN has been replaced with OBJECT_DIR)
|
||||
--- nashorn/test/script/jfx.js
|
||||
+++ nashorn/test/script/jfx.js
|
||||
@@ -89,7 +89,7 @@
|
||||
var sb = new StringBuffer(goldenDir);
|
||||
if (OSInfo.getOSType() == OSType.WINDOWS) {
|
||||
f2 = new File(sb.append(fsep + "windows.png").toString());
|
||||
- } else if (OSInfo.getOSType() == OSType.LINUX) {
|
||||
+ } else if (OSInfo.getOSType() == OSType.LINUX || OSInfo.getOSType() == OSType.BSD) {
|
||||
f2 = new File(sb.append(fsep + "linux.png").toString());
|
||||
} else if (OSInfo.getOSType() == OSType.MACOSX) {
|
||||
f2 = new File(sb.append(fsep + "macosx.png").toString());
|
||||
|
@ -1361,3 +1361,14 @@
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
--- nashorn/test/script/jfx.js
|
||||
+++ nashorn/test/script/jfx.js
|
||||
@@ -89,7 +89,7 @@
|
||||
var sb = new StringBuffer(goldenDir);
|
||||
if (OSInfo.getOSType() == OSType.WINDOWS) {
|
||||
f2 = new File(sb.append(fsep + "windows.png").toString());
|
||||
- } else if (OSInfo.getOSType() == OSType.LINUX) {
|
||||
+ } else if (OSInfo.getOSType() == OSType.LINUX || OSInfo.getOSType() == OSType.BSD) {
|
||||
f2 = new File(sb.append(fsep + "linux.png").toString());
|
||||
} else if (OSInfo.getOSType() == OSType.MACOSX) {
|
||||
f2 = new File(sb.append(fsep + "macosx.png").toString());
|
||||
|
20
java/openjdk8/files/patch-jdk-make-lib-Awt2dLibraries.gmk
Normal file
20
java/openjdk8/files/patch-jdk-make-lib-Awt2dLibraries.gmk
Normal file
@ -0,0 +1,20 @@
|
||||
--- jdk/make/lib/Awt2dLibraries.gmk
|
||||
+++ jdk/make/lib/Awt2dLibraries.gmk
|
||||
@@ -1243,6 +1243,8 @@
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
|
||||
+ else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
+ LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) %%ICONV_CPPFLAGS%%
|
||||
else
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
|
||||
endif
|
||||
@@ -1267,7 +1269,7 @@
|
||||
# Solaris still uses OPENWIN_LIB ..
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
|
||||
else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
- LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -liconv -pthread
|
||||
+ LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) %%ICONV_LDFLAGS%% -pthread
|
||||
else # .. all other Unixes can use X_LIBS
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
|
||||
endif
|
@ -0,0 +1,40 @@
|
||||
--- jdk/src/share/classes/sun/applet/AppletPanel.java
|
||||
+++ jdk/src/share/classes/sun/applet/AppletPanel.java
|
||||
@@ -68,7 +68,7 @@
|
||||
/**
|
||||
* The applet (if loaded).
|
||||
*/
|
||||
- Applet applet;
|
||||
+ protected Applet applet;
|
||||
|
||||
/**
|
||||
* Applet will allow initialization. Should be
|
||||
@@ -162,7 +162,8 @@
|
||||
* Creates a thread to run the applet. This method is called
|
||||
* each time an applet is loaded and reloaded.
|
||||
*/
|
||||
- synchronized void createAppletThread() {
|
||||
+ //Overridden by NetxPanel.
|
||||
+ protected synchronized void createAppletThread() {
|
||||
// Create a thread group for the applet, and start a new
|
||||
// thread to load the applet.
|
||||
String nm = "applet-" + getCode();
|
||||
@@ -306,7 +307,7 @@
|
||||
/**
|
||||
* Get an event from the queue.
|
||||
*/
|
||||
- synchronized AppletEvent getNextEvent() throws InterruptedException {
|
||||
+ protected synchronized AppletEvent getNextEvent() throws InterruptedException {
|
||||
while (queue == null || queue.isEmpty()) {
|
||||
wait();
|
||||
}
|
||||
@@ -692,7 +693,8 @@
|
||||
* applet event processing so that it can be gracefully interrupted from
|
||||
* things like HotJava.
|
||||
*/
|
||||
- private void runLoader() {
|
||||
+ //Overridden by NetxPanel.
|
||||
+ protected void runLoader() {
|
||||
if (status != APPLET_DISPOSE) {
|
||||
showAppletStatus("notdisposed");
|
||||
return;
|
@ -0,0 +1,66 @@
|
||||
--- jdk/src/share/classes/sun/applet/AppletViewerPanel.java
|
||||
+++ jdk/src/share/classes/sun/applet/AppletViewerPanel.java
|
||||
@@ -42,25 +42,25 @@
|
||||
*
|
||||
* @author Arthur van Hoff
|
||||
*/
|
||||
-class AppletViewerPanel extends AppletPanel {
|
||||
+public class AppletViewerPanel extends AppletPanel {
|
||||
|
||||
/* Are we debugging? */
|
||||
- static boolean debug = false;
|
||||
+ protected static boolean debug = false;
|
||||
|
||||
/**
|
||||
* The document url.
|
||||
*/
|
||||
- URL documentURL;
|
||||
+ protected URL documentURL;
|
||||
|
||||
/**
|
||||
* The base url.
|
||||
*/
|
||||
- URL baseURL;
|
||||
+ protected URL baseURL;
|
||||
|
||||
/**
|
||||
* The attributes of the applet.
|
||||
*/
|
||||
- Hashtable atts;
|
||||
+ protected Hashtable<String,String> atts;
|
||||
|
||||
/*
|
||||
* JDK 1.1 serialVersionUID
|
||||
@@ -70,7 +70,7 @@
|
||||
/**
|
||||
* Construct an applet viewer and start the applet.
|
||||
*/
|
||||
- AppletViewerPanel(URL documentURL, Hashtable atts) {
|
||||
+ protected AppletViewerPanel(URL documentURL, Hashtable<String,String> atts) {
|
||||
this.documentURL = documentURL;
|
||||
this.atts = atts;
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
* Get an applet parameter.
|
||||
*/
|
||||
public String getParameter(String name) {
|
||||
- return (String)atts.get(name.toLowerCase());
|
||||
+ return atts.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,12 +202,12 @@
|
||||
return (AppletContext)getParent();
|
||||
}
|
||||
|
||||
- static void debug(String s) {
|
||||
+ protected static void debug(String s) {
|
||||
if(debug)
|
||||
System.err.println("AppletViewerPanel:::" + s);
|
||||
}
|
||||
|
||||
- static void debug(String s, Throwable t) {
|
||||
+ protected static void debug(String s, Throwable t) {
|
||||
if(debug) {
|
||||
t.printStackTrace();
|
||||
debug(s);
|
Loading…
Reference in New Issue
Block a user