pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

java-gson: Add configure and build stage



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Nov 20 13:28:40 2020 +0100
Changeset:	a118acb5f28f7a30c1f7f960899f1bf9bd08571b

Modified Files:
	java-gson/Makefile

Log Message:
java-gson: Add configure and build stage

Still not working.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a118acb5f28f7a30c1f7f960899f1bf9bd08571b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 java-gson/Makefile | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diffs:
diff --git a/java-gson/Makefile b/java-gson/Makefile
index 182cfe41a1..b57a537813 100644
--- a/java-gson/Makefile
+++ b/java-gson/Makefile
@@ -15,4 +15,35 @@ LICENSE=	apache-2.0
 WRKSRC=		${WRKDIR}/gson-gson-parent-${PKGVERSION_NOREV}
 USE_LANGUAGES=	# none
 
+USE_TOOLS+=     bash
+
+do-configure:
+	#XXX this assumes trusted CA certificates are in /etc/openssl/certs
+	cd ${WRKSRC} && \
+		for cert in /etc/openssl/certs/*.0; do \
+			/usr/pkg/java/openjdk11/bin/keytool -importcert \
+				-keystore ${WRKDIR}/keystore \
+				-noprompt -trustcacerts \
+				-storepass password -file "$$cert" \
+				-alias $$(basename "$$cert"); done
+
+USE_JAVA=	yes
+USE_JAVA2=	yes
+MAKE_ENV+=	JAVA_HOME=${PKG_JAVA_HOME}
+
+SUBST_CLASSES+=		gradle
+SUBST_STAGE.gradle=	pre-configure
+SUBST_MESSAGE.gradle=	Upgrading to newer gradle, supporting openjdk11
+SUBST_FILES.gradle=	gradle/wrapper/gradle-wrapper.properties
+SUBST_SED.gradle=	-e 's,gradle-4.4-all.zip,gradle-5.4.1-all.zip,'
+
+do-build:
+	${RUN} echo
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BASH} \
+		./gradlew \
+		-Djavax.net.ssl.trustStore=${WRKDIR}/keystore \
+		-Djavax.net.ssl.trustStorePassword=password \
+		build
+
+.include "../../mk/java-vm.mk"
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index