/[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.9 - (hide annotations) (download)
Mon Mar 2 09:28:48 2015 UTC (5 years, 5 months ago) by ago
Branch: MAIN
Changes since 1.8: +2 -2 lines
Stable for ppc, wrt bug #525770

(Portage version: 2.2.14/cvs/Linux x86_64, RepoMan options: --include-arches="ppc", signed Manifest commit with key 7194459F)

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 ago 1.9 # $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild,v 1.8 2015/02/22 14:55:15 billie 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 ago 1.9 KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
16 billie 1.8 IUSE="dv gtk cpu_flags_x86_mmx png quicktime sdl sdlgfx static-libs"
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     src_prepare() {
42     epatch "${FILESDIR}"/${P}-pic.patch
43     # https://sourceforge.net/p/mjpeg/bugs/139/
44     epatch "${FILESDIR}"/${P}-sdl-cflags.patch
45 billie 1.4 epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
46 mgorny 1.1 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 mgorny 1.6 $(use_enable cpu_flags_x86_mmx simd-accel)
56 mgorny 1.1 $(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 billie 1.8 --without-v4l
63 mgorny 1.1 $(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