diff options
author | riastradh <riastradh@pkgsrc.org> | 2019-07-09 15:46:42 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2019-07-09 15:46:42 +0000 |
commit | 65bb866ba38adf116c6154c8eabe19b80348b208 (patch) | |
tree | 5a406424317a5112b5436dc3ca3cb5130432c07e /mail | |
parent | c004390ab40ad38720612b0e299c396b00cacc29 (diff) | |
download | pkgsrc-65bb866ba38adf116c6154c8eabe19b80348b208.tar.gz |
Teach procmail to cross-compile on NetBSD.
No revbump because this was not cross-compilable before.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/procmail/Makefile | 15 | ||||
-rw-r--r-- | mail/procmail/distinfo | 4 | ||||
-rw-r--r-- | mail/procmail/files/autoconf-NetBSD.h.in | 28 | ||||
-rw-r--r-- | mail/procmail/patches/patch-Makefile | 14 | ||||
-rw-r--r-- | mail/procmail/patches/patch-src_Makefile.0 | 39 |
5 files changed, 98 insertions, 2 deletions
diff --git a/mail/procmail/Makefile b/mail/procmail/Makefile index ecd1cd3ccc8..19650cb107b 100644 --- a/mail/procmail/Makefile +++ b/mail/procmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.50 2017/11/26 20:39:40 snj Exp $ +# $NetBSD: Makefile,v 1.51 2019/07/09 15:46:42 riastradh Exp $ DISTNAME= procmail-3.22 PKGREVISION= 5 @@ -45,6 +45,19 @@ pre-configure: >> ${WRKSRC}/src/authenticate.h .endif +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +MAKE_FLAGS+= CC_FOR_BUILD=${NATIVE_CC:Q} + +.if exists(${FILESDIR}/autoconf-${OPSYS}.h.in) +post-configure: + cd ${WRKSRC} && ${MAKE} init + ${SED} -e s,@PREFIX@,${PREFIX:U},g \ + -e s,@PKGVERSION@,${PKGVERSION:U},g \ + < ${FILESDIR}/autoconf-${OPSYS}.h.in \ + > ${WRKSRC}/autoconf.h +.endif +.endif + .if ${OPSYS} == "SunOS" do-install: cd ${WRKSRC}/new; \ diff --git a/mail/procmail/distinfo b/mail/procmail/distinfo index 59c3cbf84ea..ed70ee9d62a 100644 --- a/mail/procmail/distinfo +++ b/mail/procmail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.17 2017/11/26 20:39:40 snj Exp $ +$NetBSD: distinfo,v 1.18 2019/07/09 15:46:42 riastradh Exp $ SHA1 (procmail-3.22.tar.gz) = cd4e44c15559816453fd60349e5a32289f6f2965 RMD160 (procmail-3.22.tar.gz) = e609ec94ea9ab3b93629c62b3e29add497806483 @@ -15,3 +15,5 @@ SHA1 (patch-ba) = 2ebbd43d2773b147ee6410e37ab3696aeda3c07c SHA1 (patch-bb) = 5b273bd60d24168794189bb844e39e94bd688ea8 SHA1 (patch-bc) = 7344d3c2fce1bcd3276d8e5014bf9537c6dece5c SHA1 (patch-bd) = 27a7711e400f934bc82937eae68681e0b5c30c4a +SHA1 (patch-Makefile) = d37a6b8d7769bd98efeca3abb7d52b12873971c0 +SHA1 (patch-src_Makefile.0) = 9136b5f011456cba313d1a4884144e881974261d diff --git a/mail/procmail/files/autoconf-NetBSD.h.in b/mail/procmail/files/autoconf-NetBSD.h.in new file mode 100644 index 00000000000..b88974c0913 --- /dev/null +++ b/mail/procmail/files/autoconf-NetBSD.h.in @@ -0,0 +1,28 @@ +/* This file was automagically generated by autoconf */ + +/* 65 moves in 64 steps of size 16384 when reallocing */ +#define INEFFICIENTrealloc +#define NOsetrgid +#define GOT_bin_test +#define MAX_argc 15300 +/* Your system's strstr() is 1.91 times SLOWER than my C-routine */ +#define SLOWstrstr /* using my substitute instead */ +#define UDP_protocolno 17 +#define BIFF_serviceport "512" +#define IP_localhost {127,0,0,1} +#define MAILSPOOLDIR "/var/mail/" +#define SENDMAIL "/usr/sbin/sendmail" +#define CF_no_procmail_yet +#define buggy_SENDMAIL +#define defPATH "PATH=$HOME/bin:/bin:/usr/bin:@PREFIX@/bin:/usr/X11R7/bin" +#define defSPATH "PATH=/bin:/usr/bin:@PREFIX@/bin:/usr/X11R7/bin" +#define PM_VERSION "@PKGVERSION@" +/*locktype: 4, countlocks: 80, timeout 0, watchdog 14, /tmp/_locktest*/ +/*locktype: 2, countlocks: 0, timeout 0, watchdog 8, /tmp/_locktest*/ +/*locktype: 2, countlocks: 0, timeout 0, watchdog 8, ./_locktest*/ +/*locktype: 3, countlocks: 80, timeout 0, watchdog 14, /tmp/_locktest*/ +/* Hotwire LOCKINGTEST=010 */ +/* Procmail will lock via: dotlocking, lockf() */ +#define NOfcntl_lock +#define USElockf +/* autoconf completed */ diff --git a/mail/procmail/patches/patch-Makefile b/mail/procmail/patches/patch-Makefile new file mode 100644 index 00000000000..faa9901d643 --- /dev/null +++ b/mail/procmail/patches/patch-Makefile @@ -0,0 +1,14 @@ +$NetBSD: patch-Makefile,v 1.1 2019/07/09 15:46:42 riastradh Exp $ + +Define CC_FOR_BUILD so we can use it even when not cross-compiling. + +--- Makefile.orig 2019-07-08 17:03:10.000000000 +0000 ++++ Makefile +@@ -95,6 +95,7 @@ CFLAGS1 = $(CFLAGS0) #-posix -Xp + LDFLAGS1= $(LDFLAGS0) $(LIBS) #-lcposix + + ####CC = cc # gcc ++CC_FOR_BUILD = $(CC) + # object file extension + O = o + RM = /bin/rm -f diff --git a/mail/procmail/patches/patch-src_Makefile.0 b/mail/procmail/patches/patch-src_Makefile.0 new file mode 100644 index 00000000000..b659cffbd11 --- /dev/null +++ b/mail/procmail/patches/patch-src_Makefile.0 @@ -0,0 +1,39 @@ +$NetBSD: patch-src_Makefile.0,v 1.1 2019/07/09 15:46:42 riastradh Exp $ + +Compile recommend with CC_FOR_BUILD since it is executed during build. + +--- src/Makefile.0.orig 2001-06-29 02:20:35.000000000 +0000 ++++ src/Makefile.0 +@@ -156,11 +156,15 @@ setid.$(O): setid.c + @$(CC) -c $(CFLAGS) $*.c + + recommend.$(O): recommend.c +- @$(CC) -c $(CFLAGS) $*.c ++ @$(CC_FOR_BUILD) -c $(CFLAGS) $*.c + + .c.$(O): + $(CC) -c $(CFLAGS) $< + ++.SUFFIXES: .host-$(O) ++.c.host-$(O): ++ $(CC_FOR_BUILD) -c -o $@ $(CFLAGS) $< ++ + gethome: gethome.$(O) setid + @$(CC) $(CFLAGS) $@.$(O) -o $@ $(LDFLAGS) + +@@ -170,12 +174,12 @@ getparams: + setid: setid.$(O) + @$(CC) $(CFLAGS) $@.$(O) -o $@ $(LDFLAGS) + +-recommend: recommend.$(O) sublib.$(O) +- @$(CC) $(CFLAGS) $@.$(O) sublib.$(O) -o $@ $(LDFLAGS) ++recommend: recommend.$(O) sublib.host-$(O) ++ @$(CC_FOR_BUILD) $(CFLAGS) $@.$(O) sublib.host-$(O) -o $@ $(LDFLAGS) + + ../man/man.sed: manconf.c ../autoconf.h ../config.h includes.h procmail.h + ../man/man.sed: ../patchlevel.h +- @$(CC) $(CFLAGS) "-DBINDIR=\"$(VISIBLE_BINDIR)\"" -o _autotst \ ++ @$(CC_FOR_BUILD) $(CFLAGS) "-DBINDIR=\"$(VISIBLE_BINDIR)\"" -o _autotst \ + manconf.c $(LDFLAGS) + @./_autotst $@ + @echo Housekeeping file >$@ |