diff options
Diffstat (limited to 'sci-libs/m4ri')
-rw-r--r-- | sci-libs/m4ri/Manifest | 6 | ||||
-rw-r--r-- | sci-libs/m4ri/files/m4ri-20200115-libm_underlinking.patch | 76 | ||||
-rw-r--r-- | sci-libs/m4ri/files/m4ri-20200115-memory_violation.patch | 87 | ||||
-rw-r--r-- | sci-libs/m4ri/m4ri-20200115.ebuild | 57 | ||||
-rw-r--r-- | sci-libs/m4ri/m4ri-20200125.ebuild | 2 |
5 files changed, 2 insertions, 226 deletions
diff --git a/sci-libs/m4ri/Manifest b/sci-libs/m4ri/Manifest index 27ad83505fa3..75f878d04667 100644 --- a/sci-libs/m4ri/Manifest +++ b/sci-libs/m4ri/Manifest @@ -1,7 +1,3 @@ -AUX m4ri-20200115-libm_underlinking.patch 2352 BLAKE2B 1c391a5d359585e8d6ffb6fa39900b214d20cc089af728a0ece4d521da0b339a31e5e1c19517506602413bf5c2f035fb45c8045459ede2a9ec84d344127f064f SHA512 d95150bab2c2954eea205bc027ec3a018f4267e19224665781273c093c12e35516a741275e3fa658f2076e7dee98d0463ed4ce0cc876def2f48a31039425df83 -AUX m4ri-20200115-memory_violation.patch 2905 BLAKE2B 08cdf9f22307f8477dd6dc5980d496cc56f4a7d625d83db77f1928417a1ba388c6a84c4866276bdad7ec4742b4dc102262e6f90c89a24423494e9877064f39d6 SHA512 70a32c5ec8e4c936b530e85d48d93e6f5d49122df658528c0fd74b3d812d25eef4d9826de3d01127bb717ecbdc20be23079d5805e3d767d225cd1cf24c321fde -DIST m4ri-20200115.tar.gz 510562 BLAKE2B 4522793ab61dd97dae5c8d82a4457364f437040c9c45c355007a3150bfebb5264e336b19a7416f62b5ef937480f15079d9c0e9711dd26a6f7c6f5ce66d699296 SHA512 4791576878097077bcda768c03a43ec9a5b05c29adaa9c5f1e737e798b3fc7d027f830183d57db7b8b6b75b25e01fb522eb8b2e5359efcb05054fc341cbb403c DIST m4ri-20200125.tar.gz 511132 BLAKE2B 637dbf7f17b84dc5fc91c9d8f501fa223cfacd687cb953ce3b9c4716e9a6d39318ef168c2ec8a4b5eeb469a4b46abbcd8802aaf694991d82deb20c832843c3ab SHA512 212ea58a93b792c1901f62411b06cd1a2ee60b3506c987e45ded73c146f2fa6baf5461b1dcabf31a5771ab5a44eab050d64714f7a5fca3df2d141d0d80c6c51a -EBUILD m4ri-20200115.ebuild 1328 BLAKE2B 1cec674c12674f27301baf2b8acef7d34133d2962523849c5bff05c0947d0665e3f5b896af53c26e08e5f48c21ddd5d7a9e62455bc57b4a9a06d5e21b44f1ad5 SHA512 af3d833be19a5e04880b62839d182e26965f5571977eb5185c1de1f66720562a23d5e93118a3ec61fbf9172f3f2d5b16eb7fadf5903d65249f7a4700e3777e8f -EBUILD m4ri-20200125.ebuild 1158 BLAKE2B f273f9b212be83c0f3e7abe99fbe13dfd8d0256a734cc70b86644a1630faa645f8855e73244e5be049631a5943f46e93f4416245e2fa9cb38ada97f38991ef6c SHA512 a90dbfa0439ecd28c3413090ea288b56b75abf163b1e68e207f5288d237a62a8853447e496440454bc5e04f03fc1a9015371561a988c2032a711e1ad0d69bf75 +EBUILD m4ri-20200125.ebuild 1156 BLAKE2B 57c77e1d4b1314d2f3b1e2886a2a8173285d6bfc6eb92b2a162ab57d646b17185830e4f878c2c56d863a705265aa94c98f123051ce09efd492b193673f384f0f SHA512 5e9d34aaca2ad3f99edcd13a3525a9f9e0fb7692c8cdf3c08c3af4ef3ef5e8fa8998d87861c8739727b2f2fe6914658ef0dafcb8a2e9ef8c792a6ad008ac7f98 MISC metadata.xml 1159 BLAKE2B 4a51b94a6a8d48e39412d90a249ef2038bcaac90653cbc187226842f33f5a8c75704b2671dc5fc63650cf4a57f77d7724409eca8d5822c7689eda3e5386902da SHA512 40d6e3dce814e11ced9da6874af71022dad66ff1b0511024a9033706f1b43ce741f418086d9beb276e09578db2acc1708758f71cdb168384d59f85627505e643 diff --git a/sci-libs/m4ri/files/m4ri-20200115-libm_underlinking.patch b/sci-libs/m4ri/files/m4ri-20200115-libm_underlinking.patch deleted file mode 100644 index 8d9d2738c087..000000000000 --- a/sci-libs/m4ri/files/m4ri-20200115-libm_underlinking.patch +++ /dev/null @@ -1,76 +0,0 @@ -From be6c249e7838bd838174db5c2bb98bf63b026b83 Mon Sep 17 00:00:00 2001 -From: François Bissey <frp.bissey@gmail.com> -Date: Tue, 21 Jan 2020 11:24:50 +1300 -Subject: [PATCH] Detect and use LIBM to link libm4ri in all cases. - ---- - Makefile.am | 2 +- - configure.ac | 6 +++++- - m4ri.pc.in | 2 +- - tests/Makefile.am | 2 +- - 4 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index e317d06..416d9f1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -58,7 +58,7 @@ pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = m4ri.pc - - libm4ri_la_LDFLAGS = -release 0.0.$(RELEASE) -no-undefined --libm4ri_la_LIBADD = $(LIBPNG_LIBADD) -+libm4ri_la_LIBADD = $(LIBPNG_LIBADD) $(LIBM) - - SUBDIRS = . tests - DIST_SUBDIRS = $(SUBDIRS) bench -diff --git a/configure.ac b/configure.ac -index 39de702..520154d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -15,7 +15,7 @@ AC_CONFIG_MACRO_DIR([m4]) - dnl Compiling with per-target flags (test_elimination.c) requires AM_PROG_CC_C_O. - AM_PROG_CC_C_O - --AC_PROG_LIBTOOL -+LT_INIT - - AC_PROG_INSTALL - -@@ -26,6 +26,10 @@ if test "$ac_cv_prog_cc_c99" = "no"; then - AC_MSG_ERROR([C99 support is required but not found.]) - fi - -+# Find and set LIBM on the platform. -+LT_LIB_M -+AC_SUBST(LIBM) -+ - # SSE2 support - AC_ARG_ENABLE([sse2], - AS_HELP_STRING([--disable-sse2], [don't use SSE2 instruction set.]), -diff --git a/m4ri.pc.in b/m4ri.pc.in -index 5044de7..07597bd 100644 ---- a/m4ri.pc.in -+++ b/m4ri.pc.in -@@ -7,5 +7,5 @@ Name: M4RI - Description: Dense linear algebra over GF(2). - Version: @PACKAGE_VERSION@ - Requires: @M4RI_USE_PNG_PC@ --Libs: -L${libdir} -lm4ri @RAW_LIBPNG@ -lm -+Libs: -L${libdir} -lm4ri @RAW_LIBPNG@ @LIBM@ - Cflags: -I${includedir} @SIMD_CFLAGS@ @OPENMP_CFLAGS@ -diff --git a/tests/Makefile.am b/tests/Makefile.am -index c9839a2..069e360 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -15,7 +15,7 @@ DEFINES = - AM_CFLAGS = -I$(TOPSRCDIR) -I$(TOPBUILDDIR) -D_XOPEN_SOURCE=600 $(DEFINES) @OPENMP_CFLAGS@ @PAPI_CFLAGS@ - - STAGEDIR := $(realpath -s $(TOPBUILDDIR)/.libs) --AM_LDFLAGS = -L$(STAGEDIR) -Wl,-rpath,$(STAGEDIR) -lm4ri -lm @PAPI_LDFLAGS@ @PAPI_LIBS@ -no-install -+AM_LDFLAGS = -L$(STAGEDIR) -Wl,-rpath,$(STAGEDIR) -lm4ri $(LIBM) @PAPI_LDFLAGS@ @PAPI_LIBS@ -no-install - - test_smallops_SOURCES = test_smallops.c testing.c testing.h - --- -2.10.5 - diff --git a/sci-libs/m4ri/files/m4ri-20200115-memory_violation.patch b/sci-libs/m4ri/files/m4ri-20200115-memory_violation.patch deleted file mode 100644 index b74be3b4bf8f..000000000000 --- a/sci-libs/m4ri/files/m4ri-20200115-memory_violation.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e2fb0dcb70a97972fa1576a528cb01458f57a85d Mon Sep 17 00:00:00 2001 -From: "Martin R. Albrecht" <martinralbrecht@googlemail.com> -Date: Sun, 19 Jan 2020 17:44:57 -0800 -Subject: [PATCH] fix memory violation - -fixes #72 ---- - m4ri/mzd.c | 2 +- - tests/test_misc.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 43 insertions(+), 1 deletion(-) - -diff --git a/m4ri/mzd.c b/m4ri/mzd.c -index 861905c..922dc3c 100644 ---- a/m4ri/mzd.c -+++ b/m4ri/mzd.c -@@ -1894,7 +1894,7 @@ mzd_t *mzd_submatrix(mzd_t *S, mzd_t const *M, rci_t const startrow, rci_t const - } else { - wi_t j; - for(rci_t i=0; i<nrows; i++) { -- for(j=0; j+m4ri_radix<=ncols; j+=m4ri_radix) -+ for(j=0; j+m4ri_radix<ncols; j+=m4ri_radix) - S->rows[i][j/m4ri_radix] = mzd_read_bits(M, startrow+i, startcol+j, m4ri_radix); - S->rows[i][j/m4ri_radix] &= ~S->high_bitmask; - S->rows[i][j/m4ri_radix] |= mzd_read_bits(M, startrow+i, startcol+j, ncols - j) & S->high_bitmask; -diff --git a/tests/test_misc.c b/tests/test_misc.c -index a9a9547..b1a2e32 100644 ---- a/tests/test_misc.c -+++ b/tests/test_misc.c -@@ -76,6 +76,31 @@ int test_png(rci_t m, rci_t n) { - return ret; - } - -+int test_submatrix(const rci_t m, const rci_t n, const rci_t lowr, const rci_t lowc, const rci_t highr, const rci_t highc) { -+ printf("submatrix: m: %4d, n: %4d, (%4d, %4d, %4d, %4d)", m, n, lowr, lowc, highr, highc); -+ assert(highr-lowr > 0); -+ assert(highc-lowc > 0); -+ mzd_t *M = mzd_init(m, n); -+ mzd_randomize(M); -+ mzd_t *S = mzd_init(highr-lowr, highc-lowc); -+ mzd_submatrix(S, M, lowr, lowc, highr, highc); -+ int ret = 0; -+ for(rci_t i=0; i<highr-lowr; i++) { -+ for(rci_t j=0; j<highc-lowc; j++) { -+ ret += (mzd_read_bit(M, lowr+i, lowc+j) ^ mzd_read_bit(S, i, j)); -+ } -+ } -+ -+ mzd_free(M); -+ mzd_free(S); -+ -+ if(ret==0) { -+ printf(" ... passed\n"); -+ } else { -+ printf(" ... FAILED\n"); -+ } -+ return ret; -+} - - int main(int argc, char *argv[]) { - int status = 0; -@@ -99,6 +124,23 @@ int main(int argc, char *argv[]) { - status += test_png(126,12); - status += test_png(128,200); - -+ status += test_submatrix(2, 127, 1, 1, 2, 127); -+ status += test_submatrix(2, 128, 1, 1, 2, 128); -+ status += test_submatrix(2, 129, 1, 1, 2, 129); -+ status += test_submatrix(2, 130, 1, 1, 2, 130); -+ status += test_submatrix(2, 131, 1, 1, 2, 131); -+ -+ status += test_submatrix(2, 63, 1, 1, 1, 63); -+ status += test_submatrix(2, 64, 1, 1, 1, 64); -+ status += test_submatrix(2, 65, 1, 1, 1, 65); -+ status += test_submatrix(2, 66, 1, 1, 1, 66); -+ status += test_submatrix(2, 67, 1, 1, 1, 67); -+ -+ status += test_submatrix(2, 127, 1, 63, 2, 127); -+ status += test_submatrix(2, 128, 1, 64, 2, 128); -+ status += test_submatrix(2, 129, 1, 65, 2, 129); -+ status += test_submatrix(2, 130, 1, 66, 2, 130); -+ - if (!status) { - printf("All tests passed.\n"); - } else { --- -2.10.5 - diff --git a/sci-libs/m4ri/m4ri-20200115.ebuild b/sci-libs/m4ri/m4ri-20200115.ebuild deleted file mode 100644 index bfa4cd0d8535..000000000000 --- a/sci-libs/m4ri/m4ri-20200115.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic toolchain-funcs - -DESCRIPTION="Method of four russian for inversion (M4RI)" -HOMEPAGE="https://bitbucket.org/malb/m4ri" -SRC_URI="https://bitbucket.org/malb/${PN}/downloads/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -IUSE="debug openmp cpu_flags_x86_sse2 png static-libs" - -BDEPEND="virtual/pkgconfig" -DEPEND="png? ( media-libs/libpng:= )" -RDEPEND="${DEPEND}" - -# NEWS and ChangeLog are empty as of 2020-01-01, and README.md -# didn't make it into the release tarball. -DOCS=( AUTHORS ) - -PATCHES=( - "${FILESDIR}"/${PN}-20200115-memory_violation.patch - "${FILESDIR}"/${PN}-20200115-libm_underlinking.patch -) - -pkg_pretend() { - use openmp && tc-check-openmp -} - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - # when using openmp and -O0 the testsuite fails - # https://github.com/cschwan/sage-on-gentoo/issues/475 - # Still current as of 20200115 - use openmp && replace-flags -O0 -O1 - - econf \ - $(use_enable debug) \ - $(use_enable openmp) \ - $(use_enable png) \ - $(use_enable cpu_flags_x86_sse2 sse2) \ - $(use_enable static-libs static) -} - -src_install() { - default - find "${ED}" -name '*.la' -delete || die -} diff --git a/sci-libs/m4ri/m4ri-20200125.ebuild b/sci-libs/m4ri/m4ri-20200125.ebuild index 71b98664df90..3dfda8659c37 100644 --- a/sci-libs/m4ri/m4ri-20200125.ebuild +++ b/sci-libs/m4ri/m4ri-20200125.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://bitbucket.org/malb/${PN}/downloads/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~amd64 ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="debug openmp cpu_flags_x86_sse2 png static-libs" BDEPEND="virtual/pkgconfig" |