/[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.4 - (show annotations) (download)
Sat Sep 13 23:48:31 2014 UTC (5 years, 11 months ago) by billie
Branch: MAIN
Changes since 1.3: +2 -1 lines
Fix building with -Werror=format-security. Thanks to Agostino Sarubbo in bug #517576.

(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.3 2014/06/18 20:31:11 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-0-r2[${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 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 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 epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
53 eautoreconf
54 sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
55 }
56
57 multilib_src_configure() {
58 [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
59
60 local myconf=(
61 --enable-compile-warnings
62 $(use_enable mmx simd-accel)
63 $(use_enable static-libs static)
64 --enable-largefile
65
66 $(use_with quicktime libquicktime)
67 $(use_with dv libdv)
68 $(use_with sdl libsdl)
69 $(use_with v4l)
70 $(use_with sdl x)
71
72 # used by tools only
73 $(multilib_native_use_with gtk)
74 $(multilib_native_use_with png libpng)
75 $(multilib_native_use_with sdlgfx)
76
77 # used only in V4LCONF_LIBS that is not used anywhere...
78 --without-dga
79 )
80
81 ECONF_SOURCE=${S} \
82 econf "${myconf[@]}"
83 }
84
85 multilib_src_compile() {
86 if multilib_is_native_abi; then
87 default
88 else
89 # avoid building programs
90 emake bin_PROGRAMS=
91 fi
92 }
93
94 multilib_src_test() {
95 # there are no tests at the moment, so it would just build
96 # all programs in non-native ABIs...
97 multilib_is_native_abi && default
98 }
99
100 multilib_src_install() {
101 if multilib_is_native_abi; then
102 default
103 else
104 emake DESTDIR="${D}" install \
105 bin_PROGRAMS=
106 fi
107 }
108
109 multilib_src_install_all() {
110 einstalldocs
111 dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt
112
113 prune_libtool_files --all
114 }
115
116 pkg_postinst() {
117 if [[ -z "${REPLACING_VERSIONS}" ]]; then
118 elog "mjpegtools installs user contributed scripts which require additional"
119 elog "dependencies not pulled in by the installation."
120 elog "These have to be installed manually."
121 elog "Currently known extra dpendencies are: ffmpeg, mencoder from mplayer,"
122 elog "parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python."
123 fi
124 }

  ViewVC Help
Powered by ViewVC 1.1.20