From 068a8081c55f626678f48dcb719d72bf77530d0b Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 26 Sep 2008 02:22:59 +0000 Subject: [PATCH] o Detect and use memrchr supplied by the distribution when running system does not have memrchr(3). o Pass maintainership to submitter. Submitted by: Eric L. Chen --- textproc/stardict3/Makefile | 10 +++++++--- textproc/stardict3/files/src_conf.h | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 textproc/stardict3/files/src_conf.h diff --git a/textproc/stardict3/Makefile b/textproc/stardict3/Makefile index 4148088ef603..c030e8684a8f 100644 --- a/textproc/stardict3/Makefile +++ b/textproc/stardict3/Makefile @@ -12,10 +12,10 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} DIST_SUBDIR= stardict -MAINTAINER= delphij@FreeBSD.org +MAINTAINER= d9364104@mail.nchu.edu.tw COMMENT= A cross-platform and international dictionary written in Gtk2 -LIB_DEPENDS= sigc-2.0.0:${PORTSDIR}/devel/libsigc++20 \ +LIB_DEPENDS= sigc-2.0.0:${PORTSDIR}/devel/libsigc++20 \ enchant.1:${PORTSDIR}/textproc/enchant GNU_CONFIGURE= yes @@ -31,7 +31,7 @@ USE_GETTEXT= yes OPTIONS= GNOMEUI "GNOME support" On -CONFLICTS= stardict-2.[0-9]* +CONFLICTS= stardict-2.[0-9]* .include @@ -48,6 +48,10 @@ PLIST_SUB= GNOME="@comment not installed: " MAN1= stardict.1 +.if (${OSVERSION} < 700109) +EXTRA_PATCHES+= ${FILESDIR}/src_conf.h +.endif + post-install: @${CAT} ${PKGMESSAGE} diff --git a/textproc/stardict3/files/src_conf.h b/textproc/stardict3/files/src_conf.h new file mode 100644 index 000000000000..81ee57537444 --- /dev/null +++ b/textproc/stardict3/files/src_conf.h @@ -0,0 +1,18 @@ +--- src/conf.h.orig 2008-09-26 09:33:59.000000000 +0800 ++++ src/conf.h 2008-09-26 09:34:44.000000000 +0800 +@@ -115,7 +115,6 @@ + std::auto_ptr cf; + cache_t cache; + +-#ifdef _WIN32 + static void *memrchr(const void *mem, int c, size_t len) { + char *res; + char *cmem = (char *)mem; +@@ -127,7 +126,6 @@ + --res; + return res == cmem - 1 ? NULL : res; + } +-#endif + + template + void set_value(const char *name, const T& val, bool abs = true) {