aboutsummaryrefslogtreecommitdiff
path: root/x11-fm/endeavour
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2002-09-17 13:46:31 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2002-09-17 13:46:31 +0000
commit353e269ea77463fca90e74c3a12da1a1fabd2d13 (patch)
treebaa62eda07f78e0adc813ce6640415159c8a3511 /x11-fm/endeavour
parent6ae0d6f013c9332c17124d0c4b788f5f76612411 (diff)
downloadports-353e269ea77463fca90e74c3a12da1a1fabd2d13.tar.gz
ports-353e269ea77463fca90e74c3a12da1a1fabd2d13.zip
fix for strcasestr problem
PR: 35244 Submitted by: Miguel Mendez <flynn@energyhq.homeip.net>
Notes
Notes: svn path=/head/; revision=66508
Diffstat (limited to 'x11-fm/endeavour')
-rw-r--r--x11-fm/endeavour/Makefile8
-rw-r--r--x11-fm/endeavour/files/patch-endeavour::string.cpp17
-rw-r--r--x11-fm/endeavour/files/patch-include::string.h6
3 files changed, 19 insertions, 12 deletions
diff --git a/x11-fm/endeavour/Makefile b/x11-fm/endeavour/Makefile
index a4b1fefe2e78..420ed3b8ac47 100644
--- a/x11-fm/endeavour/Makefile
+++ b/x11-fm/endeavour/Makefile
@@ -28,6 +28,12 @@ MAKE_ARGS= PREFIX="${PREFIX}" CC="${CC}" CPP="${CXX}" \
LIBS="`imlib-config --libs` -lXpm" \
LIB_DIRS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 440003 || ${OSVERSION} >= 500000 && ${OSVERSION} < 500027
+CFLAGS+= -DNEED_STRCASESTR
+.endif
+
pre-patch:
@${REINPLACE_CMD} -e 's|make |\$$\(MAKE\) |g' ${WRKSRC}/Makefile
@${FIND} ${WRKSRC}/endeavour -type f | ${XARGS} ${REINPLACE_CMD} -e \
@@ -39,4 +45,4 @@ pre-patch:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/endeavour/endeavour ${PREFIX}/bin
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/x11-fm/endeavour/files/patch-endeavour::string.cpp b/x11-fm/endeavour/files/patch-endeavour::string.cpp
index d3a40a9304af..d5c969386ad4 100644
--- a/x11-fm/endeavour/files/patch-endeavour::string.cpp
+++ b/x11-fm/endeavour/files/patch-endeavour::string.cpp
@@ -1,23 +1,24 @@
---- endeavour/string.cpp.orig Tue Jan 29 17:05:25 2002
-+++ endeavour/string.cpp Tue Jan 29 17:11:26 2002
-@@ -35,7 +35,7 @@
+--- endeavour/string.cpp.orig Sat Feb 23 16:24:43 2002
++++ endeavour/string.cpp Sat Feb 23 16:27:03 2002
+@@ -35,7 +35,9 @@
#endif /* __MSW__ */
const char *strseekblank(const char *s);
--const char *strcasestr(const char *haystack, const char *needle);
-+// const char *strcasestr(const char *haystack, const char *needle);
++#ifdef NEED_STRCASESTR
+ const char *strcasestr(const char *haystack, const char *needle);
++#endif
int strpfx(const char *str, const char *pfx);
int strcasepfx(const char *str, const char *pfx);
void strtoupper(char *s);
-@@ -219,6 +219,7 @@
+@@ -219,6 +221,7 @@
* Case insensitive version of strstr(). Returns the pointer to
* needle in haystack if found or NULL on no match.
*/
-+#ifndef __FreeBSD__
++#ifdef NEED_STRCASESTR
const char *strcasestr(const char *haystack, const char *needle)
{
const char *strptr1, *strptr2, *strptr3;
-@@ -276,7 +277,7 @@
+@@ -276,7 +279,7 @@
return(NULL);
}
diff --git a/x11-fm/endeavour/files/patch-include::string.h b/x11-fm/endeavour/files/patch-include::string.h
index 5a3899ab5b9e..c1d10238e0a5 100644
--- a/x11-fm/endeavour/files/patch-include::string.h
+++ b/x11-fm/endeavour/files/patch-include::string.h
@@ -1,10 +1,10 @@
---- include/string.h.orig Tue Jan 29 16:54:50 2002
-+++ include/string.h Tue Jan 29 16:55:21 2002
+--- include/string.h.orig Sat Feb 23 16:37:45 2002
++++ include/string.h Sat Feb 23 16:37:48 2002
@@ -24,7 +24,9 @@
extern int strcasecmp(const char *s1, const char *s2);
#endif
extern const char *strseekblank(const char *s);
-+#ifndef __FreeBSD__
++#ifdef NEED_STRCASESTR
extern const char *strcasestr(const char *haystack, const char *needle);
+#endif
extern int strpfx(const char *str, const char *pfx);