--- qdvdauthor-1.2.0.ebuild 2009-04-05 12:37:41.000000000 +0200 +++ qdvdauthor-1.8.0-r2.ebuild 2009-06-16 23:52:24.000000000 +0200 @@ -1,102 +1,157 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-video/qdvdauthor/qdvdauthor-1.2.0.ebuild,v 1.2 2008/07/27 21:54:04 carlo Exp $ -EAPI=1 +EAPI=2 -inherit eutils flag-o-matic qt3 +inherit eutils flag-o-matic qt4 qt3 DESCRIPTION="'Q' DVD-Author is a GUI frontend for dvdauthor written in Qt" HOMEPAGE="http://qdvdauthor.sourceforge.net/" -SRC_URI="mirror://sourceforge/qdvdauthor/${P}.tar.gz" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz + buttons? ( http://${PN}.sourceforge.net/data/buttons.tar.bz2 ) + transitions? ( http://${PN}.sourceforge.net/data/alpha_trans.tar.bz2 )" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~x86" # ppc currently disabled because of media-video/dv2sub -IUSE="xine mplayer" +KEYWORDS="~amd64 ~x86" # ppc currently disabled because of media-video/dv2sub +IUSE="mplayer +xine plugins cdr buttons transitions debug" -DEPEND=">=media-video/dvdauthor-0.6.11 - >=media-gfx/imagemagick-6.1.8.8 - >=media-video/mjpegtools-1.6.2 - >=media-video/dvd-slideshow-0.7.2 - xine? ( >=media-libs/xine-lib-1.1.0 ) +DEPEND="media-video/dvdauthor + media-gfx/jhead + media-video/ffmpeg + media-video/mjpegtools + xine? ( media-libs/xine-lib ) mplayer? ( media-video/mplayer ) - !xine? ( !mplayer? ( >=media-libs/xine-lib-1.1.0 ) ) - x11-libs/qt:3" + !xine? ( !mplayer? ( media-libs/xine-lib ) ) + x11-libs/qt:3 + x11-libs/qt-gui:4 + x11-libs/libX11" RDEPEND="${DEPEND} - media-libs/netpbm app-cdr/dvdisaster + media-libs/netpbm media-video/dv2sub media-video/videotrans + media-gfx/imagemagick media-sound/toolame media-sound/lame - media-sound/sox" + media-sound/sox + media-sound/vorbis-tools + cdr? ( || ( virtual/cdrtools app-cdr/dvd+rw-tools ) )" # TODO: -# media-video/dvd-slideshow -> optional -# installing further tools -> needs evaluation +# templates now provided as rpm +# http://sourceforge.net/project/showfiles.php?group_id=98243&package_id=258878 + +pkg_setup() { + if ! use xine && ! use mplayer ; then + eerror "You have to enable at least one of the use flags xine or \ + mplayer" + die "xine and mplayer flag unset." + fi +} src_unpack() { unpack ${A} - cd "${S}" + use buttons && mv buttons "${S}" + use transitions && mv slideshow "${S}" +} - # do not over-optimize (see bug #147250) - replace-flags -O[s3] -O2 - filter-flags -finline-functions - - # set our C(XX)FLAGS - for PRO in */*.pro */*/*.pro; do - echo "QMAKE_CFLAGS_RELEASE = ${CFLAGS}" >> "${PRO}" - echo "QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}" >> "${PRO}" - done - - # full-qualify qmake in configure and append -nocache (see bug #118697) - sed -i -e "s:make;\?[[:space:]]*\$:make ${MAKEOPTS};:g" \ - -e "s:\(/qmake\):\1 -nocache QMAKE=\$QTDIR/bin/qmake:g" configure - - # fixing defaults from /usr/local/bin to gentoo default /usr/bin - sed -i -e 's:/usr/local/bin:/usr/bin:g' doc/sound.txt \ - qdvdauthor/dialog*.cpp qdvdauthor/qslideshow/dialog*.cpp +src_prepare() { + sed -i -e 's:backround:background:g' qdvdauthor/qdvdauthor.pro \ + || die "sed failed" +} + +src_configure() { + if use xine ; then + export WITH_XINE_SUPPORT=1 + fi + + if use mplayer ; then + export WITH_MPLAYER_SUPPORT=1 + fi + + export WITH_VLC_SUPPORT=0 + + eqmake3 all.pro + + cd "${S}"/qdvdauthor + eqmake3 qdvdauthor.pro + + cd "${S}"/qdvdauthor/qplayer + eqmake3 qplayer.pro + + if use plugins ; then + for i in simpledvd complexdvd menuslide testplugs; do + cd "${S}"/qdvdauthor/plugins/"${i}" + eqmake3 "${i}".pro + done + fi + + cd "${S}"/addons/jhead/libjhead + eqmake3 interface.pro + + cd "${S}"/qrender + eqmake4 qrender.pro } src_compile() { - local myconf="--prefix=/usr --build-qplayer --build-qslideshow" + cd "${S}"/qdvdauthor + emake || die "emake failed" - # select backend - use xine && myconf="${myconf} --with-xine-support" - use mplayer && myconf="${myconf} --with-mplayer-support" + cd "${S}"/qdvdauthor/qplayer + emake || die "emake failed" - # if no backend selected, use XINE as default - if ! use xine && ! use mplayer; then - myconf="${myconf} --with-xine-support" + if use plugins ; then + for i in simpledvd complexdvd menuslide testplugs; do + cd "${S}"/qdvdauthor/plugins/"${i}" + emake || die "emake failed" + eqmake3 "${i}".pro + done fi - ./configure --qt-dir="${QTDIR}" ${myconf} || die "configure failed" + cd "${S}"/addons/jhead/libjhead + emake || die "emake failed" + eqmake3 interface.pro -o Makefile.interface - # build plugins - cd qdvdauthor/plugins && ./make.sh + cd "${S}"/qrender + emake || die "emake failed" } src_install() { - emake INSTALL_ROOT="${D}" install || die "install failed" + cd "${S}"/qdvdauthor + emake INSTALL_ROOT="${D}" install || die "emake install failed" - dobin bin/{qdvdauthor,qslideshow,qplayer} - dodoc CHANGELOG README TODO doc/{ISO*,look*,sound*,todo*,render*}.txt + cd "${S}"/qdvdauthor/qplayer + emake INSTALL_ROOT="${D}" install || die "emake install failed" - insinto /usr/share/qdvdauthor - doins silence.ac3 silence.mp2 + if use plugins ; then + for i in simpledvd complexdvd; do + cd "${S}"/qdvdauthor/plugins/"${i}" + emake INSTALL_ROOT="${D}" install || die "emake install failed" + done + fi - insinto /usr/share/qdvdauthor/html/en - doins doc/html/en/*.html - - for i in simpledvd complexdvd; do - insinto /usr/share/qdvdauthor/plugins/${i} - doins qdvdauthor/plugins/${i}/*.{jpg,png} - cp -dp qdvdauthor/plugins/plugins/lib${i}.so* \ - ${D}usr/share/qdvdauthor/plugins/ - done + cd "${S}"/addons/jhead/libjhead + emake INSTALL_ROOT="${D}" -f Makefile.interface install || \ + die "emake install failed" + + cd "${S}"/qrender + emake INSTALL_ROOT="${D}" install || die "emake install failed" + + cd "${S}" + if use buttons ; then + insinto /usr/share/qdvdauthor + doins -r buttons + fi + + if use transitions ; then + insinto /usr/share/qdvdauthor + doins -r slideshow + fi + dodoc CHANGELOG README doc/{ISO*,look*,sound*,todo*,render*}.txt domenu qdvdauthor.desktop doicon qdvdauthor.png }