diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2004-03-06 12:35:05 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2004-03-06 12:35:05 +0000 |
commit | c50fd468b5ff567b4e9187616351ba072b421555 (patch) | |
tree | 2843e6b207f5724dd19063bd9298d0c06e5b2a2c /media-sound | |
parent | version bump (with lingas support, bug #43540), remove old versions (Manifest... (diff) | |
download | gentoo-2-c50fd468b5ff567b4e9187616351ba072b421555.tar.gz gentoo-2-c50fd468b5ff567b4e9187616351ba072b421555.tar.bz2 gentoo-2-c50fd468b5ff567b4e9187616351ba072b421555.zip |
Motif based CD player with CDDB2 support. Ebuild submitted by john.ross.hunt@comcast.net in bug #25113.
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/xmcd/ChangeLog | 11 | ||||
-rw-r--r-- | media-sound/xmcd/Manifest | 3 | ||||
-rw-r--r-- | media-sound/xmcd/files/digest-xmcd-3.2.1 | 2 | ||||
-rw-r--r-- | media-sound/xmcd/files/xmcd-3.2.1-gentoo.patch | 301 | ||||
-rw-r--r-- | media-sound/xmcd/metadata.xml | 5 | ||||
-rw-r--r-- | media-sound/xmcd/xmcd-3.2.1.ebuild | 137 |
6 files changed, 459 insertions, 0 deletions
diff --git a/media-sound/xmcd/ChangeLog b/media-sound/xmcd/ChangeLog new file mode 100644 index 000000000000..0058c1e4647f --- /dev/null +++ b/media-sound/xmcd/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for media-sound/xmcd +# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/ChangeLog,v 1.1 2004/03/06 12:35:05 eradicator Exp $ + +*xmcd-3.2.1 (04 Mar 2004) + + 04 Mar 2004; Jeremy Huddleston <eradicator@gentoo.org> metadata.xml, + xmcd-3.2.1.ebuild, files/xmcd-3.2.1-gentoo.patch: + Motif based CD player with CDDB2 support. Ebuild submitted by + john.ross.hunt@comcast.net in bug #25113. + diff --git a/media-sound/xmcd/Manifest b/media-sound/xmcd/Manifest new file mode 100644 index 000000000000..0d27f27fbdf1 --- /dev/null +++ b/media-sound/xmcd/Manifest @@ -0,0 +1,3 @@ +MD5 282cb8aa929021ba08441d826428a4d1 xmcd-3.2.1.ebuild 3523 +MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 +MD5 fc905fdc8e827efddb8da8e4973914d2 files/digest-xmcd-3.2.1 126 diff --git a/media-sound/xmcd/files/digest-xmcd-3.2.1 b/media-sound/xmcd/files/digest-xmcd-3.2.1 new file mode 100644 index 000000000000..9d46470cac44 --- /dev/null +++ b/media-sound/xmcd/files/digest-xmcd-3.2.1 @@ -0,0 +1,2 @@ +MD5 9a21bd7c6f2b92f6e36652c9540e2d98 xmcd-3.2.1.tar.gz 973419 +MD5 10f1271014e547ffc26e356928b0b645 cddb2supplib.tar.gz 575319 diff --git a/media-sound/xmcd/files/xmcd-3.2.1-gentoo.patch b/media-sound/xmcd/files/xmcd-3.2.1-gentoo.patch new file mode 100644 index 000000000000..cd3d4ec5b682 --- /dev/null +++ b/media-sound/xmcd/files/xmcd-3.2.1-gentoo.patch @@ -0,0 +1,301 @@ +diff -urN xmcd-3.2.1.old/cdda_d/Imakefile xmcd-3.2.1/cdda_d/Imakefile +--- xmcd-3.2.1.old/cdda_d/Imakefile 2003-08-02 21:24:35.000000000 -0500 ++++ xmcd-3.2.1/cdda_d/Imakefile 2003-12-20 02:13:36.000000000 -0600 +@@ -114,7 +114,7 @@ + alsalib_incl+= $(wildcard /usr/local/include/alsa/asoundlib.h) + + ifneq "$(strip $(alsalib_incl))" "" +-DEFINES+= -DHAS_ALSA ++DEFINES+= -DHAS_ALSA -DALSA_PCM_OLD_HW_PARAMS_API + endif + #endif + +diff -urN xmcd-3.2.1.old/install.sh xmcd-3.2.1/install.sh +--- xmcd-3.2.1.old/install.sh 2003-08-02 21:24:33.000000000 -0500 ++++ xmcd-3.2.1/install.sh 2003-12-20 02:37:16.000000000 -0600 +@@ -513,7 +513,7 @@ + then + OS_MACH=mips + else +- OS_MACH=`(uname -m) 2>/dev/null` ++ OS_MACH=`(uname -m) 2>/dev/null | sed -e 's/i[0-9]86/i686/'` + fi + + if [ -z "$OS_SYS" ] +@@ -714,30 +714,6 @@ + $ECHO "CDDB(tm) Disc Recognition Service. See the CDDB file" + $ECHO "for information." + +-# Check privilege +-(id | fgrep 'uid=0(root)') >/dev/null 2>&1 +-if [ $? != 0 ] +-then +- $ECHO "\n\nYou should be the super user to install xmcd." +- +- YNDEF=n +- if [ -z "$BATCH" ] && get_yn "\n Proceed with installation anyway" +- then +- $ECHO "\nWARNING: Without super-user privilege, some files may" +- $ECHO "not be properly installed, or they may be installed" +- $ECHO "with incorrect permissions." +- +- XBINPERM=711 +- XBINOWNER=_default_ +- OWNER=_default_ +- GROUP=_default_ +- else +- log_err -p "Not super user: installation aborted by user." +- do_exit 1 +- fi +-fi +- +- + # Check existence of binaries + + MISSING= +@@ -1049,78 +1025,6 @@ + fi + + +-# Remove old xmcd components +- +-$ECHO "\n\nChecking for old xmcd components..." +- +-# Old binaries +-dirs=`echo "$OPATH" | $AWK -F: '{ for (i = 1; i <= NF; i++) print $i }'` +-for i in $BINTRYDIRS +-do +- dirs=`$ECHO "$dirs\n$i"` +-done +-dirs=`($ECHO "$dirs" | \ +- sed -e 's/^[ ]*//' -e '/^$/d' | \ +- sort | uniq) 2>/dev/null` +- +-if [ -n "$dirs" ] +-then +- for i in $dirs +- do +- if [ "$i" = "$BINDIR" -o "$i" = "." ] +- then +- continue +- fi +- +- for j in xmcd cda cddbcmd wm2xmcd dp2xmcd $STARTUP_SCRIPT +- do +- tryfile=${i}/${j} +- if [ -f $tryfile -a -x $tryfile ] +- then +- if [ -z "$BATCH" ] +- then +- YNDEF=y +- if get_yn "Remove old executable $tryfile" +- then +- rm -f $tryfile +- if [ $? -ne 0 ] +- then +- $ECHO "Cannot remove $tryfile." +- fi +- fi +- else +- rm -f $tryfile +- fi +- fi +- done +- done +-fi +- +-# Old xmcd app-defaults files +-dirs=`for i in $LIBTRYDIRS $LIBDIR; do echo "$i"; done | sort | uniq` +-for i in $dirs +-do +- tryfile=${i}/app-defaults/XMcd +- if [ -f "$tryfile" ] +- then +- if [ -z "$BATCH" ] +- then +- YNDEF=y +- if get_yn "Remove old xmcd resource file $tryfile" +- then +- rm -f $tryfile +- if [ $? -ne 0 ] +- then +- $ECHO "Cannot remove ${tryfile}." +- fi +- fi +- else +- rm -f $tryfile +- fi +- fi +-done +- +- + # Set architecture-specific binary and library directory + ARCHBIN="${XMCDLIB}/bin-${OS_SYS_T}-${OS_MACH_T}" + ARCHLIB="${XMCDLIB}/lib-${OS_SYS_T}-${OS_MACH_T}" +@@ -1160,7 +1064,7 @@ + + if [ "$DISCOGDIR" != "$XMCDLIB/discog" ] + then +- do_link "$DISCOGDIR" "$XMCDLIB/discog" ++ do_link "../../../../../var/lib/xmcd/discog" "$XMCDLIB/discog" + $ECHO "\t$XMCDLIB/discog" + fi + +diff -urN xmcd-3.2.1.old/libdi_d/common.cfg xmcd-3.2.1/libdi_d/common.cfg +--- xmcd-3.2.1.old/libdi_d/common.cfg 2003-08-02 21:24:40.000000000 -0500 ++++ xmcd-3.2.1/libdi_d/common.cfg 2003-12-20 02:34:06.000000000 -0600 +@@ -78,7 +78,7 @@ + ! /dev/rdsk/m187_c0d3s7 (UNIX SVR4.0/88k, m187 controller 0, SCSI ID 3) + ! DKA500: (Digital OpenVMS) + ! +-device: /dev/rcd0 ++device: /dev/cdrom + + ! For CDDA playback mode, this selects the audio output port(s). The + ! value is the sum of the following: +diff -urN xmcd-3.2.1.old/libdi_d/config.sh xmcd-3.2.1/libdi_d/config.sh +--- xmcd-3.2.1.old/libdi_d/config.sh 2003-08-02 21:24:40.000000000 -0500 ++++ xmcd-3.2.1/libdi_d/config.sh 2003-12-20 02:20:38.000000000 -0600 +@@ -31,9 +31,9 @@ + VER=3.2.1 + + # Change the following directory to fit your local configuration +-BINDIR=/usr/bin/X11 +-XMCDLIB=/usr/lib/X11/xmcd +-DISCOGDIR=/usr/lib/X11/xmcd/discog ++BINDIR=/usr/X11R6/bin ++XMCDLIB=/usr/X11R6/lib/X11/xmcd ++DISCOGDIR=/var/lib/xmcd/discog + XMCD_URL=http://www.amb.org/xmcd/ + + ERRFILE=/tmp/xmcd.err +@@ -2506,7 +2506,7 @@ + # Get platform information + OS_SYS=`(uname -s) 2>/dev/null` + OS_REL=`(uname -r) 2>/dev/null` +-OS_MACH=`(uname -m) 2>/dev/null` ++OS_MACH=`(uname -m) 2>/dev/null | sed -e 's/i[0-9]86/i686/'` + OS_NODE=`(uname -n) 2>/dev/null` + + if [ -z "$OS_SYS" ] +diff -urN xmcd-3.2.1.old/libdi_d/os_linux.h xmcd-3.2.1/libdi_d/os_linux.h +--- xmcd-3.2.1.old/libdi_d/os_linux.h 2003-08-02 21:24:42.000000000 -0500 ++++ xmcd-3.2.1/libdi_d/os_linux.h 2003-12-20 02:35:00.000000000 -0600 +@@ -101,7 +101,6 @@ + + + #define OS_MODULE /* Indicate that this is compiled on a supported OS */ +-#define SETUID_ROOT /* Setuid root privilege is required */ + + + /* Public function prototypes */ +diff -urN xmcd-3.2.1.old/misc_d/discog.htm xmcd-3.2.1/misc_d/discog.htm +--- xmcd-3.2.1.old/misc_d/discog.htm 2003-08-02 21:25:02.000000000 -0500 ++++ xmcd-3.2.1/misc_d/discog.htm 2003-12-20 02:21:27.000000000 -0600 +@@ -34,7 +34,7 @@ + <H2>Directory Organization</H2> + <DIR> + <P> +-The top-level Local Discography directory is <B>$DISCOGDIR</B> ++The top-level Local Discography directory is <B>/var/lib/xmcd/discog</B> + on your system. This was created when xmcd was installed. + Under this directory there are hierarchy of directories of music genres + (i.e., <I>Rock, Classical, Jazz,</I> etc.). These genres match those +diff -urN xmcd-3.2.1.old/misc_d/genidx.sh xmcd-3.2.1/misc_d/genidx.sh +--- xmcd-3.2.1.old/misc_d/genidx.sh 2003-08-02 21:25:02.000000000 -0500 ++++ xmcd-3.2.1/misc_d/genidx.sh 2003-12-20 02:22:41.000000000 -0600 +@@ -30,8 +30,8 @@ + PATH=/bin:/usr/bin:/usr/local/bin; export PATH + + # Modify these to suit your local configuration +-XMCDLIB=/usr/lib/X11/xmcd +-DISCOGDIR=$XMCDLIB/discog ++XMCDLIB=/usr/X11R6/lib/X11/xmcd ++DISCOGDIR=/var/lib/xmcd/discog + FILE_MODE=666 + DIR_MODE=777 + +diff -urN xmcd-3.2.1.old/misc_d/start.sh xmcd-3.2.1/misc_d/start.sh +--- xmcd-3.2.1.old/misc_d/start.sh 2003-08-02 21:25:03.000000000 -0500 ++++ xmcd-3.2.1/misc_d/start.sh 2003-12-20 02:33:16.000000000 -0600 +@@ -26,7 +26,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + # +-PATH=${PATH}:/sbin:/usr/sbin:/bin:/usr/bin:/etc ++PATH=${PATH}:/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/X11R6/bin + export PATH + + +@@ -34,10 +34,28 @@ + { + if [ -z "$XMCD_LIBDIR" ] + then +- XMCD_LIBDIR=/usr/lib/X11/xmcd ++ XMCD_LIBDIR=/usr/X11R6/lib/X11/xmcd + export XMCD_LIBDIR + fi + ++ if [ "$0" = "/usr/X11R6/bin/xmcd" -o "$0" = "/usr/X11R6/bin/cda" ] & [ ! -f $XMCD_LIBDIR/config/common.cfg-`uname -n` ]; then ++ echo ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ++ echo "The default configuration is probably unsuitable for your CD drive." ++ echo "Run /etc/xmcd/config.sh to configure your CD. " ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ++ echo ++ fi ++ ++ echo ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ++ echo "For security reasons xmcd is not installed setuid. You need to be " ++ echo "the owner of the cdrom device or the following files should have " ++ echo "the setuid bit set: " ++ echo " /usr/X11R6/lib/X11/xmcd/bin-*/{xmcd,cda}. " ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ++ echo ++ + SYS_T="$SYS" + MACH_T="$MACH" + REL_T="$REL" +@@ -128,7 +146,7 @@ + MACH=mips + else + MACH=`(uname -m) 2>/dev/null | \ +- sed -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` ++ sed -e 's/i[0-9]86/i686/' -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` + fi + REL=`(uname -r) 2>/dev/null | sed -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` + +diff -urN xmcd-3.2.1.old/util_d/Imakefile xmcd-3.2.1/util_d/Imakefile +--- xmcd-3.2.1.old/util_d/Imakefile 2003-08-02 21:25:02.000000000 -0500 ++++ xmcd-3.2.1/util_d/Imakefile 2003-12-20 02:13:36.000000000 -0600 +@@ -39,10 +39,9 @@ + * + */ + +-/* +- * #include "Motif.tmpl" +- * #include "Motif.rules" +- */ ++#include "Motif.tmpl" ++#include "Motif.rules" ++ + LOCAL_LIBRARIES= XmClientLibs + + +diff -urN xmcd-3.2.1.old/xmcd_d/Imakefile xmcd-3.2.1/xmcd_d/Imakefile +--- xmcd-3.2.1.old/xmcd_d/Imakefile 2003-08-02 21:24:47.000000000 -0500 ++++ xmcd-3.2.1/xmcd_d/Imakefile 2003-12-20 02:13:36.000000000 -0600 +@@ -39,10 +39,8 @@ + * + */ + +-/* +- * #include "Motif.tmpl" +- * #include "Motif.rules" +- */ ++#include "Motif.tmpl" ++#include "Motif.rules" + + CDDBLIB= -L../cddb_d -lcddb + LOCAL_LIBDIR= -L/usr/freeware/lib32 -L/usr/local/lib diff --git a/media-sound/xmcd/metadata.xml b/media-sound/xmcd/metadata.xml new file mode 100644 index 000000000000..e1774e3d9ad7 --- /dev/null +++ b/media-sound/xmcd/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sound</herd> +</pkgmetadata> diff --git a/media-sound/xmcd/xmcd-3.2.1.ebuild b/media-sound/xmcd/xmcd-3.2.1.ebuild new file mode 100644 index 000000000000..072584a29d87 --- /dev/null +++ b/media-sound/xmcd/xmcd-3.2.1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/xmcd-3.2.1.ebuild,v 1.1 2004/03/06 12:35:05 eradicator Exp $ + +IUSE="alsa encode oggvorbis" + +SUPPLIB="cddb2supplib" +DESCRIPTION="Xmcd is a full-featured CD Player and Ripper software package." +HOMEPAGE="http://www.ibiblio.org/tkan/xmcd/" +SRC_URI="http://www.ibiblio.org/tkan/download/${PN}/${PV}/src/${P}.tar.gz + http://www.ibiblio.org/tkan/download/cddb2supp/${PV}/lib/linux-x86-libc6/${SUPPLIB}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + +DEPEND="virtual/x11 + x11-libs/openmotif + alsa? ( media-libs/alsa-lib ) + encode? ( >=media-sound/lame-3.93.1 ) + oggvorbis? ( >=media-libs/libvorbis-1.0 )" + +src_unpack() { + + ebegin "Unpacking ${P} source tarball" + unpack ${P}.tar.gz > /dev/null + eend 0 + + if use x86 + then + ebegin "Unpacking Gracenote CDDB² support package" + unpack ${SUPPLIB}.tar.gz > /dev/null + eend 0 + fi + + epatch ${FILESDIR}/${P}-gentoo.patch || die +} + +src_compile() { + + einfo "Building xmcd..." + xmkmf -a || die + make CDEBUGFLAGS="${CDEBUGFLAGS} ${CFLAGS} -D_GNU_SOURCE" || die + +} + +src_install() { + + # shamelessly culled from SuSE .spec file... + ebegin "Running install script" + BATCH_BINDIR=${D}/usr/X11R6/bin \ + BATCH_LIBDIR=${D}/usr/X11R6/lib/X11 \ + BATCH_XMCDLIB=${D}/usr/X11R6/lib/X11/xmcd \ + BATCH_MANDIR=${D}/usr/X11R6/man/man1 \ + BATCH_CDDBDIR=${D}/var/lib/xmcd/cddb \ + BATCH_DISCOGDIR=${D}/var/lib/xmcd/discog \ + sh install.sh -n -b + eend 0 + + dodir /usr/lib + for lib in libcddb.so.1 libcddb.a libcddbkey1.a libcddbkey2.a; do + cp ${S}/cddb_d/${lib} ${D}/usr/lib + done + dosym libcddbkey2.a /usr/lib/libcddbkey.a + dosym libcddb.so.1 /usr/lib/libcddb.so + + # a small fixup... + rm -rf ${D}/usr/X11R6/lib/X11/xmcd/docs + dodir etc + dosym ../usr/X11R6/lib/X11/xmcd/config /etc/xmcd + + # move binaries to correct place + ebegin "Moving binaries to target location" + (cd ${D}/usr/X11R6/lib/X11/xmcd/bin-*; + sed -e "s@${D}@@g" \ + < ${D}/usr/X11R6/bin/.xmcd_start > start + cp start ${D}/usr/X11R6/bin/.xmcd_start + sed -e "s@${D}@@" < README > README.tmp + mv README.tmp README ) + rm -f ${D}/usr/X11R6/bin/* + (cd ${D}/usr/X11R6/bin; \ + ln -s ../lib/X11/xmcd/bin-*/start xmcd; \ + ln -s ../lib/X11/xmcd/bin-*/start cda) + cp ${D}/usr/X11R6/lib/X11/xmcd/config/common.cfg \ + ${D}/usr/X11R6/lib/X11/xmcd/config/cdrom + for i in config/config.sh scripts/genidx ; do + sed -e "s@${D}@@g" \ + < ${D}/usr/X11R6/lib/X11/xmcd/$i \ + > ${D}/usr/X11R6/lib/X11/xmcd/$i.tmp + mv ${D}/usr/X11R6/lib/X11/xmcd/$i.tmp \ + ${D}/usr/X11R6/lib/X11/xmcd/$i + done + eend 0 + + ebegin "Fixing ownership and permissions" + # fix ownership + chown -R root:root ${D} + # remove setuid bit + chmod 0755 ${D}/usr/X11R6/lib/X11/xmcd/bin-*/{cda,xmcd,start,gobrowser} + chmod 0755 ${D}/usr/X11R6/lib/X11/xmcd/config/config.sh + chmod 0755 ${D}/usr/X11R6/lib/X11/xmcd/scripts/genidx + # change perms + chmod 0644 ${D}/var/lib/xmcd/discog/index.html + chmod 0644 ${D}/var/lib/xmcd/discog/*/*/index.html + eend 0 + + if [ -n "`use gracenote`" ] + then + ebegin "Adding Gracenote CDDB² support" + exeinto /usr/X11R6/lib/X11/xmcd/lib-Linux-i686 + doexe ${WORKDIR}/${P}/cddb_d/libcddb.so.1 + dosym libcddb.so.1 /usr/X11R6/lib/X11/xmcd/lib-Linux-i686/libcddb.so + eend 0 + fi + + # install documentation + dodoc docs_d/* + dosym ../../../../../usr/share/doc/${P} /usr/X11R6/lib/X11/xmcd/docs +} + +pkg_postinst() { + + einfo "" + einfo "Don't forget to run ${ROOT}etc/xmcd/config.sh" + einfo "as root to configure your CD devices!" + einfo "" + +} + +pkg_postrm() { + + einfo "" + einfo "Old discographies found in ${ROOT}var/lib/xmcd can safely be deleted." + einfo "Old CD configurations in ${ROOT}etc/xmcd can safely be deleted." + einfo "" + +} |