diff options
author | jkim <jkim@FreeBSD.org> | 2014-04-19 05:40:32 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-04-19 05:40:32 +0800 |
commit | eddbffd1705f7f5bfdcf354d8944cd1e3727f5a8 (patch) | |
tree | b6acd3fb97439c1106cb631685ac772f3e89286c /java | |
parent | b3e4da16b7d17a0b30f4c7c80a0cde1e1453f481 (diff) | |
download | freebsd-ports-gnome-eddbffd1705f7f5bfdcf354d8944cd1e3727f5a8.tar.gz freebsd-ports-gnome-eddbffd1705f7f5bfdcf354d8944cd1e3727f5a8.tar.zst freebsd-ports-gnome-eddbffd1705f7f5bfdcf354d8944cd1e3727f5a8.zip |
- Remove unnecessary use of chown to make it more staging friendly. [1]
- Use USES=shebangfix instead of rolling our own. Simplify and clean up.
Reported by: Andrzej Tobola (ato at iem dot pw dot edu dot pl)
Diffstat (limited to 'java')
-rw-r--r-- | java/linux-sun-jdk17/Makefile | 15 | ||||
-rw-r--r-- | java/linux-sun-jre17/Makefile | 17 |
2 files changed, 12 insertions, 20 deletions
diff --git a/java/linux-sun-jdk17/Makefile b/java/linux-sun-jdk17/Makefile index 12ed5f29293c..aadd2afd53f5 100644 --- a/java/linux-sun-jdk17/Makefile +++ b/java/linux-sun-jdk17/Makefile @@ -26,6 +26,7 @@ PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///} PORTVERSION=${PORTVERSION} NO_BUILD= yes USE_LINUX= yes USE_LINUX_APPS= xorglibs +USES= shebangfix ONLY_FOR_ARCHS= i386 amd64 JDK_VERSION= 7 @@ -35,8 +36,10 @@ DL_JDK_VERSION= ${JDK_INTERNAL_VERSION}_${JDK_UPDATE_VERSION} DOWNLOAD_URL= http://www.oracle.com/technetwork/java/javase/downloads/index.html APP_HOME= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME}${JDK_INTERNAL_VERSION} -SCRIPT_FILES= bin/jcontrol jre/bin/jcontrol BIN_DIRS= bin jre/bin +LIB_DIRS= ${BIN_DIRS:S|bin$|lib|} +SHEBANG_FILES= ${BIN_DIRS:S|$|/jcontrol|} +bash_CMD= ${SH} .include <bsd.port.pre.mk> @@ -74,19 +77,13 @@ post-extract: .endif post-patch: -.for script in ${SCRIPT_FILES} - @${REINPLACE_CMD} -i.orig -e 's:^#!/bin/bash:#!/bin/sh:' ${WRKSRC}/${script} -.endfor - @${FIND} ${WRKSRC} -name '*.orig' -delete @(cd ${WRKSRC}/include; ${LN} -s linux freebsd) do-install: @${MKDIR} ${STAGEDIR}${APP_HOME} @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${APP_HOME} -.for dir in ${BIN_DIRS} - @${CHOWN} -R ${BINOWN}:${BINGRP} "${STAGEDIR}${APP_HOME}/${dir}" - @${FIND} ${STAGEDIR}${APP_HOME}/${dir} -type f -exec "${CHMOD}" ${BINMODE} "{}" \; -.endfor + @cd ${STAGEDIR}${APP_HOME} && \ + ${CHMOD} ${BINMODE} ${BIN_DIRS:S|$|/*|} ${LIB_DIRS:S|$|/jexec|} post-install: ${MKDIR} ${STAGEDIR}${APP_HOME}/jre/.systemPrefs diff --git a/java/linux-sun-jre17/Makefile b/java/linux-sun-jre17/Makefile index 7cdbf83978da..eb5bfaaf8952 100644 --- a/java/linux-sun-jre17/Makefile +++ b/java/linux-sun-jre17/Makefile @@ -22,6 +22,7 @@ PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///} PORTVERSION=${PORTVERSION} NO_BUILD= yes USE_LINUX= yes USE_LINUX_APPS= xorglibs +USES= shebangfix ONLY_FOR_ARCHS= i386 amd64 JRE_VERSION= 7 @@ -31,8 +32,10 @@ DL_JRE_VERSION= ${JRE_INTERNAL_VERSION}_${JRE_UPDATE_VERSION} DOWNLOAD_URL= http://www.oracle.com/technetwork/java/javase/downloads/index.html APP_HOME= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME}${JRE_INTERNAL_VERSION} -SCRIPT_FILES= bin/jcontrol BIN_DIRS= bin +LIB_DIRS= ${BIN_DIRS:S|bin$|lib|} +SHEBANG_FILES= ${BIN_DIRS:S|$|/jcontrol|} +bash_CMD= ${SH} .include <bsd.port.pre.mk> @@ -43,19 +46,11 @@ IGNORE?=You must manually fetch the J2SE RE download for the Linux platform (${D pre-everything:: @${CAT} ${PKGMESSAGE} -post-patch: -.for script in ${SCRIPT_FILES} - @${REINPLACE_CMD} -i.orig -e 's:^#!/bin/bash:#!/bin/sh:' ${WRKSRC}/${script} -.endfor - @${FIND} ${WRKSRC} -name '*.orig' -delete - do-install: @${MKDIR} ${STAGEDIR}${APP_HOME} @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${APP_HOME} -.for dir in ${BIN_DIRS} - @${CHOWN} -R ${BINOWN}:${BINGRP} "${STAGEDIR}${APP_HOME}/${dir}" - @${FIND} ${STAGEDIR}${APP_HOME}/${dir} -type f -exec "${CHMOD}" ${BINMODE} "{}" \; -.endfor + @cd ${STAGEDIR}${APP_HOME} && \ + ${CHMOD} ${BINMODE} ${BIN_DIRS:S|$|/*|} ${LIB_DIRS:S|$|/jexec|} post-install: ${MKDIR} ${STAGEDIR}${APP_HOME}/.systemPrefs |