summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-11-18 16:12:06 +0100
committerMarek Szuba <marecki@gentoo.org>2020-11-18 16:14:40 +0100
commitde5b5f14a0117060931cd10d8e41769202488b63 (patch)
tree3abe6df4db32e2171e597bea9b0d267b1e9a1ba4 /media-gfx
parentdev-lang/erlang: sparc stable wrt bug #755239 (diff)
downloadgentoo-de5b5f14a0117060931cd10d8e41769202488b63.tar.gz
gentoo-de5b5f14a0117060931cd10d8e41769202488b63.tar.bz2
gentoo-de5b5f14a0117060931cd10d8e41769202488b63.zip
media-gfx/gmic: bump to 2.9.3
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/gmic/Manifest1
-rw-r--r--media-gfx/gmic/gmic-2.9.3.ebuild192
2 files changed, 193 insertions, 0 deletions
diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index 39f44b3db54c..4ecb061abd17 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1 +1,2 @@
DIST gmic_2.9.2.tar.gz 6639693 BLAKE2B 4b452cc5c82e8ea30a1bd65e51b6187fc12d9c7f8af6d0f8107a8d183c6e87dff11394f103eae7ac17daa00c6c9aa0f47ce78a92156e2da9bc4ee0fcacbf398d SHA512 be8707b5c156b17189548c1f808b976afcb7b7cce20ff54ff4589eda9a76a8cddf81c64b7a53c332254b2c8c29fb8ca0926016cadcb1efb7131a38d857fce796
+DIST gmic_2.9.3.tar.gz 7279292 BLAKE2B 920a94321b2916f65bb2c5b273c4938acdcd7b4825a3eeeb15407b1a6d7881f927792f89524db7d3a33272ddae8e39e8f60d29a922b5dd2873e6b9be2948a646 SHA512 e640c73b9d008b445d075b02ed7d359a0c2ee51df8245557192e38ed108e6db43de0fca577f1636c40b2c4a7db038f79926e7666b9f00b6421cda96d9a91b3ff
diff --git a/media-gfx/gmic/gmic-2.9.3.ebuild b/media-gfx/gmic/gmic-2.9.3.ebuild
new file mode 100644
index 000000000000..4af6d1c63fa1
--- /dev/null
+++ b/media-gfx/gmic/gmic-2.9.3.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_BUILD_TYPE=Release
+
+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 ~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 digikam ffmpeg fftw gimp graphicsmagick jpeg krita opencv openexr openmp png qt5 static-libs tiff X zlib"
+REQUIRED_USE="
+ || ( cli digikam gimp krita qt5 )
+ digikam? ( png zlib fftw X )
+ gimp? ( png zlib fftw X )
+ krita? ( 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 )
+ digikam? (
+ media-gfx/digikam
+ ${QT_DEPEND}
+ )
+ fftw? ( sci-libs/fftw:3.0=[threads] )
+ gimp? (
+ media-gfx/gimp:0/2
+ ${QT_DEPEND}
+ )
+ graphicsmagick? ( media-gfx/graphicsmagick:0= )
+ jpeg? ( virtual/jpeg:0 )
+ krita? ( ${QT_DEPEND} )
+ opencv? ( >=media-libs/opencv-2.3.1a-r1:0= )
+ openexr? (
+ media-libs/ilmbase:0=
+ media-libs/openexr:0=
+ )
+ 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}
+ digikam? ( dev-qt/linguist-tools )
+ gimp? ( dev-qt/linguist-tools )
+ krita? ( dev-qt/linguist-tools )
+ qt5? ( dev-qt/linguist-tools )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.9.2_ipa-sra.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 digikam || use gimp || use krita || 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=$(usex static-libs)
+ -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 digikam; then
+ mycmakeargs+=( -DGMIC_QT_HOST=digikam )
+ BUILD_DIR="${BUILD_DIR}"/digikam cmake_src_configure
+ fi
+
+ if use gimp; then
+ mycmakeargs+=( -DGMIC_QT_HOST=gimp )
+ BUILD_DIR="${BUILD_DIR}"/gimp cmake_src_configure
+ fi
+
+ if use krita; then
+ mycmakeargs+=( -DGMIC_QT_HOST=krita )
+ BUILD_DIR="${BUILD_DIR}"/krita 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 digikam && { BUILD_DIR="${BUILD_DIR}"/digikam cmake_src_compile || die "failed building digikam plugin" ; }
+ use gimp && { BUILD_DIR="${BUILD_DIR}"/gimp cmake_src_compile || die "failed building gimp plugin" ; }
+ use krita && { BUILD_DIR="${BUILD_DIR}"/krita cmake_src_compile || die "failed building krita plugin" ; }
+ use qt5 && { BUILD_DIR="${BUILD_DIR}"/qt5 cmake_src_compile || die "failed building qt5 GUI" ; }
+}
+
+src_install() {
+ cmake_src_install
+ dodoc README
+ 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 digikam; then
+ local DIGIKAMDIR="/usr/$(get_libdir)/qt5/plugins/digikam/editor"
+ exeinto "${DIGIKAMDIR}"
+ doexe "${BUILD_DIR}"/digikam/Editor_GmicQt_Plugin.so
+ fi
+ if use gimp; then
+ exeinto "${PLUGINDIR}"
+ doexe "${BUILD_DIR}"/gimp/gmic_gimp_qt
+ fi
+ use krita && dobin "${BUILD_DIR}"/krita/gmic_krita_qt
+ use qt5 && dobin "${BUILD_DIR}"/qt5/gmic_qt
+}