/[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.2 - (show annotations) (download)
Tue Jun 10 21:06:49 2014 UTC (6 years, 2 months ago) by billie
Branch: MAIN
Changes since 1.1: +2 -2 lines
Whitespace.

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

1 # Copyright 1999-2014 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.1 2014/06/10 18:08:24 mgorny 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 mmx png quicktime sdl sdlgfx static-libs v4l"
17 REQUIRED_USE="sdlgfx? ( sdl )"
18
19 RDEPEND="virtual/jpeg[${MULTILIB_USEDEP}]
20 quicktime? ( media-libs/libquicktime[${MULTILIB_USEDEP}] )
21 dv? ( >=media-libs/libdv-0.99[${MULTILIB_USEDEP}] )
22 png? ( media-libs/libpng:0= )
23 gtk? ( x11-libs/gtk+:2 )
24 sdl? ( >=media-libs/libsdl-1.2.7-r3[${MULTILIB_USEDEP}]
25 x11-libs/libX11[${MULTILIB_USEDEP}]
26 sdlgfx? ( media-libs/sdl-gfx )
27 )"
28
29 DEPEND="${RDEPEND}
30 mmx? ( dev-lang/nasm )
31 >=sys-apps/sed-4
32 virtual/awk
33 virtual/pkgconfig[${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 pkg_pretend() {
42 if has_version ">=sys-kernel/linux-headers-2.6.38" && use v4l; then
43 ewarn "Current versions of mjpegtools only support V4L1 which is not available"
44 ewarn "for kernel versions 2.6.38 and above. V4L1 will be disabled."
45 fi
46 }
47
48 src_prepare() {
49 epatch "${FILESDIR}"/${P}-pic.patch
50 # https://sourceforge.net/p/mjpeg/bugs/139/
51 epatch "${FILESDIR}"/${P}-sdl-cflags.patch
52 eautoreconf
53 sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
54 }
55
56 multilib_src_configure() {
57 [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
58
59 local myconf=(
60 --enable-compile-warnings
61 $(use_enable mmx simd-accel)
62 $(use_enable static-libs static)
63 --enable-largefile
64
65 $(use_with quicktime libquicktime)
66 $(use_with dv libdv)
67 $(use_with sdl libsdl)
68 $(use_with v4l)
69 $(use_with sdl x)
70
71 # used by tools only
72 $(multilib_native_use_with gtk)
73 $(multilib_native_use_with png libpng)
74 $(multilib_native_use_with sdlgfx)
75
76 # used only in V4LCONF_LIBS that is not used anywhere...
77 --without-dga
78 )
79
80 ECONF_SOURCE=${S} \
81 econf "${myconf[@]}"
82 }
83
84 multilib_src_compile() {
85 if multilib_is_native_abi; then
86 default
87 else
88 # avoid building programs
89 emake bin_PROGRAMS=
90 fi
91 }
92
93 multilib_src_test() {
94 # there are no tests at the moment, so it would just build
95 # all programs in non-native ABIs...
96 multilib_is_native_abi && default
97 }
98
99 multilib_src_install() {
100 if multilib_is_native_abi; then
101 default
102 else
103 emake DESTDIR="${D}" install \
104 bin_PROGRAMS=
105 fi
106 }
107
108 multilib_src_install_all() {
109 einstalldocs
110 dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt
111
112 prune_libtool_files --all
113 }
114
115 pkg_postinst() {
116 if [[ -z "${REPLACING_VERSIONS}" ]]; then
117 elog "mjpegtools installs user contributed scripts which require additional"
118 elog "dependencies not pulled in by the installation."
119 elog "These have to be installed manually."
120 elog "Currently known extra dpendencies are: ffmpeg, mencoder from mplayer,"
121 elog "parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python."
122 fi
123 }

  ViewVC Help
Powered by ViewVC 1.1.20