diff --git a/0001-fplll-fix-namespace-issue.patch b/0001-fplll-fix-namespace-issue.patch new file mode 100644 index 0000000..cbc53d9 --- /dev/null +++ b/0001-fplll-fix-namespace-issue.patch @@ -0,0 +1,49 @@ +From f952fd99fc1b6934708ae64cbe92ec1c1ec4e419 Mon Sep 17 00:00:00 2001 +From: Jerome Benoit +Date: Sun, 3 Jul 2022 17:11:31 +0200 +Subject: [PATCH] fplll: fix namespace issue + +Description: fix fplll namespace issue + Upstream maintainer of FPLLL has removed from `root` fplll.h + 'using namespace fplll' (commit e886a8899f71ca78711fdf420e6817432b2fe4be), + this patch mimics the former behviour at the scale of this package. +Origin: vendor, Debian +Author: Jerome Benoit +Last-Update: 2022-07-03 +--- + m4/ac_check_fplll.m4 | 5 ++++- + src/fplll.C | 2 ++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/m4/ac_check_fplll.m4 b/m4/ac_check_fplll.m4 +index a6e2945..224f87c 100644 +--- a/m4/ac_check_fplll.m4 ++++ b/m4/ac_check_fplll.m4 +@@ -68,7 +68,10 @@ if test "$found_fplll" = false; then + AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory]) + AC_CHECK_HEADER(fplll.h,[found_fplll=true],[found_fplll=false],[#include ]) + AC_MSG_CHECKING([for lllReduction in -fplll (version 5.x)]) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],[ZZ_mat M(3,3);lll_reduction(M, 0.99, 0.51, LM_WRAPPER);])],[AC_MSG_RESULT([yes]);found_fplll=5],[AC_MSG_RESULT([no]);found_fplll=false]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ++#include ++using namespace fplll; ++]],[ZZ_mat M(3,3);lll_reduction(M, 0.99, 0.51, LM_WRAPPER);])],[AC_MSG_RESULT([yes]);found_fplll=5],[AC_MSG_RESULT([no]);found_fplll=false]) + fi + AC_LANG_POP([C++]) + +diff --git a/src/fplll.C b/src/fplll.C +index 45241c2..832c7b1 100644 +--- a/src/fplll.C ++++ b/src/fplll.C +@@ -23,6 +23,8 @@ + #include "floattypes.h" + + #include ++using namespace fplll; ++ + + typedef Obj (*ObjFunc)(); // I never could get the () and * right + +-- +2.38.1 + diff --git a/gap-float.changes b/gap-float.changes index 23703c3..92f5bd0 100644 --- a/gap-float.changes +++ b/gap-float.changes @@ -3,6 +3,7 @@ Sun Nov 27 23:28:35 UTC 2022 - Jan Engelhardt - Update to release 1.0.3 * No changelog was provided +- Add 0001-fplll-fix-namespace-issue.patch ------------------------------------------------------------------- Wed Nov 14 22:05:01 UTC 2018 - Jan Engelhardt diff --git a/gap-float.spec b/gap-float.spec index 0923f59..eaf7a64 100644 --- a/gap-float.spec +++ b/gap-float.spec @@ -25,6 +25,7 @@ Group: Productivity/Scientific/Math URL: https://gap-packages.github.io/float/ #Git-Clone: https://github.com/gap-packages/float Source: https://github.com/gap-packages/float/releases/download/v%version/float-%version.tar.gz +Patch1: 0001-fplll-fix-namespace-issue.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gap-devel >= 4.11 @@ -34,7 +35,7 @@ BuildRequires: libtool BuildRequires: mpc-devel BuildRequires: mpfi-devel BuildRequires: mpfr-devel -BuildRequires: pkgconfig(fplll) +BuildRequires: pkgconfig(fplll) >= 5 Requires: gap-core >= 4.11 Requires: gap-gapdoc >= 1.0 @@ -44,12 +45,11 @@ with arbitrary precision. It is based on MPFR, MPFI, MPC, CXSC, FPLLL. %prep -%autosetup -n float-%version +%autosetup -n float-%version -p1 %build autoreconf -fi -%configure --with-gaproot="%gapdir" --without-fplll --without-cxsc -# fplll is too new +%configure --with-gaproot="%gapdir" --without-cxsc %make_build %install