ports/55493: Add ability to automatically install *.info not to default path in ports.

Lev A. Serbryakov lev at FreeBSD.org
Tue Aug 12 11:40:19 UTC 2003

>Number:         55493
>Category:       ports
>Synopsis:       Add ability to automatically install *.info not to default path in ports.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 12 04:40:16 PDT 2003
>Originator:     Lev A. Serbryakov <lev at FreeBSD.org>
>Release:        FreeBSD 4.8-STABLE i386
System: FreeBSD ftp.translate.ru 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Apr 11 00:25:30 MSD 2003 lev at ftp.translate.ru:/usr/obj/usr/src/sys/FTPTR i386


   New variable INFO in port's makefile allows to automatically
   generate all code for `pkg-plist' to process installed
   info files. But this code assumes, that info files are
   go to ${PREFIX}/info, and this is bad assumption.
   For example, target-specific info files of binutils, gcc, etc.
   could go to ${PREFIX}/${TARGET}/info.
   This patch adds INFO_PATH variable, whcich allows to specify
   path for info files inside ${PREFIX}.


--- bsd.port.mk.orig	Tue Aug 12 15:10:54 2003
+++ bsd.port.mk	Tue Aug 12 15:25:15 2003
@@ -529,6 +529,9 @@
 # INFO			- A list of .info files (omitting the trailing ".info");
 #				  only one entry per document!
+# INFO_PATH		- Path, where all .info files will be installed by your
+#			  port, relative to ${PREFIX} (default: share/info if
+#			  ${PREFIX} is equalr /usr and info otherwise).
 # Default targets and their behaviors:
@@ -2321,6 +2324,12 @@
 _MANPAGES:=	${_MANPAGES:S/$/.gz/}
+.if ${PREFIX} == /usr
+INFO_PATH?=	share/info
+INFO_PATH?=	info
 .if ${XFREE86_VERSION} == 3
@@ -4269,10 +4278,10 @@
 # Process GNU INFO files at package install/deinstall time
 .for i in ${INFO}
-	@${ECHO_CMD} "@unexec install-info --delete %D/info/$i.info %D/info/dir" \
+	@${ECHO_CMD} "@unexec install-info --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
 		>> ${TMPPLIST}
-	@${LS} ${PREFIX}/info/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
-	@${ECHO_CMD} "@exec install-info %D/info/$i.info %D/info/dir" \
+	@${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
+	@${ECHO_CMD} "@exec install-info %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
 		>> ${TMPPLIST}

More information about the freebsd-ports-bugs mailing list