diff options
author | Tim Harder <radhermit@gentoo.org> | 2012-11-13 06:06:08 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2012-11-13 06:06:08 +0000 |
commit | 705df1c1a9f4cde79bb57dcb417f70eecd3163c8 (patch) | |
tree | e881fd3b8ee1cad747d75729c4d186005f57a63a /media-gfx/gmic | |
parent | Version bump. (diff) | |
download | historical-705df1c1a9f4cde79bb57dcb417f70eecd3163c8.tar.gz historical-705df1c1a9f4cde79bb57dcb417f70eecd3163c8.tar.bz2 historical-705df1c1a9f4cde79bb57dcb417f70eecd3163c8.zip |
Version bump.
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64
Manifest-Sign-Key: 0x4AB3E85B4F064CA3
Diffstat (limited to 'media-gfx/gmic')
-rw-r--r-- | media-gfx/gmic/ChangeLog | 8 | ||||
-rw-r--r-- | media-gfx/gmic/Manifest | 21 | ||||
-rw-r--r-- | media-gfx/gmic/files/gmic-1.5.2.2-ffmpeg.patch | 22 | ||||
-rw-r--r-- | media-gfx/gmic/files/gmic-1.5.2.2-makefile.patch | 101 | ||||
-rw-r--r-- | media-gfx/gmic/gmic-1.5.2.2.ebuild | 77 |
5 files changed, 220 insertions, 9 deletions
diff --git a/media-gfx/gmic/ChangeLog b/media-gfx/gmic/ChangeLog index 62d6a2c76b3b..fd32fb76493e 100644 --- a/media-gfx/gmic/ChangeLog +++ b/media-gfx/gmic/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/gmic # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/gmic/ChangeLog,v 1.25 2012/11/02 07:25:53 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gmic/ChangeLog,v 1.26 2012/11/13 06:06:05 radhermit Exp $ + +*gmic-1.5.2.2 (13 Nov 2012) + + 13 Nov 2012; Tim Harder <radhermit@gentoo.org> +gmic-1.5.2.2.ebuild, + +files/gmic-1.5.2.2-ffmpeg.patch, +files/gmic-1.5.2.2-makefile.patch: + Version bump. 02 Nov 2012; Tim Harder <radhermit@gentoo.org> -gmic-1.5.1.7.ebuild, -gmic-1.5.1.8.ebuild: diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest index 4e497310109a..5755746992d3 100644 --- a/media-gfx/gmic/Manifest +++ b/media-gfx/gmic/Manifest @@ -4,21 +4,26 @@ Hash: SHA256 AUX gmic-1.5.0.7-ffmpeg.patch 1927 SHA256 57e36922ecd33f8b05666ff707ed7f8cba2d9c732ae3bad7bd379a52bf2c0b25 SHA512 9240966708b0aed5bcb04e0e15650f5697c06ab8f7a0bd16529071e4f17562f4a9ab7e28aaf31b8835d1d04876febd1c2883242c1d7279f913ff66cb04a3c27c WHIRLPOOL 97d82dc3300eb4b364f94fa2990d676f60a3ef644cb34a2ff8c5ecc24cff38d25fe3aefe846e316768a1b7a03d9178fd16db9cb0568612f7c7a425de9b22afba AUX gmic-1.5.1.7-makefile.patch 5485 SHA256 c3703b0c8e35cfd86a0b851da1a6b8b3da8776789d987ce395e5a772f6112411 SHA512 0e40fd978232680d08c1c36f01a86f9940fc34f7ef88465e67e52f23de821d13efec2dc931ae2bb9ac1daa464391b3784061ded738105ce0def330719a98c963 WHIRLPOOL 4a690fc8959d73209583a4b3a68d2d66854355e4d36564c1393a04396d033c8af4e6a43763739dee66db941b3cdd42b6ece7cafa0e1bfc5456b71f78886d7841 AUX gmic-1.5.2.1-makefile.patch 5487 SHA256 ffec62289b6d13853a61a3bff389ffbb7c1530fa39c111837349adeb8803099f SHA512 e0c16322ce1b41626e9031a715f7893e0a1ae73cafe1905251219dc091919fe4e41c60384b4f9ece92cb8b6f7e8b2014c0ff65aa1f7c2970f2bb597d4ee0496e WHIRLPOOL 5dc7a731ccd1d113893f9e09b1d7e797b72cf46bd4d43ee1dcdcf132cddf7fad7cea043d2fe929dba257067e14a67973d0f7054cd0d9b430c3b1925d8df142e2 +AUX gmic-1.5.2.2-ffmpeg.patch 716 SHA256 068c3bbb808b8e68a8826203e124d8cc86c937b8c77bc998225510abf6080e1a SHA512 9697d41c7f0fb422eb70d9bca38e8822692d95be14c4c337bea3e02cae1ad039a4b1c007536bdda669ff95c30980d13183423504ae70be3da6da53de146b0c1a WHIRLPOOL 3e94e98a0c375573a3a936a281f3b28c0800d331189f21e6afa1d0c2b2b257a7b56e10419c2362eff726d0bdfb93d902d09e14cce76ae41d779b2ae208c80328 +AUX gmic-1.5.2.2-makefile.patch 4407 SHA256 db8acb3399e38a72aeee16d537f242d77b03ebd94987f47c9bc9cc3b2cea1c69 SHA512 83aed5494640a7e7e8db7500fe7dd0e46fd29b788caafde9c715c6c0de4f77a0137fed07a2c3606e8845d6cf66dcea9d68e57bbba03d509ec90dd2bb2f41f37e WHIRLPOOL ffefa2fb0187c7b8950e58630a4bd414a46480c037113e4b05ebbae6dfe3a339e2aada3f89065405b117ad876a51b3a2442a8c2c32430b62a8c354a8d74f122a DIST gmic_1.5.1.9.tar.gz 2097627 SHA256 dc1f4d92f417b72e25e60fdde092b2c3e783af77c0595329aab471a1cf22d165 SHA512 723aaf092e79243e672d434f62c3fea8d1b723ad732034aa22225619233d76d32a4472b2b88fcee0a07cb468b85a81110fff5097dda32f2278e175fb338f87ba WHIRLPOOL b94b84a6369a647885f9edad21fd98ed1cb70d68d2bdcef479626d5f623d45490547aafe75f5195d68c1f90f201dee4544c1cd36ec6ccb54599a9550b434abb8 DIST gmic_1.5.2.1.tar.gz 2170700 SHA256 8284ebc215b8fd7c8edca98f5b0c99e1d229d2123f3d1265758dbe80b6350547 SHA512 6629a13cf824ddbcf5ba292dc18a745af6b9b41cb58c81b790866a54f071af9fe47724d73f8979b310256857480032eeeedb2699502106b5d22188032b6ac03e WHIRLPOOL 24bc500567de777705b0bab58bfd8fec0e1eabda6e55c8635c75b27b398a51c50ac37fd29a07fcf262947e89a43d522333cb5aea22d98af34409ee3913623d85 +DIST gmic_1.5.2.2.tar.gz 2187885 SHA256 e5e188e169bf9eebf47cd83d901ec2b44b0d5e5a06eadd734d51edce2202886d SHA512 757b331664178d857a241bf7a8ad8f3bafbbcf946000d0fd71cb717aa38210e34f4bf1e0df3c981fda8550722c7b6a2ee28c6a2d5d170d231127d5a0bc4fe6fe WHIRLPOOL c69e60e76ae354c258121461c334f40c34d32f4888bd41f2dfdfca6305b7bbf964a8c53a69fb6c782c51e33d814f5e498690c485bad1f8a10189dbb6c64363f8 DIST gmic_reference-1.5.1.9.pdf.xz 14713168 SHA256 c9eb3a918616a9f0b49f1584e2d2a13f96cfb5639a3eb651cf25166e10ec23b7 SHA512 c1a1fa1c41c3520c537bd9c0e241e420a0074f45a6766f65f9aad0d91268d3c617c2611bf1af4b27b29aa77fac499e4108547ad9444f20f685263a39986e749f WHIRLPOOL 2b207eb9ce04b60399f20d2f52c81d0e3a45c43cd33ab0645120b117786af76d35e6c40d3aaa79f79e957116ed9b2f473a6d15ac01cfd6957211f1f523ab2ae6 +DIST gmic_reference-1.5.2.2.pdf.xz 14980944 SHA256 3d80b11f55f22c2c9b417c1e056c85a85bd5f8f6f322558fd6aaaa145f1a7651 SHA512 f801a37fb149879fd28f2f3939260d76205f226ac47ea86956d57bd8e1dbe079925cdb9a3ce8c60b08f57a9cf7b27462ffbd81803dac6f8276fa03ec7917a5f0 WHIRLPOOL ed612f38e50a9bf9d44ed7c018fdb284eeffabf930ab7e2deb28d9970b016ccdd3ae55c4748adf97f095583fe5bcaaa5d42b5ae951c12e0e6cec548500cddf8f EBUILD gmic-1.5.1.9.ebuild 2020 SHA256 d0adb6758626e1f6addc7bbc1b0c969e42e48b887cf09b6d2213b3bad4bb5bf7 SHA512 8c6b2482e90a855dba4ab9b4b36951e61a4b7075f1b169e9c3d62fbf7f27f592178d5d1c5df657584a17f887ac8aefd692c4448f4bb8ddc02e95c007b779a026 WHIRLPOOL 8be57a69b7ac10079130da2aa00f1270d783618b23f0047c93e7844588bf9ab06182333c7d74ebde73191940283df0c039e214751271d1f262ed103492230ccc EBUILD gmic-1.5.2.1.ebuild 2001 SHA256 0cc146157a7495a89595da65b4c405f6dc03d43d10732f02aafe56c27d3c683f SHA512 ba6c41de4a6050a4fdf0c9edeecbbd300ad6e1703f783081bd1939f4ca37479123bdb2cdae414111effdb42e28872adf0b1b386d420d2da2f8cad3a4c8a852b3 WHIRLPOOL 22b2640a1f0ff054146483375bd4df21606c00786fbc72378cd8a26b863b6c46ae39f47e81cc1326164a09bb0ad9f832a4559bdf113555995d61726920cf77e2 -MISC ChangeLog 3480 SHA256 6dc6050a1b221b846fe355ae055b3be31464850b350f526ce2c107e7a578bbfb SHA512 cd7c8576b0854fb753af93e032edba0bc6908a17889e45970526601a55ba7bb42e76337460301885723ef693e7297e2d442103135d7783668cac0d78db9b18cf WHIRLPOOL 9b9465a499f5f155fb7891c3366cfa4ea8f335fbbc61b08490f0354b5666e69548b00395274b02cf83970ad39df7c69de0cbefc26a678d5083a70a650b3a93b2 +EBUILD gmic-1.5.2.2.ebuild 1992 SHA256 f258e75cdeac769e3ff0dc06ef4c567a3ae439a2a918e566edbb2e3c88afb956 SHA512 5a3bfe2ab280c918ca6aae091f44172ba8a61aa7d0b296933403979d7602ba08807d97be87ba7ceb41cec80f78bd30e5c563cb19800acf835769ce3777492961 WHIRLPOOL 343eb97ad4766eeea9857332ae78f2107475e7e7878e0b888fd0c3d10cfcef03840f75f666ca294d60e9eca051484833e88c16d6e0fe2d7c840e3cb21be9833a +MISC ChangeLog 3669 SHA256 195c5f0dcdae16744e536b54b6c11bcbc26828af7a01c81e02c3931f0fa5f7c6 SHA512 a307a5ce32ed1814bfbcb861d64d735824f73f82d1b2a91efd6320b1f5ea43bbdfca162036ab08f319a686dc9e218cac94efc0d50c54b90afc69c67bafdede79 WHIRLPOOL c8b5e6569cd80a49e8c0b05524922dd14b4e7c756c41b614101d7156ab959354dba3aea4d1a558f06d2204b0df6e571faaeb6085e39957b146c0461a4b107321 MISC metadata.xml 473 SHA256 def06af4d0283b01f9313231ff05df286129ff57afbcac23fcc7c45d8f735a6c SHA512 4bd720129471c24a6b71e32f11054d96bd2eefb3316489806a06b8deed45e5544fe1c74a73c129ec90fe30c8a4c0646c50e6690717046ad93255771627588f32 WHIRLPOOL 9a356f4c399b7a6fdf217b2dbeaeb4fd40dffc080b86c0ad913690c0b0007aaad52ea79d3b7b5b21591432c99a1e59ed02ead94e2578f1915afe2ee0c9f7d090 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQEcBAEBCAAGBQJQk3WCAAoJEEqz6FtPBkyjvNsH/1ddH4+bMxOqUrktLkYkgRiI -wmYt7GcA00aTuJ10wpq8rT+HMjaYK8lZQNZMfT65Ei7lqOcoJpZdKjpoj/4f/gmZ -rQ3qYzUTIswqtFWpmovPUUdabCNiuvRKvVNZ6OYbDvN9z2hwQ8HFqj6NDwHpMJKb -Zigu1Zz2zZG1nIhAqrj9aL/6+S4dNJbAfvSb8N/Kmk6emvuKlkuOqI5j8RZZMef0 -z4e+rLe+EQ6Yi/XVntmVqInYiOHcT6IePoeFu2Z/QLWcSgYgZ4rub7qT8K4hN26t -iHqPdOEP/MmobPj3KTZiFPOgtfdsnglGSUW9rTUNSZ4Bj0de2dAz7n1Z1UVPd4g= -=7Im2 +iQEcBAEBCAAGBQJQoeNPAAoJEEqz6FtPBkyjRTsH/3/4Oi9ADhAq0ohG7DFEJWBY +uw+7iJUr/tYghLUl5BV9iBegSmFy14sLbKTPlsYVwLyYGI71qE2eTK6gLxHo4Ndy +TGCYGZBqzVAcYqxhmbdBn4VXTtwNxmdQwn6FZHG1BFU+4qFOWFo61lUo7FKX55hO +m1ZnBUXX7dHBho1MWznDWwZfpNbFlpY/18GAdzOBufS+k4+y1EcxYDxPQNBWIx/U +z+bPiMMyrfrMKn9rTq9DJc0JBvK+7EqZhXRfDKGYa8YnArv9QqY6KYftvGX8Xlxp +ZMCJGB9sOmtcde2mfcz53DwqSNpwHpf1Eivm5+XbmKysfLkYrIaRzsvn65uGy7A= +=BxbE -----END PGP SIGNATURE----- diff --git a/media-gfx/gmic/files/gmic-1.5.2.2-ffmpeg.patch b/media-gfx/gmic/files/gmic-1.5.2.2-ffmpeg.patch new file mode 100644 index 000000000000..2305d991147f --- /dev/null +++ b/media-gfx/gmic/files/gmic-1.5.2.2-ffmpeg.patch @@ -0,0 +1,22 @@ +--- gmic-1.5.2.2/src/CImg.h ++++ gmic-1.5.2.2/src/CImg.h +@@ -318,6 +318,7 @@ + extern "C" { + #include "avformat.h" + #include "avcodec.h" ++#include "libavutil/mathematics.h" + #include "swscale.h" + } + #endif +@@ -44795,7 +44796,11 @@ + AVPacket pkt; + int got_packet; + av_init_packet(&pkt); ++#if LIBAVCODEC_VERSION_INT<AV_VERSION_INT(54,1,0) ++ out_size = avcodec_encode_video(c,video_outbuf,video_outbuf_size,picture); ++#else + out_size = avcodec_encode_video2(c,&pkt,picture,&got_packet); ++#endif + if (got_packet) { + pkt.pts = av_rescale_q(c->coded_frame->pts,c->time_base,video_str->time_base); + if (c->coded_frame->key_frame) pkt.flags|=AV_PKT_FLAG_KEY; diff --git a/media-gfx/gmic/files/gmic-1.5.2.2-makefile.patch b/media-gfx/gmic/files/gmic-1.5.2.2-makefile.patch new file mode 100644 index 000000000000..c93c639fdaf1 --- /dev/null +++ b/media-gfx/gmic/files/gmic-1.5.2.2-makefile.patch @@ -0,0 +1,101 @@ +--- gmic-1.5.2.2/src/Makefile ++++ gmic-1.5.2.2/src/Makefile +@@ -77,7 +77,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 +@@ -85,28 +85,20 @@ + MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS) + + # Flags to enable debugging. +-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 ++DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3 + + # Flags to enable image display, using X11 + # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). + # This requires the presence of the X11 include and library files. + # (package 'libx11-dev' on Debian). +-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_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr ++X11_LDFLAGS = -lX11 -lpthread #-lXrandr + + # Flags to enable fast display, using XShm. + # This requires the presence of the X11 extension include and library files. + # (package 'libx11-dev' on Debian). + XSHM_CFLAGS = -Dcimg_use_xshm +-XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext ++XSHM_LDFLAGS = -lXext + + # Flags to enable image display, using GDI32. + # This requires the presence of the GDI32 include and library files. +@@ -152,14 +144,8 @@ + # Flags to enable native support of webcams, using the OpenCV library. + # This requires the presence of the OpenCV include and library files. + # (package 'libcv3-2-dev' on Debian). +-ifeq ($(OS),Darwin) + OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv + OPENCV_LDFLAGS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 ! +-else +-OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv +-# 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. + # This requires the presence of the GraphicsMagick++ include and library files. +@@ -287,10 +273,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) $(OPT_LDFLAGS)" gmic_lib ++ $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib + + zart: lib + ifneq ($(OS),Darwin) +@@ -313,10 +299,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 +@@ -346,7 +332,6 @@ + $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp -Dgmic_float_only + 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 $(CFLAGS) -Dgmic_float_only -Dgmic_main $(LDFLAGS) +@@ -371,7 +356,6 @@ + $(CC) -o gmic_double.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_double + gmic_gmic: 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_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.2.2.ebuild b/media-gfx/gmic/gmic-1.5.2.2.ebuild new file mode 100644 index 000000000000..6dfdb636f6dd --- /dev/null +++ b/media-gfx/gmic/gmic-1.5.2.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gmic/gmic-1.5.2.2.ebuild,v 1.1 2012/11/13 06:06:06 radhermit Exp $ + +EAPI="5" + +inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic + +DESCRIPTION="GREYC's Magic Image Converter" +HOMEPAGE="http://gmic.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz + doc? ( http://dev.gentoo.org/~radhermit/dist/gmic_reference-1.5.2.2.pdf.xz )" + +LICENSE="CeCILL-2 FDL-1.3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc 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? ( virtual/jpeg ) + opencv? ( >=media-libs/opencv-2.3.1a-r1 ) + 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} + doc? ( app-arch/xz-utils )" + +S=${WORKDIR}/${P}/src + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch + epatch "${FILESDIR}"/${P}-ffmpeg.patch + + for i in ffmpeg fftw jpeg opencv png tiff zlib ; do + use $i || { sed -i -r "s/^(${i}_(C|LD)FLAGS =).*/\1/I" Makefile || die ; } + done + + use graphicsmagick || { sed -i -r "s/^(MAGICK_(C|LD)FLAGS =).*/\1/" Makefile || die ; } + use openexr || { sed -i -r "s/^(EXR_(C|LD)FLAGS =).*/\1/" Makefile || die ; } + + if ! use X ; then + sed -i -r "s/^((X11|XSHM)_(C|LD)FLAGS =).*/\1/" Makefile || die + + # Disable display capabilities when X support is disabled + append-cppflags -Dcimg_display=0 + fi +} + +src_compile() { + emake AR="$(tc-getAR)" CC="$(tc-getCXX)" custom lib +} + +src_install() { + dobin gmic + newlib.so libgmic.so libgmic.so.1 + + insinto /usr/include + doins gmic.h + + doman ../man/gmic.1.gz + dodoc ../README + + use doc && dodoc "${WORKDIR}"/gmic_reference-${PV}.pdf + + newbashcomp gmic_bashcompletion.sh ${PN} +} |