Github messages for voidlinux
 help / color / mirror / Atom feed
From: Chocimier <Chocimier@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] postgis: enable CUnit tests
Date: Sat, 07 Aug 2021 20:11:01 +0200	[thread overview]
Message-ID: <20210807181101.E4Dv7urweI4CJUbV5IIoKVl9UcehmduBLWAX6-U6OAQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31745@inbox.vuxu.org>

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

There is an updated pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org CUnit
https://github.com/void-linux/void-packages/pull/31745

postgis: enable CUnit tests


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

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

From 9cb29149b84baaa780cb6206c613f6379c6ff914 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 1 Jul 2021 23:21:49 +0200
Subject: [PATCH 1/5] New package: CUnit-2.1.3

---
 srcpkgs/CUnit-devel    |  1 +
 srcpkgs/CUnit/template | 37 +++++++++++++++++++++++++++++++++++++
 srcpkgs/CUnit/update   |  1 +
 3 files changed, 39 insertions(+)
 create mode 120000 srcpkgs/CUnit-devel
 create mode 100644 srcpkgs/CUnit/template
 create mode 100644 srcpkgs/CUnit/update

diff --git a/srcpkgs/CUnit-devel b/srcpkgs/CUnit-devel
new file mode 120000
index 000000000000..cd42858e4b11
--- /dev/null
+++ b/srcpkgs/CUnit-devel
@@ -0,0 +1 @@
+CUnit
\ No newline at end of file
diff --git a/srcpkgs/CUnit/template b/srcpkgs/CUnit/template
new file mode 100644
index 000000000000..f142f9ee64c9
--- /dev/null
+++ b/srcpkgs/CUnit/template
@@ -0,0 +1,37 @@
+# Template file for 'CUnit'
+pkgname=CUnit
+version=2.1.3
+revision=1
+_distver="${version%.*}-${version##*.}"
+wrksrc="CUnit-${_distver}"
+build_style=gnu-configure
+configure_args="--disable-console"
+hostmakedepends="autoconf automake libtool"
+short_desc="Unit Testing Framework for C"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="LGPL-2.0-or-later"
+homepage="http://cunit.sourceforge.net/"
+distfiles="${SOURCEFORGE_SITE}/cunit/CUnit/${_distver}/CUnit-${_distver}.tar.bz2"
+checksum=f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214
+
+pre_configure() {
+	vsed -e 's@./configure@:@' -i bootstrap
+	sh bootstrap .
+}
+
+post_install() {
+	mv ${DESTDIR}/usr/doc  ${DESTDIR}/usr/share
+}
+
+CUnit-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/share/man/man3
+		vmove usr/share/doc
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/CUnit/update b/srcpkgs/CUnit/update
new file mode 100644
index 000000000000..90b1a7c7efd5
--- /dev/null
+++ b/srcpkgs/CUnit/update
@@ -0,0 +1 @@
+pattern='(?<!-)\b\Q'"$pkgname"'\E[-_]?((src|source)[-_])?v?\K([^-/_\s]*?\d[^/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b'

From 3765887cfacc75435e77ab815e850c2757982fdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 1 Jul 2021 23:21:49 +0200
Subject: [PATCH 2/5] postgis: enable unit tests

---
 srcpkgs/postgis/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/postgis/template b/srcpkgs/postgis/template
index e73a8e6d351a..6a21ef3cf0fd 100644
--- a/srcpkgs/postgis/template
+++ b/srcpkgs/postgis/template
@@ -12,7 +12,7 @@ hostmakedepends="automake libtool perl which pkg-config geos libgdal-tools
  postgresql9.6-libs-devel"
 makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql9.6-libs-devel
  proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt"
+checkdepends="libxslt CUnit-devel"
 short_desc="Spatial database extender for PostgreSQL"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
 license="GPL-2.0-or-later"
@@ -21,10 +21,12 @@ changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
 checksum=2cdd3760176926704b4eb25ff3357543c9637dee74425a49082906857c7e0732
 nocross="FIXME: Cannot run test program to determine PROJ version"
-# unit tests require unpackaged cunit
-# regression tests require running postgresql
-make_check=no
 
 pre_configure() {
 	./autogen.sh
 }
+
+pre_check() {
+	# regression tests require running postgresql
+	vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}

From 570419ee50e9bcf7d05dea125db4e0050078bfec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 1 Jul 2021 23:21:49 +0200
Subject: [PATCH 3/5] postgis-postgresql12: enable unit tests

---
 srcpkgs/postgis-postgresql12/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/postgis-postgresql12/template b/srcpkgs/postgis-postgresql12/template
index abefe9159680..a079267dd81b 100644
--- a/srcpkgs/postgis-postgresql12/template
+++ b/srcpkgs/postgis-postgresql12/template
@@ -13,7 +13,7 @@ hostmakedepends="automake libtool perl pkg-config geos
  libgdal-tools postgresql12-libs-devel which"
 makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql12-libs-devel
  proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt"
+checkdepends="libxslt CUnit-devel"
 short_desc="Spatial database extender for PostgreSQL"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
 license="GPL-2.0-or-later"
@@ -22,10 +22,12 @@ changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
 checksum=2cdd3760176926704b4eb25ff3357543c9637dee74425a49082906857c7e0732
 nocross="FIXME: Cannot run test program to determine PROJ version"
-# unit tests require unpackaged cunit
-# regression tests require running postgresql
-make_check=no
 
 pre_configure() {
 	./autogen.sh
 }
+
+pre_check() {
+	# regression tests require running postgresql
+	vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}

From f5cb307e85c561f057282d9f7b363b583ef008ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 1 Jul 2021 23:21:49 +0200
Subject: [PATCH 4/5] postgis-postgresql13: enable unit tests

---
 srcpkgs/postgis-postgresql13/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 21e894f61e98..52a7c4759d1a 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -13,7 +13,7 @@ hostmakedepends="automake libtool perl pkg-config geos
  libgdal-tools postgresql-libs-devel which"
 makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
  proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt"
+checkdepends="libxslt CUnit-devel"
 short_desc="Spatial database extender for PostgreSQL"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
 license="GPL-2.0-or-later"
@@ -22,10 +22,12 @@ changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
 distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
 checksum=2cdd3760176926704b4eb25ff3357543c9637dee74425a49082906857c7e0732
 nocross="FIXME: Cannot run test program to determine PROJ version"
-# unit tests require unpackaged cunit
-# regression tests require running postgresql
-make_check=no
 
 pre_configure() {
 	./autogen.sh
 }
+
+pre_check() {
+	# regression tests require running postgresql
+	vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}

From 0cd5c85b09e74ab7aa26d78e59805e2b8f2a03ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 1 Jul 2021 23:21:49 +0200
Subject: [PATCH 5/5] mosquitto: enable tests

---
 srcpkgs/mosquitto/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mosquitto/template b/srcpkgs/mosquitto/template
index 53ab96eca22e..25b2c4955a7d 100644
--- a/srcpkgs/mosquitto/template
+++ b/srcpkgs/mosquitto/template
@@ -8,14 +8,13 @@ make_install_args="prefix=/usr"
 make_check_target=test
 conf_files="/etc/mosquitto/mosquitto.conf"
 makedepends="c-ares-devel openssl-devel uthash libwebsockets-devel cJSON-devel"
+checkdepends="CUnit-devel python3"
 short_desc="MQTT version 3.1/3.1.1/5.0 compatible message broker"
 maintainer="Lukas Braun <koomi@hackerspace-bamberg.de>"
 license="EPL-1.0, BSD-3-Clause-Attribution"
 homepage="https://mosquitto.org"
 distfiles="${homepage}/files/source/${pkgname}-${version}.tar.gz"
 checksum=1b8553ef64a1cf5e4f4cfbe098330ae612adccd3d37f35b2db6f6fab501b01d4
-# CUnit dependency is missing
-make_check=no
 
 system_accounts="_mosquitto"
 _mosquitto_homedir="/var/lib/mosquitto"
@@ -32,6 +31,11 @@ post_extract() {
 	esac
 }
 
+pre_check(){
+	# fd, addr = self._accept() # socket.timeout: timed out
+	vsed -i test/lib/Makefile -e /02-subscribe-qos/d
+}
+
 pre_install() {
 	sed -i 's,sbin,bin,g' */Makefile
 }

  parent reply	other threads:[~2021-08-07 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 21:22 [PR PATCH] " Chocimier
2021-08-07 18:09 ` [PR PATCH] [Updated] " Chocimier
2021-08-07 18:11 ` Chocimier [this message]
2021-08-10 19:56 ` Chocimier
2021-08-11 21:28 ` [PR PATCH] [Merged]: " Chocimier

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=20210807181101.E4Dv7urweI4CJUbV5IIoKVl9UcehmduBLWAX6-U6OAQ@z \
    --to=chocimier@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).