From 7d7fe6a767adcd8c80439e64947b7514d7587041 Mon Sep 17 00:00:00 2001 From: zhangxianting Date: Fri, 9 Aug 2024 17:28:47 +0800 Subject: [PATCH] fix build error --- nauty-fix-build-error.patch | 51 +++++++++++++++++++++++++++++++++++++ nauty.spec | 8 +++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 nauty-fix-build-error.patch diff --git a/nauty-fix-build-error.patch b/nauty-fix-build-error.patch new file mode 100644 index 0000000..6e19029 --- /dev/null +++ b/nauty-fix-build-error.patch @@ -0,0 +1,51 @@ +From 52548f1d329bf142ca479861f01a2f415600b866 Mon Sep 17 00:00:00 2001 +From: zhangxianting +Date: Fri, 9 Aug 2024 17:21:29 +0800 +Subject: [PATCH] fix build error + +--- + nauty-h.in | 3 ++- + nauty.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/nauty-h.in b/nauty-h.in +index 961657e..eb1daec 100644 +--- a/nauty-h.in ++++ b/nauty-h.in +@@ -40,12 +40,13 @@ it is necessary to check they are correct. + #define USE_ANSICONTROLS @have_ansicontrols@ + /* whether --enable-ansicontrols is used */ + +-#define _FILE_OFFSET_BITS @ac_cv_sys_file_offset_bits@ ++#ifdef _FILE_OFFSET_BITS + #if _FILE_OFFSET_BITS == 64 + #define _LARGEFILE_SOURCE + #else + #undef _FILE_OFFSET_BITS + #endif ++#endif + + /* Support of gcc extensions __builtin_clz, __builtin_clzl, __builtin_clzll */ + #define HAVE_CLZ @have_clz@ +diff --git a/nauty.h b/nauty.h +index 069c01e..026e250 100644 +--- a/nauty.h ++++ b/nauty.h +@@ -40,12 +40,13 @@ it is necessary to check they are correct. + #define USE_ANSICONTROLS 0 + /* whether --enable-ansicontrols is used */ + +-#define _FILE_OFFSET_BITS 0 ++#ifdef _FILE_OFFSET_BITS + #if _FILE_OFFSET_BITS == 64 + #define _LARGEFILE_SOURCE + #else + #undef _FILE_OFFSET_BITS + #endif ++#endif + + /* Support of gcc extensions __builtin_clz, __builtin_clzl, __builtin_clzll */ + #define HAVE_CLZ 0 +-- +2.44.0 + diff --git a/nauty.spec b/nauty.spec index 42d0e9b..0512fe4 100644 --- a/nauty.spec +++ b/nauty.spec @@ -3,7 +3,7 @@ Name: nauty Version: %(tr r . <<< %{nautybasever}) -Release: 1 +Release: 2 Summary: Graph canonical labeling and automorphism group computation License: ASL 2.0 @@ -27,6 +27,8 @@ Patch6: %{name}-tool-prefix.patch # Detect availability of the popcnt instruction at runtime Patch7: %{name}-popcnt.patch +Patch9000: %{name}-fix-build-error.patch + BuildRequires: gcc BuildRequires: gmp-devel BuildRequires: help2man @@ -69,6 +71,7 @@ This package contains files needed to develop programs that use libnauty. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch9000 -p1 # Remove the pregenerated makefile rm -f makefile @@ -118,5 +121,8 @@ make check %{_libdir}/pkgconfig/%{name}.pc %changelog +* Fri Aug 9 2024 zhangxianting - 2.3.0-2  +- fix build error + * Tue Dec 7 2021  haomimi - 2.3.0-1   - package init -- Gitee