Sun Feb 22 22:07:52 2009 UTC ()
On Linux, define NEEDS_STRLCPY in MAKE_ENV.

In the patched Makefile, switch on NEEDS_STRLCPY instead of OPSYS,
because OPSYS isn't defined in my world (vanilla netbsd-5 on i386),
and I can't find any reason it should be.

Add a comment to the patch explaining why the install: target was
removed, and about NEEDS_STRLCPY.


(gdt)
diff -r1.11 -r1.12 pkgsrc/geography/garmin-utils/Makefile
diff -r1.10 -r1.11 pkgsrc/geography/garmin-utils/distinfo
diff -r1.5 -r1.6 pkgsrc/geography/garmin-utils/patches/patch-aa

cvs diff -r1.11 -r1.12 pkgsrc/geography/garmin-utils/Makefile (expand / switch to unified diff)

--- pkgsrc/geography/garmin-utils/Makefile 2009/02/22 20:57:25 1.11
+++ pkgsrc/geography/garmin-utils/Makefile 2009/02/22 22:07:52 1.12
@@ -1,35 +1,40 @@ @@ -1,35 +1,40 @@
1# $NetBSD: Makefile,v 1.11 2009/02/22 20:57:25 gdt Exp $ 1# $NetBSD: Makefile,v 1.12 2009/02/22 22:07:52 gdt Exp $
2# 2#
3 3
4DISTNAME= garmin-utils-2.5 4DISTNAME= garmin-utils-2.5
 5PKGREVISION= 1
5CATEGORIES= geography 6CATEGORIES= geography
6MASTER_SITES= ftp://ftp.snafu.org/pub/ 7MASTER_SITES= ftp://ftp.snafu.org/pub/
7 8
8MAINTAINER= gson@NetBSD.org 9MAINTAINER= gson@NetBSD.org
 10# also gdt@NetBSD.org is helping
9HOMEPAGE= http://www.snafu.org/ 11HOMEPAGE= http://www.snafu.org/
10COMMENT= Utilities for Garmin GPS receivers 12COMMENT= Utilities for Garmin GPS receivers
11 13
12PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
13 15
 16# This seems excessive; on other ones it can be made to work.
14ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* 17ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-*
15 18
16INSTALLATION_DIRS= bin lib ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 19INSTALLATION_DIRS= bin lib ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1
17 20
18USE_BSD_MAKEFILE= yes 21USE_BSD_MAKEFILE= yes
19 22
 23MAKE_JOBS_SAFE= no
 24
20# No actual serial port will be right for any significant number of users, 25# No actual serial port will be right for any significant number of users,
21# so make everyone use a symlink. 26# so make everyone use a symlink.
22MAKE_FLAGS+= GPS_SERIAL_PORT=/dev/gps 27MAKE_FLAGS+= GPS_SERIAL_PORT=/dev/gps
23 28
24MAKE_JOBS_SAFE= no 
25 
26.include "../../mk/bsd.prefs.mk" 29.include "../../mk/bsd.prefs.mk"
27 30
28CPPFLAGS.Linux= -DLINUX 31CPPFLAGS.Linux= -DLINUX
29 32
30.if ${OPSYS} == "Linux" 33.if ${OPSYS} == "Linux"
31MAKE_FLAGS+= SIO_TYPE=-DSIO_TYPE=Linux \ 34MAKE_FLAGS+= SIO_TYPE=-DSIO_TYPE=Linux
32 NEEDS_STRLCPY=1 35
 36# On Linux, libc apparently does not have strlcpy.
 37MAKE_FLAGS+= NEEDS_STRLCPY=1
33.endif 38.endif
34 39
35.include "../../mk/bsd.pkg.mk" 40.include "../../mk/bsd.pkg.mk"

cvs diff -r1.10 -r1.11 pkgsrc/geography/garmin-utils/distinfo (expand / switch to unified diff)

--- pkgsrc/geography/garmin-utils/distinfo 2009/02/22 20:57:25 1.10
+++ pkgsrc/geography/garmin-utils/distinfo 2009/02/22 22:07:52 1.11
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.10 2009/02/22 20:57:25 gdt Exp $ 1$NetBSD: distinfo,v 1.11 2009/02/22 22:07:52 gdt Exp $
2 2
3SHA1 (garmin-utils-2.5.tar.gz) = 1b7ee9936a691bf5e5466a3efd052f71dd3cb63c 3SHA1 (garmin-utils-2.5.tar.gz) = 1b7ee9936a691bf5e5466a3efd052f71dd3cb63c
4RMD160 (garmin-utils-2.5.tar.gz) = c32dd4b9efaef80fb203059ac399e52d0cd86fbe 4RMD160 (garmin-utils-2.5.tar.gz) = c32dd4b9efaef80fb203059ac399e52d0cd86fbe
5Size (garmin-utils-2.5.tar.gz) = 174336 bytes 5Size (garmin-utils-2.5.tar.gz) = 174336 bytes
6SHA1 (patch-aa) = 650305540171cea6b77b52acbffe89fd76901d20 6SHA1 (patch-aa) = 3a04f974bd0eae012977dc3a8090b19032463ce7

cvs diff -r1.5 -r1.6 pkgsrc/geography/garmin-utils/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/geography/garmin-utils/patches/patch-aa 2009/02/21 14:53:43 1.5
+++ pkgsrc/geography/garmin-utils/patches/patch-aa 2009/02/22 22:07:52 1.6
@@ -1,14 +1,22 @@ @@ -1,14 +1,22 @@
1$NetBSD: patch-aa,v 1.5 2009/02/21 14:53:43 gdt Exp $ 1$NetBSD: patch-aa,v 1.6 2009/02/22 22:07:52 gdt Exp $
 2
 3Remove empty install target, to let the standard rules install the
 4library.
 5
 6If NEEDS_STRLCPY is defined in the make environment, as it will be on
 7at least Linux, compile and link with the provided version of strlcpy.
 8
 9As of 2009-02-22 neither patch has been sent upstream.
2 10
3--- lib/Makefile.orig 2009-01-13 20:50:30.000000000 +0100 11--- lib/Makefile.orig 2009-01-13 20:50:30.000000000 +0100
4+++ lib/Makefile 12+++ lib/Makefile
5@@ -11,6 +11,8 @@ NOLINT= yes 13@@ -11,6 +11,8 @@ NOLINT= yes
6 SRCS= gps1.c gps2.c gpsdisplay.c gpsprod.c gpscap.c gpsdump.c \ 14 SRCS= gps1.c gps2.c gpsdisplay.c gpsprod.c gpscap.c gpsdump.c \
7 gpsprint.c gpsversion.c gpsformat.c gpsload.c gpsfloat.c 15 gpsprint.c gpsversion.c gpsformat.c gpsload.c gpsfloat.c
8  16
9-install: 17-install:
10+.if defined(OPSYS) && ${OPSYS} == "Linux" 18+.if defined(NEEDS_STRLCPY)
11+SRCS+= strlcpy.c 19+SRCS+= strlcpy.c
12+.endif 20+.endif
13  21
14 .include <bsd.lib.mk> 22 .include <bsd.lib.mk>