summaryrefslogtreecommitdiff
path: root/dev-libs/libtommath
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-libs/libtommath
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-libs/libtommath')
-rw-r--r--dev-libs/libtommath/Manifest4
-rw-r--r--dev-libs/libtommath/libtommath-1.2.0.ebuild80
-rw-r--r--dev-libs/libtommath/metadata.xml110
3 files changed, 140 insertions, 54 deletions
diff --git a/dev-libs/libtommath/Manifest b/dev-libs/libtommath/Manifest
index 5ce648c6dae7..ee3a164798c0 100644
--- a/dev-libs/libtommath/Manifest
+++ b/dev-libs/libtommath/Manifest
@@ -1,3 +1,5 @@
DIST ltm-1.1.0.tar.xz 2125456 BLAKE2B 3aca7993704341f6a81e7fbef35389ac8ecd957dd78b5d576f0305d37493c3ddc32462cd787de2fb67d8e165417b18fcfde70accf991cd9433ff87591d8265ac SHA512 6d1b8b09d5b975a2b84ef6ab9cb1cc63db2f0503a906e499cb9d7eaba3f487be6e7f69bf692b188f888418c61ea563aa7e2411638d8979eac426b3d603ad1b91
+DIST ltm-1.2.0.tar.xz 622120 BLAKE2B 1537dad7da5c14264f03280e9d49fa0b7e6c1c4924c805f202d31c60569b9e3bee40674301d67b0f5b049c1c2dc5ec71b6c566ff5c9b8168d16840b031acc400 SHA512 6f9ccd0691831f07f86ddc81cb6145504b3d5da66dd3e92312c64cce0ea986fa4e08ba65ca8991aaebe56702c2d7c15f309696785b813dffb4c112a4ad04b203
EBUILD libtommath-1.1.0.ebuild 1513 BLAKE2B bf645873cb4e262f6244f1958369efe699b86480ea651942abe527018f846f1dc6748da60c42b1055ec41f86b25029efe5531a723aff7f24a5f77b6f257c6dc6 SHA512 8cee336bd78ba5392f3e595e76492144b59f241205aabffbb8bd790710333999e3a8fd191759aa99d5dc5f0f22f1f7f5d342a5b585d04b67667201799425f226
-MISC metadata.xml 2967 BLAKE2B 8adab466c3bf4d4e4b2368e56c7cf35c6a0e03f0dc9a237070e56bc224333876accb0c229d520f863041c0ee48b380225121d47554bb5aa511ff5689dd0e4e9b SHA512 73ce667c4bd2943f848274ee3952961d8b09c2c1faa4920cb74f9d8630470119c7e55a112b3c7dc2243c3746f75fa15db5c143e05e6739d2c9c19536f09a937f
+EBUILD libtommath-1.2.0.ebuild 1586 BLAKE2B 8072e71caabee283462113e4dba929b09ac928f7b945cd29988861d8a1d7b23e9f4ad439a6f9fb004ab7f76fac15559191ac2ff7c79b17d3b44990cca20189aa SHA512 581e2d5fb87b484dd655d455bbc84a61a571379983bcb82c35528d75e9fc8ad49935c7c03976f77ab67c61cda478fc0cf78fc413581c2708a5e2b8a2b88393c4
+MISC metadata.xml 3301 BLAKE2B c9999812b8504393673c8890cfcca6436eead1a2ce16d67000f2f0d2ebed6c993e654c720205ffc205ec248a9df1ef38c3a6c7389157fcef28eb407de94239ce SHA512 8f4beb6e7745581094557241bf74a7fd90d32e0091a6da59647887127daf99ec3dab6987811fac2863914504989549dd8d3bc79d88af7f1008c18e3eb9a5e03f
diff --git a/dev-libs/libtommath/libtommath-1.2.0.ebuild b/dev-libs/libtommath/libtommath-1.2.0.ebuild
new file mode 100644
index 000000000000..886477028fb7
--- /dev/null
+++ b/dev-libs/libtommath/libtommath-1.2.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Optimized and portable routines for integer theoretic applications"
+HOMEPAGE="https://www.libtom.net/"
+SRC_URI="https://github.com/libtom/libtommath/releases/download/v${PV}/ltm-${PV}.tar.xz"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ default
+
+ # need libtool for cross compilation. Bug #376643
+ cat <<-EOF > configure.ac
+ AC_INIT(libtommath, 0)
+ AM_INIT_AUTOMAKE
+ LT_INIT
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+
+ touch NEWS README AUTHORS ChangeLog Makefile.am
+
+ eautoreconf
+ export LIBTOOL="${S}"/libtool
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+_emake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ IGNORE_SPEED=1 \
+ DESTDIR="${ED}" \
+ LIBPATH="/usr/$(get_libdir)" \
+ INCPATH="/usr/include" \
+ "$@"
+}
+
+src_compile() {
+ _emake -f makefile.shared
+}
+
+src_test() {
+ # Tests must be built statically
+ # (i.e. without -f makefile.shared)
+ _emake test
+
+ ./test || die
+}
+
+src_install() {
+ _emake -f makefile.shared install
+
+ # We only link against -lc, so drop the .la file.
+ find "${ED}" -name '*.la' -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+
+ dodoc changes.txt
+
+ use doc && dodoc doc/*.pdf
+
+ if use examples ; then
+ docinto demo
+ dodoc demo/*.c
+ fi
+}
diff --git a/dev-libs/libtommath/metadata.xml b/dev-libs/libtommath/metadata.xml
index ff7228943422..1abe0f30209b 100644
--- a/dev-libs/libtommath/metadata.xml
+++ b/dev-libs/libtommath/metadata.xml
@@ -5,60 +5,64 @@
<email>patrick@gentoo.org</email>
<name>Patrick Lauer</name>
</maintainer>
- <longdescription>
- LibTomMath is a free open source portable number theoretic multiple-precision
- integer library written entirely in C. (phew!). The library is designed to
- provide a simple to work with API that provides fairly efficient routines that
- build out of the box without configuration.
+ <maintainer type="person">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <longdescription>
+ LibTomMath is a free open source portable number theoretic multiple-precision
+ integer library written entirely in C. (phew!). The library is designed to
+ provide a simple to work with API that provides fairly efficient routines that
+ build out of the box without configuration.
- The library builds out of the box with GCC 2.95 [and up] as well as Visual C++
- v6.00 [with SP5] without configuration. The source code is arranged to make it
- easy to dive into a particular area very quickly. The code is also littered with
- comments [This is one of the on going goals] that help explain the algorithms and
- their implementations. Ideally the code will serve as an educational tool in the
- future for CS students studying number theory.
+ The library builds out of the box with GCC 2.95 [and up] as well as Visual C++
+ v6.00 [with SP5] without configuration. The source code is arranged to make it
+ easy to dive into a particular area very quickly. The code is also littered with
+ comments [This is one of the on going goals] that help explain the algorithms and
+ their implementations. Ideally the code will serve as an educational tool in the
+ future for CS students studying number theory.
- The library provides a vast array of highly optimized routines from various
- branches of number theory.
+ The library provides a vast array of highly optimized routines from various
+ branches of number theory.
- * Simple Algebraic
- o Addition
- o Subtraction
- o Multiplication
- o Squaring
- o Division
- * Digit Manipulation
- o Shift left/right whole digits (mult by 2b by moving digits)
- o Fast multiplication/division by 2 and 2k for k&gt;1
- o Binary AND, OR and XOR gates
- * Modular Reductions
- o Barrett Reduction (fast for any p)
- o Montgomery Reduction (faster for any odd p)
- o DR Reduction (faster for any restricted p see manual)
- o 2k Reduction (fast reduction modulo 2p - k)
- o The exptmod logic can use any of the four reduction algorithms when
- appropriate with a single function call.
- * Number Theoretic
- o Greatest Common Divisor
- o Least Common Multiple
- o Jacobi Symbol Computation (falls back to Legendre for prime moduli)
- o Multiplicative Inverse
- o Extended Euclidean Algorithm
- o Modular Exponentiation
- o Fermat and Miller-Rabin Primality Tests, utility function such as
- is_prime and next_prime
- * Miscellaneous
- o Root finding over Z
- o Pseudo-random integers
- o Signed and Unsigned comparisons
- * Optimizations
- o Fast Comba based Multiplier, Squaring and Montgomery routines.
- o Montgomery, Diminished Radix and Barrett based modular
- exponentiation.
- o Karatsuba and Toom-Cook multiplication algorithms.
- o Many pointer aliasing optimiztions throughout the entire library.
- </longdescription>
- <upstream>
- <remote-id type="github">libtom/libtommath</remote-id>
- </upstream>
+ * Simple Algebraic
+ o Addition
+ o Subtraction
+ o Multiplication
+ o Squaring
+ o Division
+ * Digit Manipulation
+ o Shift left/right whole digits (mult by 2b by moving digits)
+ o Fast multiplication/division by 2 and 2k for k&gt;1
+ o Binary AND, OR and XOR gates
+ * Modular Reductions
+ o Barrett Reduction (fast for any p)
+ o Montgomery Reduction (faster for any odd p)
+ o DR Reduction (faster for any restricted p see manual)
+ o 2k Reduction (fast reduction modulo 2p - k)
+ o The exptmod logic can use any of the four reduction algorithms when
+ appropriate with a single function call.
+ * Number Theoretic
+ o Greatest Common Divisor
+ o Least Common Multiple
+ o Jacobi Symbol Computation (falls back to Legendre for prime moduli)
+ o Multiplicative Inverse
+ o Extended Euclidean Algorithm
+ o Modular Exponentiation
+ o Fermat and Miller-Rabin Primality Tests, utility function such as
+ is_prime and next_prime
+ * Miscellaneous
+ o Root finding over Z
+ o Pseudo-random integers
+ o Signed and Unsigned comparisons
+ * Optimizations
+ o Fast Comba based Multiplier, Squaring and Montgomery routines.
+ o Montgomery, Diminished Radix and Barrett based modular
+ exponentiation.
+ o Karatsuba and Toom-Cook multiplication algorithms.
+ o Many pointer aliasing optimiztions throughout the entire library.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">libtom/libtommath</remote-id>
+ </upstream>
</pkgmetadata>