Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] gmic: fix license, clean do_build
Date: Mon, 15 Nov 2021 15:48:50 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34093@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages gmic-cleanup
https://github.com/void-linux/void-packages/pull/34093

gmic: fix license, clean do_build
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

@newbluemoon 

A patch file from https://github.com/void-linux/void-packages/pull/34093.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gmic-cleanup-34093.patch --]
[-- Type: text/x-diff, Size: 7189 bytes --]

From 9024f9e43bf032a183063e0e96935b17e3e6d8cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Nov 2021 21:46:23 +0700
Subject: [PATCH] gmic: fix license, clean do_build

---
 srcpkgs/gmic/patches/includedir.patch         | 44 +++++++++++++++++++
 srcpkgs/gmic/patches/opt-flags.patch          | 28 ++++++++++++
 .../gmic/patches/plugindir-and-no-wget.patch  | 15 +++++++
 srcpkgs/gmic/template                         | 29 ++----------
 4 files changed, 91 insertions(+), 25 deletions(-)
 create mode 100644 srcpkgs/gmic/patches/includedir.patch
 create mode 100644 srcpkgs/gmic/patches/opt-flags.patch
 create mode 100644 srcpkgs/gmic/patches/plugindir-and-no-wget.patch

diff --git a/srcpkgs/gmic/patches/includedir.patch b/srcpkgs/gmic/patches/includedir.patch
new file mode 100644
index 000000000000..2cf9031443e5
--- /dev/null
+++ b/srcpkgs/gmic/patches/includedir.patch
@@ -0,0 +1,44 @@
+Index: gmic-2.9.9/src/Makefile
+===================================================================
+--- gmic-2.9.9.orig/src/Makefile
++++ gmic-2.9.9/src/Makefile
+@@ -163,13 +163,13 @@ NO_PRERELEASE = $(shell date +%y%m%d)
+ NO_PRERELEASE_CFLAGS = -Dgmic_prerelease="\\\"$(PRERELEASE)\\\""
+ 
+ # Minimal set of flags mandatory to compile G'MIC.
+-MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib || echo -I$(USR)/$(INCLUDE)) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
++MANDATORY_CFLAGS = -Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. $(shell pkg-config --cflags zlib) $(PRERELEASE_CFLAGS) $(EXTRA_CFLAGS)
+ MANDATORY_LIBS = $(shell pkg-config --libs zlib || echo -lz) $(EXTRA_LIBS)
+ 
+ ifndef NO_SRIPDLIB
+ MANDATORY_CFLAGS += -std=c++11 -pedantic
+ endif
+-MANDATORY_LIBS += -L$(USR)/$(LIB)
++MANDATORY_LIBS +=
+ ifdef IS_GCC
+ MANDATORY_CFLAGS += -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
+ MANDATORY_LIBS += -lm
+@@ -250,7 +250,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)
+-XSHM_LIBS = $(shell pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib) -lXext
++XSHM_LIBS = $(shell pkg-config --libs xcb-shm) -lXext
+ 
+ # Enable image display, using GDI32 (Windows).
+ GDI32_CFLAGS = -Dcimg_display=2
+@@ -303,12 +303,12 @@ OPENCV_LIBS = $(shell pkg-config opencv
+ 
+ # Enable support of most classical image file formats, using the GraphicsMagick++ library.
+ # (http://www.graphicsmagick.org/Magick++/)
+-MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick)
++MAGICK_CFLAGS = -Dcimg_use_magick $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/GraphicsMagick)
+ MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++)
+ 
+ # Enable native support of EXR image files, using the OpenEXR library.
+ # (http://www.openexr.com/)
+-OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/$(INCLUDE)/OpenEXR
++OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(XBPS_CROSS_BASE)$(USR)/$(INCLUDE)/OpenEXR
+ OPENEXR_LIBS = -lIlmImf -lHalf
+ 
+ # Enable Fast Fourier Transforms, using the FFTW3 library.
diff --git a/srcpkgs/gmic/patches/opt-flags.patch b/srcpkgs/gmic/patches/opt-flags.patch
new file mode 100644
index 000000000000..0d3a5894e589
--- /dev/null
+++ b/srcpkgs/gmic/patches/opt-flags.patch
@@ -0,0 +1,28 @@
+Index: gmic-2.9.9/src/Makefile
+===================================================================
+--- gmic-2.9.9.orig/src/Makefile
++++ gmic-2.9.9/src/Makefile
+@@ -192,9 +192,9 @@ endif
+ 
+ # Enable optimizations for 'cli'.
+ FLTO = -flto
+-OPT_CLI_CFLAGS = -Ofast
++OPT_CLI_CFLAGS =
+ ifdef IS_GCC
+-OPT_CLI_CFLAGS = -Ofast -mtune=generic $(FLTO)
++OPT_CLI_CFLAGS = $(FLTO)
+ OPT_CLI_LIBS = $(FLTO)
+ endif
+ ifdef icpc
+Index: gmic-2.9.9/gmic-qt/gmic_qt.pro
+===================================================================
+--- gmic-2.9.9.orig/gmic-qt/gmic_qt.pro
++++ gmic-2.9.9/gmic-qt/gmic_qt.pro
+@@ -445,7 +445,6 @@ translations/zh_tw.ts
+ 
+ # PRE_TARGETDEPS +=
+ 
+-QMAKE_CXXFLAGS_RELEASE += -Ofast # -O3 -s
+ QMAKE_LFLAGS_RELEASE += -s
+ QMAKE_CXXFLAGS_DEBUG += -Dcimg_verbosity=3
+ 
diff --git a/srcpkgs/gmic/patches/plugindir-and-no-wget.patch b/srcpkgs/gmic/patches/plugindir-and-no-wget.patch
new file mode 100644
index 000000000000..5b403240efc9
--- /dev/null
+++ b/srcpkgs/gmic/patches/plugindir-and-no-wget.patch
@@ -0,0 +1,15 @@
+Index: gmic-2.9.9/src/Makefile
+===================================================================
+--- gmic-2.9.9.orig/src/Makefile
++++ gmic-2.9.9/src/Makefile
+@@ -67,8 +67,8 @@ INCLUDE = include
+ SO = .so
+ PIC = -fPIC
+ EXE =
+-WGET = wget --no-check-certificate --quiet -O
+-PLUGINDIR = $(shell gimptool-2.0 --gimpplugindir)/plug-ins
++WGET = false
++PLUGINDIR = /usr/lib/gimp/2.0/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)
diff --git a/srcpkgs/gmic/template b/srcpkgs/gmic/template
index 8c1fa6962d8d..2bb69f4df0cd 100644
--- a/srcpkgs/gmic/template
+++ b/srcpkgs/gmic/template
@@ -1,18 +1,20 @@
 # Template file for 'gmic'
 pkgname=gmic
 version=2.9.9
-revision=1
+revision=2
 _zart_hash=939cf381c5871e506aabd066037acf2b55143c1d
 build_wrksrc="src"
 build_style=gnu-makefile
 build_helper=qmake
+make_build_args=NOSTRIP=yes
+make_use_env=yes
 hostmakedepends="pkg-config gimp qt5-host-tools qt5-qmake"
 makedepends="fftw-devel ilmbase-devel libopenexr-devel MesaLib-devel libopencv-devel
  libgomp-devel lcms2-devel libpng-devel libjpeg-turbo-devel tiff-devel libcurl-devel
  gtk+-devel gimp-devel qt5-devel"
 short_desc="GREYC's Magic for Image Computing (image processing framework)"
 maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
-license="CECILL-2.1"
+license="CECILL-2.1, CECILL-C"
 homepage="http://gmic.eu/"
 distfiles="http://gmic.eu/files/source/gmic_${version}.tar.gz
  https://github.com/c-koi/zart/archive/${_zart_hash}.tar.gz"
@@ -24,29 +26,6 @@ post_extract() {
 	mv ../zart-${_zart_hash} zart
 }
 
-post_patch() {
-	vsed -i Makefile -e "s,-I[\$](USR),-I$XBPS_CROSS_BASE/usr,g"
-	vsed -i Makefile -e "s/-Ofast/-O2/g"
-	# uses gimptool-2.0 to determine PLUGINDIR which fails in cross builds
-	vsed -i Makefile -e "s,^PLUGINDIR = .*,PLUGINDIR = /usr/lib/gimp/2\.0/plug-ins,g"
-	vsed -i ../gmic-qt/gmic_qt.pro -e "s/-Ofast/-O2/g"
-	# Not supported on ppc but we already compile for baselines
-	case "$XBPS_TARGET_MACHINE" in
-		ppc*) vsed -i Makefile -e 's;-mtune=generic;;' ;;
-	esac
-}
-
-do_build() {
-	make CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \
-		CPP="$CPP" AS="$AS" OBJCOPY="$OBJCOPY" OBJDUMP="$OBJDUMP" \
-		CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
-		cli lib libc
-
-	for _target in gimp krita gmic_qt zart; do
-		make $_target
-	done
-}
-
 post_install() {
 	vlicense ../COPYING
 }

             reply	other threads:[~2021-11-15 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 14:48 sgn [this message]
2021-11-15 16:54 ` newbluemoon
2022-06-13  2:16 ` github-actions
2022-06-25  3:33 ` [PR PATCH] [Updated] " sgn
2022-07-01 14:19 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34093@inbox.vuxu.org \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).