From owner-freebsd-java@FreeBSD.ORG  Thu Mar 13 14:53:11 2014
Return-Path: <owner-freebsd-java@FreeBSD.ORG>
Delivered-To: java@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 20515556;
 Thu, 13 Mar 2014 14:53:11 +0000 (UTC)
Received: from dd16522.kasserver.com (dd16522.kasserver.com [85.13.137.124])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id D8CDE129;
 Thu, 13 Mar 2014 14:53:10 +0000 (UTC)
Received: from mx12.chaot.net (82.131.85.135.cable.starman.ee [82.131.85.135])
 by dd16522.kasserver.com (Postfix) with ESMTPSA id 595258D4013;
 Thu, 13 Mar 2014 15:53:01 +0100 (CET)
Received: from localhost (1003@localhost [local]);
 by localhost (OpenSMTPD) with ESMTPA id 0a9c1257;
 Thu, 13 Mar 2014 16:53:00 +0200 (EET)
Date: Thu, 13 Mar 2014 16:52:59 +0200 (EET)
Message-Id: <15972966414163358595.enqueue@mx12.chaot.net>
User-Agent: OpenSMTPD enqueuer (Demoostik)
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] java/linux-sun-jre16: Stage
From: Johannes Jost Meixner <xmj@chaot.net>
X-send-pr-version: 3.113
X-GNATS-Notify: 
Cc: java@FreeBSD.org
X-BeenThere: freebsd-java@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Porting Java to FreeBSD <freebsd-java.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-java>,
 <mailto:freebsd-java-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-java/>
List-Post: <mailto:freebsd-java@freebsd.org>
List-Help: <mailto:freebsd-java-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-java>,
 <mailto:freebsd-java-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Mar 2014 14:53:11 -0000


>Submitter-Id:	current-users
>Originator:	Johannes Jost Meixner
>Organization:	Goldener Grund OUe
>Confidential:	no 
>Synopsis:	[PATCH] java/linux-sun-jre16: Stage
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 11.0-CURRENT amd64
>Environment:
System: FreeBSD mx12.chaot.net 11.0-CURRENT FreeBSD 11.0-CURRENT #4: Sun Mar  9 15:34:03 EET
>Description:
- StageDir

Port maintainer (java@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 1.00.2014.03.12 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- linux-sun-jre16-1.6.0.45.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 348075)
+++ Makefile	(working copy)
@@ -34,7 +34,6 @@
 PACKED_JARS=	lib/charsets lib/deploy lib/ext/localedata lib/javaws lib/jsse lib/plugin lib/rt
 UNPACK_CMD=	${WRKSRC}/bin/unpack200
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
@@ -56,18 +55,18 @@
 
 post-patch:
 	${REINPLACE_CMD} -i.orig -e 's:^#!/bin/bash:#!/bin/sh:' ${WRKSRC}/bin/jcontrol
-	@${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f
+	@${FIND} ${WRKSRC} -name '*.orig' -delete
 
 # XXX: This is missing a "${BRANDELF} -t Linux <executables>".
 
 do-install:
-	${MKDIR} ${APP_HOME}
+	${MKDIR} ${STAGEDIR}${APP_HOME}
 	cd ${WRKSRC} && ${FIND} . -print \
-	  | ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${APP_HOME}
+	  | ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${STAGEDIR}${APP_HOME}
 
 post-install:
-	${LOCALBASE}/bin/registervm "${APP_HOME}/bin/java # Linux-Sun-JRE${PORTVERSION}"
-	${SED} -e "s:%%JRE_HOME%%:${APP_HOME}:g" \
+	${SED} -e "s:%%JRE_HOME%%:${APP_HOME}:g; \
+		s:%%STAGEDIR%%:${STAGEDIR}:" \
 	  < ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
 	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
Index: files/pkg-install.in
===================================================================
--- files/pkg-install.in	(revision 348075)
+++ files/pkg-install.in	(working copy)
@@ -5,15 +5,15 @@
 
 # Set up system preferences during post install
 if [ "$2" = "POST-INSTALL" ]; then
-	if [ ! -d "${PREFS_LOCATION}/.systemPrefs" ] ; then
-		mkdir -m 755 "${PREFS_LOCATION}/.systemPrefs"
+	if [ ! -d "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs" ] ; then
+		mkdir -m 755 "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs"
 	fi
-	if [ ! -f "${PREFS_LOCATION}/.systemPrefs/.system.lock" ] ; then
-		touch "${PREFS_LOCATION}/.systemPrefs/.system.lock"
-		chmod 644 "${PREFS_LOCATION}/.systemPrefs/.system.lock"
+	if [ ! -f "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock" ] ; then
+		touch "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock"
+		chmod 644 "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock"
 	fi
-	if [ ! -f "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile" ] ; then
-		touch "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
-		chmod 644 "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
+	if [ ! -f "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile" ] ; then
+		touch "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
+		chmod 644 "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
 	fi
 fi
--- linux-sun-jre16-1.6.0.45.patch ends here ---