summaryrefslogtreecommitdiff
path: root/media-gfx/gmic
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-gfx/gmic
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-gfx/gmic')
-rw-r--r--media-gfx/gmic/Manifest3
-rw-r--r--media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch15
-rw-r--r--media-gfx/gmic/files/gmic-3.0.1-openexr-3-imath.patch28
-rw-r--r--media-gfx/gmic/gmic-3.0.1-r1.ebuild176
4 files changed, 206 insertions, 16 deletions
diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index bcce2c0e1fec..08281488260e 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,7 +1,8 @@
-AUX gmic-2.9.2_ipa-sra.patch 665 BLAKE2B b61fa87ac2da5fd5956c89cb4a6c128f266a175dca70cd34ff4bed0483c934241a375131eaddd6ebd5f3afb52e694d4fc6839d20718bc06463c0e263f15b6d5a SHA512 6f04cac4de5914cedd269655fe58ca406199c042bdbab6e706cfea49516d0a7e1234e61c51b6a142341a7984dd96e97c4b8f13c2efbe427627be26539af8653e
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
DIST gmic_3.0.0.tar.gz 10225122 BLAKE2B 1066c62c2c56fafbfd11608eb9e3b7c7e9a87b404aae1e7e673e21d9b7b76a599e241f16656786bfa35687f3b3921fcba96368227753105aa25e2fa451962bfa SHA512 89353d16d6304e322400c93bafb50f7557df93c933ed2994f33a17d877e4e12ec511a355b38058680f356bccab5aa84b607fab225354c19d4b8ab3e64424c87c
DIST gmic_3.0.1.tar.gz 10457923 BLAKE2B b495d10237abf5abe3d7df166119d2fc0b04142975d97db01ab0c5aa177f6e681931799fb392844e5c34d0503874a16d946a7146c5152cca1e64107948c02c03 SHA512 4bc08a3510e8987eea0463bfcf04de6dfd9a8ee8a38c14661ff201b8f563cab1b914dc60dc35b082cb5e868eb6232e2240a2d6703e0751215a82d6709236946a
EBUILD gmic-3.0.0.ebuild 4218 BLAKE2B bc0d0cad2242cb4ff8e828c390cc17b3ebf8bd50e18d81acbab8e02cf74b0de9a0bafb16545205bdaca11dd81c89caa343cfc2aa89747ee5102d5cb022f95eaf SHA512 9975caa9e60ca817e0257c5c872233e112bfa0199ca17521d4bda8d398f1a08588be3f7493bc7f7d6e7714972e83567f20de0a5502e683b9e2897a9acff3f3ed
+EBUILD gmic-3.0.1-r1.ebuild 4242 BLAKE2B ce9af2b77e661c3f903882ffaa40a5ffc434ad52fcd7b2c3e5ffebbd8ffc0e3c3b96196a94e4f002f9b86e920fae50b40075770230ad40ebeff3e27a70b073e5 SHA512 57a9b5df6025c2e64c88d1ecae16429f3bd24b56f6bd787380fc49a3ff9375942346e91856d767b4f7974a4a18fcac5e697fac54624c0a1659604787524a148a
EBUILD gmic-3.0.1.ebuild 4202 BLAKE2B fedf953be4fc0b777861128959cceaf68df2c08d73ca6c2f3c4f191ef110d6739e971959b26e31bc72132705b6adef83352b09e3d186ab125fb77120f16fd113 SHA512 9623391c7c58dce6be157c8c8e0917af2d1a0fdc853f28318e212cab6595fe94d84f9c4033d192d89c11e254c76d30bd47aed9d3b18a52b2fee24856aa611d18
MISC metadata.xml 534 BLAKE2B f229329b6cd7c9a79b7be93c64ce6e84e65391084c7d76b99ada95762c643fc445fe12fa55acc9b355b5f1fb86de7c0845ec34f921494df8cba3d90ca8c2a408 SHA512 e36403a679467cba0b0580810a27076214d676a74deb09a55f13a38bc06f5ff0999560e1ae00629047a682bcbf3b9e73243db8da3eaa24b275c24a0d1995fe3c
diff --git a/media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch b/media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch
deleted file mode 100644
index 384856a0464f..000000000000
--- a/media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-A GCC-specific setting from years ago. gcc-9 quietly ignores it (the
-resulting binaries appear to be the same whether -fno-ipa-sra has been
-specified or not), clang fails on it as not recognised.
-Just get rid of it altogether.
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -100,7 +100,7 @@
- if(APPLE)
- set(COMPILE_FLAGS "${COMPILE_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-error=c++11-narrowing -Wc++11-extensions -fpermissive")
- else()
-- set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-error=narrowing -fno-ipa-sra -fpermissive")
-+ set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-error=narrowing -fpermissive")
- endif()
-
- if(NOT "${PRERELEASE_TAG}" STREQUAL "")
diff --git a/media-gfx/gmic/files/gmic-3.0.1-openexr-3-imath.patch b/media-gfx/gmic/files/gmic-3.0.1-openexr-3-imath.patch
new file mode 100644
index 000000000000..e97ef6bf6138
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.0.1-openexr-3-imath.patch
@@ -0,0 +1,28 @@
+https://src.fedoraproject.org/rpms/gmic/raw/rawhide/f/gmic-openexr3.patch
+--- a/cmake/FindCImg.cmake
++++ b/cmake/FindCImg.cmake
+@@ -147,7 +147,10 @@ if(ENABLE_JPEG)
+ endif()
+
+ if(ENABLE_OPENEXR)
+- find_package(OpenEXR)
++ find_package(OpenEXR CONFIG)
++ if(NOT TARGET OpenEXR::OpenEXR)
++ find_package(OpenEXR)
++ endif()
+
+ if(OpenEXR_FOUND)
+ list(APPEND CLI_COMPILE_FLAGS "cimg_use_openexr")
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -307,8 +307,8 @@
+
+ # 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)
++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)
+
+ # Enable Fast Fourier Transforms, using the FFTW3 library.
+ # (http://www.fftw.org/)
diff --git a/media-gfx/gmic/gmic-3.0.1-r1.ebuild b/media-gfx/gmic/gmic-3.0.1-r1.ebuild
new file mode 100644
index 000000000000..2c806f819a10
--- /dev/null
+++ b/media-gfx/gmic/gmic-3.0.1-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake 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 zlib"
+REQUIRED_USE="
+ gimp? ( png zlib fftw X )
+ qt5? ( png zlib fftw X )
+"
+
+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="
+ 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
+ )
+ zlib? ( sys-libs/zlib:0= )"
+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.0.0_ipa-sra.patch
+ "${FILESDIR}"/${PN}-3.0.1-openexr-3-imath.patch
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+ sed -i '/CMAKE_CXX_FLAGS/s/-g //' CMakeLists.txt || die
+
+ if use gimp || use qt5; then
+ # respect user flags
+ sed -e '/CMAKE_CXX_FLAGS_RELEASE/d' \
+ -e '/${CMAKE_EXE_LINKER_FLAGS} -s/d' \
+ -i gmic-qt/CMakeLists.txt || die
+ local S="${S}/gmic-qt"
+ # Bug #753377
+ local PATCHES=()
+ cmake_src_prepare
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_LIB=ON
+ -DBUILD_LIB_STATIC=no
+ -DBUILD_CLI=$(usex cli)
+ -DBUILD_MAN=$(usex cli)
+ -DBUILD_BASH_COMPLETION=$(usex cli)
+ -DCUSTOM_CFLAGS=ON
+ -DENABLE_CURL=$(usex curl)
+ -DENABLE_X=$(usex X)
+ -DENABLE_FFMPEG=$(usex ffmpeg)
+ -DENABLE_FFTW=$(usex fftw)
+ -DENABLE_GRAPHICSMAGICK=$(usex graphicsmagick)
+ -DENABLE_JPEG=$(usex jpeg)
+ -DENABLE_OPENCV=$(usex opencv)
+ -DENABLE_OPENEXR=$(usex openexr)
+ -DENABLE_OPENMP=$(usex openmp)
+ -DENABLE_PNG=$(usex png)
+ -DENABLE_TIFF=$(usex tiff)
+ -DENABLE_ZLIB=$(usex zlib)
+ -DENABLE_DYNAMIC_LINKING=ON
+ )
+
+ cmake_src_configure
+
+ # configure gmic-qt frontends
+ local CMAKE_USE_DIR="${S}/gmic-qt"
+ mycmakeargs=(
+ -DENABLE_DYNAMIC_LINKING=ON
+ -DENABLE_CURL=$(usex curl)
+ -DGMIC_LIB_PATH="${BUILD_DIR}"
+ -DGMIC_PATH="${S}/src"
+ )
+
+ if use gimp; then
+ mycmakeargs+=( -DGMIC_QT_HOST=gimp )
+ BUILD_DIR="${BUILD_DIR}"/gimp cmake_src_configure
+ fi
+
+ if use qt5; then
+ mycmakeargs+=( -DGMIC_QT_HOST=none )
+ BUILD_DIR="${BUILD_DIR}"/qt5 cmake_src_configure
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+
+ # build gmic-qt frontends
+ local S="${S}/gmic-qt"
+ use gimp && { BUILD_DIR="${BUILD_DIR}"/gimp cmake_src_compile || die "failed building gimp plugin" ; }
+ use qt5 && { BUILD_DIR="${BUILD_DIR}"/qt5 cmake_src_compile || die "failed building qt5 GUI" ; }
+}
+
+src_install() {
+ cmake_src_install
+
+ use cli && newbashcomp "${BUILD_DIR}"/resources/gmic_bashcompletion.sh ${PN}
+
+ local PLUGINDIR="/usr/$(get_libdir)/gimp/2.0/plug-ins"
+ insinto "${PLUGINDIR}"
+ doins resources/gmic_cluts.gmz
+
+ # install gmic-qt frontends
+ if use gimp; then
+ exeinto "${PLUGINDIR}"
+ doexe "${BUILD_DIR}"/gimp/gmic_gimp_qt
+ fi
+ use qt5 && dobin "${BUILD_DIR}"/qt5/gmic_qt
+}
+
+pkg_postinst() {
+ if [[ -n "${REPLACING_VERSIONS}" ]]; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "${v}" -le "3.0.0"; then
+ einfo "Note that starting with version 3.0.1 ${CATEGORY}/${PN} no longer provides a Krita interface."
+ einfo "Please use the built-in G'MIC plugin provided with Krita 5, or use an older version."
+ break
+ fi
+ done
+ fi
+}