diff options
author | roam <roam@FreeBSD.org> | 2002-02-22 17:39:21 +0800 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2002-02-22 17:39:21 +0800 |
commit | f19b073239f405dc457c8ec10d7f1ddd433cd46a (patch) | |
tree | d68fc332ec74adfea208748b56ee0670c0a4dd49 | |
parent | 4b7fffd10bd3192aaff9428545ad50de1d49db0b (diff) | |
download | freebsd-ports-gnome-f19b073239f405dc457c8ec10d7f1ddd433cd46a.tar.gz freebsd-ports-gnome-f19b073239f405dc457c8ec10d7f1ddd433cd46a.tar.zst freebsd-ports-gnome-f19b073239f405dc457c8ec10d7f1ddd433cd46a.zip |
Make the strcasestr() definition conditional on OSVERSION.
Respect CFLAGS by patching them into the program Makefile.
No longer override the do-build target, let make(1) do its thing.
No PORTREVISION bump for the strcasestr() fix - this port simply
did not build at all on systems of olde :(
Reported by: <root@lab.simerson.net>
-rw-r--r-- | mail/autorespond/Makefile | 12 | ||||
-rw-r--r-- | mail/autorespond/files/patch-autorespond.c | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/mail/autorespond/Makefile b/mail/autorespond/Makefile index d446f97fc6a5..a71644a03f01 100644 --- a/mail/autorespond/Makefile +++ b/mail/autorespond/Makefile @@ -12,10 +12,16 @@ MASTER_SITES= http://www.inter7.com/devel/ MAINTAINER= roam@FreeBSD.org -do-build: - @cd ${WRKSRC} && ${MAKE} autorespond +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 440003 || ${OSVERSION} >= 500000 && ${OSVERSION} < 500027 +CFLAGS+= -DNEED_STRCASESTR +.endif + +post-patch: + ${PERL} -pi.fbsd -e "s/^(DEFS =.*)/\1 ${CFLAGS}/" ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/autorespond ${PREFIX}/bin/ -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/mail/autorespond/files/patch-autorespond.c b/mail/autorespond/files/patch-autorespond.c index 1dc4a73a97fd..b4c74f42c468 100644 --- a/mail/autorespond/files/patch-autorespond.c +++ b/mail/autorespond/files/patch-autorespond.c @@ -4,7 +4,7 @@ /********************************************************* ** find string in string - ignore case **/ -+/* ++#ifdef NEED_STRCASESTR char *strcasestr( char *_s1, char *_s2 ) { char *s1; @@ -13,7 +13,7 @@ return _s1 + (ptr - s1); } - -+*/ ++#endif |