diff options
author | Tim Harder <radhermit@gentoo.org> | 2019-08-23 22:48:43 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2019-08-23 22:49:32 -0600 |
commit | bfc08aa3de8e1f4e9faed1f0166f210fc2649234 (patch) | |
tree | 7d87d880fb6b8ca6289ef2b804ad66b00f2b20da /media-gfx | |
parent | media-libs/cimg: version bump to 2.7.0 (diff) | |
download | gentoo-bfc08aa3de8e1f4e9faed1f0166f210fc2649234.tar.gz gentoo-bfc08aa3de8e1f4e9faed1f0166f210fc2649234.tar.bz2 gentoo-bfc08aa3de8e1f4e9faed1f0166f210fc2649234.zip |
media-gfx/gmic: version bump to 2.7.0
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/gmic/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/gmic/gmic-2.7.0.ebuild | 171 |
2 files changed, 172 insertions, 0 deletions
diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest index df4a2a056fbf..5e7819d52764 100644 --- a/media-gfx/gmic/Manifest +++ b/media-gfx/gmic/Manifest @@ -1,2 +1,3 @@ DIST gmic_2.5.3.tar.gz 5278154 BLAKE2B 9549798eac0cf0cd869dcaeb14fca184bee3587ec8ac03f80e7f48002dfcd0afe4ad61f2c6a6f1929fb91c010aee3960d6301a0c6c6b6a2f32a7b62db9ddecb0 SHA512 fede101892d6867b83a8995dbc2b7f9e502401bf1ea952fbf95c459c932bb447693d6434e9562b00c9d96f109cbbb35d9ee876fa1f6ec9dfc52186276033e5a5 DIST gmic_2.6.7.tar.gz 5810623 BLAKE2B 407349683a7871937a37735aef81665ef5b06e5a88d5135e0d4264ce231ddba7ab088645049b1378dd73a7e6b45ada58958986b3282916aba19f7d7735c8bdaa SHA512 18088e33c133ddfa9642295af331d1808e0a618df8a7d3bb7f93d9933d4b6ec2f53a96e5a0f2bca5f1a53b4c7c0628ac7906503be007860fc37907db47029567 +DIST gmic_2.7.0.tar.gz 5823828 BLAKE2B 5a59e247ca5eb5f1aad841597fb008d9816e3c968224b8f59e51bc443218292601f8b5eea76353429677eb3ddc3fcf8f8ff28eaedd3a8ec66d84ebeb825fe7d3 SHA512 8269540253774061b108b309463dfbadb76b925e36f5d62be59020fef4178fc83b79a221f32104880b51cd9d7aef67a698beb648c6e544e4e58b88796e46a0c4 diff --git a/media-gfx/gmic/gmic-2.7.0.ebuild b/media-gfx/gmic/gmic-2.7.0.ebuild new file mode 100644 index 000000000000..eabe0e38d0f5 --- /dev/null +++ b/media-gfx/gmic/gmic-2.7.0.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=( "${FILESDIR}"/${PN}-2.6.7-qt-cmake.patch ) + 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_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 +} |