/[gentoo-x86]/media-tv/xdtv/xdtv-2.3.3.ebuild
Gentoo

Contents of /media-tv/xdtv/xdtv-2.3.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Jul 5 21:50:41 2006 UTC (8 years ago) by flameeyes
Branch: MAIN
Bump to version 2.3.3.
(Portage version: 2.1.1_pre2-r2)

1 flameeyes 1.1 # Copyright 1999-2006 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/media-tv/xdtv/xdtv-2.3.2-r2.ebuild,v 1.1 2006/06/26 09:07:31 flameeyes Exp $
4    
5     inherit font multilib autotools flag-o-matic
6    
7     IUSE="alsa jpeg encode ffmpeg xvid lirc xinerama neXt Xaw3d mmx zvbi aqua_theme
8     carbone_theme xv debug dvb ogg png aac nls x264"
9    
10     DESCRIPTION="TV viewer with support for AVI recording and plugins"
11     HOMEPAGE="http://xawdecode.sourceforge.net/"
12    
13     I18N_PV="1.3.0"
14     THEMES_PV="1.3.0"
15    
16     SRC_URI="mirror://sourceforge/xawdecode/${P}.tar.gz"
17    
18     for lang in ca de en es fr gl it ja pl ru; do
19     SRC_URI="${SRC_URI}
20     linguas_${lang}? (
21     mirror://sourceforge/xawdecode/libxdtv-i18n-${lang}-${I18N_PV}.tar.gz
22     aqua_theme? ( mirror://sourceforge/xawdecode/libxdtv-theme-aqua-${lang}-${THEMES_PV}.tar.gz )
23     carbone_theme? ( mirror://sourceforge/xawdecode/libxdtv-theme-carbone-${lang}-${THEMES_PV}.tar.gz )
24     )"
25     IUSE="${IUSE} linguas_${lang}"
26     done
27    
28     SLOT="0"
29     LICENSE="GPL-2"
30     KEYWORDS="~amd64 ~ppc ~x86"
31    
32     RDEPEND="zvbi? ( >=media-libs/zvbi-0.2.4 )
33     neXt? ( x11-libs/neXtaw )
34     Xaw3d? ( !neXt? ( x11-libs/Xaw3d ) )
35     !neXt? ( !Xaw3d? ( || ( x11-libs/libXaw virtual/x11 ) ) )
36     xvid? ( >=media-libs/xvid-1.1 )
37     encode? ( >=media-sound/lame-3.93 )
38     jpeg? ( media-libs/jpeg )
39     lirc? ( app-misc/lirc )
40     alsa? ( >=media-libs/alsa-lib-0.9 )
41     ogg? ( media-libs/libogg
42     >=media-libs/libtheora-1.0_alpha5
43     media-libs/libvorbis )
44     png? ( media-libs/libpng )
45     aac? ( media-libs/faac )
46     nls? ( virtual/libintl )
47     || ( ( x11-libs/libX11
48     x11-libs/libXext
49     x11-libs/libXpm
50     x11-libs/libXt
51     x11-libs/libXmu
52     x11-libs/libXxf86vm
53     x11-libs/libXxf86dga
54     x11-libs/libXv
55     x11-apps/xset
56     xinerama? ( x11-libs/libXinerama )
57     ) virtual/x11 )
58     x264? ( media-libs/x264-svn )"
59    
60     DEPEND="${RDEPEND}
61     dvb? ( media-tv/linuxtv-dvb-headers )
62     nls? ( sys-devel/gettext )
63     || ( ( x11-proto/videoproto
64     x11-proto/xproto
65     x11-proto/xextproto
66     x11-apps/bdftopcf
67     x11-apps/mkfontdir
68     x11-apps/mkfontscale
69     xinerama? ( x11-proto/xineramaproto )
70     ) virtual/x11 )"
71    
72     FONT_S="${S}/font"
73     FONT_SUFFIX="pcf.gz"
74    
75     extension_iter() {
76     local my_a
77     for my_a in ${A} ; do
78     my_a=${my_a%%.tar.gz}
79     if [ -z ${my_a/libxdtv*/} ] ; then
80     eval ${1} ${my_a} || die "${1}(${my_a}) failed."
81     fi
82     done
83     }
84    
85     extension_compile() {
86     einfo "Building ${1}"
87     cd "${WORKDIR}/${1}"
88    
89     epatch "${FILESDIR}/libxdtv-i18n-all-1.3.0-ldflags.patch"
90    
91     econf || die "econf failed"
92     emake || die "emake failed"
93     }
94    
95     extension_install() {
96     einfo "Installing ${1}"
97     cd ${WORKDIR}/${1} \
98     && emake DESTDIR=${D} LIBDIR="/usr/$(get_libdir)/${PN}" install
99     }
100    
101     src_unpack() {
102     unpack ${A}
103     # Disable font installation
104     sed -i -e '/^install:/,/^$/s:^\t:#:p' "${S}/font/Makefile.am"
105     # Disable /usr/share/xdtv/icons/* installation
106     sed -i -e '/^install-data-local:/,${\:share/xdtv/icons:d}' ${S}/Makefile.am
107    
108     cd "${S}"
109     epatch "${FILESDIR}/${PN}-2.3.0-setXid.patch"
110     epatch "${FILESDIR}/${PN}-2.3.2-parallel-install.patch"
111    
112     # ffmpeg doesn'g use libtool, so the condition for PIC code
113     # is __PIC__, not PIC.
114     sed -i -e 's/#\(\(.*def *\)\|\(.*defined *\)\|\(.*defined(*\)\)PIC/#\1__PIC__/' \
115     libavcodec/i386/dsputil_mmx{.c,_rnd.h,_avg.h} \
116     libavcodec/msmpeg4.c \
117     || die "sed failed (__PIC__)"
118    
119     eautomake
120     }
121    
122     src_compile() {
123     # Makes the xaw widgets choice deterministic
124     local xawconf="--disable-xaw95 --disable-xawm"
125     if use neXt ; then
126     use Xaw3d && ewarn "Both \"neXt\" and \"Xaw3d\" found in USE. Will use neXtaw widgets."
127     xawconf="${xawconf} --enable-nextaw --disable-xaw3d"
128     elif use Xaw3d ; then
129     xawconf="${xawconf} --disable-nextaw --enable-xaw3d"
130     else
131     xawconf="${xawconf} --disable-nextaw --disable-xaw3d"
132     ewarn "If you want a better GUI toolkit, enable either \"neXt\" or \"Xaw3d\" USE flags."
133     fi
134    
135     ( use mmx || use amd64 ) && myconf="${myconf} --enable-mmx" || \
136     myconf="${myconf} --disable-mmx"
137    
138     has_version '<x11-base/xorg-x11-7.0' && \
139     appdefaultsdir="/etc/X11/app-defaults" || \
140     appdefaultsdir="/usr/share/X11/app-defaults"
141    
142     econf ${xawconf} \
143     $(use_enable alsa) \
144     $(use_enable jpeg) \
145     $(use_enable lirc) \
146     $(use_enable ffmpeg) \
147     $(use_enable xvid) \
148     $(use_enable xinerama) \
149     $(use_enable zvbi) \
150     $(use_enable xv xvideo) \
151     $(use_enable encode lame) \
152     $(use_enable !debug nodebug) \
153     $(use_enable dvb) \
154     $(use_enable ogg) \
155     $(use_enable png) \
156     $(use_enable aac faac) \
157     $(use_enable nls) \
158     $(use_enable x264) \
159     --enable-pixmaps \
160     --disable-cpu-detection \
161     --disable-divx4linux \
162     --with-appdefaultsdir=${appdefaultsdir} \
163     ${myconf} \
164     || die "Configuration failed."
165    
166     emake BINDNOW_FLAGS="$(bindnow-flags)" OPT="${CFLAGS}" PERF_FLAGS="${CFLAGS}" || die "Compilation failed."
167    
168     # Build the extensions (i18n and theme libraries)
169     extension_iter extension_compile
170     }
171    
172     src_install() {
173     emake DESTDIR="${D}" install || die "Installation failed."
174    
175     # .desktop file and default icon
176     domenu gentoo/xdtv.desktop
177     doicon "${S}/src/xdtv.xpm"
178    
179     # Install the icons in the hicolor theme
180     for dim in 48 32 16; do
181     insinto /usr/share/icons/hicolor/${dim}x${dim}/apps
182     newins "${S}/xdtv-${dim}.png" xdtv.png
183     done
184    
185     # Remove fonts from being installed by autotools
186     rm -rf "${D}/usr/$(get_libdir)/X11"
187    
188     # Install the led-fixed font with font.eclass
189     gzip font/*.pcf
190     font_src_install
191    
192     # Install documentation
193     dodoc ChangeLog AUTHORS FAQ* README.* TODO lisez-moi* \
194     xdtvrc.sample lircrc.*.sample
195     docinto alevt
196     dodoc alevt/README alevt/ReadmeGR alevt/CHANGELOG alevt/COPYRIGHT
197    
198     # Install the extensions (i18n and theme libraries)
199     extension_iter extension_install
200     }
201    
202     pkg_postinst() {
203     echo
204     einfo "Please note that this ebuild created a suid-binary:"
205     einfo "/usr/bin/xdtv_v4l-conf"
206     echo
207     einfo "The OSD font has moved. You probably should add"
208     einfo "this path to your X configuration:"
209     einfo "/usr/share/fonts/${PN}"
210     echo
211     }

  ViewVC Help
Powered by ViewVC 1.1.20