<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>59423</bug_id>
          
          <creation_ts>2004-08-04 10:42 0000</creation_ts>
          <short_desc>I would like to add tagtool to the portage tree ( ebuild included )</short_desc>
          <delta_ts>2004-08-21 00:48:05 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <status_whiteboard>configure check/ebuild check/patching</status_whiteboard>
          <keywords>EBUILD</keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>yoosty69@netzero.net</reporter>
          <assigned_to>chriswhite@gentoo.org</assigned_to>
          <cc>sound@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>yoosty69@netzero.net</who>
            <bug_when>2004-08-04 10:42:51 0000</bug_when>
            <thetext>I&apos;m not sure where to put the Ebuild, so I put it in Additional Information

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




IUSE=&quot;oggvorbis&quot;

DESCRIPTION=&quot;Audio Tag Tool Ogg/Mp3 Tagger&quot;
HOMEPAGE=&quot;http://pwp.netcabo.pt/paol/tagtool/&quot;
SRC_URI=&quot;http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz&quot;

### Needs libglade 0.17, and I emerged it successfully with libvorbis 1.0.1 ###
RDEPEND=&quot;&gt;=media-libs/id3lib-3.8.2
        &lt;gnome-base/libglade-2.0.1
        oggvorbis? ( &gt;=media-libs/libvorbis-1.0.1 )&quot;

SLOT=&quot;0&quot;
LICENSE=&quot;GPL-2&quot;
KEYWORDS=&quot;~x86&quot;

src_unpack() {
        unpack ${P}.tar.gz
        cd ${S}
}

src_compile() {
        local myconf

### I&apos;m so nub I don&apos;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&apos;t  ###
### Know how to do it :(                                                ###
        export OLDLDFLAGS=&quot;$LDFLAGS&quot;
        export LDFLAGS=&quot;-lstdc++ $LDFLAGS&quot;
        econf \
                ${myconf} || die &quot;econf failed&quot;
        emake || die
        export LDFLAGS=&quot;$OLDLDFLAGS&quot;
}

src_install() {
### I&apos;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
}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yoosty69@netzero.net</who>
            <bug_when>2004-08-04 10:45:39 0000</bug_when>
            <thetext>Created an attachment (id=36752)
Ebuild for tagtool
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yoosty69@netzero.net</who>
            <bug_when>2004-08-04 10:48:58 0000</bug_when>
            <thetext>sorry.. Never submitted anything so I didn&apos;t realize that you should post the Ebuild as an attachment AFTER submitting the bug... d&apos;oh</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chriswhite@gentoo.org</who>
            <bug_when>2004-08-19 14:56:19 0000</bug_when>
            <thetext>Ok, the package is commited to cvs.  There&apos;s a patch with it so it might take
about an hour or so for that to get to the mirrors.  Here&apos;s what I did with
the ebuild and why:

-IUSE=&quot;oggvorbis&quot;
+# 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=&quot;oggvorbis mp3&quot;

added the &quot;mp3&quot; IUSE in there so a user has the option as to whether or not
they want id3lib support.  Also, you forgot the header!  That&apos;s very
important!

-SRC_URI=&quot;http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz&quot;
+SRC_URI=&quot;http://pwp.netcabo.pt/paol/tagtool/${P}.tar.gz
+               mirror://gentoo/tagtool-0.9-configure.patch.tar.bz2&quot;

Added the patch to SRC_URI.

-RDEPEND=&quot;&gt;=media-libs/id3lib-3.8.2
-       &lt;gnome-base/libglade-2.0.1
+DEPEND=&quot;&gt;=x11-libs/gtk+-2.4.0-r1
+       &gt;=gnome-base/libglade-2.4.0
+       mp3? ( &gt;=media-libs/id3lib-3.8.3-r2 )
        oggvorbis? ( &gt;=media-libs/libvorbis-1.0.1 )&quot;

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&apos;t needed.

+       myconf=&quot;&quot;
+       myconf=&quot;${myconf} $(use_enable mp3)&quot;
+       myconf=&quot;${myconf} $(use_enable oggvorbis vorbis)&quot;
+
+       #add some configure logic to prevent a dying ebuild
+       if use !mp3 &amp;&amp; use !oggvorbis
+       then
+               ewarn &quot;Vorbis or mp3 must be selected.&quot;
+               ewarn &quot;Defaulting to mp3, please cancel this emerge&quot;
+               ewarn &quot;if you do not want mp3 support.&quot;
+               myconf=&quot;--enable-mp3&quot;
+       fi
+
+       #fix the strange upstream configure logic
+       epatch ${DISTDIR}/${P}-configure.patch.tar.bz2

-### I&apos;m so nub I don&apos;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&apos;t  ###
-### Know how to do it :(                                                ###
-       export OLDLDFLAGS=&quot;$LDFLAGS&quot;
-       export LDFLAGS=&quot;-lstdc++ $LDFLAGS&quot;

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&apos;s it.  Thanks for posting!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>yoosty69@netzero.net</who>
            <bug_when>2004-08-21 00:48:05 0000</bug_when>
            <thetext>It doesn&apos;t build with newer libglade ( &gt;=libglade-2.0.0 ), which was the reason for the original sillyness of:
 &lt;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 :)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>36752</attachid>
            <date>2004-08-04 10:45 0000</date>
            <desc>Ebuild for tagtool</desc>
            <filename>tagtool-0.9.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">SVVTRT0ib2dndm9yYmlzIgoKREVTQ1JJUFRJT049IkF1ZGlvIFRhZyBUb29sIE9nZy9NcDMgVGFn
Z2VyIgpIT01FUEFHRT0iaHR0cDovL3B3cC5uZXRjYWJvLnB0L3Bhb2wvdGFndG9vbC8iClNSQ19V
Ukk9Imh0dHA6Ly9wd3AubmV0Y2Fiby5wdC9wY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VpbnN0YWxsIFwKCQlzeXNkaXI9
JHtEfS91c3Ivc2hhcmUvYXBwbGV0cy9NdWx0aW1lZGlhIFwKCQlHTk9NRV9TWVNDT05GRElSPSR7
RH0vZXRjIFwKCQl8fCBkaWUKCglkb2RvYyBDaGFuZ2VMb2cgQ09QWUlORyBORVdTIFJFQURNRSBU
T0RPIFRIQU5LUwp9Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>