pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gradle: Clean up Makefile and launcher script.
Module Name: pkgsrc-wip
Committed By: asie <asiekierka%gmail.com@localhost>
Pushed By: asie
Date: Fri Jan 29 21:23:17 2016 +0100
Changeset: 20c67127aa01ba941a14a15dade717b2eb1bb92c
Modified Files:
gradle/Makefile
gradle/files/gradle-launcher
Log Message:
gradle: Clean up Makefile and launcher script.
* REPLACE_BASH/USE_TOOLS is used over hardcoded path/dependency.
* INSTALL_DATA is used where appropriate.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=20c67127aa01ba941a14a15dade717b2eb1bb92c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gradle/Makefile | 17 +++++++++--------
gradle/files/gradle-launcher | 10 ++++------
2 files changed, 13 insertions(+), 14 deletions(-)
diffs:
diff --git a/gradle/Makefile b/gradle/Makefile
index 01d4b2c..56068c2 100644
--- a/gradle/Makefile
+++ b/gradle/Makefile
@@ -8,20 +8,21 @@ EXTRACT_SUFX= .zip
MAINTAINER= asiekierka%gmail.com@localhost
HOMEPAGE= http://gradle.org/
-COMMENT= "Groovy-based Java build system"
+COMMENT= Groovy-based Java build system
LICENSE= apache-2.0
-DEPENDS+= bash-[0-9]*:../../shells/bash
-
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_JAVA= run
USE_JAVA2= yes
+USE_TOOLS+= bash:run
NO_BUILD= yes
pre-configure:
${CP} files/gradle-launcher ${WRKSRC}/gradle-launcher
+REPLACE_BASH+= gradle-launcher
+
SUBST_CLASSES+= launcher
SUBST_FILES.launcher= gradle-launcher
SUBST_STAGE.launcher= post-configure
@@ -35,11 +36,11 @@ INSTALLATION_DIRS+= lib/java/gradle/media share/doc/java/gradle
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/gradle-launcher ${DESTDIR}${PREFIX}/bin/gradle
- ${INSTALL_SCRIPT} ${WRKSRC}/lib/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib
- ${INSTALL_SCRIPT} ${WRKSRC}/lib/plugins/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib/plugins
- ${INSTALL_SCRIPT} ${WRKSRC}/lib/plugins/sonar/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib/plugins/sonar
- ${INSTALL_SCRIPT} ${WRKSRC}/media/*.icns ${DESTDIR}${PREFIX}/lib/java/gradle/media
- ${INSTALL_SCRIPT} ${WRKSRC}/getting-started.html ${DESTDIR}${PREFIX}/share/doc/java/gradle
+ ${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib
+ ${INSTALL_DATA} ${WRKSRC}/lib/plugins/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib/plugins
+ ${INSTALL_DATA} ${WRKSRC}/lib/plugins/sonar/*.jar ${DESTDIR}${PREFIX}/lib/java/gradle/lib/plugins/sonar
+ ${INSTALL_DATA} ${WRKSRC}/media/*.icns ${DESTDIR}${PREFIX}/lib/java/gradle/media
+ ${INSTALL_DATA} ${WRKSRC}/getting-started.html ${DESTDIR}${PREFIX}/share/doc/java/gradle
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/gradle/files/gradle-launcher b/gradle/files/gradle-launcher
index 711ecc8..e3304f0 100755
--- a/gradle/files/gradle-launcher
+++ b/gradle/files/gradle-launcher
@@ -1,14 +1,12 @@
-#!@PREFIX@/bin/bash
+#!/bin/bash
##############################################################################
##
-## Gradle start up script for UN*X
+## A modified version of Gradle's "bin/gradle" startup script,
+## adapted for pkgsrc.
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
APP_HOME="@APP_HOME@"
@@ -138,7 +136,7 @@ fi
function splitJvmOpts() {
JVM_OPTS=("$@")
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+eval splitJvmOpts $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.launcher.GradleMain "$@"
Home |
Main Index |
Thread Index |
Old Index