summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-09-15 18:35:09 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-09-15 18:35:09 +0000
commit27accf83086ee6e09712860b617700375890d2dc (patch)
treec05e420b80aa3adc7d9e2a8be3ff24bb4c725a9b /media-sound/xmcd
parent~amd64 (Manifest recommit) (diff)
downloadgentoo-2-27accf83086ee6e09712860b617700375890d2dc.tar.gz
gentoo-2-27accf83086ee6e09712860b617700375890d2dc.tar.bz2
gentoo-2-27accf83086ee6e09712860b617700375890d2dc.zip
get_libdir updates. Fix bug #60734.
Diffstat (limited to 'media-sound/xmcd')
-rw-r--r--media-sound/xmcd/ChangeLog4
-rw-r--r--media-sound/xmcd/files/xmcd-3.3.2-gentoo.patch289
-rw-r--r--media-sound/xmcd/xmcd-3.3.2.ebuild47
3 files changed, 315 insertions, 25 deletions
diff --git a/media-sound/xmcd/ChangeLog b/media-sound/xmcd/ChangeLog
index 56d362a8eaf5..b5ade6153bd1 100644
--- a/media-sound/xmcd/ChangeLog
+++ b/media-sound/xmcd/ChangeLog
@@ -1,9 +1,9 @@
# ChangeLog for media-sound/xmcd
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/ChangeLog,v 1.11 2004/09/15 17:47:18 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/ChangeLog,v 1.12 2004/09/15 18:35:09 eradicator Exp $
15 Sep 2004; Jeremy Huddleston <eradicator@gentoo.org> xmcd-3.3.2.ebuild:
- Stable amd64.
+ get_libdir updates. Fix bug #60734. Stable amd64.
18 Jun 2004; Jason Wever <weeve@gentoo.org> xmcd-3.3.2.ebuild:
Stable on sparc.
diff --git a/media-sound/xmcd/files/xmcd-3.3.2-gentoo.patch b/media-sound/xmcd/files/xmcd-3.3.2-gentoo.patch
new file mode 100644
index 000000000000..de7be51aa04c
--- /dev/null
+++ b/media-sound/xmcd/files/xmcd-3.3.2-gentoo.patch
@@ -0,0 +1,289 @@
+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/xmcd-3.3.2.ebuild b/media-sound/xmcd/xmcd-3.3.2.ebuild
index 97a756cf5191..546d33d0b2cb 100644
--- a/media-sound/xmcd/xmcd-3.3.2.ebuild
+++ b/media-sound/xmcd/xmcd-3.3.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/xmcd-3.3.2.ebuild,v 1.7 2004/09/15 17:47:18 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/xmcd/xmcd-3.3.2.ebuild,v 1.8 2004/09/15 18:35:09 eradicator Exp $
inherit eutils
@@ -18,6 +18,7 @@ KEYWORDS="x86 ~ppc sparc amd64"
DEPEND="virtual/x11
x11-libs/openmotif
+ media-libs/flac
alsa? ( media-libs/alsa-lib )
encode? ( >=media-sound/lame-3.93.1 )
oggvorbis? ( >=media-libs/libvorbis-1.0 )"
@@ -52,29 +53,29 @@ 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_LIBDIR=${D}/usr/X11R6/$(get_libdir)/X11 \
+ BATCH_XMCDLIB=${D}/usr/X11R6/$(get_libdir)/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
+ sh install.sh -n -b || die
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
+ dolib cddb_d/${lib}
done
- dosym libcddbkey2.a /usr/lib/libcddbkey.a
- dosym libcddb.so.1 /usr/lib/libcddb.so
+
+ dosym libcddbkey2.a /usr/$(get_libdir)/libcddbkey.a
+ dosym libcddb.so.1 /usr/$(get_libdir)/libcddb.so
# a small fixup...
- rm -rf ${D}/usr/X11R6/lib/X11/xmcd/docs
+ rm -rf ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/docs
dodir etc
- dosym ../usr/X11R6/lib/X11/xmcd/config /etc/xmcd
+ dosym ../usr/X11R6/$(get_libdir)/X11/xmcd/config /etc/xmcd
# move binaries to correct place
ebegin "Moving binaries to target location"
- (cd ${D}/usr/X11R6/lib/X11/xmcd/bin-*;
+ (cd ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/bin-*;
sed -e "s@${D}@@g" \
< ${D}/usr/X11R6/bin/.xmcd_start > start
cp start ${D}/usr/X11R6/bin/.xmcd_start
@@ -84,14 +85,14 @@ src_install() {
(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
+ cp ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/config/common.cfg \
+ ${D}/usr/X11R6/$(get_libdir)/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
+ < ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/$i \
+ > ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/$i.tmp
+ mv ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/$i.tmp \
+ ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/$i
done
eend 0
@@ -99,9 +100,9 @@ src_install() {
# 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
+ chmod 0755 ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/bin-*/{cda,xmcd,start,gobrowser}
+ chmod 0755 ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/config/config.sh
+ chmod 0755 ${D}/usr/X11R6/$(get_libdir)/X11/xmcd/scripts/genidx
# change perms
chmod 0644 ${D}/var/lib/xmcd/discog/index.html
chmod 0644 ${D}/var/lib/xmcd/discog/*/*/index.html
@@ -110,15 +111,15 @@ src_install() {
if use x86
then
ebegin "Adding Gracenote CDDB² support"
- exeinto /usr/X11R6/lib/X11/xmcd/lib-Linux-i686
+ exeinto /usr/X11R6/$(get_libdir)/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
+ dosym libcddb.so.1 /usr/X11R6/$(get_libdir)/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
+ dosym ../../../../../usr/share/doc/${P} /usr/X11R6/$(get_libdir)/X11/xmcd/docs
}
pkg_postinst() {