Fix underlinking issues caused by missing libm and libogg linking
Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=513012
+In addition, fix nonidiomatic AC_ARG_ENABLE option handling.
+
--- tagtool-0.12.3/configure.ac
+++ tagtool-0.12.3/configure.ac
-@@ -50,6 +50,12 @@
+@@ -13,20 +13,16 @@
+
+
+ dnl Command line options
+-AC_ARG_ENABLE(mp3,
+- AC_HELP_STRING([--disable-mp3], [Disable MP3 support (if enabled, id3lib is required)]),
+- [enable_mp3=no; disable_mp3_reason="(disabled)"],
+- [enable_mp3=yes])
+-
+-AC_ARG_ENABLE(vorbis,
+- AC_HELP_STRING([--disable-vorbis], [Disable Ogg Vorbis support (if enabled, libvorbis is required)]),
+- [enable_vorbis=no; disable_vorbis_reason="(disabled)"],
+- [enable_vorbis=yes])
++AC_ARG_ENABLE([mp3],
++ AS_HELP_STRING([--disable-mp3], [Disable MP3 support (if enabled, id3lib is required)]))
+
+-if test "$enable_mp3" = "no" && test "$enable_vorbis" = "no"; then
+- AC_MSG_ERROR([At least one of 'mp3' or 'vorbis' must be enabled. Try './configure --help' for a list of options.])
+-fi;
++AC_ARG_ENABLE([vorbis],
++ AS_HELP_STRING([--disable-vorbis], [Disable Ogg Vorbis support (if enabled, libvorbis is required)]))
+
++dnl Test for no flags being enabled
++AS_IF([test "x$enable_mp3" != "xyes" && test "x$enable_vorbis" != "xyes" ], [
++ AC_MSG_ERROR([At least one of 'mp3' or 'vorbis' must be enabled. Try './configure --help' for a list of options.])
++])
+
+ dnl Checks for programs.
+ AC_PROG_CC
+@@ -50,6 +46,12 @@
fi;
dnl Check for gtk and related libraries
PKG_CHECK_MODULES(GTK, [glib-2.0 >= 2.12.0
gtk+-2.0 >= 2.8.0
-@@ -91,6 +97,9 @@
+@@ -91,6 +93,9 @@
AC_CHECK_LIB(vorbisfile, main,,
[enable_vorbis=no; disable_vorbis_reason="(missing vorbisfile library)"])
fi;
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="vorbis mp3"
+IUSE="mp3 +vorbis"
+REQUIRED_USE="|| ( mp3 vorbis )"
RDEPEND="x11-libs/gtk+:2
>=gnome-base/libglade-2.6
mp3? ( >=media-libs/id3lib-3.8.3-r6 )
- vorbis? ( >=media-libs/libvorbis-1 )
- !mp3? ( !vorbis? ( >=media-libs/libvorbis-1 ) )"
+ vorbis? ( >=media-libs/libvorbis-1 )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
}
src_configure() {
- local myconf
-
- use mp3 || myconf="${myconf} --disable-mp3"
- use vorbis || myconf="${myconf} --disable-vorbis"
-
- if ! use mp3 && ! use vorbis; then
- einfo "One of USE flags is required, enabling vorbis for you."
- myconf="--disable-mp3"
- fi
-
- econf ${myconf}
+ econf \
+ $(use_enable mp3) \
+ $(use_enable vorbis)
}
src_install() {
DESTDIR="${D}" \
GNOME_SYSCONFDIR="${D}/etc" \
sysdir="${D}/usr/share/applets/Multimedia" \
- install || die
+ install
dodoc ChangeLog NEWS README TODO THANKS
}