LICENSE_FILE=${WRKSRC}/LICENSE (Was: Port installing localized manual pages.)

Anonymous swell.k at gmail.com
Tue Jul 20 19:26:30 UTC 2010


ashish at FreeBSD.org (Ashish SHUKLA) writes:

>>> [1]  http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/146513
>
>> Why do you need to copy license file in post-extract?
>
> I added because specifying '${WRKSRC}/LICENSE' as 'LICENSE_FILE' results in
> a conflict because License infrastructure in ports system also creates a file
> named LICENSE. So, I'm just copying it to some name other than LICENSE, and
> than mentioning that in the LICENSE_FILE.

Ah, so you're referring to _LICENSE_REPORT that's created in_LICENSE_DIR.
It's not just the case of a single license file named `LICENSE' but multiple
licenses with same filename but in different directories are affected as well.
Does the following diff fixes it for you?

%%
Index: Mk/bsd.licenses.mk
===================================================================
RCS file: /a/.cvsup/ports/Mk/bsd.licenses.mk,v
retrieving revision 1.2
diff -u -p -r1.2 bsd.licenses.mk
--- Mk/bsd.licenses.mk	26 May 2010 02:20:27 -0000	1.2
+++ Mk/bsd.licenses.mk	20 Jul 2010 19:20:41 -0000
@@ -723,11 +723,11 @@ PLIST_FILES+=	${_LICENSE_DIR_REL}/${_LIC
 PLIST_DIRS+=	${_LICENSE_DIR_REL}
 
 .if ${_LICENSE_COMB} == "single"
-PLIST_FILES+=	${_LICENSE_DIR_REL}/${_LICENSE_FILE:T}
+PLIST_FILES+=	${_LICENSE_DIR_REL}/${_LICENSE}
 .else
 .	for lic in ${_LICENSE}
 .		if defined(_LICENSE_FILE_${lic})
-PLIST_FILES+=	${_LICENSE_DIR_REL}/${_LICENSE_FILE_${lic}:T}
+PLIST_FILES+=	${_LICENSE_DIR_REL}/${lic}
 .		endif
 .	endfor
 .endif
@@ -737,10 +737,10 @@ install-license:
 	@${INSTALL_DATA} ${_LICENSE_CATALOG_TMP} ${_LICENSE_CATALOG}
 	@${INSTALL_DATA} ${_LICENSE_REPORT_TMP} ${_LICENSE_REPORT}
 .if ${_LICENSE_COMB} == "single"
-	@${INSTALL_DATA} ${_LICENSE_FILE} ${_LICENSE_DIR}
+	@${INSTALL_DATA} ${_LICENSE_FILE} ${_LICENSE_DIR}/${_LICENSE}
 .else
 .	for lic in ${_LICENSE}
-	@${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${_LICENSE_DIR}
+	@${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${_LICENSE_DIR}/${lic}
 .	endfor
 .endif
 # XXX @dirrmtry entry must be here (no way to do with PLIST_* vars)
%%


More information about the freebsd-ports mailing list