/[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.7 - (hide annotations) (download)
Thu Feb 12 10:37:27 2015 UTC (5 years, 5 months ago) by pacho
Branch: MAIN
Changes since 1.6: +2 -2 lines
amd64 stable, bug #525770

(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 mgorny 1.6 # Copyright 1999-2015 Gentoo Foundation
2 mgorny 1.1 # Distributed under the terms of the GNU General Public License v2
3 pacho 1.7 # $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild,v 1.6 2015/01/29 19:15:57 mgorny Exp $
4 mgorny 1.1
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 pacho 1.7 KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
16 mgorny 1.6 IUSE="dv gtk cpu_flags_x86_mmx png quicktime sdl sdlgfx static-libs v4l"
17 mgorny 1.1 REQUIRED_USE="sdlgfx? ( sdl )"
18    
19 mgorny 1.3 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 mgorny 1.1 png? ( media-libs/libpng:0= )
23     gtk? ( x11-libs/gtk+:2 )
24 mgorny 1.3 sdl? ( >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
25     >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
26 mgorny 1.1 sdlgfx? ( media-libs/sdl-gfx )
27 billie 1.2 )"
28 mgorny 1.1
29     DEPEND="${RDEPEND}
30 mgorny 1.6 cpu_flags_x86_mmx? ( dev-lang/nasm )
31 mgorny 1.1 >=sys-apps/sed-4
32     virtual/awk
33 mgorny 1.3 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
34 mgorny 1.1
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 billie 1.4 epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
53 mgorny 1.1 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 mgorny 1.6 $(use_enable cpu_flags_x86_mmx simd-accel)
63 mgorny 1.1 $(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