Rebuild for opencv 4.7.0
This commit is contained in:
parent
d578427735
commit
8d0001f753
@ -1,26 +1,28 @@
|
||||
--- ./src/Makefile.old 2022-11-08 03:18:08.964802055 +0000
|
||||
+++ ./src/Makefile 2022-11-08 03:18:12.482790804 +0000
|
||||
@@ -80,14 +80,15 @@
|
||||
From 7ad9c03f1a6933ad0125105f62ffbe2e5d4ca584 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Sat, 3 Sep 2022 20:18:14 +0200
|
||||
Subject: [PATCH 1/3] Makefile: Rename USR variable to PREFIX
|
||||
|
||||
Call it prefix as this is what almost all other build systems use for
|
||||
choosing the install location.
|
||||
---
|
||||
src/Makefile | 126 +++++++++++++++++++++++++--------------------------
|
||||
1 file changed, 63 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 69f0ebb61..f62ce47aa 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
# Try to auto-detect target OS.
|
||||
OS = $(shell uname)
|
||||
-USR = /usr
|
||||
-LIB = lib
|
||||
-BIN = bin
|
||||
-INCLUDE = include
|
||||
+PREFIX ?= /usr
|
||||
+LIB ?= lib
|
||||
+BIN ?= bin
|
||||
+INCLUDE ?= include
|
||||
PIC = -fPIC
|
||||
EXE =
|
||||
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)
|
||||
@@ -120,12 +121,12 @@ endif
|
||||
+PREFIX = /usr
|
||||
LIB = lib
|
||||
BIN = bin
|
||||
INCLUDE = include
|
||||
@@ -120,12 +120,12 @@ endif
|
||||
|
||||
ifeq ($(OS),FreeBSD)
|
||||
OS = Unix
|
||||
@ -35,7 +37,7 @@
|
||||
endif
|
||||
|
||||
ifeq ($(OS),NetBSD)
|
||||
@@ -134,15 +135,15 @@ endif
|
||||
@@ -134,15 +134,15 @@ endif
|
||||
|
||||
ifneq (,$(findstring MINGW,$(OS)))
|
||||
OS = Windows
|
||||
@ -54,8 +56,8 @@
|
||||
endif
|
||||
WGET = curl -k -L --silent -o
|
||||
endif
|
||||
@@ -181,13 +182,13 @@ NO_PRERELEASE = $(shell date +%y%m%d)
|
||||
NO_PRERELEASE_CFLAGS = -Dgmic_prerelease="\\\"$(PRERELEASE)\\\""
|
||||
@@ -181,13 +181,13 @@ PRERELEASE = $(shell date +%y%m%d)
|
||||
PRERELEASE_CFLAGS = -Dgmic_prerelease="\\\"$(PRERELEASE)\\\""
|
||||
|
||||
# Minimal set of flags mandatory to compile G'MIC.
|
||||
-MANDATORY_CFLAGS = -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib || echo -I$(USR)/$(INCLUDE)) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
|
||||
@ -70,7 +72,7 @@
|
||||
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)
|
||||
@@ -264,7 +265,7 @@ endif
|
||||
@@ -264,7 +264,7 @@ endif
|
||||
# Enable faster X11 display, using XShm extension.
|
||||
# (ftp://www.x.org/pub/X11R7.7/doc/man/man3/XShm.3.xhtml)
|
||||
XSHM_CFLAGS = -Dcimg_use_xshm $(shell pkg-config --cflags xcb-shm)
|
||||
@ -79,7 +81,7 @@
|
||||
|
||||
# Enable image display, using GDI32 (Windows).
|
||||
GDI32_CFLAGS = -Dcimg_display=2
|
||||
@@ -317,12 +318,12 @@ OPENCV_LIBS = $(shell pkg-config opencv
|
||||
@@ -317,12 +317,12 @@ OPENCV_LIBS = $(shell pkg-config opencv --libs || echo -lopencv_core -lopencv_hi
|
||||
|
||||
# Enable support of most classical image file formats, using the GraphicsMagick++ library.
|
||||
# (http://www.graphicsmagick.org/Magick++/)
|
||||
@ -94,7 +96,7 @@
|
||||
OPENEXR_LIBS = $(shell pkg-config --libs OpenEXR || echo -lIlmImf -lHalf)
|
||||
|
||||
# Enable Fast Fourier Transforms, using the FFTW3 library.
|
||||
@@ -439,7 +440,7 @@ cli_shared:
|
||||
@@ -439,7 +439,7 @@ cli_shared:
|
||||
|
||||
# CLI (static).
|
||||
#--------------
|
||||
@ -103,7 +105,7 @@
|
||||
GMIC_STATIC_CLI_EXTRA =
|
||||
GMIC_STATIC_CLI_CFLAGS = -Dcimg_display=0 $(MANDATORY_CFLAGS) $(OPENMP_CFLAGS) $(ABORT_CFLAGS) $(PARALLEL_CFLAGS) $(ZLIB_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(FFTW_CFLAGS)
|
||||
GMIC_STATIC_CLI_LIBS = ./libgmic.o $(PARALLEL_LIBS) \
|
||||
@@ -818,84 +819,78 @@ man:
|
||||
@@ -818,35 +818,35 @@ man:
|
||||
# Install / uninstall / clean.
|
||||
#-----------------------------
|
||||
install:
|
||||
@ -158,16 +160,9 @@
|
||||
+ cp -f ../man/gmic.1.gz $(DESTDIR)$(PREFIX)/share/man/fr/man1/gmic.1.gz; \
|
||||
fi
|
||||
@if [ -f ../resources/gmic_bashcompletion.sh ]; then \
|
||||
- if [ -d /usr/share/bash-completion/completions ]; then \
|
||||
- mkdir -p $(DESTDIR)/usr/share/bash-completion/completions; \
|
||||
- cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/usr/share/bash-completion/completions/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; \
|
||||
+ mkdir -p $(DESTDIR)$(BASH_COMPLETIONSDIR); \
|
||||
+ cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)$(BASH_COMPLETIONSDIR)/gmic; \
|
||||
if [ -d /usr/share/bash-completion/completions ]; then \
|
||||
@@ -859,43 +859,43 @@ install:
|
||||
fi; \
|
||||
fi
|
||||
@if [ -f ../zart/zart ]; then \
|
||||
- mkdir -p $(DESTDIR)$(USR)/share/applications; \
|
||||
@ -241,3 +236,77 @@
|
||||
|
||||
distclean: clean
|
||||
|
||||
|
||||
From b859429e113c97dccc79f0102e2d7d37715da747 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Sat, 3 Sep 2022 20:20:30 +0200
|
||||
Subject: [PATCH 2/3] Makefile: Make a few variables configurable
|
||||
|
||||
This makes it easier for downstreams to choose where they want to put
|
||||
the files, such as libs going into /usr/lib64 in Fedora, or use the /app
|
||||
prefix for flatpaks.
|
||||
---
|
||||
src/Makefile | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index f62ce47aa..7d8b1d395 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
# Try to auto-detect target OS.
|
||||
OS = $(shell uname)
|
||||
-PREFIX = /usr
|
||||
-LIB = lib
|
||||
-BIN = bin
|
||||
-INCLUDE = include
|
||||
+PREFIX ?= /usr
|
||||
+LIB ?= lib
|
||||
+BIN ?= bin
|
||||
+INCLUDE ?= include
|
||||
PIC = -fPIC
|
||||
EXE =
|
||||
WGET = wget --no-check-certificate --quiet -O
|
||||
|
||||
From 0cd05ab2379c3cefcffc4f94f85cabf122da1be4 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Sat, 3 Sep 2022 20:36:28 +0200
|
||||
Subject: [PATCH 3/3] Makefile: Avoid hardcoding bash-completion paths
|
||||
|
||||
Instead, use pkg-config to query the bash-completion path, which
|
||||
both makes the makefile simpler and also helps get the path right in
|
||||
more cases.
|
||||
---
|
||||
src/Makefile | 11 +++--------
|
||||
1 file changed, 3 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 7d8b1d395..126d1e143 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -88,6 +88,7 @@ PIC = -fPIC
|
||||
EXE =
|
||||
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)
|
||||
@@ -849,14 +850,8 @@ install:
|
||||
cp -f ../man/gmic.1.gz $(DESTDIR)$(PREFIX)/share/man/fr/man1/gmic.1.gz; \
|
||||
fi
|
||||
@if [ -f ../resources/gmic_bashcompletion.sh ]; then \
|
||||
- if [ -d /usr/share/bash-completion/completions ]; then \
|
||||
- mkdir -p $(DESTDIR)/usr/share/bash-completion/completions; \
|
||||
- cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/usr/share/bash-completion/completions/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; \
|
||||
+ mkdir -p $(DESTDIR)$(BASH_COMPLETIONSDIR); \
|
||||
+ cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)$(BASH_COMPLETIONSDIR)/gmic; \
|
||||
fi
|
||||
@if [ -f ../zart/zart ]; then \
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/applications; \
|
||||
|
@ -10,7 +10,7 @@
|
||||
Summary: GREYC's Magic for Image Computing
|
||||
Name: gmic
|
||||
Version: 3.1.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Source0: https://gmic.eu/files/source/%{name}_%{version}.tar.gz
|
||||
# GIT archive snapshot of https://github.com/c-koi/zart
|
||||
Source1: zart-%{zart_version}.tar.gz
|
||||
@ -223,6 +223,9 @@ fi
|
||||
%{_libdir}/libcgmic.so.3*
|
||||
|
||||
%changelog
|
||||
* Mon Jan 16 2023 Sérgio Basto <sergio@serjux.com> - 3.1.6-3
|
||||
- Rebuild for opencv 4.7.0
|
||||
|
||||
* Sun Nov 13 2022 josef radinger <cheese@nosuchhost.net> - 3.1.6-2
|
||||
- build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user