aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2004-01-19 05:06:55 +0800
committerclement <clement@FreeBSD.org>2004-01-19 05:06:55 +0800
commitb02738ec54a27aba7984d1c1d33a994e366442f1 (patch)
treefd5a0241b607ff078be0c8d355d971f88af2237f
parenteece17459c6230b2977ee73ab784845b799bc4e8 (diff)
downloadfreebsd-ports-graphics-b02738ec54a27aba7984d1c1d33a994e366442f1.tar.gz
freebsd-ports-graphics-b02738ec54a27aba7984d1c1d33a994e366442f1.tar.zst
freebsd-ports-graphics-b02738ec54a27aba7984d1c1d33a994e366442f1.zip
- Add memrchr().
- Maintainer informed. Requested by: many
-rw-r--r--mail/libesmtp/Makefile5
-rw-r--r--mail/libesmtp/files/patch-smtp-tls.c23
2 files changed, 24 insertions, 4 deletions
diff --git a/mail/libesmtp/Makefile b/mail/libesmtp/Makefile
index 4bbf2ec2393..87121962c8c 100644
--- a/mail/libesmtp/Makefile
+++ b/mail/libesmtp/Makefile
@@ -6,6 +6,7 @@
PORTNAME= libesmtp
PORTVERSION= 1.0.2
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://www.stafford.uklinux.net/libesmtp/ \
@@ -20,7 +21,6 @@ USE_GMAKE= yes
USE_OPENSSL= yes
USE_LIBTOOL= yes
USE_PERL5_BUILD=yes
-USE_REINPLACE= yes
INSTALLS_SHLIB= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
@@ -34,9 +34,6 @@ CONFIGURE_ARGS= --enable-all --disable-isoc
DOCS= AUTHORS ChangeLog NEWS Notes README TODO
EXAMPLES= examples/*
-post-patch:
- @${REINPLACE_CMD} 's,memrchr,memchr,' ${WRKSRC}/smtp-tls.c
-
post-install:
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
diff --git a/mail/libesmtp/files/patch-smtp-tls.c b/mail/libesmtp/files/patch-smtp-tls.c
new file mode 100644
index 00000000000..391b58573aa
--- /dev/null
+++ b/mail/libesmtp/files/patch-smtp-tls.c
@@ -0,0 +1,23 @@
+--- smtp-tls.c.orig Mon Jan 19 02:36:32 2004
++++ smtp-tls.c Mon Jan 19 02:41:25 2004
+@@ -450,6 +450,20 @@
+ return 1;
+ }
+
++#if defined(__FreeBSD__)
++void *
++memrchr(const void *v, int c, size_t size)
++{
++ const unsigned char *p = (const unsigned char *) v + size;
++
++ while (size-- > 0) {
++ if (*--p == c)
++ return (void *) p;
++ }
++ return NULL;
++}
++#endif
++
+ /* Perform a domain name comparison where the reference may contain
+ wildcards. This implements the comparison from RFC 2818.
+ Each component of the domain name is matched separately, working from