commit:     52cd4be180d6752ead4e842aaa89356266a0c6a0
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 12:38:08 2020 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 12:38:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52cd4be1

media-gfx/pencil: add upstream patch to skip building tests

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

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../files/pencil-0.6.5-skip-building-tests.patch   | 53 ++++++++++++++++++++++
 media-gfx/pencil/pencil-0.6.5.ebuild               |  3 +-
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/media-gfx/pencil/files/pencil-0.6.5-skip-building-tests.patch 
b/media-gfx/pencil/files/pencil-0.6.5-skip-building-tests.patch
new file mode 100644
index 00000000000..dd7c80f2893
--- /dev/null
+++ b/media-gfx/pencil/files/pencil-0.6.5-skip-building-tests.patch
@@ -0,0 +1,53 @@
+From f949445894fa6da9eaa9f26f54bac59888822011 Mon Sep 17 00:00:00 2001
+From: Matt Chang <[email protected]>
+Date: Wed, 5 Aug 2020 15:06:29 +1000
+Subject: [PATCH] qmake CONFIG+=NO_TESTS to skip building tests
+
+---
+ pencil2d.pro | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/pencil2d.pro b/pencil2d.pro
+index f9fbca5a2..e1bc4a179 100644
+--- a/pencil2d.pro
++++ b/pencil2d.pro
+@@ -4,22 +4,23 @@
+ 
+ TEMPLATE = subdirs
+ 
+-SUBDIRS = \ # sub-project names
+-    core_lib \
+-    app \
+-    tests
+-
+ # build the project sequentially as listed in SUBDIRS !
+ CONFIG += ordered
+ 
+-# where to find the sub projects - give the folders
++SUBDIRS += core_lib
+ core_lib.subdir = core_lib
+-app.subdir      = app
+-tests.subdir    = tests
+ 
+-# what subproject depends on others
+-app.depends      = core_lib
+-tests.depends    = core_lib
++SUBDIRS += app
++app.subdir = app
++app.depends = core_lib
++
++SUBDIRS += tests
++tests.subdir = tests
++tests.depends = core_lib
++
++NO_TESTS {
++  SUBDIRS -= tests
++}
+ 
+ TRANSLATIONS += translations/pencil.ts \
+                 translations/pencil_ar.ts \
+@@ -48,4 +49,3 @@ TRANSLATIONS += translations/pencil.ts \
+                 translations/pencil_zh_CN.ts \
+                 translations/pencil_zh_TW.ts
+ 
+-macx: LIBS += -framework AppKit

diff --git a/media-gfx/pencil/pencil-0.6.5.ebuild 
b/media-gfx/pencil/pencil-0.6.5.ebuild
index ecd137f12e3..e4872b8d9df 100644
--- a/media-gfx/pencil/pencil-0.6.5.ebuild
+++ b/media-gfx/pencil/pencil-0.6.5.ebuild
@@ -30,6 +30,7 @@ DEPEND="${RDEPEND}
 "
 
 S="${WORKDIR}/${P/_/-}"
+PATCHES="${FILESDIR}/${P}-skip-building-tests.patch"
 
 src_prepare() {
        default
@@ -38,7 +39,7 @@ src_prepare() {
 }
 
 src_configure() {
-       eqmake5 PREFIX=/usr
+       eqmake5 PREFIX=/usr $(usex test "" "CONFIG+=NO_TESTS")
 }
 
 src_install() {

Reply via email to