Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO]xmms2: Perfect solution for ape/cue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
panchoat
n00b
n00b


Joined: 05 Sep 2007
Posts: 2

PostPosted: Mon Oct 08, 2007 10:47 am    Post subject: [HOWTO]xmms2: Perfect solution for ape/cue Reply with quote

I'm alway suffered from the lack of support for monkey audio/APE in Linux world, but now , let's get rid of the pain!

first:download mac-port in sf.net, and build it , you can find the ebuild in gentoo-china overlay by layman.

then use this ebuild from gentoo bug report, with a little modification
now let's begin:
1. add gentoo-china overlay and install mac-port
Code:
sudo emerge layman
sudo layman -a gentoo-china
sudo emerge mac-port

this process will told you to download the mac-port source from
follow the instruction, cp the source file to /usr/portage/distfiles/
and continue to emerge.

2.setup your own local overlay.
edit /etc/make.conf add these lines
Code:
PORTDIR_OVERLAY="
/usr/portage/local/my-overlay/
$PORTDIR_OVERLAY
"

and then
Code:
mkdir /usr/portage/local/my-overlay/media-sound/xmms2


cp the content below into a file named xmms2-2.8.ebuild, and mv this file into the directory you just made.
Code:
# copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

MY_PV="0.2DrJekyll"

DESCRIPTION="X-platform Music Multiplexing System 2"
HOMEPAGE="http://wiki.xmms2.xmms.se/index.php/Main_Page"
SRC_URI="mirror://sourceforge/xmms2/xmms2-${MY_PV}.tar.bz2"

LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="aac alsa ao avahi cli coreaudio curl cxx fam flac gnome jack mad mms
modplug mac mp4 musepack ofa perl python resid ruby samba shout sid speech vorbis wma xml"

DEPEND=">=dev-lang/python-2.3
   >=dev-libs/glib-2.8
   >=dev-db/sqlite-3.2.4
   aac? ( media-libs/faad2 )
   alsa? ( media-libs/alsa-lib )
   ao? ( media-libs/libao )
   avahi? ( net-dns/avahi )
   curl? ( >=net-misc/curl-7.11.2 )
   cxx? ( dev-libs/boost dev-cpp/glibmm )
   fam? ( app-admin/gamin )
   flac? ( media-libs/flac )
   gnome? ( gnome-base/gnome-vfs )
   jack? ( media-sound/jack )
   mac? ( media-sound/mac-port )
   mad? ( media-libs/libmad )
   mms? ( media-libs/libmms )
   modplug? ( media-libs/libmodplug )
   mp4? ( media-video/ffmpeg )
   musepack? ( media-libs/libmpcdec )
   ofa? ( media-libs/libofa )
   perl? ( dev-lang/perl )
   resid? ( media-libs/resid )
   ruby? ( >=dev-lang/ruby-1.8 )
   samba? ( net-fs/samba )
   shout? ( media-libs/libshout )
   sid? ( >=media-libs/libsidplay-2.0 )
   speech? ( >=sci-libs/fftw-3.0 media-libs/libsamplerate )
   vorbis? ( media-libs/libvorbis )
   wma? ( media-video/ffmpeg )
   xml? ( dev-libs/libxml2 )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${PN}-${MY_PV}"

disable_plugins() {
   local disable_plugins x

   # that one should never work (and we need a non-empty $disable_plugins)
   disable_plugins="waveout"

   for x in alsa ao coreaudio curl flac jack mac mad mms modplug musepack ofa samba sid vorbis ; do
      if ! use ${x} ; then
         disable_plugins="${disable_plugins},${x}";
      fi
   done

   for x in aac:faad avahi:daap gnome:gnomevfs mp4:avformat shout:ices speech:vocoder xml:xspf,rss ; do
      if ! use ${x/:*} ; then
         disable_plugins="${disable_plugins},${x/*:}";
      fi
   done

   echo ${disable_plugins}
}

enable_optionals() {
   local enable_optionals x

   # that one should always work (and we need a non-empty $enable_optionals)
   enable_optionals="launcher"

   for x in avahi cli perl python ruby ; do
      if use ${x} ; then
         enable_optionals="${enable_optionals},${x}";
      fi
   done

   for x in gnome:dns_sd cxx:xmmsclient++,xmmsclient++-glib fam:medialib-updater ; do
      if use ${x/:*} ; then
         enable_optionals="${enable_optionals},${x/*:}";
      fi
   done

   echo ${enable_optionals}
}

src_unpack() {
   unpack ${A}
   cd "${S}"
   epatch "${FILESDIR}/startms.patch"
}

src_compile() {
   ./waf configure --without-plugins "$(disable_plugins)" \
               --with-optionals "$(enable_optionals)" \
               --prefix /usr \
               || die "configure failed"
   ./waf build -p $(echo "${MAKEOPTS}" | sed -e "s/.*\(-j[0-9]\+\).*/\1/") || die "build failed"
}

src_install() {
   ./waf --destdir ${D} install
   dodoc AUTHORS COPYING COPYING.GPL COPYING.LGPL README TODO
}


and then
Code:
mkdir -p /usr/portage/local/my-overlay/media-sound/xmms2/files


cp the content below into a file named startms.patch, and mv it into the directory you just made(....../files).

Code:
commit cee22c84e6be8ae4c89c333695fa5b50c63ea036
Author: Florian Ragwitz <rafl@debian.org>
Date:   Sun Sep 30 00:15:57 2007 +0200

    BUG(1637): honor startms.

diff --git a/src/xmms/output.c b/src/xmms/output.c
index 6f5933c..4f5e0b1 100644
--- a/src/xmms/output.c
+++ b/src/xmms/output.c
@@ -251,6 +251,7 @@ typedef struct {
    xmms_output_t *output;
    xmms_xform_t *chain;
    gboolean flush;
+   guint startms;
 } xmms_output_song_changed_arg_t;
 
 static void
@@ -285,6 +286,21 @@ song_changed (void *data)
    if (arg->flush)
       xmms_output_flush (arg->output);
 
+   if (arg->startms > 0) {
+      xmms_error_t err;
+      xmms_error_reset (&err);
+
+      XMMS_DBG ("Got startms. Trying to seek to %u.", arg->startms);
+
+      arg->output->filler_state = FILLER_SEEK;
+      arg->output->filler_seek = xmms_sample_ms_to_samples (arg->output->format, arg->startms);
+      g_cond_signal (arg->output->filler_state_cond);
+
+      if (xmms_error_iserror (&err)) {
+         XMMS_DBG ("Failed to seek to startms");
+      }
+   }
+
    xmms_object_emit_f (XMMS_OBJECT (arg->output),
                        XMMS_IPC_SIGNAL_OUTPUT_CURRENTID,
                        XMMS_OBJECT_CMD_ARG_UINT32,
@@ -404,6 +420,8 @@ xmms_output_filler (void *arg)
          xmms_medialib_entry_t entry;
          xmms_output_song_changed_arg_t *arg;
          xmms_medialib_session_t *session;
+         gchar *tmp;
+         gint startms = 0;
 
          g_mutex_unlock (output->filler_mutex);
 
@@ -435,10 +453,21 @@ xmms_output_filler (void *arg)
             continue;
          }
 
+         if (tmp=xmms_xform_metadata_get_str (chain, "startms")) {
+            gchar *endptr;
+
+            startms = g_ascii_strtoull (tmp, &endptr, 10);
+
+            if (*endptr != '\0') {
+               startms = 0;
+            }
+         }
+
          arg = g_new0 (xmms_output_song_changed_arg_t, 1);
          arg->output = output;
          arg->chain = chain;
          arg->flush = last_was_kill;
+         arg->startms = startms;
          xmms_object_ref (chain);
 
          last_was_kill = FALSE;



Code:
ebuild /usr/portage/local/my-overlay/media-sound/xmms2/xmms2-2.8.ebuild digest


and then
Code:
echo "media-sound/xmms2 **" >> /etc/portage/package.keywords
echo "media-sound/xmms2 mms mp4 flac -fam mac asx mms lastfm avcodec curl id3" >> /etc/portage/package.use
emerge xmms2


now , the whole install is finished. you can try you cue/ape file.

Code:
xmms2 addpls xxx.cue

without this patch , xmms2 still can recognize those songs , but cannot play it at the right start time, it just always play at the start point of the ape file.

then , enjoy your music life!


Last edited by panchoat on Mon Oct 08, 2007 12:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Mon Oct 08, 2007 11:10 am    Post subject: Reply with quote

Moved from Multimedia to Unsupported Software.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
marco007
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 99

PostPosted: Mon Oct 08, 2007 11:28 am    Post subject: Reply with quote

panchoat, please write how-to.
i never used this ebuild stuff :oops:
_________________
e6400@3.6Ghz,Gigabyte MB
6800GS+Zalman,Audigy2
Gentoo+2.6.18-r5
Back to top
View user's profile Send private message
panchoat
n00b
n00b


Joined: 05 Sep 2007
Posts: 2

PostPosted: Mon Oct 08, 2007 12:06 pm    Post subject: Reply with quote

marco007 wrote:
panchoat, please write how-to.
i never used this ebuild stuff :oops:

in this thread? OK~ I will try, but forgive my English, that was not my native speaking one.
Back to top
View user's profile Send private message
marco007
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 99

PostPosted: Tue Oct 09, 2007 6:39 am    Post subject: Reply with quote

tnx for the howto (y)

little problem:
* Applying startms.patch ...

* Failed Patch: startms.patch !
* ( /usr/portage/local/my-overlay/media-sound/xmms2/files/startms.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-sound/xmms2-2.8/temp/startms.patch-13742.out

*
* ERROR: media-sound/xmms2-2.8 failed.
* Call stack:
* ebuild.sh, line 1654: Called dyn_unpack
* ebuild.sh, line 768: Called qa_call 'src_unpack'
* ebuild.sh, line 44: Called src_unpack
* xmms2-2.8.ebuild, line 98: Called epatch '/usr/portage/local/my-overlay/media-sound/xmms2/files/startms.patch'
* eutils.eclass, line 304: Called die
*
* Failed Patch: startms.patch!
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/log/portage/media-sound:xmms2-2.8:20071009-063715.log'.
*

* Messages for package media-sound/xmms2-2.8:

* Failed Patch: startms.patch !
* ( /usr/portage/local/my-overlay/media-sound/xmms2/files/startms.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-sound/xmms2-2.8/temp/startms.patch-13742.out
*
* ERROR: media-sound/xmms2-2.8 failed.
* Call stack:
* ebuild.sh, line 1654: Called dyn_unpack
* ebuild.sh, line 768: Called qa_call 'src_unpack'
* ebuild.sh, line 44: Called src_unpack
* xmms2-2.8.ebuild, line 98: Called epatch '/usr/portage/local/my-overlay/media-sound/xmms2/files/startms.patch'
* eutils.eclass, line 304: Called die
*
* Failed Patch: startms.patch!
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/log/portage/media-sound:xmms2-2.8:20071009-063715.log'.
*
* GNU info directory index is up-to-date.
_________________
e6400@3.6Ghz,Gigabyte MB
6800GS+Zalman,Audigy2
Gentoo+2.6.18-r5
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Tue Oct 09, 2007 8:30 am    Post subject: Reply with quote

Must be a copy & paste error - like rplacing tab with spaces. Please provide original URL to the patch, or host it somewhere.

And the ebuild has an error. jack? should pull in jack-audio-connection-kit, not jack!
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum