rpms/ocp/F-9 ocp-0.1.15-alsa.patch, NONE, 1.1 ocp-0.1.15-condmad.patch, NONE, 1.1 ocp-0.1.15-docdir.patch, NONE, 1.1 ocp-0.1.15-gcc43.patch, NONE, 1.1 ocp-0.1.15-info-dir.patch, NONE, 1.1 ocp-0.1.15-symlink.patch, NONE, 1.1 ocp-desktop.patch, NONE, 1.1 ocp.spec, NONE, 1.1 sources, 1.1, 1.2

Charles R. Anderson cra at fedoraproject.org
Tue Nov 11 01:11:31 UTC 2008


Author: cra

Update of /cvs/pkgs/rpms/ocp/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10838

Modified Files:
	sources 
Added Files:
	ocp-0.1.15-alsa.patch ocp-0.1.15-condmad.patch 
	ocp-0.1.15-docdir.patch ocp-0.1.15-gcc43.patch 
	ocp-0.1.15-info-dir.patch ocp-0.1.15-symlink.patch 
	ocp-desktop.patch ocp.spec 
Log Message:
initial	import to F-9


ocp-0.1.15-alsa.patch:

--- NEW FILE ocp-0.1.15-alsa.patch ---
diff -up ocp-0.1.15/devp/devpalsa.c.mixer ocp-0.1.15/devp/devpalsa.c
--- ocp-0.1.15/devp/devpalsa.c.mixer	2008-01-14 13:48:59.000000000 -0500
+++ ocp-0.1.15/devp/devpalsa.c	2008-06-17 18:32:18.000000000 -0400
@@ -893,7 +893,8 @@ static void SetOptions(unsigned int rate
 #ifdef ALSA_DEBUG
 	fprintf(stderr, "ALSA snd_pcm_hw_params_any(alsa_pcm, hwparams) = ");
 #endif
-	if ((err=snd_pcm_hw_params_any(alsa_pcm, hwparams)))
+	err=snd_pcm_hw_params_any(alsa_pcm, hwparams);
+        if (err < 0)
 	{
 #ifdef ALSA_DEBUG
 		fprintf(stderr, "failed: %s\n", snd_strerror(-err));
@@ -901,6 +902,7 @@ static void SetOptions(unsigned int rate
 		fprintf(stderr, "ALSA: snd_pcm_hw_params_any() failed: %s\n", snd_strerror(-err));
 		return;
 	}
+	err=0;
 #ifdef ALSA_DEBUG
 	fprintf(stderr, "ok\n");
 	fprintf(stderr, "ALSA snd_pcm_hw_params_set_access(alsa_pcm, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED) = ");
@@ -1225,7 +1227,7 @@ static void alsaOpenDevice(void)
 	}
 #ifdef ALSA_DEBUG
 	fprintf(stderr, "ok\n");
-	fprintf(stderr, "ALSA snd_mixer_attach(mixer, device = \"%s\") = ", device);
+	fprintf(stderr, "ALSA snd_mixer_attach(mixer, device = \"%s\") = ", alsaMixerName);
 #endif
 	if ((err=snd_mixer_attach(mixer, alsaMixerName))<0)
 	{
@@ -1380,7 +1382,7 @@ static int alsaDetect(struct deviceinfo 
 	card->dev=&plrAlsa;
 	snprintf(card->path, sizeof(card->path), "%s", cfGetProfileString("devpALSA", "path", "default"));
 	snprintf(alsaCardName, sizeof(alsaCardName), "%s", card->path);
-	snprintf(card->mixer, sizeof(card->mixer), "%s", cfGetProfileString("devpALSA", "mixer", "hw:0"));
+	snprintf(card->mixer, sizeof(card->mixer), "%s", cfGetProfileString("devpALSA", "mixer", "default"));
 	snprintf(alsaMixerName, sizeof(alsaMixerName), "%s", card->mixer);
 /*	card->irq=-1;
 	card->irq2=-1;

ocp-0.1.15-condmad.patch:

--- NEW FILE ocp-0.1.15-condmad.patch ---
diff -up ocp-0.1.15/config.h.in.condmad ocp-0.1.15/config.h.in
--- ocp-0.1.15/config.h.in.condmad	2008-01-14 13:48:57.000000000 -0500
+++ ocp-0.1.15/config.h.in	2008-06-24 20:38:53.000000000 -0400
@@ -185,6 +185,10 @@
 
 #undef HAVE_X11
 
+#undef HAVE_MAD
+
+#undef HAVE_ID3TAG
+
 #undef HAVE_STDINT_H
 
 #undef HAVE_INTTYPES_H
diff -up ocp-0.1.15/configure.ac.condmad ocp-0.1.15/configure.ac
--- ocp-0.1.15/configure.ac.condmad	2008-01-14 13:48:57.000000000 -0500
+++ ocp-0.1.15/configure.ac	2008-06-24 20:38:53.000000000 -0400
@@ -50,6 +50,9 @@ AC_ARG_WITH(x11, [  --with-x11          
 
 AC_ARG_WITH(adplug, [  --with-adplug           force/disable adplug support],, with_adplug=auto)
 
+AC_ARG_WITH(mad, [  --with-mad           force/disable mad mpeg audio support],, with_mad=auto)
+AC_ARG_WITH(id3tag, [  --with-id3tag           force/disable id3tag support],, with_id3tag=auto)
+
 AC_ARG_WITH(sidplay, [  --with-sidplay          force/disable sidplay support],, with_sidplay=auto)
 
 AC_ARG_WITH(alsa, [  --with-alsa             force/disable alsa support],, with_alsa=auto)
@@ -57,7 +60,7 @@ AC_ARG_WITH(oss,  [  --with-oss         
 
 AC_ARG_WITH(lzw, [  --with-lzw              force/disable lzw support (enabled by default)],, with_lzw=yes)
 
-AC_ARG_WITH(coreaudio, [  --with-coraudio         force/disable osx coreaudio support (autodetect by default)],, with_coreaudio=auto)
+AC_ARG_WITH(coreaudio, [  --with-coreaudio         force/disable osx coreaudio support (autodetect by default)],, with_coreaudio=auto)
 AC_ARG_WITH(flac, [  --with-flac             force/disable FLAC support (autodetect by default)],, with_flac=auto)
 
 if test "x$prefix" = "xNONE"; then
@@ -192,36 +195,60 @@ AC_LANG_POP
 
 AC_SUBST(MAD_CFLAGS)
 AC_SUBST(MAD_LIBS)
-AC_MSG_CHECKING([mad support])
-MAD_LIBS=`pkg-config --libs mad 2> /dev/null`
-MAD_CFLAGS=`pkg-config --cflags mad 2> /dev/null`
-if test "$?" = 0; then
-	AC_MSG_RESULT("$MAD_CFLAGS $MAD_LIBS")
-else
-	AC_MSG_RESULT([pkg-config failed]);
+if test "x$with_mad" != "xno"; then
+	AC_MSG_CHECKING([mad support])
+	MAD_LIBS=`pkg-config --libs mad 2> /dev/null`
+	MAD_CFLAGS=`pkg-config --cflags mad 2> /dev/null`
+	if test "$?" = 0; then
+		AC_MSG_RESULT("$MAD_CFLAGS $MAD_LIBS")
+	else
+		AC_MSG_RESULT([pkg-config failed]);
 dnl Fall back to non-pkg-config method
-	AC_CHECK_LIB(mad, mad_stream_init, , AC_MSG_ERROR("libmad not found", -1))
-	AC_CHECK_HEADER(mad.h, , AC_MSG_ERROR("libmad header files was not found", -1))
-	MAD_LIBS="-lmad -lm"
-	MAD_CFLAGS=""
-	LIBS=$push_LIBS
+		AC_CHECK_LIB(mad, mad_stream_init, , if test "x$with_mad" = "xyes"; then AC_MSG_ERROR("libmad not found", -1); else with_mad="no"; fi)
+		if test "x$with_mad" != "xno"; then
+			AC_CHECK_HEADER(mad.h, , if test "x$with_mad" = "xyes"; then AC_MSG_ERROR("libmad header files was not found", -1); else with_mad="no"; fi)
+		fi
+		if test "x$with_mad" != "xno"; then
+			MAD_LIBS="-lmad -lm"
+			MAD_CFLAGS=""
+			LIBS=$push_LIBS
+		fi
+	fi
+fi
+AC_SUBST(HAVE_MAD)
+if test "x$with_mad" = "xno"; then
+	HAVE_MAD=
+else
+	HAVE_MAD=1
 fi
 
 AC_SUBST(ID3TAG_CFLAGS)
 AC_SUBST(ID3TAG_LIBS)
-AC_MSG_CHECKING([id3tag support])
-ID3TAG_LIBS=`pkg-config --libs id3tag 2> /dev/null`
-ID3TAG_CFLAGS=`pkg-config --cflags id3tag 2> /dev/null`
-if test "$?" = 0; then
-	AC_MSG_RESULT("$ID3TAG_CFLAGS $ID3TAG_LIBS")
-else
-	AC_MSG_RESULT([pkg-config failed]);
+if test "x%with_id3tag" != "xno"; then
+	AC_MSG_CHECKING([id3tag support])
+	ID3TAG_LIBS=`pkg-config --libs id3tag 2> /dev/null`
+	ID3TAG_CFLAGS=`pkg-config --cflags id3tag 2> /dev/null`
+	if test "$?" = 0; then
+		AC_MSG_RESULT("$ID3TAG_CFLAGS $ID3TAG_LIBS")
+	else
+		AC_MSG_RESULT([pkg-config failed]);
 dnl Fall back to non-pkg-config method
-	AC_CHECK_LIB(id3tag, id3_frame_field, , AC_MSG_ERROR("libid3tag (part of libmad package on some dists) not found", -1), -lz)
-	AC_CHECK_HEADER(id3tag.h, , AC_MSG_ERROR("libid3tag header files was not found", -1))
-	ID3TAG_LIBS="-lid3tag -lz"
-	ID3TAG_CFLAGS=""
-	LIBS=$push_LIBS
+		AC_CHECK_LIB(id3tag, id3_frame_field, , if test "x$with_id3tag" = "xyes"; then AC_MSG_ERROR("libid3tag (part of libmad package on some dists) not found", -1); else with_id3tag="no"; fi, -lz)
+		if test "x$with_id3tag" != "xno"; then
+			AC_CHECK_HEADER(id3tag.h, , if test "x$with_id3tag" = "xyes"; then AC_MSG_ERROR("libid3tag header files was not found", -1); else with_id3tag="no"; fi)
+		fi
+		if test "x$with_id3tag" != "xno"; then
+			ID3TAG_LIBS="-lid3tag -lz"
+			ID3TAG_CFLAGS=""
+			LIBS=$push_LIBS
+		fi
+	fi
+fi
+AC_SUBST(HAVE_MAD)
+if test "x$with_id3tag" = "xno"; then
+	HAVE_ID3TAG=
+else
+	HAVE_ID3TAG=1
 fi
 
 AC_SUBST(OGG_CFLAGS)
@@ -605,6 +632,16 @@ if test "x$with_adplug" = "xno"; then
 else
 	echo "adplug:            ON"
 fi
+if test "x$with_mad" = "xno"; then
+	echo "mad:               OFF"
+else
+	echo "mad:               ON"
+fi
+if test "x$with_id3tag" = "xno"; then
+	echo "id3tag:            OFF"
+else
+	echo "id3tag:            ON"
+fi
 if test "x$with_sidplay" = "xno"; then
 	echo "sidplay (1.x):     OFF"
 else
diff -up ocp-0.1.15/filesel/fstypes.c.condmad ocp-0.1.15/filesel/fstypes.c
--- ocp-0.1.15/filesel/fstypes.c.condmad	2008-01-14 13:49:00.000000000 -0500
+++ ocp-0.1.15/filesel/fstypes.c	2008-06-24 20:38:53.000000000 -0400
@@ -13,11 +13,22 @@
 #include "boot/plinkman.h"
 #include "mdb.h"
 
-extern struct mdbreadinforegstruct ampegpReadInfoReg, itpReadInfoReg, oggReadInfoReg, gmdReadInfoReg, xmpReadInfoReg, gmiReadInfoReg, wavReadInfoReg;
+extern struct mdbreadinforegstruct 
+#ifdef HAVE_MAD
+				   ampegpReadInfoReg, 
+#endif
+				   itpReadInfoReg,
+				   oggReadInfoReg,
+				   gmdReadInfoReg,
+				   xmpReadInfoReg,
+				   gmiReadInfoReg,
+				   wavReadInfoReg;
 
 static void __attribute__((constructor))init(void)
 {
+#ifdef HAVE_MAD
 	mdbRegisterReadInfo(&ampegpReadInfoReg);
+#endif
 	mdbRegisterReadInfo(&itpReadInfoReg);
 	mdbRegisterReadInfo(&oggReadInfoReg);
 	mdbRegisterReadInfo(&gmdReadInfoReg);
@@ -28,7 +39,9 @@ static void __attribute__((constructor))
 
 static void __attribute__((destructor))done(void)
 {
+#ifdef HAVE_MAD
 	mdbUnregisterReadInfo(&ampegpReadInfoReg);
+#endif
 	mdbUnregisterReadInfo(&itpReadInfoReg);
 	mdbUnregisterReadInfo(&oggReadInfoReg);
 	mdbUnregisterReadInfo(&gmdReadInfoReg);
diff -up ocp-0.1.15/Makefile.in.condmad ocp-0.1.15/Makefile.in
--- ocp-0.1.15/Makefile.in.condmad	2008-01-14 13:48:57.000000000 -0500
+++ ocp-0.1.15/Makefile.in	2008-06-24 20:38:53.000000000 -0400
@@ -46,7 +46,9 @@ endif
 	$(MAKE) -C playit TOPDIR=../$(TOPDIR) install
 	$(MAKE) -C playogg TOPDIR=../$(TOPDIR) install
 	$(MAKE) -C playopl TOPDIR=../$(TOPDIR) install
+ifeq ($(HAVE_MAD),1)
 	$(MAKE) -C playmp2 TOPDIR=../$(TOPDIR) install
+endif
 	$(MAKE) -C playsid TOPDIR=../$(TOPDIR) install
 	$(MAKE) -C playwav TOPDIR=../$(TOPDIR) install
 	$(MAKE) -C playxm TOPDIR=../$(TOPDIR) install
@@ -73,7 +75,9 @@ uninstall:
 	$(MAKE) -C playit TOPDIR=../$(TOPDIR) uninstall
 	$(MAKE) -C playogg TOPDIR=../$(TOPDIR) uninstall
 	$(MAKE) -C playopl TOPDIR=../$(TOPDIR) uninstall
+ifeq ($(HAVE_MAD),1)
 	$(MAKE) -C playmp2 TOPDIR=../$(TOPDIR) uninstall
+endif
 	$(MAKE) -C playsid TOPDIR=../$(TOPDIR) uninstall
 	$(MAKE) -C playwav TOPDIR=../$(TOPDIR) uninstall
 	$(MAKE) -C playxm TOPDIR=../$(TOPDIR) uninstall
@@ -102,7 +106,9 @@ dirs:
 	$(MAKE) -C playit TOPDIR=../$(TOPDIR)
 	$(MAKE) -C playogg TOPDIR=../$(TOPDIR)
 	$(MAKE) -C playopl TOPDIR=../$(TOPDIR)
+ifeq ($(HAVE_MAD),1)
 	$(MAKE) -C playmp2 TOPDIR=../$(TOPDIR)
+endif
 	$(MAKE) -C playsid TOPDIR=../$(TOPDIR)
 	$(MAKE) -C playwav TOPDIR=../$(TOPDIR)
 	$(MAKE) -C playxm TOPDIR=../$(TOPDIR)
@@ -138,7 +144,9 @@ clean:
 	$(MAKE) -C playit TOPDIR=../$(TOPDIR) clean
 	$(MAKE) -C playogg TOPDIR=../$(TOPDIR) clean
 	$(MAKE) -C playopl TOPDIR=../$(TOPDIR) clean
+ifeq ($(HAVE_MAD),1)
 	$(MAKE) -C playmp2 TOPDIR=../$(TOPDIR) clean
+endif
 	$(MAKE) -C playsid TOPDIR=../$(TOPDIR) clean
 	$(MAKE) -C playwav TOPDIR=../$(TOPDIR) clean
 	$(MAKE) -C playxm TOPDIR=../$(TOPDIR) clean
@@ -152,7 +160,11 @@ clean:
 distclean: clean
 	rm -Rf config.h autom4te.cache Rules.make config.log config.status Makefile ocp.ini desktop/opencubicplayer.desktop doc/texi/faq.texi doc/texi/install.texi doc/texi/ocp.texi goodies/pack/Makefile goodies/helpc/Makefile
 
+ifeq ($(HAVE_MAD),1)
 fstypes_so=playgmd/gmdptype.o playgmi/gmiptype.o playit/itpptype.o playogg/oggtype.o playmp2/mpptype.o playmp2/charset.o playwav/wavptype.o playxm/xmpptype.o filesel/fstypes.o
+else
+fstypes_so=playgmd/gmdptype.o playgmi/gmiptype.o playit/itpptype.o playogg/oggtype.o playwav/wavptype.o playxm/xmpptype.o filesel/fstypes.o
+endif
 fstypes$(LIB_SUFFIX): dirs $(fstypes_so)
 	$(CC) $(SHARED_FLAGS) $(ICONV_LIBS) -o $@ $(fstypes_so)
 
@@ -195,9 +207,11 @@ playit/itpptype.o:
 playogg/oggtype.o:
 	$(MAKE) -C playogg TOPDIR=../$(TOPDIR)
 
+ifeq ($(HAVE_MAD),1)
 playmp2/mpptype.o:
 	$(MAKE) -C playmp2 TOPDIR=../$(TOPDIR)
 
+endif
 playwav/wavptype.o:
 	$(MAKE) -C playwav TOPDIR=../$(TOPDIR)
 
diff -up ocp-0.1.15/Rules.make.in.condmad ocp-0.1.15/Rules.make.in
--- ocp-0.1.15/Rules.make.in.condmad	2008-01-14 13:48:57.000000000 -0500
+++ ocp-0.1.15/Rules.make.in	2008-06-25 10:59:34.000000000 -0400
@@ -50,6 +50,8 @@ CDROM_SUPPORT=@CDROM_SUPPORT@
 LINUX=@LINUX@
 HAVE_MAKEINFO=@HAVE_MAKEINFO@
 HAVE_ADPLUG=@HAVE_ADPLUG@
+HAVE_MAD=@HAVE_MAD@
+HAVE_ID3TAG=@HAVE_ID3TAG@
 HAVE_SIDPLAY=@HAVE_SIDPLAY@
 HAVE_ALSA=@HAVE_ALSA@
 HAVE_OSS=@HAVE_OSS@

ocp-0.1.15-docdir.patch:

--- NEW FILE ocp-0.1.15-docdir.patch ---
diff -up ocp-0.1.15/Makefile.in.docdir ocp-0.1.15/Makefile.in
--- ocp-0.1.15/Makefile.in.docdir	2008-06-24 20:24:22.000000000 -0400
+++ ocp-0.1.15/Makefile.in	2008-06-24 20:26:12.000000000 -0400
@@ -6,8 +6,8 @@ include $(TOPDIR)Rules.make
 all: dirs ocp ocp.hlp ocp.pak fstypes$(LIB_SUFFIX) libocp$(LIB_SUFFIX)
 
 install: all
-	mkdir -p "$(DESTDIR)$(PREFIX)/share/ocp$(DIR_SUFFIX)"
-	$(CP) AUTHORS BUGS COPYING CREDITS KEYBOARD_REMAPS SUID TODO "$(DESTDIR)$(PREFIX)/share/ocp$(DIR_SUFFIX)"
+	mkdir -p "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)"
+	$(CP) AUTHORS BUGS COPYING CREDITS KEYBOARD_REMAPS SUID TODO "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)"
 	mkdir -p "$(DESTDIR)$(PREFIX)/share/ocp$(DIR_SUFFIX)/data"
 	$(CP) ocp.pak "$(DESTDIR)$(PREFIX)/share/ocp$(DIR_SUFFIX)/data"
 	mkdir -p "$(DESTDIR)$(PREFIX)/share/ocp$(DIR_SUFFIX)/etc"

ocp-0.1.15-gcc43.patch:

--- NEW FILE ocp-0.1.15-gcc43.patch ---
diff -up ocp-0.1.15/playopl/oplplay.cpp.gcc43 ocp-0.1.15/playopl/oplplay.cpp
--- ocp-0.1.15/playopl/oplplay.cpp.gcc43	2008-01-14 13:49:08.000000000 -0500
+++ ocp-0.1.15/playopl/oplplay.cpp	2008-06-08 22:01:52.000000000 -0400
@@ -1,3 +1,5 @@
+#include <cstdlib>
+#include <string.h>
 #include "config.h"
 #include <adplug/adplug.h>
 #include "types.h"

ocp-0.1.15-info-dir.patch:

--- NEW FILE ocp-0.1.15-info-dir.patch ---
diff -up ocp-0.1.15/doc/texi/ocp.texi.in.info-dir ocp-0.1.15/doc/texi/ocp.texi.in
--- ocp-0.1.15/doc/texi/ocp.texi.in.info-dir	2008-01-14 13:49:00.000000000 -0500
+++ ocp-0.1.15/doc/texi/ocp.texi.in	2008-06-24 19:33:12.000000000 -0400
@@ -12,6 +12,11 @@ are permitted in any medium without roya
 notice and this notice are preserved.
 @end copying
 
+ at dircategory Audio
+ at direntry
+* OCP: (ocp).                   Open Cubic Player
+ at end direntry
+
 @titlepage
 @title Open Cubic Player @PACKAGE_VERSION@ for UNIX
 @page

ocp-0.1.15-symlink.patch:

--- NEW FILE ocp-0.1.15-symlink.patch ---
diff -up ocp-0.1.15/Makefile.in.symlink ocp-0.1.15/Makefile.in
--- ocp-0.1.15/Makefile.in.symlink	2008-06-24 20:19:32.000000000 -0400
+++ ocp-0.1.15/Makefile.in	2008-06-24 20:19:41.000000000 -0400
@@ -17,7 +17,7 @@ install: all
 	mkdir -p "$(DESTDIR)$(LIBDIR)/autoload"
 	mkdir -p "$(DESTDIR)$(BINDIR)"
 	$(CP) ocp "$(DESTDIR)$(BINDIR)/ocp$(DIR_SUFFIX)"
-	if ! test -z $(DIR_SUFFIX); then ln -sf "$(BINDIR)/ocp$(DIR_SUFFIX)" "$(DESTDIR)$(BINDIR)/ocp"; fi
+	if ! test -z $(DIR_SUFFIX); then ln -sf "ocp$(DIR_SUFFIX)" "$(DESTDIR)$(BINDIR)/ocp"; fi
 	$(CP) ultrafix.sh "$(DESTDIR)$(BINDIR)/ultrafix.sh"
 	mkdir -p "$(DESTDIR)$(ULTRADIR)"
 	$(MAKE) -C doc DESTDIR="$(DESTDIR)" install TOPDIR="../$(TOPDIR)"

ocp-desktop.patch:

--- NEW FILE ocp-desktop.patch ---
diff -up ocp-0.1.15/desktop/opencubicplayer.desktop.in.desktop ocp-0.1.15/desktop/opencubicplayer.desktop.in
--- ocp-0.1.15/desktop/opencubicplayer.desktop.in.desktop	2008-01-14 13:48:58.000000000 -0500
+++ ocp-0.1.15/desktop/opencubicplayer.desktop.in	2008-11-02 14:46:54.000000000 -0500
@@ -1,9 +1,9 @@
 [Desktop Entry]
 Name=Open Cubic Player
 Comment=Open Cubic Player @PACKAGE_VERSION@ for UNIX 
-Encoding=Legacy-Mixed
+Encoding=UTF-8
 Exec=@BINDIR@/ocp
-Icon=mini/opencubicplayer_mini.xpm
-Terminal=0
+Icon=ocp
+Terminal=false
 Type=Application
 Categories=Application;AudioVideo;


--- NEW FILE ocp.spec ---
Name: ocp
Version: 0.1.15
Release: 4%{?dist}
Summary: Open Cubic Player for MOD/S3M/XM/IT/SID/MIDI music files

Group: Applications/Multimedia
# Lack of any specific mention of a GPL version, so any version applies.
# See doc/texi/ocp.text.in and doc/texi/faq.texi.
# "OCP is published under the GNU General Public License (GPL)."
# Requested upstream to include license header at the top of every
# source file 2008/07/08.
License: GPL+
URL: http://stian.lunafish.org/coding-ocp.php
Source: http://stian.lunafish.org/ocp/%{name}-%{version}.tar.bz2
# In desktop file, use UTF-8, Terminal=false and icon theme naming.
# Submitted upstream 2008/07/08.
Patch0: ocp-desktop.patch
# GCC 4.3 is more strict with regards to requiring the proper includes
# for standard library functions.  Add include <cstdlib> and
# <string.h> to oplplay.cpp.  Submitted upstream 2008/06/24.
Patch1: ocp-0.1.15-gcc43.patch
# There is a bug in the ALSA PulseAudio plugin that causes
# snd_pcm_hw_params_any to return a positive value instead of 0.  This
# breaks many applications including ocp.  As a workaround, check for
# err < 0 instead.  See:
# 
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3880
# 
# Also, with ALSA_DEBUG defined, there was an error caused by using
# "device" instead of "alsaMixerName".  I also changed the default mixer
# device to "default" instead of the hardcoded value "hw:0".
# Submitted upstream 2008/06/24.
Patch2: ocp-0.1.15-alsa.patch
# Make libmad and libid3tag support conditional via the configure
# script.  Submitted upstream 2008/06/24.
Patch3: ocp-0.1.15-condmad.patch
# Add a directory entry to ocp.texi.in for use with install-info.
# Submitted upstream 2008/06/24.
Patch4: ocp-0.1.15-info-dir.patch
# Install standard documentation under /usr/share/doc/
# Submitted upstream 2008/06/24.
Patch5: ocp-0.1.15-docdir.patch
# Use relative symlink instead of absolute symlink for /usr/bin/ocp.
# Submitted upstream 2008/06/24.
Patch6: ocp-0.1.15-symlink.patch
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires: adplug-devel
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
BuildRequires: flac-devel
BuildRequires: libid3tag-devel
BuildRequires: libsidplay-devel
BuildRequires: libvorbis-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXxf86vm-devel
BuildRequires: ncurses-devel
BuildRequires: texinfo
BuildRequires: zlib-devel

# For the hicolor icon directories
Requires: hicolor-icon-theme

Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description
Open Cubic Player is a music file player ported from DOS that supports
Amiga MOD module formats and many variants, such as MTM, STM, 669,
S3M, XM, and IT.  It is also able to render MIDI files using sound
patches and play SID, OGG Vorbis, FLAC, and WAV files.  OCP provides a
nice text-based interface with several text-based and graphical
visualizations.


%prep
%setup -q
%patch0 -p1 -b .desktop
%patch1 -p1 -b .gcc43
%patch2 -p1 -b .alsa
%patch3 -p1 -b .condmad
%patch4 -p1 -b .info-dir
%patch5 -p1 -b .docdir
%patch6 -p1 -b .symlink
autoconf

%build
%configure --with-x11 \
	   --with-adplug \
	   --with-sidplay \
	   --with-alsa \
	   --without-coreaudio \
	   --with-oss \
	   --with-lzw \
	   --with-flac \
	   --without-mad \
	   --with-id3tag \
	   --with-libiconv=auto

make
# Makefiles are not SMP-clean
#{?_smp_mflags}


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install DESTDIR=%{buildroot}

# rename ultrafix.sh script to make it obvious that it belongs to this
# package and avoid conflicts.
mv %{buildroot}%{_bindir}/ultrafix.sh %{buildroot}%{_bindir}/ocp-ultrafix.sh

# mv config to /etc (ocp will search here if it isn't found in the original location)
mv %{buildroot}%{_datadir}/%{name}-%{version}/etc/ocp.ini %{buildroot}/etc/ocp.ini
rmdir %{buildroot}%{_datadir}/%{name}-%{version}/etc

# remove wmconfig stuff
rm -rf %{buildroot}/etc/X11

# move icons to hicolor theme folder
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,48x48}/apps
mv %{buildroot}%{_datadir}/pixmaps/opencubicplayer.xpm %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/ocp.xpm
mv %{buildroot}%{_datadir}/pixmaps/mini/opencubicplayer_mini.xpm %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/ocp.xpm
rm -rf %{buildroot}%{_datadir}/pixmaps

# rename desktop file to name.desktop to match packaging guidelines
mv %{buildroot}%{_datadir}/applications/opencubicplayer.desktop \
   %{buildroot}%{_datadir}/applications/ocp.desktop
desktop-file-install --vendor="fedora" \
		     --add-category="Audio" \
		     --add-category="Midi" \
		     --add-category="Player" \
		     --dir=%{buildroot}%{_datadir}/applications \
		     --delete-original \
		     %{buildroot}%{_datadir}/applications/ocp.desktop


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
# make install already installs the docs here for us
%doc %{_docdir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}
%{_libdir}/%{name}-%{version}
%{_bindir}/ocp-%{version}
%{_bindir}/ocp
%{_bindir}/ocp-ultrafix.sh
%{_infodir}/ocp.info*
%{_datadir}/icons/hicolor/16x16/apps/*
%{_datadir}/icons/hicolor/48x48/apps/*
%{_datadir}/applications/fedora-ocp.desktop
%config(noreplace) /etc/ocp.ini


%post
/sbin/install-info %{_infodir}/ocp.info.gz %{_infodir}/dir || :
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor 2>/dev/null || :


%preun
if [ "$1" = 0 ]; then
    /sbin/install-info --delete %{_infodir}/ocp.info.gz %{_infodir}/dir || :
fi


%postun
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor 2>/dev/null || :


%changelog
* Mon Nov 10 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-4
- Add missing Requires: hicolor-icon-theme for the hicolor icon
  directories
- remove wmconfig bits in a more succinct way
- rename ultrafix.sh to ocp-ultrafix.sh to prevent possible conflicts
- add comments about the applied patches and their upstream status

* Sun Nov 02 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-3
- fix condmad.patch: add HAVE_MAD & HAVE_ID3TAG to Rules.make.in
- update desktop file patch (keep Terminal=false change, 
  use themed icon name "ocp" rather than path)
- move icons to hicolor theme, call gtk-update-icon-cache in %%post(un)

* Tue Jun 24 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-2
- don't need redundant BR libogg-devel
- remove ExlusiveArch, try build on all arches
- alphabetize BR's on separate lines
- enable oss and id3tag support
- remove obsolete wmconfig desktop file
- fix Makefile to install standard documentation files under /usr/share/doc/
- fix Makefile to create relative symlink instead of absolute
- use --delete-original on desktop-file-install
- add @dircategory and @direntry to info file so it can be installed

* Tue Jun 24 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-1.2
- BR texinfo for /usr/bin/makeinfo

* Tue Jun 24 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-1.1
- create /usr/share/doc/%%{name}-%%{version} in buildroot

* Tue Jun 24 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-1
- Initial Fedora Package submission
- clean up summary, description and comments
- don't try to install-info since there is no directory entry

* Tue Jun 24 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.8cra
- No longer BR libid3tag-devel

* Sat Jun 22 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.7cra
- conditionalize mp3 support and disable it
- explicitly disable coreaudio

* Fri Jun 20 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.6cra
- BR libXext-devel alsa-lib-devel

* Tue Jun 17 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.5cra
- disable ALSA_DEBUG

* Tue Jun 17 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.4cra
- Enable ALSA_DEBUG
- workaround pulseaudio alsa plugin bug (snd_pcm_hw_params_any returns > 0)

* Sun Jun 08 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.3cra
- gcc 4.3 patch
- install-info in post/preun
- rename desktop file to fedora-ocp.desktop
- use desktop-file-install

* Sun Jun 08 2008 Charles R. Anderson <cra at wpi.edu> 0.1.15-0.2cra
- BR libid3tag-devel libXxf86vm-devel
- use proper macros in file section
- explicitly enable configure flags, disable OSS
- License: GPL+ because no specific version is mentioned in the docs
  or source code.
- Patch desktop file to specify UTF-8 encoding


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ocp/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	10 Nov 2008 16:53:44 -0000	1.1
+++ sources	11 Nov 2008 01:11:01 -0000	1.2
@@ -0,0 +1 @@
+b936f236b41e7f1184e401f5e099debe  ocp-0.1.15.tar.bz2




More information about the fedora-extras-commits mailing list