diff options
-rw-r--r-- | audio/ocp/Makefile | 38 | ||||
-rw-r--r-- | audio/ocp/distinfo | 4 | ||||
-rw-r--r-- | audio/ocp/files/patch-playmp2_Makefile | 17 | ||||
-rw-r--r-- | audio/ocp/files/patch-playmp2_memmem.c | 62 | ||||
-rw-r--r-- | audio/ocp/pkg-plist | 3 |
5 files changed, 33 insertions, 91 deletions
diff --git a/audio/ocp/Makefile b/audio/ocp/Makefile index cebfcf71f87c..392e40347d29 100644 --- a/audio/ocp/Makefile +++ b/audio/ocp/Makefile @@ -6,7 +6,7 @@ # PORTNAME= ocp -PORTVERSION= 0.1.7 +PORTVERSION= 0.1.9 CATEGORIES= audio MASTER_SITES= http://labs.nixia.no/ @@ -27,13 +27,17 @@ USE_GCC= 3.4+ CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib +CFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib +CXXFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= CFLAGS="${CFLAGS} ${CPPFLAGS}" \ CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}" \ CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" -CONFIGURE_ARGS= --with-dir-suffix="" +CONFIGURE_ARGS= --with-dir-suffix="" \ + --libdir=${LOCALBASE}/lib TIMIDITY_CFG= ${LOCALBASE}/share/timidity/timidity.cfg @@ -52,6 +56,14 @@ CONFIGURE_ARGS+= --with-x11=yes .if defined(WITH_DEBUG) CONFIGURE_ARGS+= --with-debug .endif +.if defined(WITH_ADPLUG) +LIB_DEPENDS+= adplug-1.5.1:${PORTSDIR}/audio/libadplug +CONFIGURE_ARGS+= --without-x11 +PLIST_SUB+= ADPLUG="" +.else +PLIST_SUB+= ADPLUG="@comment " +CONFIGURE_ARGS+= --without-adplug +.endif pre-everything:: .if !exists(${TIMIDITY_CFG}) && !defined(WITHOUT_MIDI) @@ -60,27 +72,33 @@ pre-everything:: @${ECHO_MSG} "Define WITHOUT_MIDI if you do not want to install it." @${ECHO_MSG} "" .endif -.if !defined(WITHOUT_X11) +.if !defined(WITHOUT_X11) && !defined(WITH_ADPLUG) @${ECHO_MSG} "" @${ECHO_MSG} "If you want to compile without X11 support, hit Ctrl-C right now and" @${ECHO_MSG} "define WITHOUT_X11" @${ECHO_MSG} "" .endif +# Hangs on exit +.if defined(WITH_ADPLUG) && !defined(WITHOUT_X11) + @${ECHO_MSG} "" + @${ECHO_MSG} "Disabling X11 support. X11 and libadplug usage cannot yet peacefully" + @${ECHO_MSG} "coexist." + @${ECHO_MSG} "" +.endif + post-patch: .if defined(WITH_DEBUG) - @${REINPLACE_CMD} -e 's|/\*\ \(#define\ .*DEBUG\ 1\)\ \*/|\1|' \ + @${REINPLACE_CMD} -e 's|/\*\ \(#define\ LD_DEBUG\ 1\)\ \*/|\1|' \ ${WRKSRC}/config.h.in .endif - @${REINPLACE_CMD} -e 's|@LIBDIR@|${PREFIX}/lib/ocp|' \ - ${WRKSRC}/Rules.make.in @${REINPLACE_CMD} -e 's|stdint\.h|inttypes\.h|' ${WRKSRC}/types.h - @${REINPLACE_CMD} -e 's|\(-shared\)|-L${LOCALBASE}/lib -L${X11BASE}/lib \1|' \ - ${WRKSRC}/playmp2/Makefile \ - ${WRKSRC}/playogg/Makefile \ - ${WRKSRC}/playsid/Makefile @${REINPLACE_CMD} -e 's|/etc/.*\.cfg|${TIMIDITY_CFG}|' \ ${WRKSRC}/playgmi/gmitimidity.c +# conflicts with fnmatch.h from security/heimdal + @${REINPLACE_CMD} -e 's|<\(fnmatch.h\)>|"/usr/include/\1"|' \ + ${WRKSRC}/filesel/adb.c \ + ${WRKSRC}/filesel/pfilesel.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ocp ${PREFIX}/bin diff --git a/audio/ocp/distinfo b/audio/ocp/distinfo index c7ca3e8bffe9..9b9a569abc21 100644 --- a/audio/ocp/distinfo +++ b/audio/ocp/distinfo @@ -1,2 +1,2 @@ -MD5 (ocp-0.1.7.tar.gz) = b04d6cc95f28d2b7fca9caf4b580129b -SIZE (ocp-0.1.7.tar.gz) = 614935 +MD5 (ocp-0.1.9.tar.gz) = 033b17bd7fbbffb55298b9199919d3de +SIZE (ocp-0.1.9.tar.gz) = 588351 diff --git a/audio/ocp/files/patch-playmp2_Makefile b/audio/ocp/files/patch-playmp2_Makefile deleted file mode 100644 index 2a77f5bc44a1..000000000000 --- a/audio/ocp/files/patch-playmp2_Makefile +++ /dev/null @@ -1,17 +0,0 @@ ---- playmp2/Makefile.orig Sat Apr 23 22:20:07 2005 -+++ playmp2/Makefile Sat Apr 23 22:20:39 2005 -@@ -13,7 +13,7 @@ - ../filesel/mdb.h - $(CC) mpptype.c -o $@ -c - --playmp2_so=mppplay.o mpplay.o -+playmp2_so=mppplay.o mpplay.o memmem.o - playmp2.so: $(playmp2_so) - $(CC) -shared -o $@ $^ -lmad -lid3tag -lz - -@@ -45,3 +45,5 @@ - mpplay.h - $(CC) mpplay.c -o $@ -c - -+memmem.o: memmem.c -+ $(CC) memmem.c -o $@ -c diff --git a/audio/ocp/files/patch-playmp2_memmem.c b/audio/ocp/files/patch-playmp2_memmem.c deleted file mode 100644 index eb0c762072c2..000000000000 --- a/audio/ocp/files/patch-playmp2_memmem.c +++ /dev/null @@ -1,62 +0,0 @@ ---- playmp2/memmem.c.orig Sat Apr 23 22:19:21 2005 -+++ playmp2/memmem.c Sat Apr 23 22:19:15 2005 -@@ -0,0 +1,59 @@ -+/* Copyright (C) 1991,92,93,94,96,97,98,2000 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include <stddef.h> -+#include <string.h> -+ -+/* Prepare for the case that `__builtin_expect' is not available. */ -+#ifndef HAVE_BUILTIN_EXPECT -+# define __builtin_expect(expr, val) (expr) -+#endif -+ -+#undef memmem -+ -+/* Return the first occurrence of NEEDLE in HAYSTACK. */ -+void * -+memmem (haystack, haystack_len, needle, needle_len) -+ const void *haystack; -+ size_t haystack_len; -+ const void *needle; -+ size_t needle_len; -+{ -+ const char *begin; -+ const char *const last_possible -+ = (const char *) haystack + haystack_len - needle_len; -+ -+ if (needle_len == 0) -+ /* The first occurrence of the empty string is deemed to occur at -+ the beginning of the string. */ -+ return (void *) haystack; -+ -+ /* Sanity check, otherwise the loop might search through the whole -+ memory. */ -+ if (__builtin_expect (haystack_len < needle_len, 0)) -+ return NULL; -+ -+ for (begin = (const char *) haystack; begin <= last_possible; ++begin) -+ if (begin[0] == ((const char *) needle)[0] && -+ !memcmp ((const void *) &begin[1], -+ (const void *) ((const char *) needle + 1), -+ needle_len - 1)) -+ return (void *) begin; -+ -+ return NULL; -+} diff --git a/audio/ocp/pkg-plist b/audio/ocp/pkg-plist index 494fc66d6704..969f14fd2e0e 100644 --- a/audio/ocp/pkg-plist +++ b/audio/ocp/pkg-plist @@ -34,13 +34,16 @@ lib/ocp/medialib.so lib/ocp/mchasm.so lib/ocp/mcpbase.so lib/ocp/mixclip.so +%%ADPLUG%%lib/ocp/opltype.so lib/ocp/pfilesel.so lib/ocp/playgmd.so lib/ocp/playgmi.so lib/ocp/playit.so lib/ocp/playmp2.so lib/ocp/playogg.so +%%ADPLUG%%lib/ocp/playopl.so lib/ocp/playsid.so +lib/ocp/sidtype.so lib/ocp/playwav.so lib/ocp/playxm.so lib/ocp/plrbase.so |