summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-04-29 03:09:40 +0000
committerMike Frysinger <vapier@gentoo.org>2014-04-29 03:09:40 +0000
commita28fd61f13ebb952e133a5576aee818c8e21abc4 (patch)
tree0ddb322fd94a1a2dfbd57b8d48db2aabc11573ce /media-sound
parentDrop bad/unnecessary -I/-L flags that default to /usr/lib for most people. (diff)
downloadgentoo-2-a28fd61f13ebb952e133a5576aee818c8e21abc4.tar.gz
gentoo-2-a28fd61f13ebb952e133a5576aee818c8e21abc4.tar.bz2
gentoo-2-a28fd61f13ebb952e133a5576aee818c8e21abc4.zip
Move non-binary files from /usr/lib/timidity to /usr/share/timidity #377245 by Michał Górny. Fix pkg-config handling and use it to get ncurses info #497362 by Dave Kemper.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/timidity++/ChangeLog10
-rw-r--r--media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch109
-rw-r--r--media-sound/timidity++/timidity++-2.14.0-r2.ebuild185
3 files changed, 303 insertions, 1 deletions
diff --git a/media-sound/timidity++/ChangeLog b/media-sound/timidity++/ChangeLog
index a1a7e1b05280..c60615aec637 100644
--- a/media-sound/timidity++/ChangeLog
+++ b/media-sound/timidity++/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-sound/timidity++
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/timidity++/ChangeLog,v 1.160 2014/04/29 02:45:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/timidity++/ChangeLog,v 1.161 2014/04/29 03:09:40 vapier Exp $
+
+*timidity++-2.14.0-r2 (29 Apr 2014)
+
+ 29 Apr 2014; Mike Frysinger <vapier@gentoo.org>
+ +files/timidity++-2.14.0-pkg-config.patch, +timidity++-2.14.0-r2.ebuild:
+ Move non-binary files from /usr/lib/timidity to /usr/share/timidity #377245 by
+ Michał Górny. Fix pkg-config handling and use it to get ncurses info #497362
+ by Dave Kemper.
29 Apr 2014; Mike Frysinger <vapier@gentoo.org>
+files/timidity++-2.14.0-configure-flags.patch, timidity++-2.14.0-r1.ebuild:
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch b/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch
new file mode 100644
index 000000000000..15d6a4ec43f4
--- /dev/null
+++ b/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch
@@ -0,0 +1,109 @@
+use $PKG_CONFIG rather than `pkg-config`
+
+https://bugs.gentoo.org/497362
+get ncurses info via pkg-config while we're at it
+
+patch by Mike Frysinger <vapier@gentoo.org>
+
+--- a/configure.in
++++ b/configure.in
+@@ -148,6 +148,7 @@ AC_SUBST(xawresdir)
+
+ # Checks for programs.
+ AM_PATH_LISPDIR
++PKG_PROG_PKG_CONFIG
+ AC_PROG_CC
+ AC_PROG_GCC_TRADITIONAL
+ AC_PROG_INSTALL
+@@ -1318,8 +1319,8 @@ AC_MSG_CHECKING(enable_audio=jack)
+ if test "x$au_enable_jack" = xyes; then
+ AC_MSG_RESULT(yes)
+ SYSEXTRAS="$SYSEXTRAS jack_a.c"
+- EXTRALIBS="$EXTRALIBS $(pkg-config --libs jack)"
+- EXTRADEFS="$EXTRADEFS -DAU_JACK $(pkg-config --cflags jack)"
++ EXTRALIBS="$EXTRALIBS $(${PKG_CONFIG} --libs jack)"
++ EXTRADEFS="$EXTRADEFS -DAU_JACK $(${PKG_CONFIG} --cflags jack)"
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -1635,60 +1636,8 @@ dnl ncurses
+ AM_CONDITIONAL(ENABLE_NCURSES, false)
+ CONFIG_INTERFACE(ncurses,NCURSES,n,
+ AS_HELP_STRING([--enable-ncurses], [Enable ncurses interface (default is no)]),
+- [ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)
+-
+-dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9e
+-dnl because <ncurses/curses.h> includes <unctrl.h>:
+-dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directory
+-dnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h.
+-dnl configure must check ncurses header with -I/usr/include/ncurses option.
+-
+- case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in
+- *yes*);;
+- *) for i in /usr/include /usr/local/include; do
+- if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then
+- AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later)
+- CPPFLAGS="$CPPFLAGS -I$i/ncurses"
+- break
+- fi
+- done
+- ;;
+- esac
+-
+- AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses,
+- [ dnl checking pdcurses
+- AC_CHECK_LIB(curses,PDC_set_ctrl_break,
+- [ lib_curses_opt=-lcurses
+- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
+- lib_user32_opt="$lib_user32_test"
+- ],
+- [ dnl checking libpdcurses
+- AC_CHECK_LIB(pdcurses,PDC_set_ctrl_break,
+- [ lib_curses_opt=-lpdcurses
+- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
+- lib_user32_opt="$lib_user32_test"
+- ],
+- [ dnl OpenBSD use -lcurses instead of -lncurses.
+- case "$target" in
+- *openbsd*)
+- AC_CHECK_LIB(curses,initscr,lib_curses_opt=-lcurses,
+- [ AC_MSG_WARN(ncurses interface is not enabled)
+- enable_ncurses=no ])
+- ;;
+- *)
+- if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
+- lib_curses_opt=libpdcurses.lib
+- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
+- else
+- AC_MSG_WARN(ncurses interface is not enabled)
+- enable_ncurses=no
+- fi
+- ;;
+- esac
+- ])
+- ],
+- $lib_user32_test)
+- ])
++ [ CPPFLAGS="$CPPFLAGS $(${PKG_CONFIG} --cflags ncurses)"
++ lib_curses_opt=$(${PKG_CONFIG} --libs ncurses)
+ ],
+ [ LIBS="$LIBS $lib_curses_opt"
+ case "$target" in
+@@ -1855,7 +1804,7 @@ CONFIG_INTERFACE(xaw,XAW,a,
+ lib_xmu_opt=-lXmu
+ lib_xt_opt=-lXt
+ if test "x$enable_xft" = "xyes" && test "x$have_xaw" != "xno"; then
+- XFT_CFLAGS="$(pkg-config --cflags xft)";
++ XFT_CFLAGS="$(${PKG_CONFIG} --cflags xft)";
+ EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS)
+ lib_xft_opt="-lXft";
+ fi
+@@ -1909,7 +1858,7 @@ CONFIG_INTERFACE(xaw,XAW,a,
+ ;;
+ esac
+ if test "x$enable_xft" = "xyes" && test "x$have_xaw" != "xno"; then
+- XFT_CFLAGS="$(pkg-config --cflags xft)";
++ XFT_CFLAGS="$(${PKG_CONFIG} --cflags xft)";
+ EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS)
+ a_so_libs="$a_so_libs -lXft";
+ fi
diff --git a/media-sound/timidity++/timidity++-2.14.0-r2.ebuild b/media-sound/timidity++/timidity++-2.14.0-r2.ebuild
new file mode 100644
index 000000000000..fac54c0c6eb1
--- /dev/null
+++ b/media-sound/timidity++/timidity++-2.14.0-r2.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/timidity++/timidity++-2.14.0-r2.ebuild,v 1.1 2014/04/29 03:09:40 vapier Exp $
+
+EAPI=5
+inherit autotools eutils elisp-common user systemd toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=TiMidity++-${MY_PV}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="A handy MIDI to WAV converter with OSS and ALSA output support"
+HOMEPAGE="http://timidity.sourceforge.net/"
+SRC_URI="mirror://sourceforge/timidity/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="motif oss nas X gtk vorbis tk slang alsa jack emacs ao speex flac ncurses"
+
+DEPEND="ncurses? ( >=sys-libs/ncurses-5 )
+ emacs? ( virtual/emacs )
+ gtk? ( x11-libs/gtk+:2 )
+ tk? ( >=dev-lang/tk-8.5.13 )
+ nas? ( >=media-libs/nas-1.4 )
+ alsa? ( media-libs/alsa-lib )
+ slang? ( sys-libs/slang )
+ jack? ( media-sound/jack-audio-connection-kit )
+ vorbis? ( media-libs/libvorbis )
+ flac? ( media-libs/flac )
+ speex? ( media-libs/speex )
+ ao? ( >=media-libs/libao-0.8.5 )
+ motif? ( >=x11-libs/motif-2.3:0 )
+ X? ( x11-libs/libXaw x11-libs/libXext >=media-libs/libpng-1.4.2 )"
+RDEPEND="${DEPEND}
+ alsa? ( media-sound/alsa-utils )
+ app-admin/eselect-timidity"
+
+PDEPEND="|| ( media-sound/timidity-eawpatches media-sound/timidity-freepats )"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ enewgroup audio 18 # Just make sure it exists
+ enewuser timidity -1 -1 /var/lib/timidity audio
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-params.patch \
+ "${FILESDIR}"/${P}-revert-for-required-ctl_speana_data-function.patch \
+ "${FILESDIR}"/${P}-tcltk86.patch \
+ "${FILESDIR}"/${P}-ar.patch \
+ "${FILESDIR}"/${P}-configure-flags.patch \
+ "${FILESDIR}"/${P}-pkg-config.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ export EXTRACFLAGS="${CFLAGS}" #385817
+
+ local myconf=()
+ local audios
+
+ use flac && audios+=",flac"
+ use speex && audios+=",speex"
+ use vorbis && audios+=",vorbis"
+ use oss && audios+=",oss"
+ use jack && audios+=",jack"
+ use ao && audios+=",ao"
+
+ if use nas; then
+ audios+=",nas"
+ myconf+=( --with-nas-library="/usr/$(get_libdir)/libaudio.so" --with-x )
+ use X || ewarn "Basic X11 support will be enabled because required by nas."
+ fi
+
+ if use alsa; then
+ audios+=",alsa"
+ myconf+=( --with-default-output=alsa --enable-alsaseq )
+ fi
+
+ # We disable motif by default and then only enable it if it's requested.
+ if use motif; then
+ myconf+=( --enable-motif --with-x )
+ use X || ewarn "Basic X11 support will be enabled because required by motif."
+ fi
+
+ econf \
+ --localstatedir=/var/state/timidity++ \
+ --with-module-dir="${EPREFIX}/usr/share/timidity" \
+ --with-lispdir="${SITELISP}/${PN}" \
+ --with-elf \
+ --enable-audio=${audios} \
+ --enable-server \
+ --enable-network \
+ --enable-dynamic \
+ --enable-vt100 \
+ --enable-spline=cubic \
+ $(use_enable emacs) \
+ $(use_enable slang) \
+ $(use_enable ncurses) \
+ $(use_with X x) \
+ $(use_enable X spectrogram) \
+ $(use_enable X wrd) \
+ $(use_enable X xskin) \
+ $(use_enable X xaw) \
+ $(use_enable gtk) \
+ $(use_enable tk tcltk) \
+ --disable-motif \
+ "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS ChangeLog*
+ dodoc NEWS README* "${FILESDIR}"/timidity.cfg-r1
+
+ # these are only for the ALSA sequencer mode
+ if use alsa; then
+ newconfd "${FILESDIR}"/conf.d.timidity.2 timidity
+ newinitd "${FILESDIR}"/init.d.timidity.4 timidity
+
+ systemd_dounit "${FILESDIR}"/timidity.service
+ fi
+
+ insinto /etc
+ newins "${FILESDIR}"/timidity.cfg-r1 timidity.cfg
+
+ dodir /usr/share/timidity
+ dosym /etc/timidity.cfg /usr/share/timidity/timidity.cfg
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ diropts -o timidity -g nobody -m 0700
+ keepdir /var/lib/timidity
+
+ doicon "${FILESDIR}"/timidity.xpm
+ newmenu "${FILESDIR}"/timidity.desktop.2 timidity.desktop
+
+ # Order of preference: gtk, X (Xaw), ncurses, slang
+ # Do not create menu item for terminal ones
+ local interface="-id"
+ local terminal="true"
+ local nodisplay="true"
+ if use gtk || use X; then
+ interface="-ia"
+ terminal="false"
+ nodisplay="false"
+ use gtk && interface="-ig"
+ elif use ncurses || use slang; then
+ local interface="-is"
+ use ncurses && interface="-in"
+ fi
+ sed -e "s/Exec=timidity/Exec=timidity ${interface}/" \
+ -e "s/Terminal=.*/Terminal=${terminal}/" \
+ -e "s/NoDisplay=.*/NoDisplay=${nodisplay}/" \
+ -i "${D}"/usr/share/applications/timidity.desktop || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+
+ elog "A timidity config file has been installed in /etc/timidity.cfg."
+ elog "Do not edit this file as it will interfere with the eselect timidity tool."
+ elog "The tool 'eselect timidity' can be used to switch between installed patchsets."
+
+ if use alsa; then
+ elog "An init script for the alsa timidity sequencer has been installed."
+ elog "If you wish to use the timidity virtual sequencer, edit /etc/conf.d/timidity"
+ elog "and run 'rc-update add timidity <runlevel> && /etc/init.d/timidity start'"
+ fi
+
+ if use sparc; then
+ elog "Only saving to wave file and ALSA soundback has been tested working."
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}