Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2021 08:44:48 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4a1ac1018b69 - main - math/permlib: Backoport PR fixing tests and add test target
Message-ID:  <202110080844.1988imnF012972@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4a1ac1018b692fe68e1ee9474494249c0f6b34d2

commit 4a1ac1018b692fe68e1ee9474494249c0f6b34d2
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-10-08 06:49:14 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-10-08 08:43:39 +0000

    math/permlib: Backoport PR fixing tests and add test target
---
 math/permlib/Makefile                    |   9 +++
 math/permlib/distinfo                    |   4 +-
 math/permlib/files/patch-boost-from-arch | 100 -------------------------------
 3 files changed, 12 insertions(+), 101 deletions(-)

diff --git a/math/permlib/Makefile b/math/permlib/Makefile
index 9772566e87af..d765631348d3 100644
--- a/math/permlib/Makefile
+++ b/math/permlib/Makefile
@@ -1,20 +1,29 @@
 PORTNAME=	permlib
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.2.9
+PORTREVISION=	1
 CATEGORIES=	math
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES=	c2c0ae7e078df6c91c16c7326081c483700fde75.patch:-p1 # backport https://github.com/tremlin/PermLib/pull/8
+
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	C++ header-only library for permutation computations
 
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	boost-libs>0:devel/boost-libs
 RUN_DEPENDS=	boost-libs>0:devel/boost-libs
 
+USES=		cmake:testing
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	tremlin
 GH_PROJECT=	PermLib
 
+CMAKE_TESTING_ON=	BUILD_TESTS # tests are broken, see https://github.com/tremlin/PermLib/issues/7
+
 NO_BUILD=	yes
 NO_ARCH=	yes
 
diff --git a/math/permlib/distinfo b/math/permlib/distinfo
index 1bdf9111b542..e107c159409b 100644
--- a/math/permlib/distinfo
+++ b/math/permlib/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1609481998
+TIMESTAMP = 1633674785
 SHA256 (tremlin-PermLib-v0.2.9_GH0.tar.gz) = 40b9c03df57d73412d75ee4098937706d95e252b4f40d091cc13633a0c56d20e
 SIZE (tremlin-PermLib-v0.2.9_GH0.tar.gz) = 151895
+SHA256 (c2c0ae7e078df6c91c16c7326081c483700fde75.patch) = 3811e96271e5edde7e4cebbcfe9f347bf726fef84c8b1532c61c13dc439a4173
+SIZE (c2c0ae7e078df6c91c16c7326081c483700fde75.patch) = 5353
diff --git a/math/permlib/files/patch-boost-from-arch b/math/permlib/files/patch-boost-from-arch
deleted file mode 100644
index c5ca1ee7bd03..000000000000
--- a/math/permlib/files/patch-boost-from-arch
+++ /dev/null
@@ -1,100 +0,0 @@
---- include/permlib/bsgs.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/bsgs.h
-@@ -39,6 +39,7 @@
- 
- #include <boost/cstdint.hpp>
- #include <boost/foreach.hpp>
-+#include <boost/next_prior.hpp>
- #include <boost/scoped_ptr.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/utility.hpp>
---- include/permlib/change/base_transpose.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/change/base_transpose.h
-@@ -38,6 +38,7 @@
- 
- #include <boost/scoped_ptr.hpp>
- #include <boost/iterator/indirect_iterator.hpp>
-+#include <boost/next_prior.hpp>
- 
- namespace permlib {
- 
---- include/permlib/generator/schreier_generator.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/generator/schreier_generator.h
-@@ -39,6 +39,7 @@
- #include <stack>
- #include <boost/scoped_ptr.hpp>
- #include <boost/tuple/tuple.hpp>
-+#include <boost/next_prior.hpp>
- 
- namespace permlib {
- 
---- include/permlib/permutation.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/permutation.h
-@@ -48,7 +48,7 @@
- #include <boost/dynamic_bitset.hpp>
- #include <boost/foreach.hpp>
- #include <boost/cstdint.hpp>
--#include <boost/math/common_factor_rt.hpp>
-+#include <boost/integer/common_factor_rt.hpp>
- 
- namespace permlib {
- 
-@@ -343,7 +343,7 @@ inline boost::uint64_t Permutation::order() const {
- 	std::list<CyclePair> cycleList = this->cycles();
- 	boost::uint64_t ord = 1;
- 	BOOST_FOREACH(const CyclePair& cyc, cycleList) {
--		ord = boost::math::lcm(ord, static_cast<boost::uint64_t>(cyc.second));
-+		ord = boost::integer::lcm(ord, static_cast<boost::uint64_t>(cyc.second));
- 	}
- 	return ord;
- }
---- include/permlib/test/giant_test.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/test/giant_test.h
-@@ -40,7 +40,7 @@
- #include <permlib/prime_helper.h>
- 
- #include <boost/foreach.hpp>
--#include <boost/math/common_factor_rt.hpp>
-+#include <boost/integer/common_factor_rt.hpp>
- #include <cmath>
- #include <algorithm>
- 
-@@ -195,7 +195,7 @@ GiantTestBase::GiantGroupType GiantTest<PERM>::determi
- 				for (unsigned int k = 0; k < cycleLength.size(); ++k) {
- 					if (j == k)
- 						continue;
--					if (boost::math::gcd(cycleLength[j], cycleLength[k]) != 1) {
-+					if (boost::integer::gcd(cycleLength[j], cycleLength[k]) != 1) {
- 						isCoprime = false;
- 						break;
- 					}
---- include/permlib/test/primitivity_sgs_test.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/test/primitivity_sgs_test.h
-@@ -39,6 +39,7 @@
- #include <boost/foreach.hpp>
- #include <boost/scoped_ptr.hpp>
- #include <boost/utility.hpp>
-+#include <boost/next_prior.hpp>
- #include <vector>
- #include <list>
- 
---- include/permlib/test/type_recognition.h.orig	2016-07-16 17:37:15 UTC
-+++ include/permlib/test/type_recognition.h
-@@ -44,7 +44,7 @@
- #include <permlib/permlib_api.h>
- 
- #include <boost/shared_ptr.hpp>
--#include <boost/math/common_factor_rt.hpp>
-+#include <boost/integer/common_factor_rt.hpp>
- #include <iostream>
- 
- 
-@@ -344,7 +344,7 @@ GroupType* TypeRecognition<PERM,TRANSVERSAL>::largeSym
- 	
- 	size_t orbitGCD = orbits.front()->size();
- 	BOOST_FOREACH(const OrbitPtr& orbit, orbits) {
--		orbitGCD = boost::math::gcd(orbitGCD, orbit->size());
-+		orbitGCD = boost::integer::gcd(orbitGCD, orbit->size());
- 	}
- 	
- 	GroupType* lastType = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110080844.1988imnF012972>