Open Cubic Player first appeared around December 1994 as a DOS

binary-only module player. It supported many soundcards and module
formats.

At some point, the source code was released to the public under the
terms of the GNU General Public License, and around 2003 Stian
Skjelstad ported the code to Linux.

In addition to legacy tracker formats such as mod, xm and s3m, Open
Cubic Player now also supports mp3 and ogg files.

PR:		ports/80276
Submitted by:	Emanuel Haupt <ehaupt@critical.ch>
Approved by:	adamw (mentor)
This commit is contained in:
Jean-Yves Lefort 2005-04-24 14:11:31 +00:00
parent c88dce56ec
commit 8e2b69549d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134061
11 changed files with 270 additions and 0 deletions

View File

@ -319,6 +319,7 @@
SUBDIR += normalize
SUBDIR += nosefart
SUBDIR += nspmod
SUBDIR += ocp
SUBDIR += oggsplit
SUBDIR += openal
SUBDIR += opennap

70
audio/ocp/Makefile Normal file
View File

@ -0,0 +1,70 @@
# New ports collection makefile for: ocp
# Date created: 22 April 2005
# Whom: Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#
PORTNAME= ocp
PORTVERSION= 0.1.5
CATEGORIES= audio
MASTER_SITES= http://labs.nixia.no/
MAINTAINER= ehaupt@critical.ch
COMMENT= The legendary Open Cubic Player
LIB_DEPENDS= sidplay.1:${PORTSDIR}/audio/libsidplay \
id3tag.2:${PORTSDIR}/audio/libid3tag \
mad.2:${PORTSDIR}/audio/libmad \
vorbis.3:${PORTSDIR}/audio/libvorbis
ONLY_FOR_ARCHS= i386
USE_XLIB= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_REINPLACE= yes
USE_GCC= 3.4+
CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
CONFIGURE_ENV= CFLAGS="${CFLAGS} ${CPPFLAGS}" \
CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}" \
CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}"
post-patch:
@${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|ocp-" VERSION|ocp"|' \
${WRKSRC}/boot/kickload.c
@${REINPLACE_CMD} -e 's|\(-shared\)|-L${LOCALBASE}/lib -L${X11BASE}/lib \1|' \
${WRKSRC}/playmp2/Makefile \
${WRKSRC}/playogg/Makefile \
${WRKSRC}/playsid/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ocp ${PREFIX}/bin
${CHMOD} u+s ${PREFIX}/bin/ocp
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/cp.pak ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/ocp.ini ${PREFIX}/etc/ocp.ini.default
.if !exists(${PREFIX}/etc/ocp.ini)
${INSTALL_DATA} ${WRKSRC}/ocp.ini ${PREFIX}/etc
.endif
${MKDIR} ${PREFIX}/lib/ocp
${INSTALL_DATA} ${WRKSRC}/*.so ${PREFIX}/lib/ocp
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for f in AUTHORS BUGS CREDITS Changelog KEYBOARD_REMAPS SUID TODO
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

2
audio/ocp/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (ocp-0.1.5.tar.gz) = 96ba21bdecb79f8290613479461f9f1d
SIZE (ocp-0.1.5.tar.gz) = 612916

View File

@ -0,0 +1,10 @@
--- dev/mix.c.orig Sat Apr 23 23:13:56 2005
+++ dev/mix.c Sat Apr 23 23:14:04 2005
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include "mcp.h"

View File

@ -0,0 +1,12 @@
--- filesel/arctar.c.orig Sun Apr 24 02:06:12 2005
+++ filesel/arctar.c Sun Apr 24 02:07:06 2005
@@ -13,9 +13,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef __linux
-#include <sys/resource.h>
-#endif
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/time.h>

View File

@ -0,0 +1,12 @@
--- lrmi-0.8/vbetest.c.orig Fri Mar 25 18:13:15 2005
+++ lrmi-0.8/vbetest.c Sat Apr 23 19:51:05 2005
@@ -18,7 +18,8 @@
#include <dev/wscons/wsconsio.h>
#include <machine/sysarch.h>
#elif defined(__FreeBSD__)
-#include <machine/console.h>
+#include <sys/consio.h>
+#include <sys/kbio.h>
#include <machine/sysarch.h>
#endif

View File

@ -0,0 +1,10 @@
--- playgmd/gmdlokt.c.orig Sun Apr 24 02:08:10 2005
+++ playgmd/gmdlokt.c Sun Apr 24 02:08:24 2005
@@ -9,6 +9,7 @@
*/
#include "config.h"
+#include <sys/types.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -0,0 +1,17 @@
--- 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

View File

@ -0,0 +1,62 @@
--- 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;
+}

15
audio/ocp/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
Open Cubic Player first appeared around December 1994 as a DOS
binary-only module player. It supported many soundcards and module
formats.
At some point, the source code was released to the public under the
terms of the GNU General Public License, and around 2003 Stian
Skjelstad ported the code to Linux.
In addition to legacy tracker formats such as mod, xm and s3m, Open
Cubic Player now also supports mp3 and ogg files.
WWW: http://labs.nixia.no/ocp.php
- ehaupt
ehaupt@critical.ch

59
audio/ocp/pkg-plist Normal file
View File

@ -0,0 +1,59 @@
bin/ocp
@unexec if cmp -s %D/etc/ocp.ini %D/etc/ocp.ini.default; then rm -f %D/etc/ocp.ini; fi
etc/ocp.ini.default
@exec [ -f %B/ocp.ini ] || cp %B/%f %B/ocp.ini
lib/ocp/arctar.so
lib/ocp/compat.so
lib/ocp/cphelper.so
lib/ocp/cphlpif.so
lib/ocp/cpiface.so
lib/ocp/devi.so
lib/ocp/devpdisk.so
lib/ocp/devpnone.so
lib/ocp/devposs.so
lib/ocp/devsnone.so
lib/ocp/devsoss.so
lib/ocp/devwmix.so
lib/ocp/devwmixf.so
lib/ocp/devwnone.so
lib/ocp/framelock.so
lib/ocp/fstypes.so
lib/ocp/hardware.so
lib/ocp/inflate.so
lib/ocp/libocp.so
lib/ocp/load669.so
lib/ocp/loadams.so
lib/ocp/loaddmf.so
lib/ocp/loadmdl.so
lib/ocp/loadmtm.so
lib/ocp/loadokt.so
lib/ocp/loadptm.so
lib/ocp/loads3m.so
lib/ocp/loadult.so
lib/ocp/mchasm.so
lib/ocp/mcpbase.so
lib/ocp/mixclip.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
lib/ocp/playsid.so
lib/ocp/playwav.so
lib/ocp/playxm.so
lib/ocp/plrbase.so
lib/ocp/poutput.so
lib/ocp/sets.so
lib/ocp/smpbase.so
%%DATADIR%%/cp.pak
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/BUGS
%%PORTDOCS%%%%DOCSDIR%%/CREDITS
%%PORTDOCS%%%%DOCSDIR%%/Changelog
%%PORTDOCS%%%%DOCSDIR%%/KEYBOARD_REMAPS
%%PORTDOCS%%%%DOCSDIR%%/SUID
%%PORTDOCS%%%%DOCSDIR%%/TODO
@dirrm lib/ocp
@dirrm %%DATADIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%