Accepting request 603843 from home:gladiac:branches:graphics

- Update to gmic-2.2.2
  * https://discuss.pixls.us/t/release-of-gmic-2-2-0/
- Add patch gmic-qt-2.2.2-Use-HiDPI-icons.patch
- Remove patch gmic-cflags.diff
- Remove patch gmic-docdir.diff
- Remove patch gmic-make-zart.diff
- Remove patch gmic-oldgimp.diff
- Remove patch gmic-openmp.diff
- Remove patch gmic-overflow.diff
- Remove patch gmic-unstrip.diff
- Remove patch gmic-x11opts.diff
- Remove patch gmic-zart-qmake.diff

OBS-URL: https://build.opensuse.org/request/show/603843
OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=9
This commit is contained in:
Marcus Rückert 2018-05-04 00:55:43 +00:00 committed by Git OBS Bridge
parent bb5a24041a
commit adfe824f6c
19 changed files with 24275 additions and 447 deletions

3
cimg-2.2.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:533246dfb6f602755029542aa30616ef039d21e1d6fd79b0a0ac6c016cb10159
size 11037787

3
gmic-2.2.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67db8ebcde5bc538d516432ebde48921987f359129bab8dc58067ebdcfca26de
size 39077835

View File

@ -1,56 +0,0 @@
diff -ru gmic-1.6.8.orig/src/Makefile gmic-1.6.8/src/Makefile
--- gmic-1.6.8.orig/src/Makefile 2015-12-09 13:49:16.000000000 +0100
+++ gmic-1.6.8/src/Makefile 2015-12-21 11:50:21.187411451 +0100
@@ -93,6 +93,7 @@
# Flags that are mandatory to compile 'gmic'.
MANDATORY_CFLAGS = -Dgmic_build -Dcimg_use_zlib -I$(USR)/$(INCLUDE) $(PRERELEASE_CFLAGS)
+MANDATORY_CFLAGS += $(CFLAGS)
MANDATORY_LIBS = -lz
ifndef NO_SRIPDLIB
MANDATORY_CFLAGS += -std=c++11
@@ -119,7 +120,7 @@
# Flags to enable optimizations.
ifeq ($(notdir $(CC)),g++)
-OPT_CFLAGS = -O2 -mtune=generic
+OPT_CFLAGS = -O2 # -mtune=generic
else
ifeq ($(notdir $(CC)),icpc)
OPT_CFLAGS = -fast
@@ -151,12 +152,12 @@
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
# This requires the presence of the X11 include and library files.
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
-X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr
+X11_LIBS = -L/usr/X11R6/$(LIB) -lX11 -lpthread #-lXrandr
# Flags to enable fast display, using XShm.
# This requires the presence of the X11 extension include and library files.
XSHM_CFLAGS = -Dcimg_use_xshm
-XSHM_LIBS = -L$(USR)/X11R6/lib -lXext
+XSHM_LIBS = -L$(USR)/X11R6/$(LIB) -lXext
# Flags to enable image display, using GDI32.
# This requires the presence of the GDI32 include and library files.
@@ -244,7 +245,8 @@
# CLI interface: Static build.
#-----------------------------
-STATIC_CLI_PATH = $(USR)/${LIB}/x86_64-linux-gnu
+#STATIC_CLI_PATH = $(USR)/${LIB}/x86_64-linux-gnu
+STATIC_CLI_PATH = $(USR)/${LIB}
STATIC_CLI_EXTRA =
STATIC_CLI_CFLAGS = $(MANDATORY_CFLAGS) $(CIMG_ABORT_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0
STATIC_CLI_LIBS = $(PARALLEL_LIBS) \
@@ -291,7 +293,7 @@
# G'MIC Online interface: Standard build.
#----------------------------------------
STD_GMICOL_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0
-STD_GMICOL_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) /usr/lib/x86_64-linux-gnu/libfftw3.a /usr/lib/x86_64-linux-gnu/libfftw3_threads.a
+STD_GMICOL_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) $(USR)/$(LIB)/libfftw3.a $(USR)/$(LIB)/libfftw3_threads.a
#--------------------------
# Define Makefile entries.
Only in gmic-1.6.8/src: Makefile.orig
Only in gmic-1.6.8/src: Makefile.rej

View File

@ -1,20 +0,0 @@
diff -ru gmic-1.6.8.orig/src/Makefile gmic-1.6.8/src/Makefile
--- gmic-1.6.8.orig/src/Makefile 2015-12-09 13:49:16.000000000 +0100
+++ gmic-1.6.8/src/Makefile 2015-12-21 11:55:14.917445432 +0100
@@ -71,6 +71,7 @@
PLUGINDIR = `gimptool-2.0 --gimpplugindir`/plug-ins
USR = /usr
WGET = wget --quiet -O
+DOCDIR=$(USR)/share/doc
endif
ifeq ($(OSTYPE),msys)
EXE = .exe
@@ -480,7 +483,7 @@
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.8
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so
- rm -rf $(DESTDIR)$(USR)/share/doc/gmic/
+ rm -rf $(DESTDIR)$(DOCDIR)/gmic/
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz

View File

@ -1,17 +0,0 @@
Index: gmic-1.6.5.0/src/Makefile
===================================================================
--- gmic-1.6.5.0.orig/src/Makefile
+++ gmic-1.6.5.0/src/Makefile
@@ -436,8 +436,12 @@ endif
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi
if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi
+install-zart: zart
+ mkdir -p $(DESTDIR)$(USR)/share/zart
+ cp -f ../zart/zart $(DESTDIR)$(USR)/bin/zart
+
uninstall:
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic
rm -f $(DESTDIR)$(USR)/$(BIN)/zart
rm -f $(DESTDIR)$(USR)/$(INCLUDE)/gmic.h

View File

@ -1,14 +0,0 @@
--- gmic_newgimp/src/gmic_gimp.cpp 2015-06-24 14:20:53.000000000 +0200
+++ gmic-1.6.5.0/src/gmic_gimp.cpp 2015-07-06 17:41:59.842681265 +0200
@@ -60,6 +60,11 @@
#define gmic_pixel_type float
#endif
+#if GIMP_MINOR_VERSION<=6
+#define gimp_item_get_name gimp_drawable_get_name
+#define gimp_item_set_name gimp_drawable_set_name
+#endif
+
using namespace cimg_library;
// Define plug-in global variables.

View File

@ -1,15 +0,0 @@
diff -ru gmic-1.6.8.orig3/src/Makefile gmic-1.6.8/src/Makefile
--- gmic-1.6.8.orig3/src/Makefile 2015-12-21 12:24:21.000000000 +0100
+++ gmic-1.6.8/src/Makefile 2015-12-21 12:30:42.152075848 +0100
@@ -145,9 +145,11 @@
# (may slow down the code a little bit).
CIMG_ABORT_CFLAGS = -Dcimg_use_abort
+ifndef NO_OPENMP
# Flags to enable parallelization using OpenMP.
OPENMP_CFLAGS = -fopenmp -Dcimg_use_openmp
OPENMP_LIBS = -lgomp
+endif
# Flags to enable image display, using X11
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).

View File

@ -1,26 +0,0 @@
Index: gmic-1.6.5.0/src/CImg.h
===================================================================
--- gmic-1.6.5.0.orig/src/CImg.h
+++ gmic-1.6.5.0/src/CImg.h
@@ -49065,9 +49065,9 @@ namespace cimg_library_suffixed {
filename?filename:"(FILE*)");
#endif
std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
- if (std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else std::fprintf(nfile,"%u %s %s_endian\n",_width,ptype,etype);
cimglist_for(*this,l) {
const CImg<T>& img = _data[l];
std::fprintf(nfile,"%u %u %u %u",img._width,img._height,img._depth,img._spectrum);
@@ -49615,9 +49615,9 @@ namespace cimg_library_suffixed {
#endif
CImgList<ucharT> stream;
CImg<charT> tmpstr(128);
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
- if (std::strstr(ptype,"unsigned")==ptype)
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype)
cimg_snprintf(tmpstr,tmpstr._width,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else
cimg_snprintf(tmpstr,tmpstr._width,"%u %s %s_endian\n",_width,ptype,etype);
CImg<ucharT>::string(tmpstr,false).move_to(stream);

View File

@ -0,0 +1,42 @@
From eb84a3c567fe42f3e8d409d765450f4a436020b5 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Thu, 3 May 2018 22:19:38 +0200
Subject: [PATCH] Use HiDPI icons
---
src/gmic_qt.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gmic_qt.cpp b/src/gmic_qt.cpp
index 53b86fa..653615f 100644
--- a/src/gmic_qt.cpp
+++ b/src/gmic_qt.cpp
@@ -64,6 +64,7 @@ int launchPlugin()
#ifdef _IS_WINDOWS_
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
#endif
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(dummy_argc, dummy_argv);
app.setWindowIcon(QIcon(":resources/gmic_hat.png"));
@@ -99,6 +100,8 @@ int launchPluginHeadlessUsingLastParameters()
#ifdef _IS_WINDOWS_
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
#endif
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
QApplication app(dummy_argc, dummy_argv);
app.setWindowIcon(QIcon(":resources/gmic_hat.png"));
QCoreApplication::setOrganizationName(GMIC_QT_ORGANISATION_NAME);
@@ -123,6 +126,8 @@ int launchPluginHeadless(const char * command, GmicQt::InputMode input, GmicQt::
#ifdef _IS_WINDOWS_
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
#endif
+ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
QCoreApplication app(dummy_argc, dummy_argv);
QCoreApplication::setOrganizationName(GMIC_QT_ORGANISATION_NAME);
QCoreApplication::setOrganizationDomain(GMIC_QT_ORGANISATION_DOMAIN);
--
2.16.3

3
gmic-qt-2.2.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13bb8e3207af1e6aac0b3c2694e8bb212bb14e574c5fa9d6d2899966d1ee835f
size 519569

View File

@ -1,13 +0,0 @@
diff -ru gmic-1.6.8.orig.zart/src/Makefile gmic-1.6.8.orig.zart2/src/Makefile
--- gmic-1.6.8.orig.zart/src/Makefile 2015-12-21 12:53:02.221328809 +0100
+++ gmic-1.6.8.orig.zart2/src/Makefile 2015-12-21 12:55:39.754415197 +0100
@@ -81,7 +81,8 @@
ifdef NOSTRIP
STRIP=echo skip strip
else
-STRIP=strip
+#STRIP=strip
+STRIP=strip -S
endif
QMAKE=qmake

View File

@ -1,36 +0,0 @@
diff -ru gmic-1.6.8.orig2/src/Makefile gmic-1.6.8/src/Makefile
--- gmic-1.6.8.orig2/src/Makefile 2015-12-21 12:22:46.000000000 +0100
+++ gmic-1.6.8/src/Makefile 2015-12-21 12:24:21.301442314 +0100
@@ -152,8 +152,8 @@
# Flags to enable image display, using X11
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
# This requires the presence of the X11 include and library files.
-X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
-X11_LIBS = -L/usr/X11R6/$(LIB) -lX11 -lpthread #-lXrandr
+X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include -Dcimg_use_xrandr
+X11_LIBS = -L/usr/X11R6/$(LIB) -lX11 -lpthread -lXrandr
# Flags to enable fast display, using XShm.
# This requires the presence of the X11 extension include and library files.
@@ -232,8 +232,8 @@
STD_CLI_CFLAGS = $(MANDATORY_CFLAGS) $(CIMG_ABORT_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(CURL_CFLAGS) $(FFTW_CFLAGS)
STD_CLI_LIBS = $(MANDATORY_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(CURL_LIBS) $(FFTW_LIBS)
ifeq ($(OS),Unix) # Unix.
-STD_CLI_CFLAGS += $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(EXR_CFLAGS) $(OPENCV_CFLAGS) # $(XSHM_CFLAGS) $(MAGICK_CFLAGS)
-STD_CLI_LIBS += $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(EXR_LIBS) $(OPENCV_LIBS) # $(XSHM_LIBS) # $(MAGICK_LIBS)
+STD_CLI_CFLAGS += $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(EXR_CFLAGS) $(OPENCV_CFLAGS) # $(MAGICK_CFLAGS)
+STD_CLI_LIBS += $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(XSHM_LIBS) $(EXR_LIBS) $(OPENCV_LIBS) # $(MAGICK_LIBS)
else
ifeq ($(OS),Darwin) # MacOSX.
STD_CLI_CFLAGS += $(PARALLEL_CFLAGS) $(X11_CFLAGS) $(EXR_CFLAGS)
@@ -262,8 +262,8 @@
STD_GIMP_CFLAGS = $(MANDATORY_CFLAGS) $(CIMG_ABORT_CFLAGS) $(PNG_CFLAGS) $(CURL_CFLAGS) $(FFTW_CFLAGS) -Dcimg_use_rng
STD_GIMP_LIBS = $(MANDATORY_LIBS) $(PNG_LIBS) $(CURL_LIBS) $(FFTW_LIBS)
ifeq ($(OS),Unix) # Unix.
-STD_GIMP_CFLAGS += $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS)
-STD_GIMP_LIBS += $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS)
+STD_GIMP_CFLAGS += $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS)
+STD_GIMP_LIBS += $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(XSHM_LIBS)
else
ifeq ($(OS),Darwin) # MaxOSX.
STD_GIMP_CFLAGS += $(PARALLEL_CFLAGS) $(X11_CFLAGS)

View File

@ -1,23 +0,0 @@
diff -ru gmic-1.6.8.orig/src/Makefile gmic-1.6.8.orig.zart/src/Makefile
--- gmic-1.6.8.orig/src/Makefile 2015-12-09 13:49:16.000000000 +0100
+++ gmic-1.6.8.orig.zart/src/Makefile 2015-12-21 12:53:02.221328809 +0100
@@ -83,6 +83,7 @@
else
STRIP=strip
endif
+QMAKE=qmake
#----------------------------------
# Define flags to customize builds.
@@ -341,9 +342,9 @@
zart:
ifeq ($(OS),Darwin)
- cd ../zart && qmake zart.pro && $(MAKE) && $(STRIP) zart.app/Contents/MacOS/zart
+ cd ../zart && $(QMAKE) zart.pro && $(MAKE) && $(STRIP) zart.app/Contents/MacOS/zart
else
- cd ../zart && qmake zart.pro && $(MAKE) && $(STRIP) zart
+ cd ../zart && $(QMAKE) zart.pro && $(MAKE) && $(STRIP) zart
endif
# Internal rules to build compilation modules.

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Thu May 3 17:33:29 UTC 2018 - asn@cryptomilk.org
- Update to gmic-2.2.2
* https://discuss.pixls.us/t/release-of-gmic-2-2-0/
- Add patch gmic-qt-2.2.2-Use-HiDPI-icons.patch
- Remove patch gmic-cflags.diff
- Remove patch gmic-docdir.diff
- Remove patch gmic-make-zart.diff
- Remove patch gmic-oldgimp.diff
- Remove patch gmic-openmp.diff
- Remove patch gmic-overflow.diff
- Remove patch gmic-unstrip.diff
- Remove patch gmic-x11opts.diff
- Remove patch gmic-zart-qmake.diff
-------------------------------------------------------------------
Mon Dec 21 11:48:48 UTC 2015 - msvec@suse.com

418
gmic.spec
View File

@ -15,108 +15,92 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# Detect SLES12
%if 0%{?suse_version} == 1315
%define no_opencv 1
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1110
%define no_opencv 1
%else
%define no_opencv 0
%endif
%endif
%global _gimpplugindir %(gimptool-2.0 --gimpplugindir)/plug-ins
%global zart_version 20180503git34f7e48
# The macro make_jobs gets overwritten by macros.qt5 => ninja doesn't work
#define __builder ninja
Name: gmic
Version: 1.6.8
Version: 2.2.2
Release: 0
Group: Productivity/Graphics/Bitmap Editors
URL: http://gmic.sourceforge.net/
Packager: kurt@garloff.de
Source: %{name}_%{version}.tar.bz2
Source1: http://gmic.eu/gmic_reference.pdf
Patch1: gmic-cflags.diff
Patch2: gmic-docdir.diff
Patch3: gmic-overflow.diff
Patch10: gmic-x11opts.diff
Patch11: gmic-openmp.diff
Patch15: gmic-oldgimp.diff
Patch20: gmic-zart-qmake.diff
Patch21: gmic-make-zart.diff
Patch31: gmic-unstrip.diff
URL: https://gmic.eu
Source0: https://github.com/dtschump/gmic/archive/v.%{version}/gmic-%{version}.tar.gz
Source1: https://github.com/c-koi/gmic-qt/archive/v.%{version}/gmic-qt-%{version}.tar.gz
Source2: https://github.com/dtschump/CImg/archive/v.%{version}/cimg-%{version}.tar.gz
# GIT archive snapshot of https://github.com/c-koi/zart
Source3: zart-%{zart_version}.tar.gz
# Copy of http://gmic.eu/gmic_stdlib.h
Source4: https://gmic.eu/gmic_stdlib.h
Source10: http://gmic.eu/gmic_reference.pdf
Patch0: gmic-qt-2.2.2-Use-HiDPI-icons.patch
Summary: GREYC's Magick for Image Computing (denoise and others)
License: CECILL v.2.0 (GPL compatible)
Prefix: /usr
Group: Productivity/Graphics/Bitmap Editors
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: procps
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: dos2unix
BuildRequires: OpenEXR-devel
BuildRequires: libqt4-devel
BuildRequires: libcurl-devel
%if 0%{?suse_version} >= 1110
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: fftw3-devel
BuildRequires: fftw3-threads-devel
%if 0%{?no_opencv} == 0
BuildRequires: opencv-devel
BuildRequires: libjasper1
%endif
#BuildRequires:cuGraphicsMagick-devel
%else
%if 0%{?fedora_version} > 16
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: opencv-devel
BuildRequires: jasper-libs
#BuildRequires: fftw-libs-threads
%else
%if 0%{?mandriva_version} > 0
BuildRequires: libtiff-devel
%endif
%endif
%endif
BuildRequires: gcc-c++
BuildRequires: gimp-devel
BuildRequires: libGraphicsMagick++-devel
BuildRequires: libcurl-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libqt5-linguist-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
BuildRequires: ninja
BuildRequires: opencv-devel
%description
G'MIC is an open and full-featured framework for image processing, providing several different user interfaces to convert/manipulate/filter/visualize generic image datasets, from 1d scalar signals to 3d+t sequences of multi-spectral volumetric images. Technically speaking, what it does is:
G'MIC is an open and full-featured framework for image processing, providing
several different user interfaces to convert/manipulate/filter/visualize
generic image datasets, from 1d scalar signals to 3d+t sequences of
multi-spectral volumetric images. Technically speaking, what it does is:
Define a lightweight but powerful script language (the G'MIC language) dedicated to the design of image processing operators and pipelines.
* Define a lightweight but powerful script language (the G'MIC language)
dedicated to the design of image processing operators and pipelines.
Provide several user interfaces embedding the corresponding interpreter:
* Provide several user interfaces embedding the corresponding interpreter:
- A command-line executable gmic, to use the G'MIC framework from a shell.
In this setting, G'MIC may be seen as a serious (and friendly) competitor
of the ImageMagick or GraphicsMagick software suites.
- A gimp plug-in, to bring G'MIC capabilities to the GIMP image retouching
software. (gimp-plugin-gmic)
- A krita plug-in, to bring G'MIC capabilities to the krita digital painting
software. (krita-plugin-gmic)
- A web service G'MIC Online, to allow users applying image processing
algorithms directly in a web browser.
- A Qt-based interface ZArt, for real-time mainpulation of webcam images.
(gmic-zart)
- A C++ library libgmic, to be linked to third-party applications.
(libgmic1, gmic-devel)
A command-line executable gmic, to use the G'MIC framework from a shell.
In this setting, G'MIC may be seen as a serious (and friendly) competitor of the ImageMagick or GraphicsMagick software suites.
G'MIC is focused on the design of possibly complex pipelines for converting,
manipulating, filtering and visualizing generic 1d/2d/3d multi-spectral image
datasets. This includes of course color images, but also more complex data as
image sequences or 3d(+t) volumetric float-valued datasets.
A plug-in gmic_gimp, to bring G'MIC capabilities to the GIMP image retouching software. (gmic-gimp)
G'MIC is an open framework: the default language can be extended with custom
G'MIC-written commands, defining thus new available image filters or effects.
By the way, G'MIC already contains a substantial set of pre-defined image
processing algorithms and pipelines (more than 1000).
A web service G'MIC Online, to allow users applying image processing algorithms directly in a web browser.
A Qt-based interface ZArt, for real-time mainpulation of webcam images. (gmic-zart)
A C++ library libgmic, to be linked to third-party applications. (libgmic1, gmic-devel)
G'MIC is focused on the design of possibly complex pipelines for converting, manipulating, filtering and visualizing generic 1d/2d/3d multi-spectral image datasets. This includes of course color images, but also more complex data as image sequences or 3d(+t) volumetric float-valued datasets.
G'MIC is an open framework: the default language can be extended with custom G'MIC-written commands, defining thus new available image filters or effects. By the way, G'MIC already contains a substantial set of pre-defined image processing algorithms and pipelines (more than 1000).
G'MIC has been designed with portability in mind and runs on different platforms (Windows, Unix, MacOSX). It is distributed under the CeCILL license (GPL-compatible). Since 2008, it is developed in the Image Team of the GREYC laboratory, in Caen/France, by permanent researchers working in the field of image processing on a daily basis.
G'MIC has been designed with portability in mind and runs on different
platforms (Windows, Unix, MacOSX). It is distributed under the CeCILL license
(GPL-compatible). Since 2008, it is developed in the Image Team of the GREYC
laboratory, in Caen/France, by permanent researchers working in the field of
image processing on a daily basis.
G'MIC has superior denoising and sharpening capabilities.
Authors
-------
David Tschumperle ( http://www.greyc.ensicaen.fr/~dtschump/ ) (source code)
Claude Bulin ( http://www.xcfa.tuxfamily.org/ ) (packaging)
Angelo Lama ( historical developper of EKD : http://ekd.tuxfamily.org,
post-prod software for videos and images) (testing)
Stephane de la Linuxerie (http://linuxerie.midiblogs.com and http://polariscorp.free.fr) (design & gimp plug-in)
Jerome Ferrari (testing)
GREYC Image / CNRS UMR 6072 / FRANCE
Team web page : http://www.greyc.ensicaen.fr/EquipeImage/
%package -n libgmic1
Summary: Shared library that belongs to gmic
Group: Productivity/Graphics/Bitmap Editors
@ -134,23 +118,24 @@ programs.
Header and library from gmic to needed to develop C++ code that
uses the gmic functionality provided by the gmic library.
%package gimp
%package -n gimp-plugin-gmic
Summary: GMIC plugin for gimp
Group: Productivity/Graphics/Bitmap Editors
Requires: gimp
Obsoletes: gmic-gimp
Provides: gmic-gimp
%description gimp
%description -n gimp-plugin-gmic
This is a plugin for gimp that exposes many of the nice gmic features
for interactive use in gimp.
%if 0%{?no_opencv} == 0
%package zart
Summary: Real-time web cam video stream manipulation
Group: Productivity/Graphics/Bitmap editors
%package -n krita-plugin-gmic
Summary: GMIC plugin for krita
Group: Productivity/Graphics/Bitmap Editors
Requires: krita
%description zart
This program allows you to capture video from a web cam and apply
(real time) gmic image manipulations on the video stream.
%endif
%description -n krita-plugin-gmic
This is a plugin for krita to provide gmic features.
%package doc
Summary: GMIC reference documentation
@ -160,108 +145,102 @@ License: GFDL-v1.3
%description doc
This is the reference documentation for G'MIC in .pdf format.
%package zart
Summary: GMIC GUI for video streams
Group: Productivity/Graphics/Bitmap editors
%description zart
ZArt is a computer program whose purpose is to demonstrate the possibilities of
the G'MIC image processing language by offering the choice of several
manipulations on a video stream acquired from a webcam. In other words, ZArt is
a GUI for G'MIC real-time manipulations on the output of a webcam.
%prep
%setup
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch10 -p1
%patch11 -p1
%if 0%{?suse_version} <= 1120
%patch15 -p1
%endif
# More gmic features ... opencv
%if 0%{?no_opencv} == 0
#%patch15 -p1
%endif
#%patch17 -p1
%patch20 -p1
%patch21 -p1
%patch31 -p1
# Remove build time references so build-compare can do its work
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" src/CImg.h
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" src/CImg.h
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" src/gmic.cpp
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" src/gmic.cpp
# Replacement for documentation that was formerly included
echo -e "<HTML>\n<Head><Title>G'MIC documentation</Title></Head>" > index.html
echo -e "<Body><H1>G'MIC documentation links</H1>\n<ul>" >> index.html
echo -e "<li><A HRef=\"http://gmic.sourceforge.net/reference.shtml\">Reference documentation</A></li>" >> index.html
echo -e "<li><A HRef=\"../gmic-doc/gmic_reference.pdf\">Reference doc (PDF)</A> (local copy, if gmic-doc is installed)</li>" >> index.html
echo -e "<li><A HRef=\"http://gmic.sourceforge.net/tutorial.shtml\">Tutorial</A></li>" >> index.html
echo -e "<li><A HRef=\"https://www.flickr.com/groups/gmic/discuss/72157625021897552/\">What can I do with G'MIC?</A> (Tutorial list on flickr)</li>" >> index.html
echo -e "<li><A HRef=\"README\">README file</A> (local)</li>" >> index.html
echo -e "</ul>\n</Body>\n</HTML>" >> index.html
mv zart/README zart/README.zart
cp -p %{SOURCE1} .
%setup -a 1 -a 2 -a 3 -n %{name}-v.%{version}
ln -s gmic-qt-v.%{version} gmic-qt
ln -s CImg-v.%{version} cimg
cp cimg/CImg.h src/CImg.h
cp %{SOURCE4} src/gmic_stdlib.h
cp %{SOURCE10} .
pushd gmic-qt
%patch0 -p1
popd
%build
GCCVER=`gcc -v 2>&1 | tail -n1 | sed -e 's/^gcc version \([^ ]*\) .*$/\1/' -e 's/\.//g'`
if test $GCCVER -ge 480 -a $GCCVER -le 482; then MAKEFLAGS="NO_OPENMP=1"; fi
if test $GCCVER -le 445; then sed -i 's/\-std=c++11//' src/Makefile; fi
if test $GCCVER -le 440; then MAKEFLAGS="NO_OPENMP=1"; fi
# Limit parallel build to avoid overloading machines
free -m
MEM=`free -m | grep '^Mem:' | sed 's/^Mem: *\([0-9]*\).*$/\1/'`
# x86(-64) needs 0.6GB per gmic_XXX except gmic_float (main) with 1 GB
MAXJOBS=$((($MEM-300)/540))
echo "Limiting Jobs %jobs -> $MAXJOBS"
if test -n "%jobs" -a $MAXJOBS -gt 1; then
if test %jobs -gt $MAXJOBS; then
JOBS="-j$MAXJOBS"
else
JOBS="-j%jobs"
fi
else
JOBS=""
fi
cd src
%if 0%{?fedora_version} > 16
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} QMAKE=qmake-qt4 cli
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} QMAKE=qmake-qt4 gimp lib
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} QMAKE=qmake-qt4 zart
%else
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} cli
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} gimp lib
%if 0%{?no_opencv} == 0
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} zart
%endif
%endif
#make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" gimp
free -m
# Build gmic
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DBUILD_LIB_STATIC=OFF \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
# Create link for zart dynamic linking
ln -s ../build/libgmic.so src/libgmic.so
# Build gmic{_gimp|_krita}_qt
pushd gmic-qt
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-v.%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-v.%{version}/build \
-DGMIC_QT_HOST=gimp \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-v.%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-v.%{version}/build \
-DGMIC_QT_HOST=krita \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-v.%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-v.%{version}/build \
-DGMIC_QT_HOST=none \
|| cat CMakeFiles/CMakeError.log
%make_jobs
popd
# Build zart
pushd zart
qmake-qt5 CONFIG+=release GMIC_DYNAMIC_LINKING=on GMIC_PATH=%{_builddir}/%{name}-v.%{version}/src zart.pro
make %{?_smp_mflags}
popd
%install
mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/gimp/2.0/plug-ins/
cd src
make install DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib}
#ln -s libgmic.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libgmic.so
%if 0%{?fedora_version} > 16
make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib} QMAKE=qmake-qt4
%else
%if 0%{?no_opencv} == 0
make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib}
%endif
%endif
#mkdir -p $RPM_BUILD_ROOT%{_docdir}/gmic/html
#for name in images res js slides thumbs; do
# cp -ax html/$name $RPM_BUILD_ROOT%{_docdir}/gmic/html/
#done
#for name in README AUTHORS ChangeLog COPYING; do
# cp -p $name $RPM_BUILD_ROOT%{_docdir}/gmic/
#done
strip -S $RPM_BUILD_ROOT/usr/bin/gmic
strip -S $RPM_BUILD_ROOT/usr/%{_lib}/gimp/2.0/plug-ins/gmic_gimp
# ZART
%if 0%{?no_opencv} == 0
strip -S $RPM_BUILD_ROOT/usr/bin/zart
%endif
# Duplicate man page ...
rm $RPM_BUILD_ROOT/%{_mandir}/fr/man1/gmic.1.gz
# Reference manual
#install -d $RPM_BUILD_ROOT/%{_docdir}/gmic
#install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_docdir}/gmic/
%cmake_install
install -d -m 0755 %{buildroot}%{_sysconfdir}/bash_completion.d
install -m 0644 build/resources/gmic_bashcompletion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/gmic
# Film color lookup tables
install -d -m 0755 %{buildroot}%{_gimpplugindir}
install -m 0644 resources/gmic_film_cluts.gmz %{buildroot}%{_gimpplugindir}/gmic_film_cluts.gmz
# qt_gmic
pushd gmic-qt
install -m 0755 build/gmic_qt %{buildroot}%{_bindir}/gmic_qt
# krita plugin
install -m 0755 build/gmic_krita_qt %{buildroot}%{_bindir}/gmic_krita_qt
# gimp plugin
install -d -m 0755 %{buildroot}%{_gimpplugindir}
install -m 0755 build/gmic_gimp_qt %{buildroot}%{_gimpplugindir}/gmic_gimp_qt
popd
# zart
pushd zart
install -m 0755 zart %{buildroot}%{_bindir}/zart
popd
%post -n libgmic1
%{run_ldconfig}
@ -271,42 +250,37 @@ rm $RPM_BUILD_ROOT/%{_mandir}/fr/man1/gmic.1.gz
%files
%defattr(-,root,root)
/usr/bin/gmic
%if 0%{?mandriva_version} == 0
#%{_mandir}/fr/man1/gmic.1.gz
%{_mandir}/man1/gmic.1.gz
%else
#%{_mandir}/fr/man1/gmic.1.lzma
%{_mandir}/man1/gmic.1.lzma
%endif
#%dir %{_docdir}/gmic
#%doc README COPYING AUTHORS index.html
%doc README COPYING index.html
%doc README COPYING
%{_bindir}/gmic
%{_bindir}/gmic_qt
%{_mandir}/man1/gmic.1*
%config %attr(0644,root,root) /etc/bash_completion.d/gmic
%if 0%{?no_opencv} == 0
%files zart
%defattr(-,root,root)
/usr/bin/zart
%doc zart/Licence_CeCILL_V2-en.html zart/README.zart
%endif
%files gimp
%defattr(-,root,root)
/usr/%{_lib}/gimp/2.0/plug-ins/gmic_gimp
%files -n libgmic1
%defattr(-,root,root)
%{_libdir}/libgmic.so.1*
%files -n libgmic-devel
%defattr(-,root,root)
/usr/include/gmic.h
%{_libdir}/libgmic.so
%files doc
%defattr(-,root,root)
#%dir %{_docdir}/gmic
%doc gmic_reference.pdf
%files zart
%defattr(-,root,root)
%doc zart/README zart/LICENSE
%{_bindir}/zart
%files -n gimp-plugin-gmic
%defattr(-,root,root)
%{_gimpplugindir}/gmic_gimp_qt
%{_gimpplugindir}/gmic_film_cluts.gmz
%files -n krita-plugin-gmic
%defattr(-,root,root)
%{_bindir}/gmic_krita_qt
%files -n libgmic1
%defattr(-,root,root)
%{_libdir}/libgmic.so.*
%files -n libgmic-devel
%defattr(-,root,root)
%{_includedir}/gmic.h
%{_libdir}/libgmic.so
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d7e44a36b70bc5d462436f2d0c8cc7902b01454e42509d9d591a45ac3b95458
size 2638619

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e368d2491f050990b1c35169ef657812c43d3944f6220567f2434bd710963bf
size 25661970
oid sha256:988c6fff02a8105c89d9b3a9dda2c658645570537f6115683c3ea22321bdb28d
size 35833761

24007
gmic_stdlib.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c3617895b4436aadcfdd934829de3b491b047eab6dd94e353cae9b5af7a7288
size 285407