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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Feb 21 23:28:59 2015 UTC (5 years, 4 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
Update HOMEPAGE.

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

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.0.4.ebuild,v 1.1 2015/02/07 21:34:51 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="mirror://sourceforge/${PN}/${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 )
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 )
28 tiff? ( media-libs/tiff )
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 cp "${FILESDIR}"/${PN}-1.6.0.2-makefile.patch "${WORKDIR}" || die
52 edos2unix "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
53 epatch "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
54
55 for i in fftw jpeg opencv openmp png tiff zlib ; do
56 use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
57 done
58
59 use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
60 use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
61
62 if ! use X ; then
63 sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
64
65 # disable display capabilities when X support is disabled
66 append-cxxflags -Dcimg_display=0
67 fi
68 }
69
70 src_compile() {
71 emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
72 LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= linux lib
73 emake man bashcompletion
74 }
75
76 src_install() {
77 emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
78 dodoc ../README
79 }

  ViewVC Help
Powered by ViewVC 1.1.20