diff options
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/Manifest.gz | bin | 38322 -> 38325 bytes | |||
-rw-r--r-- | media-gfx/gmic/Manifest | 3 | ||||
-rw-r--r-- | media-gfx/gmic/files/gmic-3.1.5-makefile_automagic.patch | 131 | ||||
-rw-r--r-- | media-gfx/gmic/gmic-3.1.5.ebuild | 107 |
4 files changed, 241 insertions, 0 deletions
diff --git a/media-gfx/Manifest.gz b/media-gfx/Manifest.gz Binary files differindex 296fc30ddc4b..a20f25f9e096 100644 --- a/media-gfx/Manifest.gz +++ b/media-gfx/Manifest.gz diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest index 22c3d2a8a523..ad6ae8bdd2da 100644 --- a/media-gfx/gmic/Manifest +++ b/media-gfx/gmic/Manifest @@ -1,5 +1,8 @@ AUX gmic-3.0.0_ipa-sra.patch 665 BLAKE2B d1b47e2f0e8e63251172ee6cbc2c5b1bd86d100904a3d7bb0c5df39c051769b8b6c0aa0bb1f81010fd9ca195886a0dbce41528d31a811627ee28d1af58a83432 SHA512 4677fc93e72ed5e71a91197d364a04e1f8c6c13bb3f5b6eb5402a03c0d6ab395b54788669e028b932e207986121138419a58ed5f4333c0a45cbe6c0b9638ed96 AUX gmic-3.0.1-openexr-3-imath.patch 1051 BLAKE2B 03d1cd6be5c5af76b6ecb071b46ee20abc4bd05d055fcd3ee21943ae5821c8c41e080b20d054b2f5e53cfbeb7326b8af6fa599182cdfd5e47679a57b47fa2f1d SHA512 83e9ec847328eef9f275f747ca6d2ac1071151cc7eb62ad70fa9de121d790e45d60514993274a44fe980537a793eaa56d397da5e207355fa2c9723bdafe7ff88 +AUX gmic-3.1.5-makefile_automagic.patch 5378 BLAKE2B 161a06be29e9dc4ac9d4f6234d0da70831c2fd4be4f5f849a16957afee8b4436644591f0f5aecfdfb2b3b33b8ac4f65b8daa966afeb4ee97d340290fce83bfda SHA512 79157c017566e4d0b277169e9356dfaf71c2b46b7e70aa6c6bcc81c664006524bc8b2a86be83e88a1128c3dc527e294b5ea2a685d924975b8a22161e9adc6df0 DIST gmic_3.0.1.tar.gz 10457923 BLAKE2B b495d10237abf5abe3d7df166119d2fc0b04142975d97db01ab0c5aa177f6e681931799fb392844e5c34d0503874a16d946a7146c5152cca1e64107948c02c03 SHA512 4bc08a3510e8987eea0463bfcf04de6dfd9a8ee8a38c14661ff201b8f563cab1b914dc60dc35b082cb5e868eb6232e2240a2d6703e0751215a82d6709236946a +DIST gmic_3.1.5.tar.gz 10782647 BLAKE2B 9334f61b4309dec31d5dd0c52b87a97628bfa819602f3bac03cbc74c26a65dc660c0f4ae5c84d2aba5062ebc2869ae3d656e6fc2b2f9c9d0565d07762a920d21 SHA512 7e27856db8b68fde33e50f09a9d07479b67843388a98edc891deab51828d922200af20afee163984e0c7660e46387d1fe514d35ac3e3d9c8ebe02b0aa89cbc96 EBUILD gmic-3.0.1-r1.ebuild 4226 BLAKE2B 5ce0e43829487f7fe35a61cb073b729a67f16e7f2a32be825abe4daf5feb32d1a3d332aea7585d67a7de8d00b92928040fa7848dd6c92208e996ba82378f492d SHA512 e2307dad214313bd7bdaf5bc2db02cb9c1031a475334549ed224cba08a42a0aa6711e4fe513b5a01501e543615da102d2cd8e2e239a303c6433654250226b27c +EBUILD gmic-3.1.5.ebuild 2593 BLAKE2B 56cd1f6e8c3a28663fe53ce977cc9a71d3a1a2082120714168ae143558639dc61b4b2fea2f7f6c08d093d4a227849ea73d2af0531783f171f6febace3b47bc33 SHA512 3b8b33dab32fa12e09bfbb2b4657730dde4f370afd31d641c04dcde9902fa4032a7c6ec041d0b9bd2c93937e471c8df56361c9bc3da5b1bb5b20e7cd0ebf6bd5 MISC metadata.xml 466 BLAKE2B aef1ab7a346d34ebdba8f6e09298d1bd96ed2771307fbd3e3cc15ed0774da1c29be9a3b260b9a7c287ce904685f708e56d59953fb92bf4d93d52227614f3c148 SHA512 755bfb920c6baa950716dff8a345540a730b1c6d179837d81ce1e1a3dcdc826665b61f9da8dcd007c44893f3310ace5dfe2a976a80926ab96170cb84a3f3555c diff --git a/media-gfx/gmic/files/gmic-3.1.5-makefile_automagic.patch b/media-gfx/gmic/files/gmic-3.1.5-makefile_automagic.patch new file mode 100644 index 000000000000..8dbe50d6e194 --- /dev/null +++ b/media-gfx/gmic/files/gmic-3.1.5-makefile_automagic.patch @@ -0,0 +1,131 @@ +Includes the OpenEXR3 patch as well as support for building with USE=-X, +as the relevant lines are deeply embedded in the automagic stuff. + +--- a/src/Makefile ++++ b/src/Makefile +@@ -226,8 +226,10 @@ + + # Enable parallelization in CImg, using OpenMP. + # (http://www.openmp.org/) ++ifeq ($(GMIC_USE_OPENMP),yes) + OPENMP_CFLAGS = -fopenmp -Dcimg_use_openmp + OPENMP_LIBS = -lgomp ++endif + + # Enable software debugging. + # (Use address sanitizer and thus slows down the code) +@@ -249,9 +251,13 @@ + # Enable image display, using X11 (Unix). + # (Keep /usr/ dirname here since X11 is located in /usr/ on Mac too) + ifneq ($(OS),Darwin) ++ifeq ($(GMIC_USE_X11),yes) + X11_CFLAGS = -Dcimg_display=1 $(shell pkg-config --cflags x11 || echo -I/usr/X11R6/include) #-Dcimg_use_xrandr + X11_LIBS = $(shell pkg-config --libs x11 || echo -L/usr/X11R6/lib -lX11) -lpthread # $(shell pkg-config --libs xrandr || echo -lXrandr) + else ++X11_CFLAGS = -Dcimg_display=0 ++endif ++else + ifeq (,$(wildcard /usr/X11)) + X11_CFLAGS = -Dcimg_display=0 #-Dcimg_use_xrandr + X11_LIBS = -lpthread # $(shell pkg-config --libs xrandr || echo -lXrandr) +@@ -263,8 +269,10 @@ + + # Enable faster X11 display, using XShm extension. + # (ftp://www.x.org/pub/X11R7.7/doc/man/man3/XShm.3.xhtml) ++ifeq ($(GMIC_USE_XSHM),yes) + XSHM_CFLAGS = -Dcimg_use_xshm $(shell pkg-config --cflags xcb-shm) + XSHM_LIBS = $(shell pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib) -lXext ++endif + + # Enable image display, using GDI32 (Windows). + GDI32_CFLAGS = -Dcimg_display=2 +@@ -273,8 +281,10 @@ + # Enable native support of PNG image files, using the PNG library. + # (http://www.libpng.org/pub/png/libpng.html) + ifneq ($(OS),Darwin) ++ifeq ($(GMIC_USE_PNG),yes) + PNG_CFLAGS = -Dcimg_use_png $(shell pkg-config --cflags libpng) + PNG_LIBS = $(shell pkg-config --libs libpng || echo -lpng -lz) ++endif + else + ifeq (,$(wildcard /tmp/skl)) + PNG_CFLAGS = -Dcimg_use_png $(shell pkg-config --cflags libpng) +@@ -287,56 +297,76 @@ + + # Enable native support of JPEG image files, using the JPEG library. + # (http://libjpeg.sourceforge.net/) ++ifeq ($(GMIC_USE_JPEG),yes) + JPEG_CFLAGS = -Dcimg_use_jpeg $(shell pkg-config --cflags libjpeg) + JPEG_LIBS = $(shell pkg-config --libs libjpeg || echo -ljpeg) ++endif + + # Enable native support of TIFF image files, using the TIFF library. + # (http://www.libtiff.org/) ++ifeq ($(GMIC_USE_TIFF),yes) + TIFF_CFLAGS = -Dcimg_use_tiff $(shell pkg-config --cflags libtiff-4) + TIFF_LIBS = $(shell pkg-config --libs libtiff-4 || echo -ltiff) ++endif + + # Enable native support for loading HEIC/AVIF image files, using the libheif library. + # ( https://github.com/strukturag/libheif ) ++ifeq ($(GMIC_USE_HEIF),yes) + HEIF_CFLAGS = -Dcimg_use_heif + HEIF_LIBS = -lheif ++endif + + # Enable native support of MINC2 image files, using the MINC2 library. + # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) ++ifeq ($(GMIC_USE_MINC2),yes) + MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include + MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib ++endif + + # Enable native support for downloading files from the network. + # ( http://curl.haxx.se/libcurl/ ) ++ifeq ($(GMIC_USE_CURL),yes) + CURL_CFLAGS = -Dcimg_use_curl $(shell pkg-config --cflags libcurl) + CURL_LIBS = $(shell pkg-config --libs libcurl || echo -lcurl) ++endif + + # Enable native support of webcams and video streaming, using the OpenCV library. + # (https://opencv.org/) ++ifeq ($(GMIC_USE_OPENCV),yes) + OPENCV_CFLAGS = -Dcimg_use_opencv $(shell pkg-config opencv --cflags) -I/usr/include/opencv -I/usr/include/opencv4 + OPENCV_LIBS = $(shell pkg-config opencv --libs || echo -lopencv_core -lopencv_highgui -lopencv_videoio) ++endif + + # Enable support of most classical image file formats, using the GraphicsMagick++ library. + # (http://www.graphicsmagick.org/Magick++/) ++ifeq ($(GMIC_USE_GRAPHICSMAGICK),yes) + MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick) + MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++) ++endif + + # Enable native support of EXR image files, using the OpenEXR library. + # (http://www.openexr.com/) +-OPENEXR_CFLAGS = -Dcimg_use_openexr $(shell pkg-config --cflags OpenEXR || echo -I$(USR)/$(INCLUDE)/OpenEXR) +-OPENEXR_LIBS = $(shell pkg-config --libs OpenEXR || echo -lIlmImf -lHalf) ++ifeq ($(GMIC_USE_EXR),yes) ++OPENEXR_CFLAGS = -Dcimg_use_openexr $(shell pkg-config --cflags OpenEXR || echo -I$(USR)/$(INCLUDE)/OpenEXR -I$(USR)/$(INCLUDE)/Imath) ++OPENEXR_LIBS = $(shell pkg-config --libs OpenEXR || echo -lOpenEXR -lImath) ++endif + + # Enable Fast Fourier Transforms, using the FFTW3 library. + # (http://www.fftw.org/) ++ifeq ($(GMIC_USE_FFTW),yes) + FFTW_CFLAGS = -Dcimg_use_fftw3 $(shell pkg-config --cflags fftw3) + FFTW_LIBS = $(shell pkg-config --libs fftw3 || echo -lfftw3) + ifneq ($(OS),Windows) + FFTW_LIBS += -lfftw3_threads + endif ++endif + + # Enable native support of the BOARD library. + # (https://github.com/c-koi/libboard) ++ifeq ($(GMIC_USE_BOARD),yes) + BOARD_CFLAGS = -Dcimg_use_board + BOARD_LIBS = -lboard ++endif + + GMIC_STD_CFLAGS = $(MANDATORY_CFLAGS) $(ABORT_CFLAGS) $(PARALLEL_CFLAGS) $(FFTW_CFLAGS) $(CURL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS) + GMIC_STD_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(FFTW_LIBS) $(CURL_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(TIFF_LIBS) diff --git a/media-gfx/gmic/gmic-3.1.5.ebuild b/media-gfx/gmic/gmic-3.1.5.ebuild new file mode 100644 index 000000000000..a4e2815a060b --- /dev/null +++ b/media-gfx/gmic/gmic-3.1.5.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/dtschump/gmic.git" + inherit git-r3 +else + SRC_URI="https://gmic.eu/files/source/${PN}_${PV}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="GREYC's Magic Image Converter" +HOMEPAGE="https://gmic.eu/ https://github.com/dtschump/gmic" + +LICENSE="CeCILL-2 GPL-3" +SLOT="0" +IUSE="cli curl ffmpeg fftw gimp graphicsmagick jpeg opencv openexr openmp png qt5 tiff X" +REQUIRED_USE=" + gimp? ( png fftw X ) + qt5? ( png fftw X ) +" + +# No test suite, hand-crafted Makefiles barf out on 'emake check' +RESTRICT="test" + +MIN_QT_VER="5.2.0" +QT_DEPEND=" + >=dev-qt/qtcore-${MIN_QT_VER}:5= + >=dev-qt/qtgui-${MIN_QT_VER}:5= + >=dev-qt/qtnetwork-${MIN_QT_VER}:5= + >=dev-qt/qtwidgets-${MIN_QT_VER}:5= +" +COMMON_DEPEND=" + sys-libs/zlib:0= + curl? ( net-misc/curl ) + fftw? ( sci-libs/fftw:3.0=[threads] ) + gimp? ( + media-gfx/gimp:0/2 + ${QT_DEPEND} + ) + graphicsmagick? ( media-gfx/graphicsmagick:0= ) + jpeg? ( virtual/jpeg:0 ) + opencv? ( >=media-libs/opencv-2.3.1a-r1:0= ) + openexr? ( + dev-libs/imath:= + media-libs/openexr:= + ) + png? ( media-libs/libpng:0= ) + qt5? ( ${QT_DEPEND} ) + tiff? ( media-libs/tiff:0 ) + X? ( + x11-libs/libX11 + x11-libs/libXext + )" +RDEPEND="${COMMON_DEPEND} + ffmpeg? ( media-video/ffmpeg:0= ) +" +DEPEND="${COMMON_DEPEND} + gimp? ( dev-qt/linguist-tools ) + qt5? ( dev-qt/linguist-tools ) +" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-3.1.5-makefile_automagic.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +gmic_emake() { + emake -j1 -C src \ + GMIC_USE_CURL=$(usex curl) \ + GMIC_USE_EXR=$(usex openexr) \ + GMIC_USE_FFTW=$(usex fftw) \ + GMIC_USE_GRAPHICSMAGICK=$(usex graphicsmagick) \ + GMIC_USE_JPEG=$(usex jpeg) \ + GMIC_USE_OPENCV=$(usex opencv) \ + GMIC_USE_OPENMP=$(usex openmp) \ + GMIC_USE_PNG=$(usex png) \ + GMIC_USE_TIFF=$(usex tiff) \ + GMIC_USE_X11=$(usex X) \ + QMAKE="qmake5" \ + $@ +} + +# FIXME: +# - do not pre-strip binaries +# - honour user LDFLAGS on lib{,c}gmic.so +# - fix multilib-strict violation on same +# - nuke relative DT_RUNPATH on same +# - GIMP plug-in dir should only be created if USE=gimp, otherwise it ends up being just /plug-ins +src_compile() { + gmic_emake lib libc + use cli && gmic_emake cli_shared + use gimp && gmic_emake gimp_shared + use qt5 && gmic_emake gmic_qt_shared +} |