pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc
Module Name: pkgsrc
Committed By: asau
Date: Fri Dec 16 16:27:23 UTC 2016
Modified Files:
pkgsrc/mk: java-vm.mk
Added Files:
pkgsrc/lang/openjdk7: builtin.mk
pkgsrc/lang/openjdk8: builtin.mk
Log Message:
Enable OpenJDK 7 and 8 on Linux. Add builtin support.
Tested on openSUSE 11-42.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/openjdk7/builtin.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/openjdk8/builtin.mk
cvs rdiff -u -r1.107 -r1.108 pkgsrc/mk/java-vm.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/java-vm.mk
diff -u pkgsrc/mk/java-vm.mk:1.107 pkgsrc/mk/java-vm.mk:1.108
--- pkgsrc/mk/java-vm.mk:1.107 Wed Jul 13 14:16:17 2016
+++ pkgsrc/mk/java-vm.mk Fri Dec 16 16:27:23 2016
@@ -1,4 +1,4 @@
-# $NetBSD: java-vm.mk,v 1.107 2016/07/13 14:16:17 jperkin Exp $
+# $NetBSD: java-vm.mk,v 1.108 2016/12/16 16:27:23 asau Exp $
#
# This Makefile fragment handles Java dependencies and make variables,
# and is meant to be included by packages that require Java either at
@@ -139,6 +139,8 @@ _ONLY_FOR_PLATFORMS.sun-jdk6= \
SunOS-5.11-x86_64
_ONLY_FOR_PLATFORMS.openjdk7= \
DragonFly-*-* \
+ Linux-*-i[3-6]86 \
+ Linux-*-x86_64 \
NetBSD-[5-9]*-i386 \
NetBSD-[5-9]*-x86_64 \
NetBSD-[7-9]*-sparc64 \
@@ -147,6 +149,8 @@ _ONLY_FOR_PLATFORMS.openjdk7= \
SunOS-*-x86_64
_ONLY_FOR_PLATFORMS.openjdk8= \
DragonFly-*-* \
+ Linux-*-i[3-6]86 \
+ Linux-*-x86_64 \
NetBSD-[5-9]*-i386 \
NetBSD-[5-9]*-x86_64 \
NetBSD-[7-9]*-sparc64 \
Added files:
Index: pkgsrc/lang/openjdk7/builtin.mk
diff -u /dev/null pkgsrc/lang/openjdk7/builtin.mk:1.1
--- /dev/null Fri Dec 16 16:27:23 2016
+++ pkgsrc/lang/openjdk7/builtin.mk Fri Dec 16 16:27:23 2016
@@ -0,0 +1,73 @@
+BUILTIN_PKG:= openjdk7
+
+BUILTIN_FIND_FILES_VAR:= OJDK7
+BUILTIN_FIND_FILES.OJDK7= \
+ /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/bin/javac
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.openjdk7)
+. if empty(OJDK7:M__nonexistent__)
+IS_BUILTIN.openjdk7= yes
+. else
+IS_BUILTIN.openjdk7= no
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.openjdk7
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.openjdk7) && \
+ !empty(IS_BUILTIN.openjdk7:M[yY][eE][sS])
+BUILTIN_VERSION.openjdk7!= ${OJDK7} -version 2>&1 | ${SED} -Ee 's:^[^0-9]*([0-9._]+)$:\1:' -e 's/_/./g' -e 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.\4/'
+BUILTIN_PKG.openjdk7= openjdk7-$(BUILTIN_VERSION.openjdk7)
+.endif
+MAKEVARS+= BUILTIN_PKG.openjdk7
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.openjdk7)
+. if ${PREFER.openjdk7} == "pkgsrc"
+USE_BUILTIN.openjdk7= no
+. else
+USE_BUILTIN.openjdk7= ${IS_BUILTIN.openjdk7}
+. if defined(BUILTIN_PKG.openjdk7) && \
+ !empty(IS_BUILTIN.openjdk7:M[yY][eE][sS])
+USE_BUILTIN.openjdk7= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.openjdk7}
+. if !empty(USE_BUILTIN.openjdk7:M[yY][eE][sS])
+USE_BUILTIN.openjdk7!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.openjdk7:Q}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+. endif
+.endif
+MAKEVARS+= USE_BUILTIN.openjdk7
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.openjdk7?= no
+.if !empty(CHECK_BUILTIN.openjdk7:M[nN][oO])
+#
+# Here we place code that depends on whether USE_BUILTIN.openjdk7 is
+# set to "yes" or "no".
+#
+. if !empty(USE_BUILTIN.openjdk7:M[yY][eE][sS])
+PKG_JAVA_HOME= ${OJDK7:H:H}
+. endif
+.endif # CHECK_BUILTIN.openjdk7
Index: pkgsrc/lang/openjdk8/builtin.mk
diff -u /dev/null pkgsrc/lang/openjdk8/builtin.mk:1.1
--- /dev/null Fri Dec 16 16:27:23 2016
+++ pkgsrc/lang/openjdk8/builtin.mk Fri Dec 16 16:27:23 2016
@@ -0,0 +1,73 @@
+BUILTIN_PKG:= openjdk8
+
+BUILTIN_FIND_FILES_VAR:= OJDK8
+BUILTIN_FIND_FILES.OJDK8= \
+ /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/javac
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.openjdk8)
+. if empty(OJDK8:M__nonexistent__)
+IS_BUILTIN.openjdk8= yes
+. else
+IS_BUILTIN.openjdk8= no
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.openjdk8
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.openjdk8) && \
+ !empty(IS_BUILTIN.openjdk8:M[yY][eE][sS])
+BUILTIN_VERSION.openjdk8!= ${OJDK8} -version 2>&1 | ${SED} -Ee 's:^[^0-9]*([0-9._]+)$:\1:' -e 's/_/./g' -e 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.\4/'
+BUILTIN_PKG.openjdk8= openjdk8-$(BUILTIN_VERSION.openjdk8)
+.endif
+MAKEVARS+= BUILTIN_PKG.openjdk8
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.openjdk8)
+. if ${PREFER.openjdk8} == "pkgsrc"
+USE_BUILTIN.openjdk8= no
+. else
+USE_BUILTIN.openjdk8= ${IS_BUILTIN.openjdk8}
+. if defined(BUILTIN_PKG.openjdk8) && \
+ !empty(IS_BUILTIN.openjdk8:M[yY][eE][sS])
+USE_BUILTIN.openjdk8= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.openjdk8}
+. if !empty(USE_BUILTIN.openjdk8:M[yY][eE][sS])
+USE_BUILTIN.openjdk8!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.openjdk8:Q}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+. endif
+.endif
+MAKEVARS+= USE_BUILTIN.openjdk8
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.openjdk8?= no
+.if !empty(CHECK_BUILTIN.openjdk8:M[nN][oO])
+#
+# Here we place code that depends on whether USE_BUILTIN.openjdk8 is
+# set to "yes" or "no".
+#
+. if !empty(USE_BUILTIN.openjdk8:M[yY][eE][sS])
+PKG_JAVA_HOME= ${OJDK8:H:H}
+. endif
+.endif # CHECK_BUILTIN.openjdk8
Home |
Main Index |
Thread Index |
Old Index