aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-05-21 19:57:11 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-05-21 19:57:11 +0000
commita763513dabf3c9ea2ee1243b20d9411d276eba11 (patch)
treef022d159d370a144a6334596e57da06347a0a612 /java
parente17751e9cf23008a5203ba54f073d65a4d09aab4 (diff)
downloadports-a763513dabf3c9ea2ee1243b20d9411d276eba11.tar.gz
ports-a763513dabf3c9ea2ee1243b20d9411d276eba11.zip
Notes
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6-jre/Makefile2
-rw-r--r--java/openjdk6/Makefile5
-rw-r--r--java/openjdk6/files/patch-set67
3 files changed, 62 insertions, 12 deletions
diff --git a/java/openjdk6-jre/Makefile b/java/openjdk6-jre/Makefile
index e4c29c2ab185..051f4402754c 100644
--- a/java/openjdk6-jre/Makefile
+++ b/java/openjdk6-jre/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
PKGNAMESUFFIX= -jre
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index 308a77baaece..3a9c7aae85ef 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -3,7 +3,7 @@
PORTNAME= openjdk6
PORTVERSION= b31
-PORTREVISION?= 2
+PORTREVISION?= 3
PORTEPOCH= 1
CATEGORIES= java devel
MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
@@ -245,7 +245,8 @@ post-patch:
${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
+ ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \
+ ${WRKSRC}/jdk/src/share/classes/sun/print/PSPrinterJob.java
.if ${PORT_OPTIONS:MPOLICY}
@${REINPLACE_CMD} -e 's|%%POLICY%%|unlimited|' \
${WRKSRC}/jdk/make/javax/crypto/Makefile
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set
index 79544a6c8255..555841a7e064 100644
--- a/java/openjdk6/files/patch-set
+++ b/java/openjdk6/files/patch-set
@@ -5272,17 +5272,42 @@
+}
--- jdk/src/share/classes/sun/print/PSPrinterJob.java
+++ jdk/src/share/classes/sun/print/PSPrinterJob.java
-@@ -1531,7 +1531,9 @@
+@@ -1531,9 +1531,33 @@
pFlags |= NOSHEET;
ncomps+=1;
}
- if (System.getProperty("os.name").equals("Linux")) {
+
+ String osname = System.getProperty("os.name");
-+ if (osname.equals("Linux") || osname.equals("FreeBSD") || osname.equals("NetBSD") || osname.equals("OpenBSD") || osname.equals("Darwin")) {
++ if (osname.equals("Linux") || osname.endsWith("BSD") || osname.contains("OS X")) {
++ String lprPath = "/usr/bin/lpr";
++ if (osname.endsWith("BSD")) {
++ final PrintService pservice = getPrintService();
++ Boolean isIPPPrinter =
++ (Boolean)java.security.AccessController.doPrivileged(
++ new java.security.PrivilegedAction() {
++ public Object run() {
++ try {
++ Class psClass =
++ Class.forName("sun.print.IPPPrintService");
++ if (psClass.isInstance(pservice)) {
++ return Boolean.TRUE;
++ }
++ } catch (Throwable t) {
++ }
++ return Boolean.FALSE;
++ }
++ });
++ if (isIPPPrinter) {
++ lprPath = "%%LOCALBASE%%/bin/lpr";
++ }
++ }
execCmd = new String[ncomps];
- execCmd[n++] = "/usr/bin/lpr";
+- execCmd[n++] = "/usr/bin/lpr";
++ execCmd[n++] = lprPath;
if ((pFlags & PRINTER) != 0) {
+ execCmd[n++] = new String("-P" + printer);
+ }
--- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
+++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
@@ -49,8 +49,12 @@
@@ -9279,19 +9304,43 @@
+}
--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
-@@ -119,7 +119,11 @@
+@@ -119,7 +119,9 @@
}
static boolean isBSD() {
- return osname.equals("Linux");
-+ return (osname.equals("Linux") ||
-+ osname.equals("FreeBSD") ||
-+ osname.equals("Darwin") ||
-+ osname.equals("NetBSD") ||
-+ osname.equals("OpenBSD"));
++ return (osname.equals("Linux") ||
++ osname.endsWith("BSD") ||
++ osname.contains("OS X"));
}
static final int UNINITIALIZED = -1;
+@@ -129,13 +131,13 @@
+ static int cmdIndex = UNINITIALIZED;
+
+ String[] lpcFirstCom = {
+- "/usr/sbin/lpc status | grep : | sed -ne '1,1 s/://p'",
++ "/usr/sbin/lpc status all | grep ':$' | sed -ne '1,1 s/://p'",
+ "/usr/sbin/lpc status | grep -E '^[ 0-9a-zA-Z_-]*@' | awk -F'@' '{print $1}'"
+ };
+
+ String[] lpcAllCom = {
+- "/usr/sbin/lpc status | grep : | sed -e 's/://'",
+- "/usr/sbin/lpc -a status | grep -E '^[ 0-9a-zA-Z_-]*@' | awk -F'@' '{print $1}' | sort"
++ "/usr/sbin/lpc status all | grep ':$' | sed -e 's/://'",
++ "/usr/sbin/lpc status all | grep -E '^[ 0-9a-zA-Z_-]*@' | awk -F'@' '{print $1}' | sort"
+ };
+
+ String[] lpcNameCom = {
+@@ -145,7 +147,7 @@
+
+
+ static int getBSDCommandIndex() {
+- String command = "/usr/sbin/lpc status";
++ String command = "/usr/sbin/lpc status all";
+ String[] names = execCmd(command);
+
+ if ((names == null) || (names.length == 0)) {
--- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java
+++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java
@@ -38,9 +38,6 @@