texinfo breakage

Gerald Pfeifer pfeifer at dbai.tuwien.ac.at
Tue Jul 15 07:11:12 PDT 2003


On Mon, 14 Jul 2003, Kris Kennaway wrote:
>> Ultimately, I strongly feel that the current handling of .info files in
>> the ports collection is broken in that every port handles them manually.
> I'd be happy to test any solution you can come up with, but as it
> stands right now the texinfo port has caused dozens of package builds
> to fail, and I need someone to either volunteer to fix them, or [...]

Finally enhancing the ports infrastructure to deal with info files is
really overdue (as we are currently experiencing).

So, here is a patch! :-)

I successfully tested this per
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-testing.html
(working the `make deinstall` bug which was already present there) using
the sysutils/cfengine2 port, which has info documentations consisting both
of single and multiple files.

A patch to update sysutils/cfengine2 as attached as well, and if you look
at that, I hope you will agree on the beauty of my approach. ;-)

Cheers,
Gerald

Index: bsd.port.mk
===================================================================
RCS file: /sw/FreeBSD/CVSUP/ports/Mk/bsd.port.mk,v
retrieving revision 1.456
diff -u -2 -p -r1.456 bsd.port.mk
--- bsd.port.mk	11 Jul 2003 06:30:43 -0000	1.456
+++ bsd.port.mk	15 Jul 2003 13:58:38 -0000
@@ -527,4 +527,9 @@ FreeBSD_MAINTAINER=	portmgr at FreeBSD.org
 #				  "no" otherwise.
 #
+# And set the following to specifiy all .info files your port installs.
+#
+# INFO			- A list of .info files (omitting the trailing ".info");
+#				  only one entry per document!
+#
 # Default targets and their behaviors:
 #
@@ -3213,5 +3218,5 @@ _INSTALL_SEQ=	install-message check-cate
 				generate-plist check-already-installed
 _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
-				pre-su-install-script do-install post-install \
+				pre-su-install-script do-install add-plist-info post-install \
 				post-install-script compress-man run-ldconfig fake-pkg \
 				security-check
@@ -4252,4 +4257,13 @@ generate-plist:
 ${TMPPLIST}:
 	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-plist
+
+add-plist-info:
+.for i in ${INFO}
+	@${ECHO_CMD} "@unexec install-info --delete %D/info/$i.info %D/info/dir" \
+		>> ${TMPPLIST}
+	@${LS} ${PREFIX}/info/$i* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
+	@${ECHO_CMD} "@exec install-info %D/info/$i.info %D/info/dir" \
+		>> ${TMPPLIST}
+.endfor

 # Compress (or uncompress) and symlink manpages.
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /sw/FreeBSD/CVSUP/ports/sysutils/cfengine2/Makefile,v
retrieving revision 1.26
diff -u -3 -p -r1.26 Makefile
--- Makefile	7 Mar 2003 06:11:08 -0000	1.26
+++ Makefile	15 Jul 2003 13:42:12 -0000
@@ -25,5 +25,6 @@ HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX}
 
 MAN8=		cfengine.8
+INFO=		cfengine-Anomalies cfengine-Reference cfengine-Tutorial
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /sw/FreeBSD/CVSUP/ports/sysutils/cfengine2/pkg-plist,v
retrieving revision 1.7
diff -u -3 -p -r1.7 pkg-plist
--- pkg-plist	30 Jul 2002 18:34:22 -0000	1.7
+++ pkg-plist	15 Jul 2003 13:31:27 -0000
@@ -1,26 +1,3 @@
- at unexec install-info --delete %D/info/cfengine-Anomalies.info %D/info/dir
- at unexec install-info --delete %D/info/cfengine-Reference.info %D/info/dir
- at unexec install-info --delete %D/info/cfengine-Tutorial.info %D/info/dir
-info/cfengine-Anomalies.info
-info/cfengine-Reference.info
-info/cfengine-Reference.info-1
-info/cfengine-Reference.info-2
-info/cfengine-Reference.info-3
-info/cfengine-Reference.info-4
-info/cfengine-Reference.info-5
-info/cfengine-Reference.info-6
-info/cfengine-Reference.info-7
-info/cfengine-Reference.info-8
-info/cfengine-Tutorial.info
-info/cfengine-Tutorial.info-1
-info/cfengine-Tutorial.info-2
-info/cfengine-Tutorial.info-3
-info/cfengine-Tutorial.info-4
-info/cfengine-Tutorial.info-5
-info/cfengine-Tutorial.info-6
- at exec install-info %D/info/cfengine-Anomalies.info %D/info/dir
- at exec install-info %D/info/cfengine-Reference.info %D/info/dir
- at exec install-info %D/info/cfengine-Tutorial.info %D/info/dir
 sbin/cfagent
 sbin/cfdoc
 sbin/cfenvd


More information about the freebsd-ports mailing list