Subject: pkg/22881: Fix latex2rtf to not hardcode install(1)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 08:50:03
>Number: 22881
>Category: pkg
>Synopsis: Fix latex2rtf to not hardcode install(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 08:51:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Perkin
>Release: N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
latex2rtf makes a fine effort, but still defaults to picking up the
first install(1) in $PATH, which isn't always a good one.
Rather than patching Makefile.in a bit more, I decided to just override
do-install completely, seems less hassle (and reduces the diff).
>How-To-Repeat:
===> Installing for latex2rtf-1.8a
mkdir /home/jonp/bulk/pkg/share/latex2rtf
true /home/jonp/bulk/pkg/share/latex2rtf
true /home/jonp/bulk/pkg/share/latex2rtf
install -c -g wheel -o root -m 755 latex2rtf /home/jonp/bulk/pkg/bin
install: The -c, -f, -n options each require a directory following!
*** Error code 2
>Fix:
http://www.perkin.org.uk/projects/netbsd/latex2rtf.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/converters/latex2rtf/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile 2003/08/09 10:35:48 1.8
+++ Makefile 2003/09/22 08:46:20
@@ -14,9 +14,9 @@
MAKE_FLAGS+= XCFLAGS="${CFLAGS}"
INFO_FILES= latex2rtf.info
+SUPPORT_FILES= direct.cfg fonts.cfg ignore.cfg english.cfg german.cfg \
+ spanish.cfg
-INSTALL_TARGET= simple_install simple_cfg_install
-
post-extract:
${CP} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.in
${RM} -f ${WRKSRC}/*.o
@@ -25,10 +25,16 @@
${SED} < ${WRKSRC}/${MAKEFILE}.in > ${WRKSRC}/${MAKEFILE} \
-e 's:@PREFIX@:${PREFIX}:'
-post-install:
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/latex2rtf ${PREFIX}/bin/latex2rtf
+ ${INSTALL_MAN} ${WRKSRC}/latex2rtf.1 ${PREFIX}/man/man1/latex2rtf.1
${INSTALL_DATA} ${WRKSRC}/doc/latex2rtf.info ${PREFIX}/info/latex2rtf.info
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/latex2rtf
${INSTALL_DATA} ${WRKSRC}/doc/l2r.html ${PREFIX}/share/doc/latex2rtf/latex2rtf.html
${INSTALL_DATA} ${WRKSRC}/doc/l2r.pdf ${PREFIX}/share/doc/latex2rtf/latex2rtf.pdf
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/latex2rtf
+.for FILE in ${SUPPORT_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/cfg/${FILE} ${PREFIX}/share/latex2rtf/${FILE}
+.endfor
.include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/converters/latex2rtf/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2001/04/18 16:28:01 1.2
+++ distinfo 2003/09/22 08:46:20
@@ -2,4 +2,4 @@
SHA1 (latex2rtf-1.8aa.tar.gz) = ab02cf1d069ba05400b2cb5df2182a1c139d4ae8
Size (latex2rtf-1.8aa.tar.gz) = 338481 bytes
-SHA1 (patch-aa) = c58421e1edbe4606f550e96c620d6fa5b5b1d6eb
+SHA1 (patch-aa) = 3ee116cc90138a17bf734b2e38a82c1e194119be
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/converters/latex2rtf/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patches/patch-aa 2000/03/08 00:20:17 1.1.1.1
+++ patches/patch-aa 2003/09/22 08:46:20
@@ -2,26 +2,6 @@
--- ./Makefile.in.orig Tue Mar 7 23:37:35 2000
+++ ./Makefile.in Tue Mar 7 23:45:10 2000
-@@ -83,13 +83,13 @@
- DIR_USER=root
- BIN_USER=root
- DAT_USER=root
--DIR_GROUP=root
--BIN_GROUP=root
--DAT_GROUP=root
-+DIR_GROUP=wheel
-+BIN_GROUP=wheel
-+DAT_GROUP=wheel
- # If you have the program install, use the following definitions
--INST_DIR=$(INSTALL) -g $(DIR_GROUP) -o $(DIR_USER) -d -m $(BIN_MODE)
--INST_BIN=$(INSTALL) -g $(BIN_GROUP) -o $(BIN_USER) -m $(DIR_MODE)
--INST_DAT=$(INSTALL) -g $(DAT_GROUP) -o $(DAT_USER) -m $(DAT_MODE)
-+INST_DIR=$(INSTALL) -c -g $(DIR_GROUP) -o $(DIR_USER) -d -m $(BIN_MODE)
-+INST_BIN=$(INSTALL) -c -g $(BIN_GROUP) -o $(BIN_USER) -m $(DIR_MODE)
-+INST_DAT=$(INSTALL) -c -g $(DAT_GROUP) -o $(DAT_USER) -m $(DAT_MODE)
- CHOWN_DIR=true
- CHOWN_BIN=true
- CHOWN_DAT=true
@@ -115,8 +115,8 @@
#
# Where support files are searched for by the executable
>Release-Note:
>Audit-Trail:
>Unformatted: