Remove interactive license verification since it causes issues due to

lack of stdin availability when built indirectly as a depend of another
port. Instead of interactive license verification solely use the
ACCEPT_JRL_LICENSE var. If it's not correctly set error out and let the
user know what to do. Cluestick and okay espie@
This commit is contained in:
kurt 2007-11-07 17:04:36 +00:00
parent a51d7f9f59
commit 8778311747
4 changed files with 12 additions and 76 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.44 2007/10/25 20:51:41 kurt Exp $
# $OpenBSD: Makefile,v 1.45 2007/11/07 17:04:36 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= amd64 i386
@ -148,10 +148,10 @@ JREIMAGEDIR= ${OUTPUTDIR}/j2re-image
ACCEPT_JRL_LICENSE ?= No
.if ${ACCEPT_JRL_LICENSE:L} != "yes"
IS_INTERACTIVE= Yes
pre-extract:
@${SH} ${FILESDIR}/license.sh
@echo continuing...
ERRORS += "Fatal: you must read and accept Sun's JRL license located"
ERRORS += "at ${FILESDIR}/JavaResearchLicense.txt"
ERRORS += "To indicate your acceptance of the JRL add ACCEPT_JRL_LICENSE=Yes"
ERRORS += "to /etc/mk.conf and restart the build."
.endif
post-extract:

View File

@ -1,11 +1,4 @@
#!/bin/sh
# $OpenBSD: license.sh,v 1.2 2007/10/29 01:22:34 kurt Exp $
# $FreeBSD: ports/java/jdk15/files/license.sh,v 1.1 2007/08/13 04:57:47 glewis Exp $
# License agreement
more << EOF_LICENSE
JAVA RESEARCH LICENSE
Version 1.6
JAVA RESEARCH LICENSE Version 1.6
I. DEFINITIONS.
@ -150,7 +143,6 @@ Terms") shall survive termination.
D. Miscellaneous.
1. Trademark. You agree to comply with Sun's Trademark & Logo
Usage Requirements, as modified from time to time, available at
http://www.sun.com/policies/trademarks/. Except as expressly provided
@ -174,27 +166,3 @@ In no event shall this License be construed against the drafter.
http://www.sun.com/its, you agree to comply with the U.S. export
controls and trade laws of other countries that apply to Technology
and Modifications.
EOF_LICENSE
agreed=
while [ x$agreed = x ]; do
echo
echo "Do you agree to the above license terms? [yes or no] "
if read reply leftover; then
case $reply in
y* | Y*)
agreed=1
;;
n* | N*)
echo
echo "If you don't agree to the license you can't build this software"
exit 1
;;
esac
else
echo
echo "An error occurred reading your response!"
exit 1
fi
done

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2007/11/07 03:53:53 kurt Exp $
# $OpenBSD: Makefile,v 1.8 2007/11/07 17:04:36 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= i386 amd64
@ -116,10 +116,10 @@ COPYFILES= control/make/common/Defs-linux.gmk \
ACCEPT_JRL_LICENSE ?= No
.if ${ACCEPT_JRL_LICENSE:L} != "yes"
IS_INTERACTIVE= Yes
pre-extract:
@${SH} ${FILESDIR}/license.sh
@echo continuing....
ERRORS += "Fatal: you must read and accept Sun's JRL license located"
ERRORS += "at ${FILESDIR}/JavaResearchLicense.txt"
ERRORS += "To indicate your acceptance of the JRL add ACCEPT_JRL_LICENSE=Yes"
ERRORS += "to /etc/mk.conf and restart the build."
.endif
do-extract:

View File

@ -1,11 +1,4 @@
#!/bin/sh
# $OpenBSD: license.sh,v 1.2 2007/10/29 01:22:34 kurt Exp $
# $FreeBSD: ports/java/jdk15/files/license.sh,v 1.1 2007/08/13 04:57:47 glewis Exp $
# License agreement
more << EOF_LICENSE
JAVA RESEARCH LICENSE
Version 1.6
JAVA RESEARCH LICENSE Version 1.6
I. DEFINITIONS.
@ -150,7 +143,6 @@ Terms") shall survive termination.
D. Miscellaneous.
1. Trademark. You agree to comply with Sun's Trademark & Logo
Usage Requirements, as modified from time to time, available at
http://www.sun.com/policies/trademarks/. Except as expressly provided
@ -174,27 +166,3 @@ In no event shall this License be construed against the drafter.
http://www.sun.com/its, you agree to comply with the U.S. export
controls and trade laws of other countries that apply to Technology
and Modifications.
EOF_LICENSE
agreed=
while [ x$agreed = x ]; do
echo
echo "Do you agree to the above license terms? [yes or no] "
if read reply leftover; then
case $reply in
y* | Y*)
agreed=1
;;
n* | N*)
echo
echo "If you don't agree to the license you can't build this software"
exit 1
;;
esac
else
echo
echo "An error occurred reading your response!"
exit 1
fi
done