diff options
author | Tim Harder <radhermit@gentoo.org> | 2019-01-14 01:20:15 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2019-01-14 01:47:53 -0600 |
commit | 3358b8f975a8a2c746aaf16db674389d5c8f6350 (patch) | |
tree | 6ea5972f088965f11de92a8dbecab3de73a54f42 /media-gfx/gmic | |
parent | media-libs/cimg: version bump to 2.4.5 (diff) | |
download | gentoo-3358b8f975a8a2c746aaf16db674389d5c8f6350.tar.gz gentoo-3358b8f975a8a2c746aaf16db674389d5c8f6350.tar.bz2 gentoo-3358b8f975a8a2c746aaf16db674389d5c8f6350.zip |
media-gfx/gmic: version bump to 2.4.5
Closes: https://bugs.gentoo.org/674624
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'media-gfx/gmic')
-rw-r--r-- | media-gfx/gmic/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/gmic/gmic-2.4.5.ebuild | 171 |
2 files changed, 172 insertions, 0 deletions
diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest index d9a7a458c066..ba950258f35e 100644 --- a/media-gfx/gmic/Manifest +++ b/media-gfx/gmic/Manifest @@ -1 +1,2 @@ DIST gmic_2.4.3.tar.gz 3816129 BLAKE2B 1c9dd6c7e45809d0cf8b8a45476a4b20ad321b5f34fbc5214cb149777c6e9a6aba845cd816cc1503010e281bda0b32e1059dd34d052afe2ebc086469163967be SHA512 482e70b0c82992799c5769ded1547904d16dbc9206d67279b6f524c1214258b97fa539678844a450d6f64144dc7a2715c754d6a1d85398e648bc34086fc3218f +DIST gmic_2.4.5.tar.gz 3819428 BLAKE2B 71d19bf6d79ca00bf95006bd96595b83ee28caadf46a9c899176dcd96c5da1b3b9fa7b2150ea2383262c1db2357838c4c716c8ab09060c6c06faa5f7c52975c8 SHA512 39f7c35303704c579d62377f491830f6d310be672f3015aafbd6715c5fa1185d64671f841fd5e0cb818dfc96851afc6dbdbbb99f9b5156ccaeab91e7e1b08033 diff --git a/media-gfx/gmic/gmic-2.4.5.ebuild b/media-gfx/gmic/gmic-2.4.5.ebuild new file mode 100644 index 000000000000..4774c14f3a4c --- /dev/null +++ b/media-gfx/gmic/gmic-2.4.5.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_BUILD_TYPE=Release +CMAKE_MIN_VERSION=3.9 + +inherit cmake-utils bash-completion-r1 + +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 ~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 krita opencv openexr openmp png qt5 static-libs tiff X zlib" +REQUIRED_USE=" + || ( cli gimp krita qt5 ) + 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 ) + fftw? ( sci-libs/fftw:3.0=[threads] ) + gimp? ( + >=media-gfx/gimp-2.8.0 + ${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} + virtual/pkgconfig + gimp? ( dev-qt/linguist-tools ) + krita? ( dev-qt/linguist-tools ) + qt5? ( dev-qt/linguist-tools ) +" + +pkg_pretend() { + if use openmp ; then + tc-has-openmp || die "Please switch to an openmp compatible compiler" + fi + + if ! test-flag-CXX -std=c++11 ; then + die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags" + fi +} + +src_prepare() { + local PATCHES=( "${FILESDIR}"/${PN}-2.4.3-curl.patch ) + cmake-utils_src_prepare + sed -i '/CMAKE_CXX_FLAGS/s/-g //' CMakeLists.txt || die + + if use gimp || use krita || use qt5; then + sed -i '/CMAKE_CXX_FLAGS_RELEASE/d' gmic-qt/CMakeLists.txt || die + local S="${S}/gmic-qt" + PATCHES=() + cmake-utils_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-utils_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-utils_src_configure + fi + + if use krita; then + mycmakeargs+=( -DGMIC_QT_HOST=krita ) + BUILD_DIR="${BUILD_DIR}"/krita cmake-utils_src_configure + fi + + if use qt5; then + mycmakeargs+=( -DGMIC_QT_HOST=none ) + BUILD_DIR="${BUILD_DIR}"/qt5 cmake-utils_src_configure + fi +} + +src_compile() { + cmake-utils_src_compile + + # build gmic-qt frontends + local S="${S}/gmic-qt" + use gimp && { BUILD_DIR="${BUILD_DIR}"/gimp cmake-utils_src_compile || die "failed building gimp plugin" ; } + use krita && { BUILD_DIR="${BUILD_DIR}"/krita cmake-utils_src_compile || die "failed building krita plugin" ; } + use qt5 && { BUILD_DIR="${BUILD_DIR}"/qt5 cmake-utils_src_compile || die "failed building qt5 GUI" ; } +} + +src_install() { + cmake-utils_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_film_cluts.gmz + + # install gmic-qt frontends + 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 +} |