From owner-freebsd-ports Sat Feb 23 7:50:20 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 14DA537B416 for ; Sat, 23 Feb 2002 07:50:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1NFo2Y30815; Sat, 23 Feb 2002 07:50:02 -0800 (PST) (envelope-from gnats) Received: from energyhq.homeip.net (213-97-200-73.uc.nombres.ttd.es [213.97.200.73]) by hub.freebsd.org (Postfix) with ESMTP id 53ACB37B400 for ; Sat, 23 Feb 2002 07:46:51 -0800 (PST) Received: by energyhq.homeip.net (Postfix, from userid 1001) id 3761A3FC32; Sat, 23 Feb 2002 16:46:07 +0100 (CET) Message-Id: <20020223154607.3761A3FC32@energyhq.homeip.net> Date: Sat, 23 Feb 2002 16:46:07 +0100 (CET) From: Miguel Mendez Reply-To: Miguel Mendez To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/35244: proper fix for x11-fm/endeavour's strcasestr problem Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35244 >Category: ports >Synopsis: proper fix for x11-fm/endeavour's strcasestr problem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Feb 23 07:50:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Miguel Mendez >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD energyhq.homeip.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Thu Feb 14 12:09:50 CET 2002 root@energyhq.homeip.net:/storage2/obj/storage2/src/sys/ENERGYHQ i386 >Description: The current patch for strcasestr prevents endeavour from being built on older FreeBSD releases where that function is not yet part of libc. >How-To-Repeat: >Fix: --- endeavour.diff begins here --- diff -ruN endeavour.old/Makefile endeavour/Makefile --- endeavour.old/Makefile Fri Jun 15 14:42:35 2001 +++ endeavour/Makefile Sat Feb 23 16:30:13 2002 @@ -26,6 +26,12 @@ LIBS="`imlib-config --libs` -lXpm" \ LIB_DIRS="-L${X11BASE}/lib" +.include + +.if ${OSVERSION} < 440003 || ${OSVERSION} >= 500000 && ${OSVERSION} < 500027 +CFLAGS+= -DNEED_STRCASESTR +.endif + pre-patch: @${PERL} -pi -e 's|make |\$$\(MAKE\) |g' ${WRKSRC}/Makefile @find ${WRKSRC}/endeavour -type f | xargs ${PERL} -pi -e \ @@ -37,4 +43,4 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/endeavour/endeavour ${PREFIX}/bin -.include +.include diff -ruN endeavour.old/files/patch-endeavour::string.cpp endeavour/files/patch-endeavour::string.cpp --- endeavour.old/files/patch-endeavour::string.cpp Tue Jan 29 21:32:39 2002 +++ endeavour/files/patch-endeavour::string.cpp Sat Feb 23 16:27:45 2002 @@ -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 -ruN endeavour.old/files/patch-include::string.h endeavour/files/patch-include::string.h --- endeavour.old/files/patch-include::string.h Tue Jan 29 21:32:39 2002 +++ endeavour/files/patch-include::string.h Sat Feb 23 16:38:17 2002 @@ -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); --- endeavour.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message