Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  4 Jan 2004 16:27:35 -0600
From:      "Frank J. Laszlo" <laszlof@vonostingroup.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/60909: info docs are not installed correctly when PREFIX=/usr
Message-ID:  <20040104222611.7A29443D41@mx1.FreeBSD.org>
Resent-Message-ID: <200401042230.i04MUKvw039370@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60909
>Category:       ports
>Synopsis:       info docs are not installed correctly when PREFIX=/usr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 04 14:30:20 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Frank Laszlo
>Release:        FreeBSD 4.9-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD trinity.freematrix.us 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #0: Wed Dec 3 07:48:46 CST 2003 laszlof@trinity.freematrix.us:/usr/obj/usr/src/sys/TRINITY i386


	
>Description:
	according to hier(7) info pages are supposed to go in $PREFIX/share/info. We tend to
	ignore this when PREFIX=/usr/local (default) and install them into /usr/local/info.
	But if PREFIX=/usr the info pages get installed into /usr/info (which is not correct)
	I have attached a patch for bsd.port.mk to fix this, it adds the variable INFOPREFIX and set
	it to $PREFIX/share when $PREFIX=/usr, and $PREFIX/info otherwise (for local/ installation)
>How-To-Repeat:
	Build a port with info pages and PREFIX=/usr
>Fix:

	

--- bsd.port.mk.patch begins here ---
--- bsd.port.mk.orig	Sun Jan  4 12:18:33 2004
+++ bsd.port.mk	Sun Jan  4 13:49:21 2004
@@ -1728,7 +1728,7 @@
 
 MAKE_FLAGS?=	-f
 MAKEFILE?=		Makefile
-MAKE_ENV+=		PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}"
+MAKE_ENV+=		PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}" INFOPREFIX="${INFOPREFIX}"
 
 .if ${OSVERSION} < 500016
 PTHREAD_CFLAGS=	-D_THREAD_SAFE
@@ -2446,8 +2446,10 @@
 
 .if ${PREFIX} == /usr
 MANPREFIX?=	/usr/share
+INFOPREFIX?=	/usr/share
 .else
 MANPREFIX?=	${PREFIX}
+INFOPREFIX?=	${PREFIX}
 .endif
 
 .for sect in 1 2 3 4 5 6 7 8 9
@@ -4470,7 +4472,7 @@
 .endfor
 	@${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}
 .if !defined(NO_MTREE)
-	@${ECHO_CMD} "@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi" >> ${TMPPLIST}
+	@${ECHO_CMD} "@unexec if [ -f %D/share/info/dir ]; then if sed -e '1,/Menu:/d' %D/share/info/dir | grep -q '^[*] '; then true; else rm %D/share/info/dir; fi; fi" >> ${TMPPLIST}
 .endif
 .if defined(INSTALLS_SHLIB)
 	@${ECHO_CMD} "@exec ${LDCONFIG} -m ${LDCONFIG_PLIST}" >> ${TMPPLIST}
@@ -4508,10 +4510,10 @@
 add-plist-info:
 # 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 ${INFOPREFIX}/info/$i.info ${INFOPREFIX}/info/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} ${INFOPREFIX}/info/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
+	@${ECHO_CMD} "@exec install-info ${INFOPREFIX}/info/$i.info ${INFOPREFIX}/info/dir" \
 		>> ${TMPPLIST}
 .endfor
 
--- bsd.port.mk.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?20040104222611.7A29443D41>