Date: Tue, 27 Dec 2011 11:08:50 GMT From: Chris Rees <crees@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/163640: bsd.licenses.mk: Add code to support standard licenses Message-ID: <201112271108.pBRB8o9U088708@freefall.freebsd.org> Resent-Message-ID: <201112271110.pBRBAEe2088821@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163640 >Category: ports >Synopsis: bsd.licenses.mk: Add code to support standard licenses >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 27 11:10:13 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.2-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #5 r227907: Wed Nov 23 21:55:50 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=374446+0+current/cvs-ports As described, LICENSE= 'some known license' leaves us with a dummy file in /usr/local/share/licenses/${PKGNAME} that suggests that we fetch the license ourselves from the Internet. This patch checks in _LICENSE_STORE for a matching license and uses that if it exists >How-To-Repeat: >Fix: Try it out by applying, and drop some licenses into ${PORTSDIR}/Templates/licenses with the same filename as the LICENSE variable. --- licenses.patch begins here --- ? Templates/licenses Index: Mk/bsd.licenses.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.licenses.mk,v retrieving revision 1.8 diff -u -r1.8 bsd.licenses.mk --- Mk/bsd.licenses.mk 31 Mar 2011 03:37:14 -0000 1.8 +++ Mk/bsd.licenses.mk 27 Dec 2011 11:03:29 -0000 @@ -141,6 +141,7 @@ # # _LICENSE_DIR - Directory to install licenses # _LICENSE_DIR_REL - Same as above, without ${PREFIX} +# _LICENSE_STORE - Store for known license files # _LICENSE_CATALOG - License catalog (make include file) to be created (dst) # _LICENSE_CATALOG_TMP - Same as above, but in WRKDIR (src) # _LICENSE_REPORT - License summary, shows licenses and how they are combined (dst) @@ -151,6 +152,7 @@ _LICENSE_DIR?= ${PREFIX}/share/licenses/${PKGNAME} _LICENSE_DIR_REL?= share/licenses/${PKGNAME} +_LICENSE_STORE?= ${PORTSDIR}/Templates/licenses _LICENSE_CATALOG?= ${_LICENSE_DIR}/catalog.mk _LICENSE_CATALOG_TMP?= ${WRKDIR}/.license-catalog.mk _LICENSE_REPORT?= ${_LICENSE_DIR}/LICENSE @@ -228,9 +230,13 @@ # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) . if !defined(LICENSE_FILE) . if !defined(LICENSE_TEXT) -# XXX Until we have a license pool under /usr/ports/Licenses use this +. if exists(${_LICENSE_STORE}/${lic}) +_LICENSE_FILE= ${_LICENSE_STORE}/${lic} +. else +# No license file in /usr/ports/Templates/licenses _LICENSE_TEXT= The license: ${_LICENSE} (${_LICENSE_NAME}) is standard, please read from the web. _LICENSE_FILE= ${WRKDIR}/${lic} +. endif . else _LICENSE_ERROR?= defining LICENSE_TEXT is not allowed for known licenses . endif --- licenses.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112271108.pBRB8o9U088708>