summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authortrevor <trevor@FreeBSD.org>2005-01-19 07:36:45 +0000
committertrevor <trevor@FreeBSD.org>2005-01-19 07:36:45 +0000
commitfb439efe3ed0681b71aba44e82570f78bd1f4010 (patch)
tree969f3f9b4a7543d24b65ac2286bf11cc52bbaace /audio
parent3c3f715b00219a04be572db0735d7710e8b8f14c (diff)
downloadFreeBSD-ports-fb439efe3ed0681b71aba44e82570f78bd1f4010.zip
FreeBSD-ports-fb439efe3ed0681b71aba44e82570f78bd1f4010.tar.gz
The useless wctype.h in FreeBSD 4 confuses streamripper's configure
script. Patch around the problem.
Diffstat (limited to 'audio')
-rw-r--r--audio/streamripper/Makefile8
-rw-r--r--audio/streamripper/files/patch-lib_util.c33
2 files changed, 34 insertions, 7 deletions
diff --git a/audio/streamripper/Makefile b/audio/streamripper/Makefile
index effdde2..816c467 100644
--- a/audio/streamripper/Makefile
+++ b/audio/streamripper/Makefile
@@ -24,10 +24,4 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
PLIST_FILES= bin/streamripper
MAN1= streamripper.1
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN= "Does not compile on FreeBSD < 5.x"
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/audio/streamripper/files/patch-lib_util.c b/audio/streamripper/files/patch-lib_util.c
new file mode 100644
index 0000000..365ef2f
--- /dev/null
+++ b/audio/streamripper/files/patch-lib_util.c
@@ -0,0 +1,33 @@
+Argh, FreeBSD 4.X has a wctype.h header that does nothing.
+
+--- lib/util.c.orig Sat Nov 13 17:41:09 2004
++++ lib/util.c Wed Jan 19 07:01:41 2005
+@@ -28,9 +28,7 @@
+ #if defined HAVE_WCHAR_H
+ #include <wchar.h>
+ #endif
+-#if defined HAVE_WCTYPE_H
+-#include <wctype.h>
+-#endif
++#include <ctype.h>
+ #endif
+ #include <locale.h>
+ #include <time.h>
+@@ -464,7 +462,7 @@ strip_invalid_chars_testing(char *str)
+
+ /* Replace illegals to legal */
+ for (wstrp = w_in; *wstrp; wstrp++) {
+- if ((wcschr(w_invalid, *wstrp) == NULL) && (!iswcntrl(*wstrp)))
++ if ((wcschr(w_invalid, *wstrp) == NULL) && (!iscntrl(*wstrp)))
+ continue;
+ *wstrp = replacement;
+ }
+@@ -543,7 +541,7 @@ strip_invalid_chars_stable(char *str)
+
+ /* Replace illegals to legal */
+ for (wstrp = w_in; *wstrp; wstrp++) {
+- if ((wcschr(w_invalid, *wstrp) == NULL) && (!iswcntrl(*wstrp)))
++ if ((wcschr(w_invalid, *wstrp) == NULL) && (!iscntrl(*wstrp)))
+ continue;
+ *wstrp = replacement;
+ }
OpenPOWER on IntegriCloud