/[gentoo-x86]/media-gfx/gmic/gmic-1.6.5.0.ebuild
Gentoo

Contents of /media-gfx/gmic/gmic-1.6.5.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Jun 27 03:23:19 2015 UTC (5 years, 3 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Force rebuild when libpng slot changes.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)

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-gfx/gmic/gmic-1.6.5.0.ebuild,v 1.2 2015/06/27 03:20:46 radhermit Exp $
4
5 EAPI=5
6
7 inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic
8
9 DESCRIPTION="GREYC's Magic Image Converter"
10 HOMEPAGE="http://gmic.eu/"
11 SRC_URI="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
12
13 LICENSE="CeCILL-2 FDL-1.3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr openmp png tiff X zlib"
17
18 DEPEND="
19 fftw? ( sci-libs/fftw:3.0[threads] )
20 graphicsmagick? ( media-gfx/graphicsmagick )
21 jpeg? ( virtual/jpeg:0 )
22 opencv? ( >=media-libs/opencv-2.3.1a-r1 )
23 openexr? (
24 media-libs/ilmbase
25 media-libs/openexr
26 )
27 png? ( media-libs/libpng:0= )
28 tiff? ( media-libs/tiff:0 )
29 X? (
30 x11-libs/libX11
31 x11-libs/libXext
32 )
33 zlib? ( sys-libs/zlib )"
34 RDEPEND="${DEPEND}
35 ffmpeg? ( media-video/ffmpeg:0 )
36 "
37
38 S=${WORKDIR}/${P}/src
39
40 pkg_pretend() {
41 if use openmp ; then
42 tc-has-openmp || die "Please switch to an openmp compatible compiler"
43 fi
44
45 if ! test-flag-CXX -std=c++11 ; then
46 die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
47 fi
48 }
49
50 src_prepare() {
51 epatch "${FILESDIR}"/${P}-makefile.patch
52
53 for i in fftw jpeg opencv openmp png tiff zlib ; do
54 use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
55 done
56
57 use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
58 use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
59
60 if ! use X ; then
61 sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
62
63 # disable display capabilities when X support is disabled
64 append-cxxflags -Dcimg_display=0
65 fi
66 }
67
68 src_compile() {
69 emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
70 LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= cli lib
71 emake man bashcompletion
72 }
73
74 src_install() {
75 emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
76 dodoc ../README
77 }

  ViewVC Help
Powered by ViewVC 1.1.20