Subject: pkg/22884: Fixes for misc/mmv to build/install on SunOS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 09:42:06
>Number: 22884
>Category: pkg
>Synopsis: Fixes for misc/mmv to build/install on SunOS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 09:43: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:
Remove some BSD-specific stuff from the NetBSD mmv patches, and override
the install target to ensure we D.T.R.T. with dodgy install(1)s.
-DIS_BSD is assumed if -DIS_SYSV isn't used, which makes for a nice
clean Makefile. Tested it actually works on NetBSD/sparc64.
>How-To-Repeat:
===> Building for mmv-1.0b
/home/jonp/pkg/gcc-3.3/bin/gcc -O -c mmv.c
mmv.c:142:21: sys/dir.h: No such file or directory
mmv.c: In function `badname':
mmv.c:1425: error: `MAXNAMLEN' undeclared (first use in this function)
mmv.c:1425: error: (Each undeclared identifier is reported only once
mmv.c:1425: error: for each function it appears in.)
mmv.c: In function `takedir':
mmv.c:1778: error: `DIR' undeclared (first use in this function)
mmv.c:1778: error: `dirp' undeclared (first use in this function)
mmv.c:1787: warning: assignment makes pointer from integer without a cast
mmv.c:1797: error: dereferencing pointer to incomplete type
mmv.c:1797: error: dereferencing pointer to incomplete type
mmv.c: In function `doreps':
mmv.c:2389: warning: passing arg 2 of `signal' from incompatible pointer type
*** Error code 1
>Fix:
http://www.perkin.org.uk/projects/netbsd/mmv.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/mmv/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 2003/07/17 21:49:30 1.5
+++ Makefile 2003/09/22 09:35:55
@@ -13,4 +13,14 @@
ALL_TARGET= mmv
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+CFLAGS+= -DIS_SYSV
+.endif
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/mmv ${PREFIX}/bin/mmv
+ ${INSTALL_MAN} ${WRKSRC}/mmv.1 ${PREFIX}/man/man1/mmv.1
+
.include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/misc/mmv/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2001/08/16 10:16:17 1.2
+++ distinfo 2003/09/22 09:35:55
@@ -2,5 +2,5 @@
SHA1 (mmv_1.01b.orig.tar.gz) = 538a26b1d7e8b9bc286843e6aa2d8d959d8914bb
Size (mmv_1.01b.orig.tar.gz) = 25656 bytes
-SHA1 (patch-aa) = ca985e048ae9c56a0d38a9e1f035e6776c5ec877
+SHA1 (patch-aa) = eb97c23ee711b1650d4e36ba61258ee704fd6766
SHA1 (patch-ab) = 1fc216f9d3ea0747ce57498e9738c1182c8555ee
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/misc/mmv/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patches/patch-aa 2001/08/16 10:16:18 1.2
+++ patches/patch-aa 2003/09/22 09:35:55
@@ -1,8 +1,8 @@
$NetBSD: patch-aa,v 1.2 2001/08/16 10:16:18 abs Exp $
--- Makefile.orig Sat Nov 5 00:24:55 1994
-+++ Makefile
-@@ -1,16 +1,16 @@
++++ Makefile Mon Sep 22 10:32:39 2003
+@@ -1,11 +1,11 @@
# Possible defines in CONF:
# IS_MSDOS IS_SYSV IS_V7 IS_BSD HAS_DIRENT HAS_RENAME MV_DIR
@@ -13,24 +13,9 @@
-LDFLAGS =-s -N
+#CC =gcc -traditional
+#LD =$(CC)
-+CCFLAGS+= -DIS_BSD -DHAS_DIRENT -DHAS_RENAME
-+#CFLAGS =-O2 $(CONF)
++CFLAGS += -DHAS_DIRENT -DHAS_RENAME
++#CFLAGS =-O2 -m486 $(CONF)
+#LDFLAGS =-s -N
#IBIN =$(LOCAL)$(ARCH)/bin
#IMAN =$(LOCAL)$(ANY)/man
--IBIN=$(DESTDIR)/usr/bin/
--IMAN=$(DESTDIR)/usr/man/
-+IBIN=${PREFIX}/bin
-+IMAN=${PREFIX}/man
-
- mmv: mmv.o
-
-@@ -20,5 +20,5 @@
- install: $(DEST)$(IBIN)/mmv
- install: $(DEST)$(IMAN)/man1/mmv.1
-
--$(DEST)$(IBIN)/mmv: mmv; cp $? $@
--$(DEST)$(IMAN)/man1/mmv.1: mmv.1; cp $? $@
-+$(DEST)$(IBIN)/mmv: mmv; install -c $? $@
-+$(DEST)$(IMAN)/man1/mmv.1: mmv.1; install -c -m 0644 $? $@
>Release-Note:
>Audit-Trail:
>Unformatted: