Init package
This commit is contained in:
parent
b65d80953d
commit
0db969f1ff
62
add-riscv-support.patch
Normal file
62
add-riscv-support.patch
Normal file
@ -0,0 +1,62 @@
|
||||
Author: misaka00251 <misaka00251@misakanet.cn>
|
||||
Date: Fri Jul 15 16:13:26 2022 +0800
|
||||
|
||||
Add riscv64 support.
|
||||
|
||||
diff --git a/include/cln/object.h b/include/cln/object.h
|
||||
index 56f6f07..e26e079 100644
|
||||
--- a/include/cln/object.h
|
||||
+++ b/include/cln/object.h
|
||||
@@ -22,10 +22,10 @@ namespace cln {
|
||||
#if defined(__m68k__)
|
||||
#define cl_word_alignment 2
|
||||
#endif
|
||||
-#if defined(__i386__) || (defined(__mips__) && !defined(__LP64__)) || (defined(__sparc__) && !defined(__arch64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || (defined(__s390__) && !defined(__s390x__)) || defined(__sh__) || (defined(__x86_64__) && defined(__ILP32__))
|
||||
+#if defined(__i386__) || (defined(__mips__) && !defined(__LP64__)) || (defined(__sparc__) && !defined(__arch64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || (defined(__s390__) && !defined(__s390x__)) || defined(__sh__) || (defined(__x86_64__) && defined(__ILP32__)) || (defined(__riscv) && __riscv_xlen == 32)
|
||||
#define cl_word_alignment 4
|
||||
#endif
|
||||
-#if defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(__s390x__) || defined(__aarch64__)
|
||||
+#if defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(__s390x__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
|
||||
#define cl_word_alignment 8
|
||||
#endif
|
||||
#if !defined(cl_word_alignment)
|
||||
diff --git a/include/cln/types.h b/include/cln/types.h
|
||||
index 159e8bc..fd3c9a2 100644
|
||||
--- a/include/cln/types.h
|
||||
+++ b/include/cln/types.h
|
||||
@@ -48,7 +48,7 @@
|
||||
#undef HAVE_LONGLONG
|
||||
#endif
|
||||
#endif
|
||||
- #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__aarch64__))
|
||||
+ #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__aarch64__)) || (defined(__riscv) && __riscv_xlen == 64)
|
||||
// 64 bit registers in hardware
|
||||
#define HAVE_FAST_LONGLONG
|
||||
#endif
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
// Integer type used for counters.
|
||||
// Constraint: sizeof(uintC) >= sizeof(uintL)
|
||||
- #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__aarch64__) || defined(__mips64__)))
|
||||
+ #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__aarch64__) || defined(__mips64__))) || (defined(__riscv) && __riscv_xlen == 64)
|
||||
#define intCsize long_bitsize
|
||||
typedef long sintC;
|
||||
typedef unsigned long uintC;
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
// Integer type used for lfloat exponents.
|
||||
// Constraint: sizeof(uintE) >= sizeof(uintC)
|
||||
- #if (defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__i386__) || defined(__mips__) || defined(__rs6000__) || defined(__aarch64__)))
|
||||
+ #if (defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__i386__) || defined(__mips__) || defined(__rs6000__) || defined(__aarch64__))) || (defined(__riscv) && __riscv_xlen == 64)
|
||||
#define intEsize 64
|
||||
typedef sint64 sintE;
|
||||
typedef uint64 uintE;
|
||||
@@ -127,7 +127,7 @@
|
||||
typedef int sintD;
|
||||
typedef unsigned int uintD;
|
||||
#else // we are not using GMP, so just guess something reasonable
|
||||
- #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__s390x__) || defined(__x86_64__) || defined(__aarch64__) || defined(__mips64__)))
|
||||
+ #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__s390x__) || defined(__x86_64__) || defined(__aarch64__) || defined(__mips64__))) || (defined(__riscv) && __riscv_xlen == 64)
|
||||
#define intDsize 64
|
||||
typedef sint64 sintD;
|
||||
typedef uint64 uintD;
|
||||
BIN
cln-1.3.4.tar.bz2
Normal file
BIN
cln-1.3.4.tar.bz2
Normal file
Binary file not shown.
79
cln.spec
Normal file
79
cln.spec
Normal file
@ -0,0 +1,79 @@
|
||||
Name: cln
|
||||
Version: 1.3.4
|
||||
Release: 1
|
||||
Summary: Class Library for Numbers
|
||||
License: GPLv2+
|
||||
URL: http://www.ginac.de/CLN/
|
||||
Source0: http://www.ginac.de/CLN/%{name}-%{version}.tar.bz2
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: texi2html
|
||||
BuildRequires: perl(Unicode::EastAsianWidth)
|
||||
BuildRequires: texinfo-tex
|
||||
BuildRequires: make
|
||||
# Didn't pickup this
|
||||
BuildRequires: texlive-ec texlive-cm-super
|
||||
Patch01: add-riscv-support.patch
|
||||
|
||||
%description
|
||||
A collection of C++ math classes and functions, which are designed for
|
||||
memory and speed efficiency, and enable type safety and algebraic
|
||||
syntax.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for programs using the CLN library
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: gmp-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
A collection of C++ math classes and functions, which are designed for
|
||||
memory and speed efficiency, and enable type safety and algebraic
|
||||
syntax.
|
||||
|
||||
This package is necessary if you wish to develop software based on
|
||||
the CLN library.
|
||||
|
||||
%ifarch %{arm}
|
||||
%global XFLAGS %{optflags} -DNO_ASM
|
||||
%else
|
||||
%global XFLAGS %{optflags}
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%ifarch riscv64
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
%configure --disable-static CXXFLAGS="%{XFLAGS}" CFLAGS="%{XFLAGS}"
|
||||
make %{?_smp_mflags}
|
||||
make pdf
|
||||
make html
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
rm -rf %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1/pi.*
|
||||
|
||||
%check
|
||||
make %{_smp_mflags} check
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc COPYING NEWS README TODO
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/cln.pc
|
||||
%{_includedir}/cln/
|
||||
%{_infodir}/*.info*
|
||||
%doc doc/cln.pdf doc/cln.html
|
||||
|
||||
%changelog
|
||||
* Fri Jul 15 2022 misaka00251 <misaka00251@misakanet.cn> - 1.3.4-1
|
||||
- Init package
|
||||
Loading…
x
Reference in New Issue
Block a user