ports/91057: Mk/bsd.port.mk: consider info files in subdirectories

Gerald Pfeifer gerald at FreeBSD.org
Thu Dec 29 13:40:23 UTC 2005


>Number:         91057
>Category:       ports
>Synopsis:       Mk/bsd.port.mk: consider info files in subdirectories
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 29 13:40:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        
>Organization:
FreeBSD.org
>Environment:
>Description:
	To address the conflicts between the various lang/gcc ports
	like lang/gcc34 versus lang/gcc41, all of which provide more
	or less the same set of .info files which cannot be changed
	due to the way GNU makeinfo works, I had to move these .info
	files into port-specific subdirectories of $PREFIX/info.

	This works nicely, except for the fact that these port-specific
	subdirectories cannot be removed from within pkg-plist or some
	Makefile hooks, since the handling of INFO comes pretty late in
	the game and puts the indivudal .info files after any handling
	we could add for that port-specific subdirectory.

	This simple patch addresses this in a nicer way, by having the
	ports infrastructure take care of everything.  All one needs to
	do as a port maintainer is
	  1) passing --infodir=${PREFIX}/${INFO_PATH}/<SUBDIR> to configure
	  2) using INFO=<SUBDIR>/infofile1 <SUBDIR>/infofile2
	and the rest is handled automatically.
>How-To-Repeat:
>Fix:

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.518
diff -u -3 -p -r1.518 bsd.port.mk
--- bsd.port.mk	8 Nov 2005 09:02:51 -0000	1.518
+++ bsd.port.mk	29 Dec 2005 00:16:56 -0000
@@ -4916,6 +4916,9 @@ add-plist-info:
 	@${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}
+	if [ "`${DIRNAME} $i`" != "." ]; then \
+		${ECHO_CMD} "@unexec ${RMDIR} %D/info/`${DIRNAME} $i` 2> /dev/null || true" >> ${TMPPLIST}; \
+	fi
 .endfor
 .if (${PREFIX} != "/usr")
 	@${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST}

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list