public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2016-10-29  4:49 Tim Harder
  0 siblings, 0 replies; 13+ messages in thread
From: Tim Harder @ 2016-10-29  4:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0784a517b9baf2a746ddf587ca218561d60d939e
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 29 04:43:49 2016 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 04:46:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0784a517

media-gfx/gmic: version bump to 1.7.8

Move to using cmake for building and combine library/cli/gimp builds
into one ebuild.

 media-gfx/gmic/Manifest                     |  1 +
 media-gfx/gmic/files/gmic-1.7.8-cmake.patch | 76 ++++++++++++++++++++++++
 media-gfx/gmic/gmic-1.7.8.ebuild            | 90 +++++++++++++++++++++++++++++
 media-gfx/gmic/metadata.xml                 |  1 +
 4 files changed, 168 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index 7a6735d..8e45643 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,2 +1,3 @@
 DIST gmic_1.6.5.0.tar.gz 3005945 SHA256 ebc98c4f5848b8343d581104e072299529ac3edbcea7b565ffd6e1fb4bfd66ed SHA512 3feb5589dcc341106ce1305ce2d3f90776f074607bec3b8413519aa5f2c9dc9554a9ee7a5ba1d52d1a9e7676e6bff135d444276c989511f973cd456136d0e4e1 WHIRLPOOL 02f3f711fa9c876fba39e56a42c30f62a6c2d0848ae836f9635d7df0ef57f48f2a8f09ca361232c2239e473046fe7d085260ac365d2e7b6d49e65c3c0aa2e9bc
 DIST gmic_1.6.5.1.tar.gz 3092777 SHA256 63737973848c292ef3877e1f6af3839e20fa209dd7a1bbacbdbac03bbb6fce85 SHA512 cfbb8db9a3f884ac27b4929a774c94372523a1e59a205180dde452d34310d32df4ef76c9cdfcc4ef5adf0ba72c5e1e44564cfeb2e9bc003ec8fae45df9c606c4 WHIRLPOOL e5e0e9d4dfff7a5b0da9d613bc998e32f71925cc44eb504519811327697fd13edf2abb1b94bd22619b17fa111d1e984944a01d7417ff0e328950b4258a7172fb
+DIST gmic_1.7.8.tar.gz 3013635 SHA256 3a2f32d79714239cfa56ecb10799b7d73362b4e2a852444bc24866272cd041a4 SHA512 2bfa7bb9ff3a99a76c71f7c4e0d619e9c205dafc02b5a2d1f097b6285c141e5413f7016b92d974327f787010a6832d272ab21a89842eee2484151072c2d4c559 WHIRLPOOL a81e135031ac095e700302d1b59428b6f86df4543643d17e759fcde3bcd7ceac950b7418d89854d2ee8c55af18efc67efc65f41984ca1dbbe5c12c3a12c36539

diff --git a/media-gfx/gmic/files/gmic-1.7.8-cmake.patch b/media-gfx/gmic/files/gmic-1.7.8-cmake.patch
new file mode 100644
index 00000000..2c4a6b3
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-1.7.8-cmake.patch
@@ -0,0 +1,76 @@
+--- gmic-1.7.8/CMakeLists.txt
++++ gmic-1.7.8/CMakeLists.txt
+@@ -3,9 +3,11 @@
+ project(gmic CXX C)
+ 
+ find_package(PkgConfig)
++include(GNUInstallDirs)
+ 
+ # options controlling the build process
+ option(BUILD_LIB "Build the GMIC shared library" ON)
++option(BUILD_LIB_STATIC "Build the GMIC static library" ON)
+ option(BUILD_CLI "Build the CLI interface" ON)
+ option(BUILD_PLUGIN "Build the GIMP plug-in" ON)
+ option(ENABLE_X "Add support for X11" ON)
+@@ -44,7 +46,7 @@
+ if(ENABLE_OPENMP)
+   if(NOT APPLE)
+     set(COMPILE_FLAGS " ${COMPILE_FLAGS} -fopenmp -Dcimg_use_openmp ")
+-    set(EXTRA_LIBRARIES "-lgomp ${EXTRA_LIBRARIES}")
++	set(EXTRA_LIBRARIES "${EXTRA_LIBRARIES} -lgomp")
+   endif(NOT APPLE)
+ endif(ENABLE_OPENMP)
+ 
+@@ -187,9 +189,9 @@
+     "Choose the type of build, options are: Debug Release RelWithDebInfo."
+     FORCE)
+ endif(NOT CMAKE_BUILD_TYPE)
+-SET(CMAKE_CXX_FLAGS_DEBUG " -O0 -g -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}") 
+-SET(CMAKE_CXX_FLAGS_RELEASE " -O3 -mtune=generic ${COMPILE_FLAGS}") 
+-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -O3 -g -mtune=generic ${COMPILE_FLAGS}") 
++SET(CMAKE_CXX_FLAGS_DEBUG " -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}") 
++SET(CMAKE_CXX_FLAGS_RELEASE " ${COMPILE_FLAGS}") 
++SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMPILE_FLAGS}") 
+ 
+ 
+ # source files
+@@ -220,7 +222,7 @@
+ if(BUILD_LIB)
+   add_library(libgmic SHARED ${CLI_Includes} ${CLI_Sources})
+   add_dependencies(libgmic gmic_extra_headers)
+-  set_target_properties(libgmic PROPERTIES OUTPUT_NAME "gmic")
++  set_target_properties(libgmic PROPERTIES SOVERSION "1" OUTPUT_NAME "gmic")
+   IF(NOT APPLE)
+     set_target_properties(libgmic PROPERTIES LINK_FLAGS "-Wl,-soname,libgmic.so.1")
+   ENDIF(NOT APPLE)
+@@ -236,7 +238,13 @@
+     ${FFTW3_LIBRARIES}
+     ${EXTRA_LIBRARIES}
+     )
+-  
++
++  INSTALL(TARGETS libgmic LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
++  INSTALL(FILES src/gmic.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++endif(BUILD_LIB)
++
++
++if(BUILD_LIB_STATIC)
+   add_library(libgmicstatic STATIC ${CLI_Includes} ${CLI_Sources})
+   add_dependencies(libgmicstatic gmic_extra_headers)
+   set_target_properties(libgmicstatic PROPERTIES OUTPUT_NAME "gmic")
+@@ -252,11 +260,10 @@
+     ${FFTW3_LIBRARIES}
+     ${EXTRA_LIBRARIES}
+     )
+-  
+-  INSTALL(TARGETS libgmic LIBRARY DESTINATION lib)
+-  INSTALL(TARGETS libgmicstatic ARCHIVE DESTINATION lib)
+-  INSTALL(FILES src/gmic.h DESTINATION include)
+-endif(BUILD_LIB)
++
++  INSTALL(TARGETS libgmicstatic ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
++  INSTALL(FILES src/gmic.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++endif(BUILD_LIB_STATIC)
+ 
+ 
+ if(BUILD_CLI)

diff --git a/media-gfx/gmic/gmic-1.7.8.ebuild b/media-gfx/gmic/gmic-1.7.8.ebuild
new file mode 100644
index 00000000..80601fc
--- /dev/null
+++ b/media-gfx/gmic/gmic-1.7.8.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils bash-completion-r1
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="http://gmic.eu/ https://github.com/dtschump/gmic"
+SRC_URI="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cli ffmpeg fftw gimp graphicsmagick jpeg opencv openexr openmp png static-libs tiff X zlib"
+REQUIRED_USE="|| ( cli gimp )"
+
+COMMON_DEPEND="
+	fftw? ( sci-libs/fftw:3.0[threads] )
+	gimp? ( >=media-gfx/gimp-2.4.0 )
+	graphicsmagick? ( media-gfx/graphicsmagick )
+	jpeg? ( virtual/jpeg:0 )
+	opencv? ( >=media-libs/opencv-2.3.1a-r1 )
+	openexr? (
+		media-libs/ilmbase
+		media-libs/openexr
+	)
+	png? ( media-libs/libpng:0= )
+	tiff? ( media-libs/tiff:0 )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXext
+	)
+	zlib? ( sys-libs/zlib )"
+RDEPEND="${COMMON_DEPEND}
+	ffmpeg? ( media-video/ffmpeg:0 )
+	gimp? ( !media-plugins/gimp-gmic )
+"
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}"/${P}-cmake.patch )
+
+src_prepare() {
+	default
+	gunzip man/${PN}.1.gz || die
+}
+
+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_configure() {
+	local mycmakeargs=(
+		-DBUILD_LIB=ON
+		-DBUILD_LIB_STATIC=$(usex static-libs)
+		-DBUILD_CLI=$(usex cli)
+		-DBUILD_PLUGIN=$(usex gimp)
+		-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)
+	)
+
+	local CMAKE_BUILD_TYPE="Release"
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	dodoc README
+	doman man/${PN}.1
+	use cli && newbashcomp resources/${PN}_bashcompletion.sh ${PN}
+}

diff --git a/media-gfx/gmic/metadata.xml b/media-gfx/gmic/metadata.xml
index 139c76d..2999c9f 100644
--- a/media-gfx/gmic/metadata.xml
+++ b/media-gfx/gmic/metadata.xml
@@ -6,6 +6,7 @@
 		<name>Gentoo Graphics Project</name>
 	</maintainer>
 	<use>
+		<flag name="cli">Build CLI interface</flag>
 		<flag name="graphicsmagick">Enable support for many common image file formats using the GraphicsMagick++ library</flag>
 		<flag name="opencv">Enable support for webcams using the OpenCV library</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2018-12-30  8:27 Tim Harder
  0 siblings, 0 replies; 13+ messages in thread
From: Tim Harder @ 2018-12-30  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     4de7949186333cfd1c8ef2c29ac015591f3fba28
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 30 08:06:08 2018 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sun Dec 30 08:26:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4de79491

media-gfx/gmic: version bump to 2.4.3

Closes: https://bugs.gentoo.org/556116
Closes: https://bugs.gentoo.org/621270
Closes: https://bugs.gentoo.org/622466
Closes: https://bugs.gentoo.org/628318
Closes: https://bugs.gentoo.org/629194
Closes: https://bugs.gentoo.org/633950
Closes: https://bugs.gentoo.org/643090
Closes: https://bugs.gentoo.org/657764

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 media-gfx/gmic/Manifest                    |   1 +
 media-gfx/gmic/files/gmic-2.4.3-curl.patch | 100 +++++++++++++++++
 media-gfx/gmic/gmic-2.4.3.ebuild           | 170 +++++++++++++++++++++++++++++
 media-gfx/gmic/metadata.xml                |   1 +
 4 files changed, 272 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index f0fb1ad0b3d..c72ee5e76e0 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,3 +1,4 @@
 DIST gmic_1.7.8.tar.gz 3013635 BLAKE2B 1e964b42358010d1c643ff976f70774e2418a42b09601f29f9838e594ba4a0145e4c019cba39523efa85846bb75df7bbc451fd2c23ababc94ace93f35587c535 SHA512 2bfa7bb9ff3a99a76c71f7c4e0d619e9c205dafc02b5a2d1f097b6285c141e5413f7016b92d974327f787010a6832d272ab21a89842eee2484151072c2d4c559
 DIST gmic_1.7.9.tar.gz 3069082 BLAKE2B bc756258adbe468a4ceb347d546e1d283b6b21bb8bac4d3ec14b5c789fa375de37babded5862bdbbf86e83e4818c00c77758c13d10041ab90903d2d01e58ca6a SHA512 749611748c9fe2a141efc9b0a445411c1ece842f4c576b68b3b17cbbffdc1cf43a2aee55dc399b899dc03882f240289beaef96d9ec85b10ffc0ad986412cd4bc
 DIST gmic_2.0.0.tar.gz 3181386 BLAKE2B 4e6300388e62c915bf41ed04f70e487de8f5e460855f2e087c20766ef186d7dd1a4b99a053d9bd4ab02dc3f391982a9bebb20bcdd9b1e4737ba2bff77bd84a62 SHA512 08cb3bb02d072db5881dc3b2c23be766ae9909a29042777b474733afe30efeaeff35582ac69e8c5f38258c563919a17ce22294c594cbe04f792769b6609b3efb
+DIST gmic_2.4.3.tar.gz 3816129 BLAKE2B 1c9dd6c7e45809d0cf8b8a45476a4b20ad321b5f34fbc5214cb149777c6e9a6aba845cd816cc1503010e281bda0b32e1059dd34d052afe2ebc086469163967be SHA512 482e70b0c82992799c5769ded1547904d16dbc9206d67279b6f524c1214258b97fa539678844a450d6f64144dc7a2715c754d6a1d85398e648bc34086fc3218f

diff --git a/media-gfx/gmic/files/gmic-2.4.3-curl.patch b/media-gfx/gmic/files/gmic-2.4.3-curl.patch
new file mode 100644
index 00000000000..f91f86ff0d4
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-2.4.3-curl.patch
@@ -0,0 +1,100 @@
+Add curl support for the cli app and base library and make it truly optional
+for gmic-qt instead of automagic.
+
+--- gmic-2.4.3/CMakeLists.txt
++++ gmic-2.4.3/CMakeLists.txt
+@@ -83,6 +83,7 @@
+ option(BUILD_MAN "Build the manpage" ON)
+ option(BUILD_BASH_COMPLETION "Build Bash completion" ON)
+ option(CUSTOM_CFLAGS "Override default compiler optimization flags" OFF)
++option(ENABLE_CURL "Add support for curl" ON)
+ option(ENABLE_X "Add support for X11" ON)
+ option(ENABLE_FFMPEG "Add support for FFMpeg" ON)
+ option(ENABLE_FFTW "Add support for FFTW" ON)
+@@ -136,6 +137,16 @@
+   link_directories(${ZLIB_LIBRARY_DIRS})
+ endif()
+ 
++# curl support
++if(ENABLE_CURL)
++  find_package(CURL)
++endif()
++if(CURL_FOUND)
++  set(COMPILE_FLAGS "${COMPILE_FLAGS} -Dcimg_use_curl")
++  include_directories(${CURL_INCLUDE_DIRS})
++  link_directories(${CURL_LIBRARY_DIRS})
++endif()
++
+ #X11 support
+ if(ENABLE_X)
+   find_package(X11)
+@@ -288,6 +299,7 @@
+     ${OPENEXR_LIBRARIES}
+     ${OPENCV_LIBRARIES}
+     ${ZLIB_LIBRARIES}
++    ${CURL_LIBRARIES}
+     ${FFTW3_LIBRARIES}
+     ${EXTRA_LIBRARIES}
+   )
+@@ -316,6 +328,7 @@
+     ${OPENEXR_LIBRARIES}
+     ${OPENCV_LIBRARIES}
+     ${ZLIB_LIBRARIES}
++    ${CURL_LIBRARIES}
+     ${FFTW3_LIBRARIES}
+     ${EXTRA_LIBRARIES}
+   )
+@@ -345,6 +358,7 @@
+       ${OPENEXR_LIBRARIES}
+       ${OPENCV_LIBRARIES}
+       ${ZLIB_LIBRARIES}
++      ${CURL_LIBRARIES}
+       ${FFTW3_LIBRARIES}
+       ${EXTRA_LIBRARIES}
+     )
+--- gmic-2.4.3/gmic-qt/CMakeLists.txt
++++ gmic-2.4.3/gmic-qt/CMakeLists.txt
+@@ -30,6 +30,7 @@
+ message("G'MIC path: " ${GMIC_PATH})
+ 
+ option(ENABLE_DYNAMIC_LINKING "Dynamically link the binaries to the GMIC shared library" OFF)
++option(ENABLE_CURL "Add support for curl" ON)
+ set (GMIC_LIB_PATH "${GMIC_PATH}" CACHE STRING "Define the path to the GMIC shared library")
+ 
+ #
+@@ -149,10 +150,12 @@
+ #
+ # CURL
+ #
+-find_package(CURL)
+-if (CURL_FOUND)
+-    add_definitions(-Dcimg_use_curl)
+-    include_directories(SYSTEM ${CURL_INCLUDE_DIRS} )
++if(ENABLE_CURL)
++    find_package(CURL)
++    if (CURL_FOUND)
++        add_definitions(-Dcimg_use_curl)
++        include_directories(SYSTEM ${CURL_INCLUDE_DIRS} )
++    endif()
+ endif()
+ 
+ #
+@@ -187,11 +190,13 @@
+         ${ZLIB_LIBRARIES}
+ )
+ 
+-if (CURL_FOUND)
+-    set(gmic_qt_LIBRARIES
+-        ${gmic_qt_LIBRARIES}
+-        ${CURL_LIBRARIES}
+-    )
++if(ENABLE_CURL)
++    if (CURL_FOUND)
++        set(gmic_qt_LIBRARIES
++            ${gmic_qt_LIBRARIES}
++            ${CURL_LIBRARIES}
++        )
++    endif()
+ endif()
+ 
+ add_definitions(-Dgmic_build)

diff --git a/media-gfx/gmic/gmic-2.4.3.ebuild b/media-gfx/gmic/gmic-2.4.3.ebuild
new file mode 100644
index 00000000000..0b6b7df9acb
--- /dev/null
+++ b/media-gfx/gmic/gmic-2.4.3.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 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}"/${P}-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)
+		-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
+}

diff --git a/media-gfx/gmic/metadata.xml b/media-gfx/gmic/metadata.xml
index 97ea96d2123..1cd8c96cdca 100644
--- a/media-gfx/gmic/metadata.xml
+++ b/media-gfx/gmic/metadata.xml
@@ -7,6 +7,7 @@
 	</maintainer>
 	<use>
 		<flag name="cli">Build CLI interface</flag>
+		<flag name="krita">Build <pkg>media-gfx/krita</pkg> plugin</flag>
 		<flag name="opencv">Enable support for webcams using the OpenCV library</flag>
 	</use>
 	<upstream>


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2018-12-30  8:27 Tim Harder
  0 siblings, 0 replies; 13+ messages in thread
From: Tim Harder @ 2018-12-30  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     376bba5f9f4a952ddfe8bc4464e7846100f39f85
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 30 08:18:27 2018 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sun Dec 30 08:26:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376bba5f

media-gfx/gmic: remove old

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 media-gfx/gmic/Manifest                     |  3 -
 media-gfx/gmic/files/gmic-1.7.8-cmake.patch | 76 ------------------------
 media-gfx/gmic/files/gmic-1.7.9-flags.patch | 15 -----
 media-gfx/gmic/files/gmic-1.7.9-man.patch   | 17 ------
 media-gfx/gmic/gmic-1.7.8.ebuild            | 91 -----------------------------
 media-gfx/gmic/gmic-1.7.9.ebuild            | 86 ---------------------------
 media-gfx/gmic/gmic-2.0.0.ebuild            | 91 -----------------------------
 7 files changed, 379 deletions(-)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index c72ee5e76e0..d9a7a458c06 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,4 +1 @@
-DIST gmic_1.7.8.tar.gz 3013635 BLAKE2B 1e964b42358010d1c643ff976f70774e2418a42b09601f29f9838e594ba4a0145e4c019cba39523efa85846bb75df7bbc451fd2c23ababc94ace93f35587c535 SHA512 2bfa7bb9ff3a99a76c71f7c4e0d619e9c205dafc02b5a2d1f097b6285c141e5413f7016b92d974327f787010a6832d272ab21a89842eee2484151072c2d4c559
-DIST gmic_1.7.9.tar.gz 3069082 BLAKE2B bc756258adbe468a4ceb347d546e1d283b6b21bb8bac4d3ec14b5c789fa375de37babded5862bdbbf86e83e4818c00c77758c13d10041ab90903d2d01e58ca6a SHA512 749611748c9fe2a141efc9b0a445411c1ece842f4c576b68b3b17cbbffdc1cf43a2aee55dc399b899dc03882f240289beaef96d9ec85b10ffc0ad986412cd4bc
-DIST gmic_2.0.0.tar.gz 3181386 BLAKE2B 4e6300388e62c915bf41ed04f70e487de8f5e460855f2e087c20766ef186d7dd1a4b99a053d9bd4ab02dc3f391982a9bebb20bcdd9b1e4737ba2bff77bd84a62 SHA512 08cb3bb02d072db5881dc3b2c23be766ae9909a29042777b474733afe30efeaeff35582ac69e8c5f38258c563919a17ce22294c594cbe04f792769b6609b3efb
 DIST gmic_2.4.3.tar.gz 3816129 BLAKE2B 1c9dd6c7e45809d0cf8b8a45476a4b20ad321b5f34fbc5214cb149777c6e9a6aba845cd816cc1503010e281bda0b32e1059dd34d052afe2ebc086469163967be SHA512 482e70b0c82992799c5769ded1547904d16dbc9206d67279b6f524c1214258b97fa539678844a450d6f64144dc7a2715c754d6a1d85398e648bc34086fc3218f

diff --git a/media-gfx/gmic/files/gmic-1.7.8-cmake.patch b/media-gfx/gmic/files/gmic-1.7.8-cmake.patch
deleted file mode 100644
index 2c4a6b3557b..00000000000
--- a/media-gfx/gmic/files/gmic-1.7.8-cmake.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- gmic-1.7.8/CMakeLists.txt
-+++ gmic-1.7.8/CMakeLists.txt
-@@ -3,9 +3,11 @@
- project(gmic CXX C)
- 
- find_package(PkgConfig)
-+include(GNUInstallDirs)
- 
- # options controlling the build process
- option(BUILD_LIB "Build the GMIC shared library" ON)
-+option(BUILD_LIB_STATIC "Build the GMIC static library" ON)
- option(BUILD_CLI "Build the CLI interface" ON)
- option(BUILD_PLUGIN "Build the GIMP plug-in" ON)
- option(ENABLE_X "Add support for X11" ON)
-@@ -44,7 +46,7 @@
- if(ENABLE_OPENMP)
-   if(NOT APPLE)
-     set(COMPILE_FLAGS " ${COMPILE_FLAGS} -fopenmp -Dcimg_use_openmp ")
--    set(EXTRA_LIBRARIES "-lgomp ${EXTRA_LIBRARIES}")
-+	set(EXTRA_LIBRARIES "${EXTRA_LIBRARIES} -lgomp")
-   endif(NOT APPLE)
- endif(ENABLE_OPENMP)
- 
-@@ -187,9 +189,9 @@
-     "Choose the type of build, options are: Debug Release RelWithDebInfo."
-     FORCE)
- endif(NOT CMAKE_BUILD_TYPE)
--SET(CMAKE_CXX_FLAGS_DEBUG " -O0 -g -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}") 
--SET(CMAKE_CXX_FLAGS_RELEASE " -O3 -mtune=generic ${COMPILE_FLAGS}") 
--SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -O3 -g -mtune=generic ${COMPILE_FLAGS}") 
-+SET(CMAKE_CXX_FLAGS_DEBUG " -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}") 
-+SET(CMAKE_CXX_FLAGS_RELEASE " ${COMPILE_FLAGS}") 
-+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMPILE_FLAGS}") 
- 
- 
- # source files
-@@ -220,7 +222,7 @@
- if(BUILD_LIB)
-   add_library(libgmic SHARED ${CLI_Includes} ${CLI_Sources})
-   add_dependencies(libgmic gmic_extra_headers)
--  set_target_properties(libgmic PROPERTIES OUTPUT_NAME "gmic")
-+  set_target_properties(libgmic PROPERTIES SOVERSION "1" OUTPUT_NAME "gmic")
-   IF(NOT APPLE)
-     set_target_properties(libgmic PROPERTIES LINK_FLAGS "-Wl,-soname,libgmic.so.1")
-   ENDIF(NOT APPLE)
-@@ -236,7 +238,13 @@
-     ${FFTW3_LIBRARIES}
-     ${EXTRA_LIBRARIES}
-     )
--  
-+
-+  INSTALL(TARGETS libgmic LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
-+  INSTALL(FILES src/gmic.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
-+endif(BUILD_LIB)
-+
-+
-+if(BUILD_LIB_STATIC)
-   add_library(libgmicstatic STATIC ${CLI_Includes} ${CLI_Sources})
-   add_dependencies(libgmicstatic gmic_extra_headers)
-   set_target_properties(libgmicstatic PROPERTIES OUTPUT_NAME "gmic")
-@@ -252,11 +260,10 @@
-     ${FFTW3_LIBRARIES}
-     ${EXTRA_LIBRARIES}
-     )
--  
--  INSTALL(TARGETS libgmic LIBRARY DESTINATION lib)
--  INSTALL(TARGETS libgmicstatic ARCHIVE DESTINATION lib)
--  INSTALL(FILES src/gmic.h DESTINATION include)
--endif(BUILD_LIB)
-+
-+  INSTALL(TARGETS libgmicstatic ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
-+  INSTALL(FILES src/gmic.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
-+endif(BUILD_LIB_STATIC)
- 
- 
- if(BUILD_CLI)

diff --git a/media-gfx/gmic/files/gmic-1.7.9-flags.patch b/media-gfx/gmic/files/gmic-1.7.9-flags.patch
deleted file mode 100644
index aea11ed50a7..00000000000
--- a/media-gfx/gmic/files/gmic-1.7.9-flags.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- gmic-1.7.9/CMakeLists.txt
-+++ gmic-1.7.9/CMakeLists.txt
-@@ -190,9 +190,9 @@
-     "Choose the type of build, options are: Debug Release RelWithDebInfo."
-     FORCE)
- endif(NOT CMAKE_BUILD_TYPE)
--SET(CMAKE_CXX_FLAGS_DEBUG " -O0 -g -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}")
--SET(CMAKE_CXX_FLAGS_RELEASE " -O3 -mtune=generic ${COMPILE_FLAGS}")
--SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " -O3 -g -mtune=generic ${COMPILE_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_DEBUG " -ansi -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_RELEASE " ${COMPILE_FLAGS}")
-+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMPILE_FLAGS}")
- 
- 
- # source files

diff --git a/media-gfx/gmic/files/gmic-1.7.9-man.patch b/media-gfx/gmic/files/gmic-1.7.9-man.patch
deleted file mode 100644
index 44353a2123f..00000000000
--- a/media-gfx/gmic/files/gmic-1.7.9-man.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- gmic-1.7.9/CMakeLists.txt
-+++ gmic-1.7.9/CMakeLists.txt
-@@ -334,11 +334,10 @@
- if(BUILD_MAN)
-   file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/man)
-   add_custom_command(
--    OUTPUT ${CMAKE_SOURCE_DIR}/man/gmic.1.gz
-+    OUTPUT ${CMAKE_SOURCE_DIR}/man/gmic.1
-     DEPENDS gmic
-     COMMAND ${CMAKE_BINARY_DIR}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -__help man 2> ${CMAKE_SOURCE_DIR}/man/gmic.1
--    COMMAND gzip -f ${CMAKE_SOURCE_DIR}/man/gmic.1
-   )
--  add_custom_target(man ALL DEPENDS ${CMAKE_SOURCE_DIR}/man/gmic.1.gz)
--  INSTALL(FILES ${CMAKE_SOURCE_DIR}/man/gmic.1.gz DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
-+  add_custom_target(man ALL DEPENDS ${CMAKE_SOURCE_DIR}/man/gmic.1)
-+  INSTALL(FILES ${CMAKE_SOURCE_DIR}/man/gmic.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
- endif(BUILD_MAN)

diff --git a/media-gfx/gmic/gmic-1.7.8.ebuild b/media-gfx/gmic/gmic-1.7.8.ebuild
deleted file mode 100644
index 985bd87c6da..00000000000
--- a/media-gfx/gmic/gmic-1.7.8.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils bash-completion-r1
-
-DESCRIPTION="GREYC's Magic Image Converter"
-HOMEPAGE="http://gmic.eu/ https://github.com/dtschump/gmic"
-SRC_URI="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
-
-LICENSE="CeCILL-2 FDL-1.3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+cli ffmpeg fftw gimp graphicsmagick jpeg opencv openexr openmp png static-libs tiff X zlib"
-REQUIRED_USE="|| ( cli gimp )"
-
-COMMON_DEPEND="
-	fftw? ( sci-libs/fftw:3.0[threads] )
-	gimp? ( >=media-gfx/gimp-2.4.0 )
-	graphicsmagick? ( media-gfx/graphicsmagick )
-	jpeg? ( virtual/jpeg:0 )
-	opencv? ( >=media-libs/opencv-2.3.1a-r1 )
-	openexr? (
-		media-libs/ilmbase
-		media-libs/openexr
-	)
-	png? ( media-libs/libpng:0= )
-	tiff? ( media-libs/tiff:0 )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXext
-	)
-	zlib? ( sys-libs/zlib )"
-RDEPEND="${COMMON_DEPEND}
-	ffmpeg? ( media-video/ffmpeg:0 )
-	gimp? ( !media-plugins/gimp-gmic )
-"
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-"
-
-PATCHES=( "${FILESDIR}"/${P}-cmake.patch )
-
-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() {
-	default
-	gunzip man/${PN}.1.gz || die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_LIB=ON
-		-DBUILD_LIB_STATIC=$(usex static-libs)
-		-DBUILD_CLI=$(usex cli)
-		-DBUILD_PLUGIN=$(usex gimp)
-		-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)
-	)
-
-	local CMAKE_BUILD_TYPE="Release"
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	dodoc README
-
-	if use cli; then
-		doman man/${PN}.1
-		newbashcomp resources/${PN}_bashcompletion.sh ${PN}
-	fi
-}

diff --git a/media-gfx/gmic/gmic-1.7.9.ebuild b/media-gfx/gmic/gmic-1.7.9.ebuild
deleted file mode 100644
index f8b8e275154..00000000000
--- a/media-gfx/gmic/gmic-1.7.9.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils bash-completion-r1
-
-DESCRIPTION="GREYC's Magic Image Converter"
-HOMEPAGE="http://gmic.eu/ https://github.com/dtschump/gmic"
-SRC_URI="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
-
-LICENSE="CeCILL-2 FDL-1.3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+cli ffmpeg fftw gimp graphicsmagick jpeg opencv openexr openmp png static-libs tiff X zlib"
-REQUIRED_USE="|| ( cli gimp )"
-
-COMMON_DEPEND="
-	fftw? ( sci-libs/fftw:3.0[threads] )
-	gimp? ( >=media-gfx/gimp-2.4.0 )
-	graphicsmagick? ( media-gfx/graphicsmagick )
-	jpeg? ( virtual/jpeg:0 )
-	opencv? ( >=media-libs/opencv-2.3.1a-r1 )
-	openexr? (
-		media-libs/ilmbase
-		media-libs/openexr
-	)
-	png? ( media-libs/libpng:0= )
-	tiff? ( media-libs/tiff:0 )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXext
-	)
-	zlib? ( sys-libs/zlib )"
-RDEPEND="${COMMON_DEPEND}
-	ffmpeg? ( media-video/ffmpeg:0 )
-	gimp? ( !media-plugins/gimp-gmic )
-"
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-flags.patch
-	"${FILESDIR}"/${P}-man.patch
-)
-
-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_configure() {
-	local mycmakeargs=(
-		-DBUILD_LIB=ON
-		-DBUILD_LIB_STATIC=$(usex static-libs)
-		-DBUILD_CLI=$(usex cli)
-		-DBUILD_MAN=$(usex cli)
-		-DBUILD_PLUGIN=$(usex gimp)
-		-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)
-	)
-
-	local CMAKE_BUILD_TYPE="Release"
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	dodoc README
-	use cli && newbashcomp resources/${PN}_bashcompletion.sh ${PN}
-}

diff --git a/media-gfx/gmic/gmic-2.0.0.ebuild b/media-gfx/gmic/gmic-2.0.0.ebuild
deleted file mode 100644
index bf371feb3ea..00000000000
--- a/media-gfx/gmic/gmic-2.0.0.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="GREYC's Magic Image Converter"
-HOMEPAGE="http://gmic.eu/ https://github.com/dtschump/gmic"
-
-LICENSE="CeCILL-2 FDL-1.3"
-SLOT="0"
-IUSE="+cli ffmpeg fftw gimp graphicsmagick jpeg opencv openexr openmp png static-libs tiff X zlib"
-REQUIRED_USE="|| ( cli gimp )"
-
-COMMON_DEPEND="
-	fftw? ( sci-libs/fftw:3.0[threads] )
-	gimp? ( >=media-gfx/gimp-2.4.0 )
-	graphicsmagick? ( media-gfx/graphicsmagick )
-	jpeg? ( virtual/jpeg:0 )
-	opencv? ( >=media-libs/opencv-2.3.1a-r1 )
-	openexr? (
-		media-libs/ilmbase
-		media-libs/openexr
-	)
-	png? ( media-libs/libpng:0= )
-	tiff? ( media-libs/tiff:0 )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXext
-	)
-	zlib? ( sys-libs/zlib )"
-RDEPEND="${COMMON_DEPEND}
-	ffmpeg? ( media-video/ffmpeg:0 )
-"
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.7.9-flags.patch
-	"${FILESDIR}"/${PN}-1.7.9-man.patch
-)
-
-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_configure() {
-	local mycmakeargs=(
-		-DBUILD_LIB=ON
-		-DBUILD_LIB_STATIC=$(usex static-libs)
-		-DBUILD_CLI=$(usex cli)
-		-DBUILD_MAN=$(usex cli)
-		-DBUILD_PLUGIN=$(usex gimp)
-		-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)
-	)
-
-	local CMAKE_BUILD_TYPE="Release"
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	dodoc README
-	use cli && newbashcomp resources/${PN}_bashcompletion.sh ${PN}
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2019-07-02 21:06 Tim Harder
  0 siblings, 0 replies; 13+ messages in thread
From: Tim Harder @ 2019-07-02 21:06 UTC (permalink / raw
  To: gentoo-commits

commit:     23a04f77b1ab7d3d5dcc3c4f08dedfd0d044b4ee
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 21:03:44 2019 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 21:05:06 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a04f77

media-gfx/gmic: version bump to 2.6.7

Closes: https://bugs.gentoo.org/687662

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 media-gfx/gmic/Manifest                        |   1 +
 media-gfx/gmic/files/gmic-2.6.7-qt-cmake.patch |  54 ++++++++
 media-gfx/gmic/gmic-2.6.7.ebuild               | 171 +++++++++++++++++++++++++
 3 files changed, 226 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index 7504d64e6e4..fc20d5e7d3c 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,3 +1,4 @@
 DIST gmic_2.4.3.tar.gz 3816129 BLAKE2B 1c9dd6c7e45809d0cf8b8a45476a4b20ad321b5f34fbc5214cb149777c6e9a6aba845cd816cc1503010e281bda0b32e1059dd34d052afe2ebc086469163967be SHA512 482e70b0c82992799c5769ded1547904d16dbc9206d67279b6f524c1214258b97fa539678844a450d6f64144dc7a2715c754d6a1d85398e648bc34086fc3218f
 DIST gmic_2.4.5.tar.gz 3819428 BLAKE2B 71d19bf6d79ca00bf95006bd96595b83ee28caadf46a9c899176dcd96c5da1b3b9fa7b2150ea2383262c1db2357838c4c716c8ab09060c6c06faa5f7c52975c8 SHA512 39f7c35303704c579d62377f491830f6d310be672f3015aafbd6715c5fa1185d64671f841fd5e0cb818dfc96851afc6dbdbbb99f9b5156ccaeab91e7e1b08033
 DIST gmic_2.5.3.tar.gz 5278154 BLAKE2B 9549798eac0cf0cd869dcaeb14fca184bee3587ec8ac03f80e7f48002dfcd0afe4ad61f2c6a6f1929fb91c010aee3960d6301a0c6c6b6a2f32a7b62db9ddecb0 SHA512 fede101892d6867b83a8995dbc2b7f9e502401bf1ea952fbf95c459c932bb447693d6434e9562b00c9d96f109cbbb35d9ee876fa1f6ec9dfc52186276033e5a5
+DIST gmic_2.6.7.tar.gz 5810623 BLAKE2B 407349683a7871937a37735aef81665ef5b06e5a88d5135e0d4264ce231ddba7ab088645049b1378dd73a7e6b45ada58958986b3282916aba19f7d7735c8bdaa SHA512 18088e33c133ddfa9642295af331d1808e0a618df8a7d3bb7f93d9933d4b6ec2f53a96e5a0f2bca5f1a53b4c7c0628ac7906503be007860fc37907db47029567

diff --git a/media-gfx/gmic/files/gmic-2.6.7-qt-cmake.patch b/media-gfx/gmic/files/gmic-2.6.7-qt-cmake.patch
new file mode 100644
index 00000000000..e268558a95e
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-2.6.7-qt-cmake.patch
@@ -0,0 +1,54 @@
+Fix linking with fftw when thread support is enabled and fix source code file
+name typo.
+
+--- gmic-qt/CMakeLists.txt
++++ gmic-qt/CMakeLists.txt
+@@ -13,6 +13,7 @@
+ set(CMAKE_AUTOUIC OFF)
+ set(CMAKE_AUTORCC ON)
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
++set(EXTRA_LIBRARIES)
+ 
+ set (GMIC_QT_HOST "gimp" CACHE STRING "Define for which host qmic-qt will be built: gimp, krita or none.")
+ if (${GMIC_QT_HOST} STREQUAL "none")
+@@ -143,8 +144,13 @@
+ #
+ find_package(FFTW3 REQUIRED)
+ add_definitions(-Dcimg_use_fftw3 )
+-add_definitions(-Dcimg_use_fftw3_singlethread )
+ include_directories(${FFTW3_INCLUDE_DIR})
++find_library(FFTW3_THREADS_LIB fftw3_threads PATHS ${FFTW3_LIBRARY_DIRS})
++if(FFTW3_THREADS_LIB STREQUAL "FFTW3_THREADS_LIB-NOTFOUND")
++    add_definitions(-Dcimg_use_fftw3_singlethread)
++else()
++    list(APPEND EXTRA_LIBRARIES "-lfftw3_threads")
++endif()
+ 
+ #
+ # CURL
+@@ -185,6 +191,7 @@
+         ${PNG_LIBRARIES}
+         ${FFTW3_LIBRARIES}
+         ${ZLIB_LIBRARIES}
++        ${EXTRA_LIBRARIES}
+ )
+ 
+ if (CURL_FOUND)
+@@ -278,7 +285,7 @@
+   src/FilterParameters/ChoiceParameter.h
+   src/FilterParameters/ColorParameter.h
+   src/FilterParameters/ConstParameter.h
+-  src/FilterParameters/CustomDoubleSpinbox.h
++  src/FilterParameters/CustomDoubleSpinBox.h
+   src/FilterParameters/FileParameter.h
+   src/FilterParameters/FilterParametersWidget.h
+   src/FilterParameters/FloatParameter.h
+@@ -350,7 +357,7 @@
+   src/FilterParameters/ChoiceParameter.cpp
+   src/FilterParameters/ColorParameter.cpp
+   src/FilterParameters/ConstParameter.cpp
+-  src/FilterParameters/CustomDoubleSpinbox.cpp
++  src/FilterParameters/CustomDoubleSpinBox.cpp
+   src/FilterParameters/FileParameter.cpp
+   src/FilterParameters/FilterParametersWidget.cpp
+   src/FilterParameters/FloatParameter.cpp

diff --git a/media-gfx/gmic/gmic-2.6.7.ebuild b/media-gfx/gmic/gmic-2.6.7.ebuild
new file mode 100644
index 00000000000..2a1fe822e6e
--- /dev/null
+++ b/media-gfx/gmic/gmic-2.6.7.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}"/${P}-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
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2019-09-04 13:32 Tim Harder
  0 siblings, 0 replies; 13+ messages in thread
From: Tim Harder @ 2019-09-04 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     1d78c775718dbca78456247544e7d3649c33d4f2
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  4 13:28:59 2019 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Wed Sep  4 13:31:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d78c775

media-gfx/gmic: fix qt-cmake patch for 2.7.1

Closes: https://bugs.gentoo.org/693486

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 media-gfx/gmic/files/gmic-2.7.1-qt-cmake.patch | 35 ++++++++++++++++++++++++++
 media-gfx/gmic/gmic-2.7.1.ebuild               |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/media-gfx/gmic/files/gmic-2.7.1-qt-cmake.patch b/media-gfx/gmic/files/gmic-2.7.1-qt-cmake.patch
new file mode 100644
index 00000000000..caf22d04ce9
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-2.7.1-qt-cmake.patch
@@ -0,0 +1,35 @@
+Fix linking with fftw when thread support is enabled.
+
+--- gmic-qt/CMakeLists.txt
++++ gmic-qt/CMakeLists.txt
+@@ -13,6 +13,7 @@
+ set(CMAKE_AUTOUIC OFF)
+ set(CMAKE_AUTORCC ON)
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
++set(EXTRA_LIBRARIES)
+ 
+ set (GMIC_QT_HOST "gimp" CACHE STRING "Define for which host qmic-qt will be built: gimp, krita, none, paintdotnet, or digikam.")
+ if (${GMIC_QT_HOST} STREQUAL "none")
+@@ -145,8 +146,13 @@
+ #
+ find_package(FFTW3 REQUIRED)
+ add_definitions(-Dcimg_use_fftw3 )
+-add_definitions(-Dcimg_use_fftw3_singlethread )
+ include_directories(${FFTW3_INCLUDE_DIR})
++find_library(FFTW3_THREADS_LIB fftw3_threads PATHS ${FFTW3_LIBRARY_DIRS})
++if(FFTW3_THREADS_LIB STREQUAL "FFTW3_THREADS_LIB-NOTFOUND")
++    add_definitions(-Dcimg_use_fftw3_singlethread)
++else()
++    list(APPEND EXTRA_LIBRARIES "-lfftw3_threads")
++endif()
+ 
+ #
+ # CURL
+@@ -187,6 +193,7 @@
+         ${PNG_LIBRARIES}
+         ${FFTW3_LIBRARIES}
+         ${ZLIB_LIBRARIES}
++        ${EXTRA_LIBRARIES}
+ )
+ 
+ if (CURL_FOUND)

diff --git a/media-gfx/gmic/gmic-2.7.1.ebuild b/media-gfx/gmic/gmic-2.7.1.ebuild
index d4bacf38744..bd8a5d1a186 100644
--- a/media-gfx/gmic/gmic-2.7.1.ebuild
+++ b/media-gfx/gmic/gmic-2.7.1.ebuild
@@ -87,7 +87,7 @@ src_prepare() {
 	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 )
+		PATCHES=( "${FILESDIR}"/${PN}-2.7.1-qt-cmake.patch )
 		cmake-utils_src_prepare
 	fi
 }


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2020-11-06 17:18 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2020-11-06 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     3e75f48e522d2e576921c7c6d5082a4124260147
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 16:26:26 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Nov  6 17:16:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e75f48e

media-gfx/gmic: bump to 2.9.2

Includes USE=digikam support by Siuchung Cheung + fix for building under
clang.

Closes: https://bugs.gentoo.org/730932
Closes: https://bugs.gentoo.org/745225
Closes: https://bugs.gentoo.org/746221
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/Manifest                       |   1 +
 media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch |  15 ++
 media-gfx/gmic/gmic-2.9.2.ebuild              | 190 ++++++++++++++++++++++++++
 media-gfx/gmic/metadata.xml                   |   1 +
 4 files changed, 207 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index c36aae8a862..37a45bd8dc3 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,2 +1,3 @@
 DIST gmic_2.9.0.tar.gz 6195597 BLAKE2B 3e1f83aa7e2024c545cab16c15cbd108ecaa33e7b0423c37cbb7e19fc9179280dfb31d819926110f06ff10a8b2b3e22b3c7f6c3e8bdece8b51c7295b8e78a974 SHA512 3b3703520998e5ad547316683158d7b60541a8cea2a7c1e7118f8de88492e0961bf1fe1da360dfb26d0ba7eaf997e7005a864364297db2bb405d532dedc4241d
 DIST gmic_2.9.1.tar.gz 6212626 BLAKE2B cb948987629f9bf07f3e756eb5f90526ac2012a7bd2c11021a3fbc253709d9e62ecd60a2f3a9f9fd9a8605f0f2a73497143c4f121e27d1cb5aa4f3a455916c56 SHA512 dc6a90bb130b50164f7696a2e0c702ee24267f1559f52b77d4040fa0477c452b52eb140263bb3abb49673638246784b356004866e13f6d0660feff759688b45b
+DIST gmic_2.9.2.tar.gz 6639693 BLAKE2B 4b452cc5c82e8ea30a1bd65e51b6187fc12d9c7f8af6d0f8107a8d183c6e87dff11394f103eae7ac17daa00c6c9aa0f47ce78a92156e2da9bc4ee0fcacbf398d SHA512 be8707b5c156b17189548c1f808b976afcb7b7cce20ff54ff4589eda9a76a8cddf81c64b7a53c332254b2c8c29fb8ca0926016cadcb1efb7131a38d857fce796

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
new file mode 100644
index 00000000000..384856a0464
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-2.9.2_ipa-sra.patch
@@ -0,0 +1,15 @@
+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/gmic-2.9.2.ebuild b/media-gfx/gmic/gmic-2.9.2.ebuild
new file mode 100644
index 00000000000..260962b2dc1
--- /dev/null
+++ b/media-gfx/gmic/gmic-2.9.2.ebuild
@@ -0,0 +1,190 @@
+# 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 ~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-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}
+	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"
+		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
+}

diff --git a/media-gfx/gmic/metadata.xml b/media-gfx/gmic/metadata.xml
index aa4cb5a5a51..e2159e098bb 100644
--- a/media-gfx/gmic/metadata.xml
+++ b/media-gfx/gmic/metadata.xml
@@ -4,6 +4,7 @@
 	<!-- maintainer-needed -->
 	<use>
 		<flag name="cli">Build CLI interface</flag>
+		<flag name="digikam">Build <pkg>media-gfx/digikam</pkg> plugin</flag>
 		<flag name="krita">Build <pkg>media-gfx/krita</pkg> plugin</flag>
 		<flag name="opencv">Enable support for webcams using the OpenCV library</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2021-12-12 19:52 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2021-12-12 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     e9d8d87cce54800fade3f2a654ccc4d63256e327
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 12 19:51:30 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sun Dec 12 19:51:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9d8d87c

media-gfx/gmic: add 3.0.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/Manifest                       |   1 +
 media-gfx/gmic/files/gmic-3.0.0_ipa-sra.patch |  16 +++
 media-gfx/gmic/gmic-3.0.0.ebuild              | 172 ++++++++++++++++++++++++++
 3 files changed, 189 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index 88491591cb89..e4cdf89bbb61 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1 +1,2 @@
 DIST gmic_2.9.9.tar.gz 7325061 BLAKE2B 256b4f1180edfc8ebb3a3e7f7666c7b44d95cd36a52c1b5539a355f022471eeef776c77b820864ca05b2ccc4a58a2e85970994cfdbce9e55aff31112af4e6000 SHA512 fcc129f5acfb32a3154d4c987f574c18ad68dd35e9e357fdc391166211747f5d7eed63a2fcde29c110a79e8665f2a6d1e70b68c81e19bb02be43a84ec7f1cc64
+DIST gmic_3.0.0.tar.gz 10225122 BLAKE2B 1066c62c2c56fafbfd11608eb9e3b7c7e9a87b404aae1e7e673e21d9b7b76a599e241f16656786bfa35687f3b3921fcba96368227753105aa25e2fa451962bfa SHA512 89353d16d6304e322400c93bafb50f7557df93c933ed2994f33a17d877e4e12ec511a355b38058680f356bccab5aa84b607fab225354c19d4b8ab3e64424c87c

diff --git a/media-gfx/gmic/files/gmic-3.0.0_ipa-sra.patch b/media-gfx/gmic/files/gmic-3.0.0_ipa-sra.patch
new file mode 100644
index 000000000000..04cfa560f193
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.0.0_ipa-sra.patch
@@ -0,0 +1,16 @@
+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)
+     list(APPEND GMIC_CXX_COMPILE_FLAGS -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-error=c++11-narrowing -Wc++11-extensions -fpermissive)
+ else()
+-    list(APPEND GMIC_CXX_COMPILE_FLAGS -Wno-error=narrowing -fno-ipa-sra -fpermissive)
++    list(APPEND GMIC_CXX_COMPILE_FLAGS -Wno-error=narrowing -fpermissive)
+ endif()
+ 
+ if(NOT "${PRERELEASE_TAG}" STREQUAL "")

diff --git a/media-gfx/gmic/gmic-3.0.0.ebuild b/media-gfx/gmic/gmic-3.0.0.ebuild
new file mode 100644
index 000000000000..8f9fa857f2b0
--- /dev/null
+++ b/media-gfx/gmic/gmic-3.0.0.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2021 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 ~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 tiff X zlib"
+REQUIRED_USE="
+	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: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}
+	gimp? ( dev-qt/linguist-tools )
+	krita? ( dev-qt/linguist-tools )
+	qt5? ( dev-qt/linguist-tools )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.0.0_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 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=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 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 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 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
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2022-02-15 19:51 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-02-15 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     300ac949ce26921799260da56eb99980d3a9ef46
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 21:38:26 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 15 19:50:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=300ac949

media-gfx/gmic: support OpenEXR 3 / imath

Bug: https://bugs.gentoo.org/833158
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gmic/files/gmic-3.0.1-openexr-3-imath.patch    |  28 ++++
 media-gfx/gmic/gmic-3.0.1-r1.ebuild                | 176 +++++++++++++++++++++
 2 files changed, 204 insertions(+)

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..e1eadca4d27c
--- /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
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2022-09-01 14:54 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2022-09-01 14:54 UTC (permalink / raw
  To: gentoo-commits

commit:     dfe1698f7bc522bad72422db6ea40c89048e2f3f
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 14:07:39 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 14:54:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfe1698f

media-gfx/gmic: drop 3.1.5

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/Manifest                            |   1 -
 .../gmic/files/gmic-3.1.5-makefile_automagic.patch | 131 ---------------------
 media-gfx/gmic/gmic-3.1.5.ebuild                   | 107 -----------------
 3 files changed, 239 deletions(-)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index baa4209a704d..12e056f95844 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,2 +1 @@
 DIST gmic_3.0.1.tar.gz 10457923 BLAKE2B b495d10237abf5abe3d7df166119d2fc0b04142975d97db01ab0c5aa177f6e681931799fb392844e5c34d0503874a16d946a7146c5152cca1e64107948c02c03 SHA512 4bc08a3510e8987eea0463bfcf04de6dfd9a8ee8a38c14661ff201b8f563cab1b914dc60dc35b082cb5e868eb6232e2240a2d6703e0751215a82d6709236946a
-DIST gmic_3.1.5.tar.gz 10782647 BLAKE2B 9334f61b4309dec31d5dd0c52b87a97628bfa819602f3bac03cbc74c26a65dc660c0f4ae5c84d2aba5062ebc2869ae3d656e6fc2b2f9c9d0565d07762a920d21 SHA512 7e27856db8b68fde33e50f09a9d07479b67843388a98edc891deab51828d922200af20afee163984e0c7660e46387d1fe514d35ac3e3d9c8ebe02b0aa89cbc96

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
deleted file mode 100644
index 8dbe50d6e194..000000000000
--- a/media-gfx/gmic/files/gmic-3.1.5-makefile_automagic.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-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
deleted file mode 100644
index 4555221810cb..000000000000
--- a/media-gfx/gmic/gmic-3.1.5.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# 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
-"
-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? ( media-libs/libjpeg-turbo:= )
-	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="${DEPEND}
-	ffmpeg? ( media-video/ffmpeg:0= )
-"
-BDEPEND="
-	virtual/pkgconfig
-	gimp? ( dev-qt/linguist-tools:5 )
-	qt5? ( dev-qt/linguist-tools:5 )
-"
-
-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
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2022-09-01 23:22 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2022-09-01 23:22 UTC (permalink / raw
  To: gentoo-commits

commit:     4c8ea9beed8f910f3789e6b10980e3613f6a1f86
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 23:14:49 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 23:14:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c8ea9be

media-gfx/gmic: do not build static libraries

I don't even want to know why upstream has targets for SHARED libraries
generating static libraries as well.

Closes: https://bugs.gentoo.org/867880
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/files/gmic-3.1.6-ar_so.patch | 26 ++++++++++++++++++++++++++
 media-gfx/gmic/gmic-3.1.6.ebuild            |  3 +--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/media-gfx/gmic/files/gmic-3.1.6-ar_so.patch b/media-gfx/gmic/files/gmic-3.1.6-ar_so.patch
new file mode 100644
index 000000000000..007cdfb50de5
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.1.6-ar_so.patch
@@ -0,0 +1,26 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -414,7 +414,6 @@
+ _lib : libgmic.so use_libgmic
+ 
+ libgmic.so: libgmic.o
+-	ar rcs libgmic.a libgmic.o
+ ifeq ($(OS),Darwin)
+ 	$(CXX) -shared -std=c++11 -pedantic -o libgmic.so.$(VERSION) libgmic.o $(LIBS)
+ else
+@@ -508,7 +507,6 @@
+ 	@echo " done!"
+ 
+ libcgmic.so: libcgmic.o
+-	ar rcs libcgmic.a libcgmic.o
+ ifeq ($(OS),Darwin)
+ 	$(CXX) -shared -o libcgmic.so.$(VERSION) libcgmic.o libgmic.o $(LIBS)
+ else
+@@ -558,7 +556,6 @@
+ _libc_static: libcgmic_files libcgmic_static.so use_libcgmic_static
+ 
+ libcgmic_static.so: libcgmic_static.o
+-	ar rcs libcgmic_static.a libcgmic_static.o
+ ifeq ($(OS),Darwin)
+ 	$(CXX) -shared -static -o libcgmic_static.so.$(VERSION) libcgmic_static.o libgmic.o $(PIC) $(CFLAGS) $(LIBS)
+ else

diff --git a/media-gfx/gmic/gmic-3.1.6.ebuild b/media-gfx/gmic/gmic-3.1.6.ebuild
index 06ca0c8a4cc3..1f33517bc284 100644
--- a/media-gfx/gmic/gmic-3.1.6.ebuild
+++ b/media-gfx/gmic/gmic-3.1.6.ebuild
@@ -66,6 +66,7 @@ BDEPEND="
 "
 
 PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.6-ar_so.patch
 	"${FILESDIR}"/${PN}-3.1.6-makefile_automagic.patch
 	"${FILESDIR}"/${PN}-3.1.6-relative_rpath.patch
 )
@@ -100,8 +101,6 @@ gmic_emake() {
 		$@
 }
 
-# FIXME:
-#  - honour user CFLAGS while building C binaries (i.e. 'use_libcgmic')
 src_compile() {
 	gmic_emake lib libc
 	use cli && gmic_emake cli_shared


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2022-11-10 23:26 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2022-11-10 23:26 UTC (permalink / raw
  To: gentoo-commits

commit:     a16ca95eda19f52557b440b134dbc50e9fc7fcfd
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 10 23:25:14 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Nov 10 23:26:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a16ca95e

media-gfx/gmic: strip stray backslashes from grep calls

Since grep-3.8 the string '\ ' no longer matches a space.

Closes: https://bugs.gentoo.org/880339
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/files/gmic-3.1.6-grep38.patch | 27 +++++++++++++++++++++++++++
 media-gfx/gmic/gmic-3.1.6.ebuild             |  1 +
 2 files changed, 28 insertions(+)

diff --git a/media-gfx/gmic/files/gmic-3.1.6-grep38.patch b/media-gfx/gmic/files/gmic-3.1.6-grep38.patch
new file mode 100644
index 000000000000..ec1df70002c3
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.1.6-grep38.patch
@@ -0,0 +1,27 @@
+Starting with version 3.8, grep no longer quietly ignores backslashes
+preceding a white-space character.
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -88,16 +88,16 @@
+ EXE =
+ WGET = wget --no-check-certificate --quiet -O
+ PLUGINDIR = $(shell gimptool-2.0 --gimpplugindir)/plug-ins
+-VERSION = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c3)
+-VERSION1 = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c1)
+-VERSION2 = $(shell grep 'gmic_version\ ' gmic.h | tail -c3 | head -c1)
+-VERSION3 = $(shell grep 'gmic_version\ ' gmic.h | tail -c2 | head -c1)
++VERSION = $(shell grep 'gmic_version ' gmic.h | tail -c4 | head -c3)
++VERSION1 = $(shell grep 'gmic_version ' gmic.h | tail -c4 | head -c1)
++VERSION2 = $(shell grep 'gmic_version ' gmic.h | tail -c3 | head -c1)
++VERSION3 = $(shell grep 'gmic_version ' gmic.h | tail -c2 | head -c1)
+ SVERSION=$(VERSION1).$(VERSION2).$(VERSION3)
+ SRC_PATH=$(shell pwd)
+ 
+ # Check that versions of files 'CImg.h' and 'gmic.h' match.
+ ifneq (,$(wildcard CImg.h))
+-CIMG_VERSION = $(shell grep 'cimg_version\ ' CImg.h | tail -c4 | head -c3)
++CIMG_VERSION = $(shell grep 'cimg_version ' CImg.h | tail -c4 | head -c3)
+ else
+ CIMG_VERSION = $(VERSION)
+ endif

diff --git a/media-gfx/gmic/gmic-3.1.6.ebuild b/media-gfx/gmic/gmic-3.1.6.ebuild
index da836f3b546c..85bb406d8cc0 100644
--- a/media-gfx/gmic/gmic-3.1.6.ebuild
+++ b/media-gfx/gmic/gmic-3.1.6.ebuild
@@ -67,6 +67,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.6-ar_so.patch
+	"${FILESDIR}"/${PN}-3.1.6-grep38.patch
 	"${FILESDIR}"/${PN}-3.1.6-makefile_automagic.patch
 	"${FILESDIR}"/${PN}-3.1.6-relative_rpath.patch
 )


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2023-01-31 23:15 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2023-01-31 23:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ad4a63d56a252db323a2ee72d8581fd20729a88f
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 23:15:04 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 23:15:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad4a63d5

media-gfx/gmic: add 3.2.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/Manifest                            |   1 +
 media-gfx/gmic/files/gmic-3.2.0-grep38.patch       |  27 ++++
 .../gmic/files/gmic-3.2.0-makefile_automagic.patch | 133 ++++++++++++++++++++
 .../gmic/files/gmic-3.2.0-relative_rpath.patch     |  11 ++
 media-gfx/gmic/gmic-3.2.0.ebuild                   | 138 +++++++++++++++++++++
 5 files changed, 310 insertions(+)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index faa5c8711243..26174056ae0b 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,2 +1,3 @@
 DIST gmic_3.0.1.tar.gz 10457923 BLAKE2B b495d10237abf5abe3d7df166119d2fc0b04142975d97db01ab0c5aa177f6e681931799fb392844e5c34d0503874a16d946a7146c5152cca1e64107948c02c03 SHA512 4bc08a3510e8987eea0463bfcf04de6dfd9a8ee8a38c14661ff201b8f563cab1b914dc60dc35b082cb5e868eb6232e2240a2d6703e0751215a82d6709236946a
 DIST gmic_3.1.6.tar.gz 10843311 BLAKE2B c50bcb9bd6c3d7d68a06f72faf0061d22b37c6fa357b40c16963c16a8841dba5ee8cf4509076a6734bb4eedbddfa2870897cb30687715ee6d7d84f2520700c17 SHA512 7d1ab97e8dfdf75b647cb7248eaa153e3ebcd5d1b799c67a6e027a5e2e8746047d348ea8e25485aed615d62f485dd06895fe6234f67a055cab423997b96f9775
+DIST gmic_3.2.0.tar.gz 10933655 BLAKE2B 6b87acb2a356d3d0c00e795d8b66de75acffa1f87b63caf58986ab52730fcd58bb9dfa37caf057ac2ab2a58695dd783c09018305f21d258427d9c1e450d1c14d SHA512 2eccf179e865416ce5a6cc38fd5587fe79fb30cda381ca2bcb1e587f101a55c502422121d4696834bc25b6200aa3c2292ff30947f2704a610f46e61460685f5b

diff --git a/media-gfx/gmic/files/gmic-3.2.0-grep38.patch b/media-gfx/gmic/files/gmic-3.2.0-grep38.patch
new file mode 100644
index 000000000000..e25a809fdeea
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.2.0-grep38.patch
@@ -0,0 +1,27 @@
+Starting with version 3.8, grep no longer quietly ignores backslashes
+preceding a white-space character.
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -89,16 +89,16 @@
+ WGET = wget --no-check-certificate --quiet -O
+ PLUGINDIR = $(shell gimptool-2.0 --gimpplugindir)/plug-ins
+ BASH_COMPLETIONSDIR = $(shell pkg-config --variable completionsdir bash-completion || echo $(PREFIX)/share/bash-completion/completions)
+-VERSION = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c3)
+-VERSION1 = $(shell grep 'gmic_version\ ' gmic.h | tail -c4 | head -c1)
+-VERSION2 = $(shell grep 'gmic_version\ ' gmic.h | tail -c3 | head -c1)
+-VERSION3 = $(shell grep 'gmic_version\ ' gmic.h | tail -c2 | head -c1)
++VERSION = $(shell grep 'gmic_version ' gmic.h | tail -c4 | head -c3)
++VERSION1 = $(shell grep 'gmic_version ' gmic.h | tail -c4 | head -c1)
++VERSION2 = $(shell grep 'gmic_version ' gmic.h | tail -c3 | head -c1)
++VERSION3 = $(shell grep 'gmic_version ' gmic.h | tail -c2 | head -c1)
+ SVERSION=$(VERSION1).$(VERSION2).$(VERSION3)
+ SRC_PATH=$(shell pwd)
+ 
+ # Check that versions of files 'CImg.h' and 'gmic.h' match.
+ ifneq (,$(wildcard CImg.h))
+-CIMG_VERSION = $(shell grep 'cimg_version\ ' CImg.h | tail -c4 | head -c3)
++CIMG_VERSION = $(shell grep 'cimg_version ' CImg.h | tail -c4 | head -c3)
+ else
+ CIMG_VERSION = $(VERSION)
+ endif

diff --git a/media-gfx/gmic/files/gmic-3.2.0-makefile_automagic.patch b/media-gfx/gmic/files/gmic-3.2.0-makefile_automagic.patch
new file mode 100644
index 000000000000..6cab84226e98
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.2.0-makefile_automagic.patch
@@ -0,0 +1,133 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -230,6 +230,7 @@
+ 
+ # Enable parallelization in CImg, using OpenMP.
+ # (http://www.openmp.org/)
++ifeq ($(GMIC_USE_OPENMP),yes)
+ ifdef IS_CLANG
+ OPENMP_CFLAGS = -I/usr/lib/gcc/x86_64-linux-gnu/9/include -Dcimg_use_openmp -fopenmp=libomp
+ OPENMP_LIBS =
+@@ -237,6 +238,7 @@
+ OPENMP_CFLAGS = -fopenmp -Dcimg_use_openmp
+ OPENMP_LIBS = -lgomp
+ endif
++endif
+ 
+ # Enable software debugging.
+ # (Use address sanitizer and thus slows down the code)
+@@ -258,9 +260,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)
+@@ -272,8 +278,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$(PREFIX)/X11R6/lib) -lXext
++endif
+ 
+ # Enable image display, using GDI32 (Windows).
+ GDI32_CFLAGS = -Dcimg_display=2
+@@ -282,8 +290,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)
+@@ -296,56 +306,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$(PREFIX)/$(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$(PREFIX)/$(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/files/gmic-3.2.0-relative_rpath.patch b/media-gfx/gmic/files/gmic-3.2.0-relative_rpath.patch
new file mode 100644
index 000000000000..85db75fbb4c4
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.2.0-relative_rpath.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -188,7 +188,7 @@
+ ifndef NO_SRIPDLIB
+ MANDATORY_CFLAGS += -std=c++11 -pedantic
+ endif
+-MANDATORY_LIBS += -L. -L$(PREFIX)/$(LIB) -Wl,-rpath,.
++MANDATORY_LIBS += -L. -L$(PREFIX)/$(LIB)
+ ifdef IS_GCC
+ MANDATORY_CFLAGS += -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
+ GCC_VER_GTEQ5 = $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 5)

diff --git a/media-gfx/gmic/gmic-3.2.0.ebuild b/media-gfx/gmic/gmic-3.2.0.ebuild
new file mode 100644
index 000000000000..e37b2cb59f90
--- /dev/null
+++ b/media-gfx/gmic/gmic-3.2.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="https://gmic.eu/ https://github.com/GreycLab/gmic"
+SRC_URI="https://gmic.eu/files/source/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+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 )
+"
+
+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
+"
+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:= )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	opencv? ( >=media-libs/opencv-2.3.1a-r1:= )
+	openexr? (
+		dev-libs/imath:=
+		media-libs/openexr:=
+	)
+	png? ( media-libs/libpng:= )
+	qt5? ( ${QT_DEPEND} )
+	tiff? ( media-libs/tiff:= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXext
+	)"
+RDEPEND="${DEPEND}
+	ffmpeg? ( media-video/ffmpeg:= )
+"
+BDEPEND="
+	virtual/pkgconfig
+	gimp? (
+		dev-qt/linguist-tools:5
+		media-gfx/gimp:0/2
+	)
+	qt5? ( dev-qt/linguist-tools:5 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.6-ar_so.patch
+	"${FILESDIR}"/${PN}-3.2.0-grep38.patch
+	"${FILESDIR}"/${PN}-3.2.0-makefile_automagic.patch
+	"${FILESDIR}"/${PN}-3.2.0-relative_rpath.patch
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+gmic_emake() {
+	local mymakeargs=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		STRIP="/bin/true"
+		LIB="$(get_libdir)"
+		OPT_CFLAGS="${CXXFLAGS}"
+		OPT_LIBS="${LDFLAGS}"
+		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"
+	)
+
+	# Possibly unnecessary since 3.2.0, just in case though.
+	tc-is-clang && mymakeargs+=( OPENMP_LIBS="-lomp" )
+
+	emake -j1 -C src \
+		"${mymakeargs[@]}" \
+		$@
+}
+
+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
+}
+
+src_install() {
+	# See below for why this has to name a directory even if USE=-gimp
+	local gimp_plugindir="/deleteme"
+	if use gimp; then
+		if type gimptool &>/dev/null; then
+			gimp_plugindir="$(gimptool --gimpplugindir)/plug-ins"
+		elif type gimptool-2.0 &>/dev/null; then
+			gimp_plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins"
+		elif type gimptool-2.99 &>/dev/null; then
+			gimp_plugindir="$(gimptool-2.99 --gimpplugindir)/plug-ins"
+		else
+			die "Cannot find GIMP plugin directory"
+		fi
+	fi
+
+	gmic_emake DESTDIR="${ED}" PLUGINDIR="${gimp_plugindir}" install
+
+	# Upstream build scripts create PLUGINDIR and write some files to it
+	# regardless of whether the GIMP plug-in has been built or not, or even
+	# when they haven't been able to execute gimptool to get the base path.
+	use gimp || rm -rf "${ED}/${gimp_plugindir}"
+
+	# These are already gzipped in the source tarballs
+	find "${ED}/usr/share/man" -name "*.gz" -exec gunzip {} \; || die
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/
@ 2023-06-10 10:35 Marek Szuba
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Szuba @ 2023-06-10 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     35708a59267472d95a46cf1057fc0c2b7dbab1a8
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 10:24:35 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 10:35:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35708a59

media-gfx/gmic: add 3.2.5, drop 3.2.4

Closes: https://bugs.gentoo.org/907946
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/gmic/Manifest                            |  2 +-
 .../gmic/files/gmic-3.2.5-relative_rpath.patch     | 22 ++++++++++++++++++++++
 .../gmic/{gmic-3.2.4.ebuild => gmic-3.2.5.ebuild}  |  2 +-
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
index b6befc696e45..2e7c54c78759 100644
--- a/media-gfx/gmic/Manifest
+++ b/media-gfx/gmic/Manifest
@@ -1,3 +1,3 @@
 DIST gmic_3.2.0.tar.gz 10933655 BLAKE2B 6b87acb2a356d3d0c00e795d8b66de75acffa1f87b63caf58986ab52730fcd58bb9dfa37caf057ac2ab2a58695dd783c09018305f21d258427d9c1e450d1c14d SHA512 2eccf179e865416ce5a6cc38fd5587fe79fb30cda381ca2bcb1e587f101a55c502422121d4696834bc25b6200aa3c2292ff30947f2704a610f46e61460685f5b
 DIST gmic_3.2.2.tar.gz 11321544 BLAKE2B e6786fdb0342e1dfa62043837fedeea25961b375af5d1dde247be373c0ef3e35a556dc78d6dd09b5b4c4ead3b531e2bb6a7b671a400dc9d477b22f1c6c7da6b9 SHA512 be695107f8cceb94789aaa021ca431ead3e0a7f87533478df0942ea6ad94f81639de8af827bb24fbef1baccc6ded8d41b4f5386ed9ee37704c2483ea7596800e
-DIST gmic_3.2.4.tar.gz 11342611 BLAKE2B f189683e0d12e707c839009449804c9db7b8afc3ff02dd033e0f9b820e889f51f4ae84b0d1e790e836761384778f4da33d79bc7b159484bbf00ec9cf88df92b2 SHA512 0a261d6242b485d7661919c14680f25d7b15d175619d8115077808c5502edb4ed313f37b3b6c6981709751d49bc7df40332aaefc03e626303135a827a5d41daf
+DIST gmic_3.2.5.tar.gz 11352319 BLAKE2B 812e28119bcbe485a7551c7afc89d7efb2a46ba3d9cc31597fddcd4c4ba48fa040827eccd92c1abbef3035c057d432f6b7b783ff9067da8be2806a05902bdf35 SHA512 e453b83201fa7aff7dc193c529c6b81306e94990a03356488abbbe3acdf8eb6b07e12c16e496e9607bcb730258218b3431c489b3fd1434bb31e28727be7eae27

diff --git a/media-gfx/gmic/files/gmic-3.2.5-relative_rpath.patch b/media-gfx/gmic/files/gmic-3.2.5-relative_rpath.patch
new file mode 100644
index 000000000000..113aa57c34c5
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-3.2.5-relative_rpath.patch
@@ -0,0 +1,22 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -188,7 +188,7 @@
+ ifndef NO_SRIPDLIB
+ MANDATORY_CFLAGS += -std=c++11 -pedantic
+ endif
+-MANDATORY_LIBS += -L. -L$(PREFIX)/$(LIB) -Wl,-rpath,.
++MANDATORY_LIBS += -L. -L$(PREFIX)/$(LIB)
+ ifdef IS_GCC
+ MANDATORY_CFLAGS += -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
+ GCC_VER_GTEQ5 = $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 5)
+--- a/gmic-qt/gmic_qt.pro
++++ b/gmic-qt/gmic_qt.pro
+@@ -434,7 +434,7 @@
+ 
+ equals(GMIC_DYNAMIC_LINKING, "on" )|equals(GMIC_DYNAMIC_LINKING, "ON" ) {
+   message(Dynamic linking with libgmic)
+-  LIBS += -Wl,-rpath,. $$GMIC_PATH/libgmic.so
++  LIBS += $$GMIC_PATH/libgmic.so
+ }
+ 
+ equals(GMIC_DYNAMIC_LINKING, "off" )|equals(GMIC_DYNAMIC_LINKING, "OFF" ) {

diff --git a/media-gfx/gmic/gmic-3.2.4.ebuild b/media-gfx/gmic/gmic-3.2.5.ebuild
similarity index 98%
rename from media-gfx/gmic/gmic-3.2.4.ebuild
rename to media-gfx/gmic/gmic-3.2.5.ebuild
index c8691f8d98b3..e49f4fe6fe0d 100644
--- a/media-gfx/gmic/gmic-3.2.4.ebuild
+++ b/media-gfx/gmic/gmic-3.2.5.ebuild
@@ -63,8 +63,8 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.6-ar_so.patch
 	"${FILESDIR}"/${PN}-3.2.0-grep38.patch
-	"${FILESDIR}"/${PN}-3.2.0-relative_rpath.patch
 	"${FILESDIR}"/${PN}-3.2.4-makefile_automagic.patch
+	"${FILESDIR}"/${PN}-3.2.5-relative_rpath.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-06-10 10:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-01 23:22 [gentoo-commits] repo/gentoo:master commit in: media-gfx/gmic/, media-gfx/gmic/files/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2023-06-10 10:35 Marek Szuba
2023-01-31 23:15 Marek Szuba
2022-11-10 23:26 Marek Szuba
2022-09-01 14:54 Marek Szuba
2022-02-15 19:51 Sam James
2021-12-12 19:52 Marek Szuba
2020-11-06 17:18 Marek Szuba
2019-09-04 13:32 Tim Harder
2019-07-02 21:06 Tim Harder
2018-12-30  8:27 Tim Harder
2018-12-30  8:27 Tim Harder
2016-10-29  4:49 Tim Harder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox