/[gentoo-x86]/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild
Gentoo

Contents of /media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Tue May 5 17:02:27 2015 UTC (5 years, 3 months ago) by billie
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +2 -2 lines
Remove old. Specify slot dependency for virtual/jpeg

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 215AD14D)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild,v 1.14 2015/05/01 19:16:58 jer Exp $
4
5 EAPI=5
6
7 inherit autotools eutils flag-o-matic multilib-minimal toolchain-funcs
8
9 DESCRIPTION="Tools for MJPEG video"
10 HOMEPAGE="http://mjpeg.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="1"
15 KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd"
16 IUSE="dv gtk cpu_flags_x86_mmx png quicktime sdl sdlgfx static-libs"
17 REQUIRED_USE="sdlgfx? ( sdl )"
18
19 RDEPEND="virtual/jpeg:0=[${MULTILIB_USEDEP}]
20 quicktime? ( >=media-libs/libquicktime-1.2.4-r1[${MULTILIB_USEDEP}] )
21 dv? ( >=media-libs/libdv-1.0.0-r3[${MULTILIB_USEDEP}] )
22 png? ( media-libs/libpng:0= )
23 gtk? ( x11-libs/gtk+:2 )
24 sdl? ( >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
25 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
26 sdlgfx? ( media-libs/sdl-gfx )
27 )"
28
29 DEPEND="${RDEPEND}
30 cpu_flags_x86_mmx? ( dev-lang/nasm )
31 >=sys-apps/sed-4
32 virtual/awk
33 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
34
35 RDEPEND="${RDEPEND}
36 abi_x86_32? (
37 !<=app-emulation/emul-linux-x86-medialibs-20140508-r4
38 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
39 )"
40
41 src_prepare() {
42 epatch "${FILESDIR}"/${P}-pic.patch
43 # https://sourceforge.net/p/mjpeg/bugs/139/
44 epatch "${FILESDIR}"/${P}-sdl-cflags.patch
45 epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
46 eautoreconf
47 sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
48 }
49
50 multilib_src_configure() {
51 [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
52
53 local myconf=(
54 --enable-compile-warnings
55 $(use_enable cpu_flags_x86_mmx simd-accel)
56 $(use_enable static-libs static)
57 --enable-largefile
58
59 $(use_with quicktime libquicktime)
60 $(use_with dv libdv)
61 $(use_with sdl libsdl)
62 --without-v4l
63 $(use_with sdl x)
64
65 # used by tools only
66 $(multilib_native_use_with gtk)
67 $(multilib_native_use_with png libpng)
68 $(multilib_native_use_with sdlgfx)
69
70 # used only in V4LCONF_LIBS that is not used anywhere...
71 --without-dga
72 )
73
74 ECONF_SOURCE=${S} \
75 econf "${myconf[@]}"
76 }
77
78 multilib_src_compile() {
79 if multilib_is_native_abi; then
80 default
81 else
82 # avoid building programs
83 emake bin_PROGRAMS=
84 fi
85 }
86
87 multilib_src_test() {
88 # there are no tests at the moment, so it would just build
89 # all programs in non-native ABIs...
90 multilib_is_native_abi && default
91 }
92
93 multilib_src_install() {
94 if multilib_is_native_abi; then
95 default
96 else
97 emake DESTDIR="${D}" install \
98 bin_PROGRAMS=
99 fi
100 }
101
102 multilib_src_install_all() {
103 einstalldocs
104 dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt
105
106 prune_libtool_files --all
107 }
108
109 pkg_postinst() {
110 if [[ -z "${REPLACING_VERSIONS}" ]]; then
111 elog "mjpegtools installs user contributed scripts which require additional"
112 elog "dependencies not pulled in by the installation."
113 elog "These have to be installed manually."
114 elog "Currently known extra dpendencies are: ffmpeg, mencoder from mplayer,"
115 elog "parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python."
116 fi
117 }

  ViewVC Help
Powered by ViewVC 1.1.20