Bug 59423 - I would like to add tagtool to the portage tree ( ebuild included )
|
Bug#:
59423
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: x86
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: enhancement
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: chriswhite@gentoo.org
|
Reported By: yoosty69@netzero.net
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: I would like to add tagtool to the portage tree ( ebuild included )
|
|
Keywords: EBUILD
|
|
Status Whiteboard: configure check/ebuild check/patching
|
|
Opened: 2004-08-04 10:42 0000
|
I'm not sure where to put the Ebuild, so I put it in Additional Information
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
IUSE="oggvorbis"
DESCRIPTION="Audio Tag Tool Ogg/Mp3 Tagger"
HOMEPAGE="http://pwp.netcabo.pt/paol/tagtool/"
SRC_URI="http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz"
### Needs libglade 0.17, and I emerged it successfully with libvorbis 1.0.1 ###
RDEPEND=">=media-libs/id3lib-3.8.2
<gnome-base/libglade-2.0.1
oggvorbis? ( >=media-libs/libvorbis-1.0.1 )"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86"
src_unpack() {
unpack ${P}.tar.gz
cd ${S}
}
src_compile() {
local myconf
### I'm so nub I don't even know if LDFLAGS are used or what... ###
### What I DO know, is that this here LDFLAGS var needs to be set as: ###
### -lstdc++ for the config script to find the id3libs. ###
### ( A patch for the appropriate scripts might be better, but I don't ###
### Know how to do it :( ###
export OLDLDFLAGS="$LDFLAGS"
export LDFLAGS="-lstdc++ $LDFLAGS"
econf \
${myconf} || die "econf failed"
emake || die
export LDFLAGS="$OLDLDFLAGS"
}
src_install() {
### I'm not sure if the GNOME_SYSCONFDIR var is necessary for this program, ###
### but this ebuild is ripped off of one of the easytag ebuilds... ###
einstall \
sysdir=${D}/usr/share/applets/Multimedia \
GNOME_SYSCONFDIR=${D}/etc \
|| die
dodoc ChangeLog COPYING NEWS README TODO THANKS
}
sorry.. Never submitted anything so I didn't realize that you should post the
Ebuild as an attachment AFTER submitting the bug... d'oh
Ok, the package is commited to cvs. There's a patch with it so it might take
about an hour or so for that to get to the mirrors. Here's what I did with
the ebuild and why:
-IUSE="oggvorbis"
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/tagtool/tagtool-0.9.ebuild,v 1.1 2004/08/19 21:38:25 chriswhite Exp $
+
+inherit eutils
+
+IUSE="oggvorbis mp3"
added the "mp3" IUSE in there so a user has the option as to whether or not
they want id3lib support. Also, you forgot the header! That's very
important!
-SRC_URI="http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz"
+SRC_URI="http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz
+ mirror://gentoo/tagtool-0.9-configure.patch.tar.bz2"
Added the patch to SRC_URI.
-RDEPEND=">=media-libs/id3lib-3.8.2
- <gnome-base/libglade-2.0.1
+DEPEND=">=x11-libs/gtk+-2.4.0-r1
+ >=gnome-base/libglade-2.4.0
+ mp3? ( >=media-libs/id3lib-3.8.3-r2 )
oggvorbis? ( >=media-libs/libvorbis-1.0.1 )"
The RDEPEND was changed to DEPEND, since these are all required to build
the program more than to run it. Also changed id3lib version number since it
fixes the LD_FLAG hack. Fudged the version numbers so they matched up more
with what upstream requires.
-src_unpack() {
- unpack ${P}.tar.gz
+src_compile() {
cd ${S}
-}
-src_compile() {
unpack ${P}.tar.gz is depricated by unpack ${A}. Also, if unpack ${A} is the
only thing that src_unpack does, then it isn't needed.
+ myconf=""
+ myconf="${myconf} $(use_enable mp3)"
+ myconf="${myconf} $(use_enable oggvorbis vorbis)"
+
+ #add some configure logic to prevent a dying ebuild
+ if use !mp3 && use !oggvorbis
+ then
+ ewarn "Vorbis or mp3 must be selected."
+ ewarn "Defaulting to mp3, please cancel this emerge"
+ ewarn "if you do not want mp3 support."
+ myconf="--enable-mp3"
+ fi
+
+ #fix the strange upstream configure logic
+ epatch ${DISTDIR}/${P}-configure.patch.tar.bz2
-### I'm so nub I don't even know if LDFLAGS are used or what... ###
-### What I DO know, is that this here LDFLAGS var needs to be set as: ###
-### -lstdc++ for the config script to find the id3libs. ###
-### ( A patch for the appropriate scripts might be better, but I don't ###
-### Know how to do it :( ###
- export OLDLDFLAGS="$LDFLAGS"
- export LDFLAGS="-lstdc++ $LDFLAGS"
ok, the id3lib version adjustment above gets rid of this strange hack..
the myconf was changed to utilize $(use_enable) for both vorbis and mp3 USE
flags. The !mp3 and !vorbis prevents the emerge from failing in a long list
of other emerges by providing it with some kind of default.
The configure patch fixes some rather odd upstream autoconfigure logic that
created a broken package when --disable-something and --enable-something were
both passed to configure.
- einstall \
+ make install \
+ DESTDIR=${D} \
More prefered to einstall.. check `man 5 ebuild` for information on that.
- dodoc ChangeLog COPYING NEWS README TODO THANKS
+ dodoc ChangeLog NEWS README TODO THANKS
COPYING is not a doc that we need.
That's it. Thanks for posting!
It doesn't build with newer libglade ( >=libglade-2.0.0 ), which was the reason
for the original sillyness of:
<gnome-base/libglade-2.0.1
in DEPEND
and wow, I looked at the configure patch... you changed alot of junk... and now
it works w/out that LDFLAGS mess. Good Job :)