From 9da7e84a125cfc49e089ab2536e6528afd0a9896 Mon Sep 17 00:00:00 2001 From: dholland Date: Thu, 15 Apr 2010 06:50:46 +0000 Subject: DESTDIR support. Use SPECIAL_PERMS. Fix some pkglint. Add missing manpage link. Fix getline lossage on -current. Wrap the homemade config.sh substitutions in @@ to make them more robust. PKGREVISION++ --- mail/elm/Makefile | 24 ++++++++++++++++++------ mail/elm/PLIST | 4 +++- mail/elm/distinfo | 9 +++++---- mail/elm/files/config.sh | 22 +++++++++++----------- mail/elm/patches/patch-ac | 12 +++++++----- mail/elm/patches/patch-ad | 24 +++++++++++++++++------- mail/elm/patches/patch-an | 37 +++++++++++++++++++++++++++++++++---- mail/elm/patches/patch-aq | 24 ++++++++++++++++++++++++ 8 files changed, 118 insertions(+), 38 deletions(-) create mode 100644 mail/elm/patches/patch-aq (limited to 'mail/elm') diff --git a/mail/elm/Makefile b/mail/elm/Makefile index cb0cd26b5c2..dac5eed1923 100644 --- a/mail/elm/Makefile +++ b/mail/elm/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.44 2009/06/30 00:07:19 joerg Exp $ +# $NetBSD: Makefile,v 1.45 2010/04/15 06:50:46 dholland Exp $ DISTNAME= elm2.5.8 PKGNAME= elm-2.5.8 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= http://www.instinct.org/elm/files/tarballs/ @@ -10,6 +10,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.instinct.org/elm/ COMMENT= ELM Mail User Agent (without ME extensions) +PKG_DESTDIR_SUPPORT= user-destdir + MAKE_JOBS_SAFE= no DEPENDS+= metamail>=2.7:../../mail/metamail @@ -20,7 +22,8 @@ CONFLICTS+= elm-me-[0-9]* HAS_CONFIGURE= YES CONFIGURE_SCRIPT= ./Configure CONFIGURE_ARGS+= -d -USE_TOOLS= nroff +CONFIGURE_ENV+= DESTDIR=${DESTDIR} +USE_TOOLS+= nroff INSTALLATION_DIRS= share/nls/C @@ -32,14 +35,23 @@ LIBC= /usr/lib/libSystem.dylib LIBC= /usr/lib/libc.so .endif +SPECIAL_PERMS+= bin/elm ${ROOT_USER} mail 2755 + pre-configure: ${CP} ${FILESDIR}/config.sh ${WRKSRC}/config.sh.orig - ${SED} -e 's:PREFIX:${PREFIX}:g' \ - -e 's:LOCALBASE:${LOCALBASE}:g' \ - -e 's:LIBC:${LIBC}:g' \ + ${SED} -e 's:@PREFIX@:${PREFIX}:g' \ + -e 's:@DESTDIR@:${DESTDIR}:g' \ + -e 's:@LOCALBASE@:${LOCALBASE}:g' \ + -e 's:@LIBC@:${LIBC}:g' \ ${WRKSRC}/config.sh.orig > ${WRKSRC}/config.sh ${MV} ${WRKSRC}/nls/LANGS ${WRKSRC}/nls/LANGS.tmpl ${SED} -e 's:__PREFIX:'${PREFIX}':g' < ${WRKSRC}/nls/LANGS.tmpl > ${WRKSRC}/nls/LANGS +post-install: + ${LN} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/frm.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/nfrm.1 + ${LN} ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/frm.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/nfrm.1 + .include "../../devel/gettext-lib/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/elm/PLIST b/mail/elm/PLIST index ea9357b9eb9..caa8248e635 100644 --- a/mail/elm/PLIST +++ b/mail/elm/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.5 2009/06/14 18:04:31 joerg Exp $ +@comment $NetBSD: PLIST,v 1.6 2010/04/15 06:50:46 dholland Exp $ bin/answer bin/checkalias bin/elm @@ -35,6 +35,7 @@ man/cat1/listalias.1 man/cat1/messages.1 man/cat1/newalias.1 man/cat1/newmail.1 +man/cat1/nfrm.1 man/cat1/printmail.1 man/cat1/readmsg.1 man/cat1/wnewmail.1 @@ -48,6 +49,7 @@ man/man1/listalias.1 man/man1/messages.1 man/man1/newalias.1 man/man1/newmail.1 +man/man1/nfrm.1 man/man1/printmail.1 man/man1/readmsg.1 man/man1/wnewmail.1 diff --git a/mail/elm/distinfo b/mail/elm/distinfo index 37a03cf7377..2a8f5ac2417 100644 --- a/mail/elm/distinfo +++ b/mail/elm/distinfo @@ -1,12 +1,12 @@ -$NetBSD: distinfo,v 1.13 2008/07/21 05:35:37 dholland Exp $ +$NetBSD: distinfo,v 1.14 2010/04/15 06:50:46 dholland Exp $ SHA1 (elm2.5.8.tar.gz) = bf09df75d0dc9097a1e69591bfb4872f860e00c7 RMD160 (elm2.5.8.tar.gz) = c12dbefd0bf9d47ee4438673507a4693c4a6808c Size (elm2.5.8.tar.gz) = 607078 bytes SHA1 (patch-aa) = d84d99098d567135db05cc67899cf1df5c1780b0 SHA1 (patch-ab) = 0d3a39f6fb0179bf75095ed7aa1910d94506fbe8 -SHA1 (patch-ac) = 3216e1f8a00200efd93ada37c8250c5277abfbfe -SHA1 (patch-ad) = de6e99072ad6379126bb1e6d798bc2cd851a92ed +SHA1 (patch-ac) = e9f199af63ab9cf5bb76cae60263a94788ee2cd6 +SHA1 (patch-ad) = cd150bcef3e6e4ae62acd77bb4b24028e803a1f4 SHA1 (patch-ae) = 1d3fa90fbe037cc8f81202b6a1ad779b74298c4d SHA1 (patch-af) = 7e08a1595ff31bcb1f45433d20693b4e0c5bf824 SHA1 (patch-ag) = e7bb5d94736a7a1dd8616a7e8f88c4c5c64059d1 @@ -16,6 +16,7 @@ SHA1 (patch-aj) = e129e633f8def8cd529b03014d6818b1eb59d220 SHA1 (patch-ak) = 7e3fe79d140cd205a910b8a9a56327dc19e3359e SHA1 (patch-al) = fe79a8d235c815728398e8052005755ea44c257a SHA1 (patch-am) = d406ae06488b85b33b03d860b37398849dce7832 -SHA1 (patch-an) = d33ce57ed4e86e5b7a7f5347250458c51d19ec0d +SHA1 (patch-an) = 4f03314d53f8f4a8e120d73ced9eafd22f1fa00b SHA1 (patch-ao) = 001eee84bc6e6239cfed31d4d9bf571a00220af0 SHA1 (patch-ap) = 6240a5d8a0d376bc896c3f18e6ed6bed597d758e +SHA1 (patch-aq) = 6821ffff099f9b9281c8dbceebd7b7fad6ac01b7 diff --git a/mail/elm/files/config.sh b/mail/elm/files/config.sh index 6236e50a9c3..3fac655e1c7 100644 --- a/mail/elm/files/config.sh +++ b/mail/elm/files/config.sh @@ -133,8 +133,8 @@ bld='' compress='/usr/bin/compress' execmail='' libswanted='intl nls' -bin='PREFIX/bin' -installbin='PREFIX/bin' +bin='@PREFIX@/bin' +installbin='@DESTDIR@@PREFIX@/bin' c_date='Sun Jul 1 03:59:18 JST 2001' d_ascii='undef' d_broke_ctype='define' @@ -165,7 +165,7 @@ ign_hname='n' d_index='define' d_internet='define' d_ispell='define' -ispell_path='LOCALBASE/bin/ispell' +ispell_path='@LOCALBASE@/bin/ispell' ispell_options='' d_locale='define' d_nl_types='define' @@ -233,15 +233,15 @@ d_systimekernel='undef' i_unistd='define' i_utime='define' i_sysutime='undef' -lib='PREFIX/lib/elm' -installlib='PREFIX/lib/elm' -libc='LIBC' +lib='@PREFIX@/lib/elm' +installlib='@DESTDIR@@PREFIX@/lib/elm' +libc='@LIBC@' linepr='/usr/bin/lp' maildir='/var/mail' mailer='/usr/sbin/sendmail' mailgrp='wheel' -mansrc='PREFIX/man/man1' -catmansrc='PREFIX/man/cat1' +mansrc='@DESTDIR@@PREFIX@/man/man1' +catmansrc='@DESTDIR@@PREFIX@/man/cat1' manext='.1' manext_choice='.1' catmanext='.1' @@ -258,9 +258,9 @@ medium='' large='' huge='' optimize='-O2' -ccflags='-ILOCALBASE/include' -cppflags=' -ILOCALBASE/include' -ldflags='-Wl,-RLOCALBASE/lib -LLOCALBASE/lib' +ccflags='-I@LOCALBASE@/include' +cppflags=' -I@LOCALBASE@/include' +ldflags='-Wl,-R@LOCALBASE@/lib -L@LOCALBASE@/lib' cc='cc -MD' libs='-lintl' nametype='bsd' diff --git a/mail/elm/patches/patch-ac b/mail/elm/patches/patch-ac index 1870eb34eb6..d4ca5d082d6 100644 --- a/mail/elm/patches/patch-ac +++ b/mail/elm/patches/patch-ac @@ -1,6 +1,7 @@ -$NetBSD: patch-ac,v 1.5 2001/07/18 20:04:13 martin Exp $ ---- nls/Makefile.orig Mon Jul 16 00:30:02 2001 -+++ nls/Makefile Wed Jul 18 06:56:10 2001 +$NetBSD: patch-ac,v 1.6 2010/04/15 06:50:46 dholland Exp $ + +--- nls/Makefile.orig 2005-08-18 12:49:24.000000000 +0000 ++++ nls/Makefile @@ -1,6 +1,6 @@ LANGFILE=LANGS CATNAME=elm2.5.cat @@ -9,13 +10,14 @@ $NetBSD: patch-ac,v 1.5 2001/07/18 20:04:13 martin Exp $ HDIR= ../hdrs SDIR= C/C/C -@@ -35,8 +35,11 @@ +@@ -35,8 +35,11 @@ nls-headers: clean $(HFILES) # same basename, so wait until install to put them somewhere. all: -install: +- ./Install $(LANGFILE) $(GENCAT) $(CATNAME) +install: $(GENCAT) - ./Install $(LANGFILE) $(GENCAT) $(CATNAME) ++ DESTDIR=$(DESTDIR) ./Install $(LANGFILE) $(GENCAT) $(CATNAME) + +$(GENCAT): + cd gencat && $(MAKE) $(MFLAGS) $(MJ) diff --git a/mail/elm/patches/patch-ad b/mail/elm/patches/patch-ad index 945a085d970..c5435e4c03b 100644 --- a/mail/elm/patches/patch-ad +++ b/mail/elm/patches/patch-ad @@ -1,7 +1,10 @@ -$NetBSD: patch-ad,v 1.6 2001/07/18 20:04:13 martin Exp $ ---- Make.defs.SH.orig Mon Jul 16 01:59:07 2001 -+++ Make.defs.SH Mon Jul 16 02:02:02 2001 -@@ -113,6 +113,7 @@ +$NetBSD: patch-ad,v 1.7 2010/04/15 06:50:46 dholland Exp $ + +destdir support. + +--- Make.defs.SH.orig 2005-08-18 12:49:24.000000000 +0000 ++++ Make.defs.SH +@@ -113,6 +113,7 @@ RANLIB = $ranlib RM = $rm TEST = $test TOUCH = $touch @@ -9,11 +12,18 @@ $NetBSD: patch-ad,v 1.6 2001/07/18 20:04:13 martin Exp $ DESTBIN = $installbin DESTLIB = $installlib -@@ -143,6 +144,7 @@ +@@ -143,9 +144,12 @@ INST_MAILER = \ $(RM) -f $@.old ; \ $(TEST) ! -f $@ || $(MV) $@ $@.old ; \ $(RM) -f $@.old ; \ + $(MKDIR) -p `dirname $@` ; \ $(CP) $? $@ ; \ - $(TEST) $(MAILERMODE) -lt 999 || $(CHGRP) $(MAILGRP) $@ ; \ - $(CHMOD) $(MAILERMODE) $@ +- $(TEST) $(MAILERMODE) -lt 999 || $(CHGRP) $(MAILGRP) $@ ; \ +- $(CHMOD) $(MAILERMODE) $@ ++ $(CHMOD) a+x $@ ++# now done by pkgsrc makefile with SPECIAL_PERMS ++# $(TEST) $(MAILERMODE) -lt 999 || $(CHGRP) $(MAILGRP) $@ ++# $(CHMOD) $(MAILERMODE) $@ + + # + # Common rules diff --git a/mail/elm/patches/patch-an b/mail/elm/patches/patch-an index 4951be6c217..05038dbe42e 100644 --- a/mail/elm/patches/patch-an +++ b/mail/elm/patches/patch-an @@ -1,8 +1,10 @@ -$NetBSD: patch-an,v 1.1 2008/07/21 05:35:37 dholland Exp $ +$NetBSD: patch-an,v 1.2 2010/04/15 06:50:46 dholland Exp $ ---- nls/gencat/genlib.c.orig 2005-08-18 08:49:24.000000000 -0400 -+++ nls/gencat/genlib.c 2008-07-21 01:07:43.000000000 -0400 -@@ -42,6 +42,8 @@ +Add necessary includes; fix POSIX getline lossage. + +--- nls/gencat/genlib.c.orig 2005-08-18 12:49:24.000000000 +0000 ++++ nls/gencat/genlib.c +@@ -42,6 +42,8 @@ up-to-date. Many thanks. #include #include #if defined(SYSV) || defined(__STDC__) @@ -11,3 +13,30 @@ $NetBSD: patch-an,v 1.1 2008/07/21 05:35:37 dholland Exp $ # include # include # define L_SET SEEK_SET +@@ -86,7 +88,7 @@ static void nomem() { + error(NULL, "out of memory"); + } + +-static char *getline(fd) ++static char *get_line(fd) + int fd; + { + static long len = 0, curlen = BUFSIZ; +@@ -201,7 +203,7 @@ char quote; + ++cptr; + switch (*cptr) { + case '\0': +- cptr = getline(fd); ++ cptr = get_line(fd); + if (!cptr) error(NULL, "premature end of file"); + msglen += strlen(cptr); + i = tptr - msg; +@@ -333,7 +335,7 @@ int fd; + + hconst[0] = '\0'; + +- while (cptr = getline(fd)) { ++ while (cptr = get_line(fd)) { + if (*cptr == '$') { + ++cptr; + if (strncmp(cptr, "set", 3) == 0) { diff --git a/mail/elm/patches/patch-aq b/mail/elm/patches/patch-aq new file mode 100644 index 00000000000..5ec1146d1d0 --- /dev/null +++ b/mail/elm/patches/patch-aq @@ -0,0 +1,24 @@ +$NetBSD: patch-aq,v 1.1 2010/04/15 06:50:46 dholland Exp $ + +destdir support. + +--- nls/Install~ 2005-08-18 12:49:24.000000000 +0000 ++++ nls/Install +@@ -40,12 +40,12 @@ do + echo "\"$InDir\" is not a directory" + continue + fi +- if [ ! -d $DestDir ] ++ if [ ! -d $DESTDIR$DestDir ] + then +- echo "\"$DestDir\" is not a directory" ++ echo "\"$DESTDIR$DestDir\" is not a directory" + continue + fi +- /bin/rm -f $DestDir/$CATNAME +- echo "$GENCAT $DestDir/$CATNAME $InDir/*.m" +- $GENCAT $DestDir/$CATNAME $InDir/*.m ++ /bin/rm -f $DESTDIR$DestDir/$CATNAME ++ echo "$GENCAT $DESTDIR$DestDir/$CATNAME $InDir/*.m" ++ $GENCAT $DESTDIR$DestDir/$CATNAME $InDir/*.m + done < $LANGFILE -- cgit v1.2.3