From 7cd15e49c65501ea9f043ddd17a1aae86302e7d5 Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Tue, 25 Oct 2011 07:42:26 +0000 Subject: [PATCH] Initial import (thanks to all contributors in bug #328301). Package-Manager: portage-2.2.0_alpha70/cvs/Linux x86_64 --- media-gfx/gmic/ChangeLog | 10 ++ media-gfx/gmic/Manifest | 19 +++ .../gmic/files/gmic-1.5.0.4-makefile.patch | 130 ++++++++++++++++++ media-gfx/gmic/gmic-1.5.0.4.ebuild | 63 +++++++++ media-gfx/gmic/metadata.xml | 13 ++ 5 files changed, 235 insertions(+) create mode 100644 media-gfx/gmic/ChangeLog create mode 100644 media-gfx/gmic/Manifest create mode 100644 media-gfx/gmic/files/gmic-1.5.0.4-makefile.patch create mode 100644 media-gfx/gmic/gmic-1.5.0.4.ebuild create mode 100644 media-gfx/gmic/metadata.xml diff --git a/media-gfx/gmic/ChangeLog b/media-gfx/gmic/ChangeLog new file mode 100644 index 000000000000..3cf56883713d --- /dev/null +++ b/media-gfx/gmic/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for media-gfx/gmic +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gmic/ChangeLog,v 1.1 2011/10/25 07:42:26 radhermit Exp $ + +*gmic-1.5.0.4 (25 Oct 2011) + + 25 Oct 2011; Tim Harder +gmic-1.5.0.4.ebuild, + +files/gmic-1.5.0.4-makefile.patch, +metadata.xml: + Initial import (thanks to all contributors in bug #328301). + diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest new file mode 100644 index 000000000000..100c5524cc9c --- /dev/null +++ b/media-gfx/gmic/Manifest @@ -0,0 +1,19 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +AUX gmic-1.5.0.4-makefile.patch 6103 RMD160 20467bf823bdde29e554f29d18cc64328ccb5079 SHA1 6ea32fef37a2b2971bf23cf7f17ef9c408fe79c5 SHA256 98e27d448764fe3704ae38d0eba08b19be3fdd7c9356e02b7f580f513b2ac5b3 +DIST gmic_1.5.0.4.tar.gz 1250701 RMD160 007a7bfbdec30fd42868fa2eabe9d52a69c001cc SHA1 b466bad3c5feec25c17a0004e7e3e4bdab1b64ba SHA256 0be5a5a7360f155b5f7e152035acaf936452dd613e518b427b81669b318de7ed +EBUILD gmic-1.5.0.4.ebuild 1685 RMD160 7dfadf334d693cbd34847723d3a2962e5ea06894 SHA1 e2a8dc7ac584e1a81935b8fe279639e633d48dc1 SHA256 6851085f59b04a79804ede3905ef398a3f87563bca12010e42b6b50b8a0fa649 +MISC ChangeLog 420 RMD160 27c32b4d4ec554df91d9128404db4c51c4fb8317 SHA1 342ca91d62def81f88a3a1c4131966dfdd0630c0 SHA256 82c7e2be743f98cd2cf57e3b1efb535009a4a82b3afb51e068824fd716446252 +MISC metadata.xml 473 RMD160 680f8739786ae6d9221c0f6d2734cb16682c1b7c SHA1 1ce57e832b27b5e349e070cdeaf37ff11f500b18 SHA256 def06af4d0283b01f9313231ff05df286129ff57afbcac23fcc7c45d8f735a6c +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.18 (GNU/Linux) + +iQEcBAEBCgAGBQJOpmhoAAoJEEqz6FtPBkyj+BgH/jD7ZH7Fi47MaIcgNPGAVfMB +nkad9uUmxdHTVZuu0cdqc0GKezyZoByC/5ul8Hj5+3e2gUuZ+JRERfROToicMqeG +5SrBeXW0BlUr9DDywUubODX4rB1m+UNYvbUjkWE0fJm1n6qRAMSUhtnPpocDMu98 +M5/qvQolfQ6dupS2llxu5qVQdeEREqFEodHp1WKTQvqnARINtFPyzuaKljYOkOI/ +qdUOrW0UvTbvUlxil3RQVuhFzPJ/lhKJXPMrYLh4VMdFmKW0RaTnswbI0VD5Hkx+ +hSliTeBUZ5dczjNacsBFxXk2lvxkJ1D6YvVd/hoFseVFpXKogXS+ldcOGNeDTs0= +=klrF +-----END PGP SIGNATURE----- diff --git a/media-gfx/gmic/files/gmic-1.5.0.4-makefile.patch b/media-gfx/gmic/files/gmic-1.5.0.4-makefile.patch new file mode 100644 index 000000000000..047c6124a162 --- /dev/null +++ b/media-gfx/gmic/files/gmic-1.5.0.4-makefile.patch @@ -0,0 +1,130 @@ +--- gmic-1.5.0.4/src/Makefile.orig ++++ gmic-1.5.0.4/src/Makefile +@@ -87,7 +87,7 @@ + + # Flags that are mandatory to compile 'gmic'. + MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include +-MANDATORY_LDFLAGS += -L$(USR)/lib ++MANDATORY_LDFLAGS += + ifeq ($(IS_GCC),yes) + MANDATORY_CFLAGS += -Wall -W + MANDATORY_LDFLAGS += -lm +@@ -98,21 +98,21 @@ + DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3 -g + + # Flags to enable optimizations. +-ifeq ($(IS_GCC),yes) +-OPT_CFLAGS = -O3 -fno-tree-pre # -ffast-math +-endif +-ifeq ($(CC),icc) +-OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits +-endif ++#ifeq ($(IS_GCC),yes) ++#OPT_CFLAGS = -O3 -fno-tree-pre # -ffast-math ++#endif ++#ifeq ($(CC),icc) ++#OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits ++#endif + + # Flags to enable image display, using X11 + # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). + X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr +-X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr ++X11_LDFLAGS = -lX11 -lpthread #-lXrandr + + # Flags to enable fast display, using XShm. + XSHM_CFLAGS = -Dcimg_use_xshm +-XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext ++XSHM_LDFLAGS = -lXext + + # Flags to enable image display, using GDI32. + GDI32_CFLAGS = -Dcimg_display=2 -Dcimg_appname=\\\"gmic\\\" +@@ -144,12 +144,7 @@ + + # Flags to enable native support of webcams, using the OpenCV library. + OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include/opencv +-ifeq ($(OS),Darwin) + OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui # Use this for OpenCV 2.2.0 ! +-else +-OPENCV_LDFLAGS = -lcv -lhighgui +-# OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui # Use this for OpenCV 2.2.0 ! +-endif + + # Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. + MAGICK_CFLAGS = -Dcimg_use_magick -I$(USR)/include/GraphicsMagick +@@ -183,11 +178,11 @@ + $(EXR_LDFLAGS) $(FFTW_LDFLAGS) $(OPENCV_LDFLAGS) # $(FFMPEG_LDFLAGS) $(XSHM_LDFLAGS) # $(MAGICK_LDFLAGS) + + CUST_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ +- $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(MINC2_CFLAGS) $(ZLIB_CFLAGS) $(OPENCV_CFLAGS) \ +- $(FFTW_CFLAGS) $(FFMPEG_CFLAGS) $(BOARD_CFLAGS) $(EXR_CFLAGS) $(MAGICK_CFLAGS) ++ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) $(OPENCV_CFLAGS) \ ++ $(FFTW_CFLAGS) $(FFMPEG_CFLAGS) $(EXR_CFLAGS) $(MAGICK_CFLAGS) + CUST_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(X11_LDFLAGS) $(XSHM_LDFLAGS) $(PNG_LDFLAGS) \ +- $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) $(MINC2_LDFLAGS) $(ZLIB_LDFLAGS) $(OPENCV_LDFLAGS) \ +- $(FFTW_LDFLAGS) $(FFMPEG_LDFLAGS) $(BOARD_LDFLAGS) $(EXR_LDFLAGS) $(MAGICK_LDFLAGS) ++ $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) $(ZLIB_LDFLAGS) $(OPENCV_LDFLAGS) \ ++ $(FFTW_LDFLAGS) $(FFMPEG_LDFLAGS) $(EXR_LDFLAGS) $(MAGICK_LDFLAGS) + + DEBUG_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ + $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) \ +@@ -213,7 +208,7 @@ + STD_WINDOWS_LDFLAGS = $(MANDATORY_LDFLAGS) $(GDI32_LDFLAGS) $(ZLIB_LDFLAGS) $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(FFTW_LDFLAGS) + + STD_GIMP_CFLAGS = -Dgmic_build -Dcimg_display=0 -I$(USR)/include $(FFTW_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) ${IS_BETA_CFLAGS} +-STD_GIMP_LDFLAGS = -L$(USR)/lib -lpthread $(FFTW_LDFLAGS) $(PNG_LDFLAGS) $(ZLIB_LDFLAGS) ++STD_GIMP_LDFLAGS = -lpthread $(FFTW_LDFLAGS) $(PNG_LDFLAGS) $(ZLIB_LDFLAGS) + ifeq ($(OS),MINGW32_NT-5.1) + STD_GIMP_LDFLAGS += -mwindows + endif +@@ -254,10 +249,10 @@ + endif + + gimp: +- $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" "STRIP_EXE=1" gmic_gimp ++ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" gmic_gimp + + lib: +- $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS)" gmic_lib ++ $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS)" gmic_lib + + # Entries for non-default configurations. + minimal: +@@ -267,10 +262,10 @@ + $(MAKE) "CFLAGS+=$(DEBUG_UNIX_CFLAGS)" "LDFLAGS+=$(DEBUG_UNIX_LDFLAGS)" gmic_minimal + + linux: +- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic ++ $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_UNIX_LDFLAGS)" gmic_gmic + + custom: +- $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic ++ $(MAKE) "CFLAGS+=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(CUST_UNIX_LDFLAGS)" gmic_gmic + + solaris: + $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic_gmic +@@ -288,7 +283,7 @@ + gmic_lib.o: gmic.cpp gmic_def.h + $(CC) -o gmic_lib.o -c gmic.cpp -fPIC -Dgmic_minimal -Dgmic_float $(CFLAGS) + gmic_lib: gmic_lib.o +- ar rcs libgmic.a gmic_lib.o ++ $(AR) rcs libgmic.a gmic_lib.o + $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LDFLAGS) + $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LDFLAGS) + +@@ -296,7 +291,6 @@ + $(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp -Dgmic_minimal -Dgmic_float $(CFLAGS) + gmic_gimp : gmic_gimp.o gmic_gimp.cpp + $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LDFLAGS) +- strip gmic_gimp$(EXE) + + gmic_minimal: gmic.cpp + $(CC) -o gmic gmic.cpp -Dgmic_minimal -Dgmic_float -Dgmic_main $(CFLAGS) $(LDFLAGS) +@@ -321,7 +315,6 @@ + $(CC) -o gmic_double.o -c gmic.cpp -Dgmic_separate_compilation -Dgmic_double $(CFLAGS) + gmic_gmic: gmic.cpp gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o gmic_def.h + $(CC) -o gmic gmic.cpp -Dgmic_separate_compilation -Dgmic_main $(CFLAGS) gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o $(LDFLAGS) +- strip gmic$(EXE) + + def: + @echo "#ifndef gmic_gimp" > gmic_def.h diff --git a/media-gfx/gmic/gmic-1.5.0.4.ebuild b/media-gfx/gmic/gmic-1.5.0.4.ebuild new file mode 100644 index 000000000000..1758c3bff01c --- /dev/null +++ b/media-gfx/gmic/gmic-1.5.0.4.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gmic/gmic-1.5.0.4.ebuild,v 1.1 2011/10/25 07:42:26 radhermit Exp $ + +EAPI="4" + +inherit eutils toolchain-funcs bash-completion-r1 + +DESCRIPTION="GREYC's Magic Image Converter" +HOMEPAGE="http://gmic.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="CeCILL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr png tiff X zlib" + +RDEPEND=" + ffmpeg? ( virtual/ffmpeg ) + fftw? ( sci-libs/fftw:3.0 ) + graphicsmagick? ( media-gfx/graphicsmagick ) + jpeg? ( media-libs/jpeg ) + opencv? ( media-libs/opencv ) + openexr? ( + media-libs/ilmbase + media-libs/openexr + ) + png? ( media-libs/libpng ) + tiff? ( media-libs/tiff ) + X? ( + x11-libs/libX11 + x11-libs/libXext + ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${P}/src" + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch + + for i in ffmpeg fftw jpeg opencv png tiff zlib ; do + use $i || { sed -i -r -e "s/^(${i}_(C|LD)FLAGS =).*/\1/I" Makefile || die ; } + done + + use graphicsmagick || { sed -i -r -e "s/^(MAGICK_(C|LD)FLAGS =).*/\1/" Makefile || die ; } + use openexr || { sed -i -r -e "s/^(EXR_(C|LD)FLAGS =).*/\1/" Makefile || die ; } + use X || { sed -i -r -e "s/^((X11|XSHM)_(C|LD)FLAGS =).*/\1/" Makefile || die ; } +} + +src_compile() { + emake AR="$(tc-getAR)" CC="$(tc-getCXX)" custom bashcompletion lib +} + +src_install() { + dobin gmic + newlib.so libgmic.so libgmic.so.1 + insinto /usr/include + doins gmic.h + doman ../man/gmic.1.gz + dodoc ../{AUTHORS,README} + newbashcomp gmic_bashcompletion.sh ${PN} +} diff --git a/media-gfx/gmic/metadata.xml b/media-gfx/gmic/metadata.xml new file mode 100644 index 000000000000..f578ca35694b --- /dev/null +++ b/media-gfx/gmic/metadata.xml @@ -0,0 +1,13 @@ + + + + graphics + + radhermit@gentoo.org + Tim Harder + + + Enable support for many common image file formats using the GraphicsMagick++ library + Enable support for webcams using the OpenCV library + + -- 2.26.2