Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 241804 | Differences between
and this patch

Collapse All | Expand All

(-)qdvdauthor-1.2.0.ebuild (-61 / +118 lines)
Lines 1-102 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-video/qdvdauthor/qdvdauthor-1.2.0.ebuild,v 1.2 2008/07/27 21:54:04 carlo Exp $
3
# $Header: /var/cvsroot/gentoo-x86/media-video/qdvdauthor/qdvdauthor-1.2.0.ebuild,v 1.2 2008/07/27 21:54:04 carlo Exp $
4
4
5
EAPI=1
5
EAPI=2
6
6
7
inherit eutils flag-o-matic qt3
7
inherit eutils flag-o-matic qt4 qt3
8
8
9
DESCRIPTION="'Q' DVD-Author is a GUI frontend for dvdauthor written in Qt"
9
DESCRIPTION="'Q' DVD-Author is a GUI frontend for dvdauthor written in Qt"
10
HOMEPAGE="http://qdvdauthor.sourceforge.net/"
10
HOMEPAGE="http://qdvdauthor.sourceforge.net/"
11
SRC_URI="mirror://sourceforge/qdvdauthor/${P}.tar.gz"
11
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
12
		templates? ( mirror://sourceforge/${PN}/${PN}-templates-1.10.0.tar.bz2
13
					http://${PN}.sourceforge.net/data/masks.tar.bz2 )"
12
14
13
LICENSE="GPL-2"
15
LICENSE="GPL-2"
14
SLOT="0"
16
SLOT="0"
15
KEYWORDS="~amd64 ~x86"  # ppc currently disabled because of media-video/dv2sub
17
KEYWORDS="~amd64 ~x86"	# ppc currently disabled because of media-video/dv2sub
16
IUSE="xine mplayer"
18
IUSE="mplayer +xine plugins cdr templates debug"
17
19
18
DEPEND=">=media-video/dvdauthor-0.6.11
20
DEPEND="media-video/dvdauthor
19
	>=media-gfx/imagemagick-6.1.8.8
21
	media-gfx/jhead
20
	>=media-video/mjpegtools-1.6.2
22
	media-video/ffmpeg
21
	>=media-video/dvd-slideshow-0.7.2
23
	media-video/mjpegtools
22
	xine? ( >=media-libs/xine-lib-1.1.0 )
24
	xine? ( media-libs/xine-lib )
23
	mplayer? ( media-video/mplayer )
25
	mplayer? ( media-video/mplayer )
24
	!xine? ( !mplayer? ( >=media-libs/xine-lib-1.1.0 ) )
26
	!xine? ( !mplayer? ( media-libs/xine-lib ) )
25
	x11-libs/qt:3"
27
	x11-libs/qt:3
28
	x11-libs/qt-gui:4
29
	x11-libs/libX11
30
	templates? ( app-text/convmv )"
26
31
27
RDEPEND="${DEPEND}
32
RDEPEND="${DEPEND}
28
	media-libs/netpbm
29
	app-cdr/dvdisaster
33
	app-cdr/dvdisaster
34
	media-libs/netpbm
30
	media-video/dv2sub
35
	media-video/dv2sub
31
	media-video/videotrans
36
	media-video/videotrans
37
	media-gfx/imagemagick
32
	media-sound/toolame
38
	media-sound/toolame
33
	media-sound/lame
39
	media-sound/lame
34
	media-sound/sox"
40
	media-sound/sox
41
	media-sound/vorbis-tools
42
	cdr? ( || ( virtual/cdrtools app-cdr/dvd+rw-tools ) )"
43
44
TEMPLATES="${WORKDIR}"/${PN}-templates-1.10.0
45
46
pkg_setup() {
47
	if ! use xine && ! use mplayer ; then
48
		eerror "You have to enable at least one of the use flags xine or \
49
			mplayer"
50
		die "xine and mplayer flag unset."
51
	fi
52
}
35
53
36
# TODO:
54
src_prepare() {
37
# media-video/dvd-slideshow -> optional
55
	sed -i -e 's:backround:background:g' qdvdauthor/qdvdauthor.pro \
38
# installing further tools -> needs evaluation
56
		|| die "sed failed"
57
58
	mv "${WORKDIR}"/masks ${TEMPLATES}
59
60
	# remove spaces in filenames
61
	local OIFS IFS i
62
	OIFS=${IFS}; IFS=$'\n'
63
	for i in $(find ${TEMPLATES} -depth -name '* *') ; do
64
		mv ${i} $(dirname ${i})/$(basename ${i// /-})
65
	done
66
	IFS=${OIFS}
39
67
40
src_unpack() {
68
	# fix filename encoding
41
	unpack ${A}
69
	convmv --notest -r -f iso-8859-15 -t utf8 ${TEMPLATES}/buttons 1>>/dev/null 2>&1
42
	cd "${S}"
70
}
43
71
44
	# do not over-optimize (see bug #147250)
72
src_configure() {
45
	replace-flags -O[s3] -O2
73
	if use xine ; then
46
	filter-flags -finline-functions
74
		export WITH_XINE_SUPPORT=1
47
75
	fi
48
	# set our C(XX)FLAGS
76
49
	for PRO in */*.pro */*/*.pro; do
77
	if use mplayer ; then
50
		echo "QMAKE_CFLAGS_RELEASE = ${CFLAGS}" >> "${PRO}"
78
		export WITH_MPLAYER_SUPPORT=1
51
		echo "QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}" >> "${PRO}"
79
	fi
52
	done
53
80
54
	# full-qualify qmake in configure and append -nocache (see bug #118697)
81
	export WITH_VLC_SUPPORT=0
55
	sed -i -e "s:make;\?[[:space:]]*\$:make ${MAKEOPTS};:g" \
82
56
		-e "s:\(/qmake\):\1 -nocache QMAKE=\$QTDIR/bin/qmake:g" configure
83
	eqmake3 all.pro
57
84
58
	# fixing defaults from /usr/local/bin to gentoo default /usr/bin
85
	cd "${S}"/qdvdauthor
59
	sed -i -e 's:/usr/local/bin:/usr/bin:g' doc/sound.txt \
86
	eqmake3 qdvdauthor.pro
60
		qdvdauthor/dialog*.cpp qdvdauthor/qslideshow/dialog*.cpp
87
88
	cd "${S}"/qdvdauthor/qplayer
89
	eqmake3 qplayer.pro
90
91
	if use plugins ; then
92
		for i in simpledvd complexdvd menuslide testplugs; do
93
			cd "${S}"/qdvdauthor/plugins/${i}
94
			eqmake3 ${i}.pro
95
		done
96
	fi
97
98
	cd "${S}"/addons/jhead/libjhead
99
	eqmake3 interface.pro
100
101
	cd "${S}"/qrender
102
	eqmake4 qrender.pro
61
}
103
}
62
104
63
src_compile() {
105
src_compile() {
64
	local myconf="--prefix=/usr --build-qplayer --build-qslideshow"
106
	cd "${S}"/qdvdauthor
107
	emake || die "emake failed"
65
108
66
	# select backend
109
	cd "${S}"/qdvdauthor/qplayer
67
	use xine && myconf="${myconf} --with-xine-support"
110
	emake || die "emake failed"
68
	use mplayer && myconf="${myconf} --with-mplayer-support"
69
111
70
	# if no backend selected, use XINE as default
112
	if use plugins ; then
71
	if ! use xine && ! use mplayer; then
113
		for i in simpledvd complexdvd menuslide testplugs; do
72
		myconf="${myconf} --with-xine-support"
114
			cd "${S}"/qdvdauthor/plugins/${i}
115
			emake || die "emake failed"
116
			eqmake3 ${i}.pro
117
		done
73
	fi
118
	fi
74
119
75
	./configure --qt-dir="${QTDIR}" ${myconf} || die "configure failed"
120
	cd "${S}"/addons/jhead/libjhead
121
	emake || die "emake failed"
122
	eqmake3 interface.pro -o Makefile.interface
76
123
77
	# build plugins
124
	cd "${S}"/qrender
78
	cd qdvdauthor/plugins && ./make.sh
125
	emake || die "emake failed"
79
}
126
}
80
127
81
src_install() {
128
src_install() {
82
	emake INSTALL_ROOT="${D}" install || die "install failed"
129
	cd "${S}"/qdvdauthor
130
	emake INSTALL_ROOT="${D}" install || die "emake install failed"
83
131
84
	dobin bin/{qdvdauthor,qslideshow,qplayer}
132
	cd "${S}"/qdvdauthor/qplayer
85
	dodoc CHANGELOG README TODO doc/{ISO*,look*,sound*,todo*,render*}.txt
133
	emake INSTALL_ROOT="${D}" install || die "emake install failed"
86
134
87
	insinto /usr/share/qdvdauthor
135
	if use plugins ; then
88
	doins silence.ac3 silence.mp2
136
		for i in simpledvd complexdvd; do
137
			cd "${S}"/qdvdauthor/plugins/${i}
138
			emake INSTALL_ROOT="${D}" install || die "emake install failed"
139
		done
140
	fi
89
141
90
	insinto /usr/share/qdvdauthor/html/en
142
	cd "${S}"/addons/jhead/libjhead
91
	doins doc/html/en/*.html
143
	emake INSTALL_ROOT="${D}" -f Makefile.interface install || \
92
144
		die "emake install failed"
93
	for i in simpledvd complexdvd; do
145
94
		insinto /usr/share/qdvdauthor/plugins/${i}
146
	cd "${S}"/qrender
95
		doins qdvdauthor/plugins/${i}/*.{jpg,png}
147
	emake INSTALL_ROOT="${D}" install || die "emake install failed"
96
		cp -dp qdvdauthor/plugins/plugins/lib${i}.so* \
148
97
			${D}usr/share/qdvdauthor/plugins/
149
	cd "${TEMPLATES}"
98
	done
150
	if use templates ; then
151
		insinto /usr/share/qdvdauthor
152
		doins -r animated buttons masks slideshow static
153
	fi
99
154
155
	cd "${S}"
156
	dodoc CHANGELOG README
100
	domenu qdvdauthor.desktop
157
	domenu qdvdauthor.desktop
101
	doicon qdvdauthor.png
158
	doicon qdvdauthor.png
102
}
159
}

Return to bug 241804