From owner-svn-ports-head@FreeBSD.ORG Wed May 21 20:06:18 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A0D2A3D; Wed, 21 May 2014 20:06:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA77D2B0F; Wed, 21 May 2014 20:06:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LK6HXN086402; Wed, 21 May 2014 20:06:17 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4LK6H14086398; Wed, 21 May 2014 20:06:17 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201405212006.s4LK6H14086398@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 May 2014 20:06:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r354762 - in head/java: openjdk8 openjdk8-jre openjdk8/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 20:06:18 -0000 Author: jkim Date: Wed May 21 20:06:16 2014 New Revision: 354762 URL: http://svnweb.freebsd.org/changeset/ports/354762 QAT: https://qat.redports.org/buildarchive/r354762/ Log: Fix printing services. When CUPS is used, ${LOCALBASE}/bin/lpr must be used to print a generated PostScript file. When lpd(8) is used, lpr(1) from base must be used. Also, status command for lpc(8) requires a printer name. If no argument is specified, i.e., "/usr/sbin/lpc status", then it displays the command usage, i.e., "usage: status {all | printer ...}". Unfortunately, "usage" is interpreted as a printer name because ":" is included. Add "all" and adjust an expression for grep(1). Added: head/java/openjdk8/files/patch-jdk-src-share-classes-sun-print-PSPrinterJob.java (contents, props changed) Modified: head/java/openjdk8-jre/Makefile head/java/openjdk8/Makefile head/java/openjdk8/files/patch-bsd Modified: head/java/openjdk8-jre/Makefile ============================================================================== --- head/java/openjdk8-jre/Makefile Wed May 21 20:03:14 2014 (r354761) +++ head/java/openjdk8-jre/Makefile Wed May 21 20:06:16 2014 (r354762) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 2 +PORTREVISION= 3 PKGNAMESUFFIX= ${JDK_MAJOR_VERSION}-jre COMMENT= Java Runtime Environment ${JDK_MAJOR_VERSION} Modified: head/java/openjdk8/Makefile ============================================================================== --- head/java/openjdk8/Makefile Wed May 21 20:03:14 2014 (r354761) +++ head/java/openjdk8/Makefile Wed May 21 20:06:16 2014 (r354762) @@ -2,7 +2,7 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//} -PORTREVISION?= 6 +PORTREVISION?= 7 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 \ @@ -195,6 +195,7 @@ post-patch: ${WRKSRC}/common/autoconf/toolchain.m4 \ ${WRKSRC}/configure \ ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \ + ${WRKSRC}/jdk/src/share/classes/sun/print/PSPrinterJob.java \ ${WRKSRC}/jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java @${REINPLACE_CMD} -e 's|/usr/local/java/classes|${LOCALBASE}/share/java/classes|' \ ${WRKSRC}/jdk/src/bsd/doc/man/*.1 Modified: head/java/openjdk8/files/patch-bsd ============================================================================== --- head/java/openjdk8/files/patch-bsd Wed May 21 20:03:14 2014 (r354761) +++ head/java/openjdk8/files/patch-bsd Wed May 21 20:06:16 2014 (r354762) @@ -8328,7 +8328,19 @@ /* * Prevent recursions. Since LD_LIBRARY_PATH is the one which will be set by -@@ -928,9 +934,13 @@ +@@ -900,8 +906,9 @@ + * onwards the filename returned in DL_info structure from dladdr is + * an absolute pathname so technically realpath isn't required. + * On Linux we read the executable name from /proc/self/exe. +- * As a fallback, and for platforms other than Solaris and Linux, +- * we use FindExecName to compute the executable name. ++ * On FreeBSD we read the executable name from /proc/curproc/file. ++ * As a fallback, and for platforms other than Solaris, Linux, and ++ * FreeBSD, we use FindExecName to compute the executable name. + */ + const char* + SetExecname(char **argv) +@@ -928,9 +935,13 @@ } } } @@ -8343,7 +8355,7 @@ char buf[PATH_MAX+1]; int len = readlink(self, buf, PATH_MAX); if (len >= 0) { -@@ -938,7 +948,7 @@ +@@ -938,7 +949,7 @@ exec_path = JLI_StringDup(buf); } } @@ -8352,7 +8364,7 @@ { /* Not implemented */ } -@@ -1000,7 +1010,7 @@ +@@ -1000,7 +1011,7 @@ int ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) { int rslt; @@ -8361,7 +8373,7 @@ pthread_t tid; pthread_attr_t attr; pthread_attr_init(&attr); -@@ -1025,7 +1035,7 @@ +@@ -1025,7 +1036,7 @@ } pthread_attr_destroy(&attr); @@ -8370,7 +8382,7 @@ thread_t tid; long flags = 0; if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) { -@@ -1036,7 +1046,7 @@ +@@ -1036,7 +1047,7 @@ /* See above. Continue in current thread if thr_create() failed */ rslt = continuation(args); } @@ -8379,7 +8391,7 @@ return rslt; } -@@ -1044,13 +1054,13 @@ +@@ -1044,13 +1055,13 @@ #define MAX_PID_STR_SZ 20 void SetJavaLauncherPlatformProps() { @@ -8571,6 +8583,21 @@ osname.contains("OS X")); } +@@ -140,12 +141,12 @@ + 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 all | grep : | sed -e 's/://'", ++ "/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" + }; + --- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java +++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java @@ -266,7 +266,7 @@ Added: head/java/openjdk8/files/patch-jdk-src-share-classes-sun-print-PSPrinterJob.java ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk8/files/patch-jdk-src-share-classes-sun-print-PSPrinterJob.java Wed May 21 20:06:16 2014 (r354762) @@ -0,0 +1,34 @@ +--- jdk/src/share/classes/sun/print/PSPrinterJob.java ++++ jdk/src/share/classes/sun/print/PSPrinterJob.java +@@ -1588,8 +1588,30 @@ + + String osname = System.getProperty("os.name"); + 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++] = lprPath; + if ((pFlags & PRINTER) != 0) { + execCmd[n++] = "-P" + printer; + }