mail/fdm: Fix non-privileged build and MAXNAMLEN - The patch was added to define the non-posix MAXNAMLEN macro if it was not already defined. - The Makefile had to patched and then inline-replaced to fix the invocation of the install program. Without this, non-root builds fail.diff -r1.1.1.1 -r1.2 pkgsrc/mail/fdm/Makefile
(marino)
@@ -1,29 +1,38 @@ | @@ -1,29 +1,38 @@ | |||
1 | # $NetBSD: Makefile,v 1.1.1.1 2012/08/17 17:45:40 seb Exp $ | 1 | # $NetBSD: Makefile,v 1.2 2012/08/23 18:04:12 marino Exp $ | |
2 | 2 | |||
3 | DISTNAME= fdm-1.6 | 3 | DISTNAME= fdm-1.6 | |
4 | CATEGORIES= mail | 4 | CATEGORIES= mail | |
5 | PKG_REVISION= 1 | |||
5 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fdm/} | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fdm/} | |
6 | 7 | |||
7 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
8 | HOMEPAGE= http://fdm.sourceforge.net/ | 9 | HOMEPAGE= http://fdm.sourceforge.net/ | |
9 | COMMENT= Fetch or receive mail and deliver it in various ways | 10 | COMMENT= Fetch or receive mail and deliver it in various ways | |
10 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
11 | 12 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 14 | |||
14 | INSTALLATION_DIRS+= ${EGDIR} ${DOCDIR} | 15 | INSTALLATION_DIRS+= ${EGDIR} ${DOCDIR} | |
15 | EGDIR= ${PREFIX}/share/examples/fdm | 16 | EGDIR= ${PREFIX}/share/examples/fdm | |
16 | DOCDIR= ${PREFIX}/share/doc/fdm | 17 | DOCDIR= ${PREFIX}/share/doc/fdm | |
17 | 18 | |||
18 | USE_TOOLS+= pax | 19 | USE_TOOLS+= pax | |
19 | MAKE_ENV+= PCRE=1 | 20 | MAKE_ENV+= PCRE=1 | |
20 | 21 | |||
22 | SUBST_CLASSES+= files | |||
23 | SUBST_STAGE.files= post-patch | |||
24 | SUBST_FILES.files= Makefile | |||
25 | SUBST_SED.files= -e "s|@INSTALL_PROGRAM_DIR@|${INSTALL_PROGRAM_DIR}|" | |||
26 | SUBST_SED.files+= -e "s|@INSTALL_PROGRAM@|${INSTALL_PROGRAM}|" | |||
27 | SUBST_SED.files+= -e "s|@INSTALL_MAN@|${INSTALL_MAN}|" | |||
28 | SUBST_MESSAGE.files= Fixing install invocation in Makefile | |||
29 | ||||
21 | post-install: | 30 | post-install: | |
22 | cd ${WRKSRC}/examples && pax -rwpam . ${DESTDIR}${EGDIR} | 31 | cd ${WRKSRC}/examples && pax -rwpam . ${DESTDIR}${EGDIR} | |
23 | ${INSTALL_DATA} ${WRKSRC}/MANUAL ${DESTDIR}${DOCDIR} | 32 | ${INSTALL_DATA} ${WRKSRC}/MANUAL ${DESTDIR}${DOCDIR} | |
24 | 33 | |||
25 | .include "../../security/openssl/buildlink3.mk" | 34 | .include "../../security/openssl/buildlink3.mk" | |
26 | .include "../../devel/zlib/buildlink3.mk" | 35 | .include "../../devel/zlib/buildlink3.mk" | |
27 | .include "../../devel/pcre/buildlink3.mk" | 36 | .include "../../devel/pcre/buildlink3.mk" | |
28 | .include "../../databases/tdb/buildlink3.mk" | 37 | .include "../../databases/tdb/buildlink3.mk" | |
29 | .include "../../mk/bsd.pkg.mk" | 38 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.1.1.1 2012/08/17 17:45:40 seb Exp $ | 1 | $NetBSD: distinfo,v 1.2 2012/08/23 18:04:12 marino Exp $ | |
2 | 2 | |||
3 | SHA1 (fdm-1.6.tar.gz) = fb8042f2355062848ff142c9604069b6657e6a82 | 3 | SHA1 (fdm-1.6.tar.gz) = fb8042f2355062848ff142c9604069b6657e6a82 | |
4 | RMD160 (fdm-1.6.tar.gz) = 7e2c846b97dce20e123b8453732e107f88e0de8f | 4 | RMD160 (fdm-1.6.tar.gz) = 7e2c846b97dce20e123b8453732e107f88e0de8f | |
5 | Size (fdm-1.6.tar.gz) = 192159 bytes | 5 | Size (fdm-1.6.tar.gz) = 192159 bytes | |
6 | SHA1 (patch-aa) = 48df1eff56801692dc27a1e8670f155afd392f67 | 6 | SHA1 (patch-aa) = 4284d7fc2e88fc9d42fc861e19a890dd526354d6 | |
7 | SHA1 (patch-fdm.h) = 03ad0167120e06e76f4f1ef086c918c6a0cccf55 |
@@ -1,25 +1,38 @@ | @@ -1,25 +1,38 @@ | |||
1 | $NetBSD: patch-aa,v 1.1.1.1 2012/08/17 17:45:40 seb Exp $ | 1 | $NetBSD: patch-aa,v 1.2 2012/08/23 18:04:12 marino Exp $ | |
2 | 2 | |||
3 | cleanup cpp args dans adjust/fix Darwin build | 3 | cleanup cpp args dans adjust/fix Darwin build | |
4 | 4 | |||
5 | --- Makefile.orig 2008-12-22 16:20:05.000000000 +0000 | 5 | --- Makefile.orig 2008-12-22 16:20:05.000000000 +0000 | |
6 | +++ Makefile | 6 | +++ Makefile | |
7 | @@ -37,7 +37,7 @@ HDRS= fdm.h array.h fetch.h match.h deli | 7 | @@ -37,7 +37,7 @@ HDRS= fdm.h array.h fetch.h match.h deli | |
8 | YACC= yacc -d | 8 | YACC= yacc -d | |
9 | 9 | |||
10 | CC?= cc | 10 | CC?= cc | |
11 | -INCDIRS+= -I. -I- -I/usr/local/include | 11 | -INCDIRS+= -I. -I- -I/usr/local/include | |
12 | +INCDIRS+= -I. | 12 | +INCDIRS+= -I. | |
13 | .ifdef PROFILE | 13 | .ifdef PROFILE | |
14 | # Don't use ccache | 14 | # Don't use ccache | |
15 | CC= /usr/bin/gcc | 15 | CC= /usr/bin/gcc | |
16 | @@ -70,7 +70,8 @@ LIBS+= -lpcre | 16 | @@ -70,7 +70,8 @@ LIBS+= -lpcre | |
17 | .if ${OS} == "Darwin" | 17 | .if ${OS} == "Darwin" | |
18 | SRCS+= compat/strtonum.c | 18 | SRCS+= compat/strtonum.c | |
19 | INCDIRS+= -Icompat -I/usr/local/include/openssl | 19 | INCDIRS+= -Icompat -I/usr/local/include/openssl | |
20 | -CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE | 20 | -CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE | |
21 | +CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE -DNO_QUEUE_H -DNO_TREE_H | 21 | +CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE -DNO_QUEUE_H -DNO_TREE_H | |
22 | +LIBS+= -lresolv | 22 | +LIBS+= -lresolv | |
23 | .endif | 23 | .endif | |
24 | 24 | |||
25 | # NetBSD | 25 | # NetBSD | |
26 | @@ -93,9 +94,9 @@ CFLAGS+= -DNO_STRTONUM | |||
27 | .endif | |||
28 | ||||
29 | PREFIX?= /usr/local | |||
30 | -INSTALLDIR= install -d | |||
31 | -INSTALLBIN= install -g bin -o root -m 555 | |||
32 | -INSTALLMAN= install -g bin -o root -m 444 | |||
33 | +INSTALLDIR= @INSTALL_PROGRAM_DIR@ | |||
34 | +INSTALLBIN= @INSTALL_PROGRAM@ | |||
35 | +INSTALLMAN= @INSTALL_MAN@ | |||
36 | ||||
37 | LDFLAGS+= -L/usr/local/lib | |||
38 | .ifdef PROFILE |
$NetBSD: patch-fdm.h,v 1.1 2012/08/23 18:04:12 marino Exp $
--- fdm.h.orig 2012-08-23 17:13:57.000000000 +0000
+++ fdm.h
@@ -71,6 +71,10 @@
extern char *__progname;
+#ifndef MAXNAMLEN
+#define MAXNAMLEN NAME_MAX
+#endif
+
/* Linux compatibility bullshit. */
#ifndef UID_MAX
#define UID_MAX UINT_MAX