>Submitter-Id:  current-users
>Originator:    John Hein
>Organization:
>Confidential:  no 
>Synopsis:      [patch] support systems that have been built WITHOUT_INFO=yes 
>(no makeinfo & install-info)
>Severity:      non-critical
>Priority:      medium
>Category:      ports
>Class:         change-request
>Release:       FreeBSD 7.1-PRERELEASE i386
>Environment:


>Description:

If world is built with WITHOUT_INFO=yes, then as of 7.x, it does not
install install-info and makeinfo, etc. (see the exclusion of the
texinfo subdir in gnu/usr.bin/Makefile).

But lots of ports and bsd.port.mk expect these tools to be there
unconditionally.

Worlds without these tools (think building for embedded boxes with
nanobsd, for example) break when building these ports.

The port I hit first that has this problem is libtool15 which has this...

CONFIGURE_ENV=  MAKEINFO="makeinfo --no-split"

See also at least these PRs for more:

ports/121296, ports/121717

>How-To-Repeat:

make buildworld WITHOUT_INFO=yes
make installworld WITHOUT_INFO=yes

(or just manually move away /usr/bin/makeinfo and /usr/bin/install-info)

Then
cd ports/devel/libtool15
make && make install

>Fix:

Support WITHOUT_INFO (or detect missing install-info) in ports/Mk.
See patch below.

Ports can be fixed by keying on HAS_INFO (the preferred method, I
think) or changing hard-coded invocations of makeinfo and/or
install-info to the MAKEINFO and INSTALLINFO commands as defined
below in bsd.commands.mk.

Once this fix (or similar) is in place, we can generate a patch
for all the ports that have hard-coded references to the *info
utilities.

Index: bsd.commands.mk
===================================================================
RCS file: /base/FreeBSD-CVS/ports/Mk/bsd.commands.mk,v
retrieving revision 1.3
diff -u -p -r1.3 bsd.commands.mk
--- bsd.commands.mk     14 Apr 2008 16:46:41 -0000      1.3
+++ bsd.commands.mk     18 Dec 2008 17:58:12 -0000
@@ -92,6 +92,18 @@ XARGS?=              /usr/bin/xargs
 XMKMF?=                ${LOCALBASE}/bin/xmkmf -a
 YACC?=         /usr/bin/yacc
 
+.if exists(/usr/bin/install-info) && !defined(WITHOUT_INFO)
+HAS_INFO=      yes
+INSTALLINFO?=  /usr/bin/install-info
+MAKEINFO?=     /usr/bin/makeinfo
+.else
+# Ideally, ports should key on HAS_INFO.  In some cases, it
+# may make more sense to just have a port use ${MAKEINFO} and
+# ${INSTALLINFO} which are defined to a no-op here.
+INSTALLINFO?=  true
+MAKEINFO?=     true
+.endif
+
 .if exists(/sbin/md5)
 MD5?=          /sbin/md5
 .else
Index: bsd.port.mk
===================================================================
RCS file: /base/FreeBSD-CVS/ports/Mk/bsd.port.mk,v
retrieving revision 1.604
diff -u -p -r1.604 bsd.port.mk
--- bsd.port.mk 5 Sep 2008 19:41:43 -0000       1.604
+++ bsd.port.mk 18 Dec 2008 17:58:05 -0000
@@ -5672,13 +5672,16 @@ add-plist-data:
 .if !target(add-plist-info)
 add-plist-info:
 # Process GNU INFO files at package install/deinstall time
-.if defined(INFO)
+.if defined(INFO) && defined(HAS_INFO)
 .for i in ${INFO}
-       install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info 
${PREFIX}/${INFO_PATH}/dir
-       @${ECHO_CMD} "@unexec install-info --quiet --delete 
%D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
+       -ls -alF ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir
+       -cat ${PREFIX}/${INFO_PATH}/dir
+       ${INSTALLINFO} --quiet ${PREFIX}/${INFO_PATH}/$i.info 
${PREFIX}/${INFO_PATH}/dir || \
+               { echo "*** ignoring failed ${INSTALLINFO} for possible 
duplicate entry ***" >&2; true; }
+       @${ECHO_CMD} "@unexec ${INSTALLINFO} --quiet --delete 
%D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
                >> ${TMPPLIST}
        @${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> 
${TMPPLIST}
-       @${ECHO_CMD} "@exec install-info --quiet %D/${INFO_PATH}/$i.info 
%D/${INFO_PATH}/dir" \
+       @${ECHO_CMD} "@exec ${INSTALLINFO} --quiet %D/${INFO_PATH}/$i.info 
%D/${INFO_PATH}/dir" \
                >> ${TMPPLIST}
 .endfor
 .if defined(INFO_SUBDIR)
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to