summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/linux-jdk13/Makefile12
-rw-r--r--java/linux-sun-jdk13/Makefile12
2 files changed, 24 insertions, 0 deletions
diff --git a/java/linux-jdk13/Makefile b/java/linux-jdk13/Makefile
index b2b3381511be..d8bdec195cf2 100644
--- a/java/linux-jdk13/Makefile
+++ b/java/linux-jdk13/Makefile
@@ -49,6 +49,18 @@ IGNORE= You must manually fetch the Java 2 Development Kit ${PORTVERSION} \
then run make again
.endif
+pre-extract:
+ @if [ -z "`kldstat -v | ${GREP} -E 'linux(aout|elf)'`" ]; then \
+ ${ECHO} 'Linux mode is not enabled.\
+ Loading Linux kernel module...' | fmt; \
+ linux || { \
+ ${ECHO} 'The Linux kernel module could not be loaded.\
+ Please manually load the module and retry.\
+ See "man linux" for details.' | fmt; \
+ ${FALSE}; \
+ };\
+ fi
+
post-fetch:
@${CHMOD} +x ${DISTDIR}/${DISTFILES}
diff --git a/java/linux-sun-jdk13/Makefile b/java/linux-sun-jdk13/Makefile
index b2b3381511be..d8bdec195cf2 100644
--- a/java/linux-sun-jdk13/Makefile
+++ b/java/linux-sun-jdk13/Makefile
@@ -49,6 +49,18 @@ IGNORE= You must manually fetch the Java 2 Development Kit ${PORTVERSION} \
then run make again
.endif
+pre-extract:
+ @if [ -z "`kldstat -v | ${GREP} -E 'linux(aout|elf)'`" ]; then \
+ ${ECHO} 'Linux mode is not enabled.\
+ Loading Linux kernel module...' | fmt; \
+ linux || { \
+ ${ECHO} 'The Linux kernel module could not be loaded.\
+ Please manually load the module and retry.\
+ See "man linux" for details.' | fmt; \
+ ${FALSE}; \
+ };\
+ fi
+
post-fetch:
@${CHMOD} +x ${DISTDIR}/${DISTFILES}