diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/libtommath |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/libtommath')
-rw-r--r-- | dev-libs/libtommath/Manifest | 9 | ||||
-rw-r--r-- | dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch | 47 | ||||
-rw-r--r-- | dev-libs/libtommath/libtommath-0.42.0-r1.ebuild | 65 | ||||
-rw-r--r-- | dev-libs/libtommath/libtommath-1.0-r1.ebuild | 72 | ||||
-rw-r--r-- | dev-libs/libtommath/libtommath-1.0.ebuild | 63 | ||||
-rw-r--r-- | dev-libs/libtommath/metadata.xml | 64 |
6 files changed, 320 insertions, 0 deletions
diff --git a/dev-libs/libtommath/Manifest b/dev-libs/libtommath/Manifest new file mode 100644 index 000000000000..6d00b284ba91 --- /dev/null +++ b/dev-libs/libtommath/Manifest @@ -0,0 +1,9 @@ +AUX libtommath-0.42.0-makefile.patch 1694 SHA256 de23b0b66ed4f51d0831bb4b1e7affd06e5adcee9b83dccf5144c2a40491d8bc SHA512 3ba5253df119d57e598167d4ea0c3cbc000c50395598a953462d24e21832d41bdb16631688a99266f533e133fa39a58cc271e32d05e61b3756697ddb06898999 WHIRLPOOL cf79bc2234f5aa9e831024588d671510a36f3ac50c461f590a006eb60491baffff4b46a30154cb56ea3e2c2e3eee548e075fc16911f26e1a4739a3527d2f78f7 +DIST libtommath-0.42.0.tar.gz 1732144 SHA256 5246356ba18c1b6edf4a7bc836a3d223842b86914cdba6dd8c112bfc59e227c8 SHA512 d26e7737e5750530a7b96432502f0d458931e67af528872c46ad8dfc921b8f6ef4b3e05cb07d22bd13a8b24db65812928ae4c381250a4df95f6ca55efc3dae23 WHIRLPOOL beab5007a204042fd0a5b86ccc639ee37d82bb4afe2ceebcfe062deffaa259c8a699c81a52e804c2a79cb36914d805c81826a6e456523f729063240d1bfca9e6 +DIST ltm-1.0.tar.xz 2191540 SHA256 993a7df9ee091fca430cdde3263df57d88ef62af8103903214da49fc51bbb56c SHA512 da2ced516106fb056373d97f9ac443805c57ebeb0a33982c14703d6dd8c3925e49aeb690b790ba91768ed5d41f5875dc50a3d3435dbb4088cfa3fddee9162082 WHIRLPOOL 90997863f853626b82683864213cd74ae5558ea55e6a1fd10e2ffc3446aeadf07e8f657115cb6c79e121da695d0f0e3168f98f42fa3f158b720e8b94c8e63190 +EBUILD libtommath-0.42.0-r1.ebuild 1436 SHA256 02fbddc9037dcbd7fc3976bd50f606818ec5df42fb9510af3f5f53dcac50ea83 SHA512 83dc7913ebfad16d431bb6524b5a2fe032b52dd15cbc6d127b1e78785f36bd7787624d3459ff23cea37c29acd0db763b646e093cdad9292fb446829a526b3707 WHIRLPOOL 1055e4f31de5f255384c844a22ffa7d42f6f4beb0ca4d5ff6a35d205e700a3b16c74505df98ceea786a0cc22e9b5f0f5bd28e4b7bb30e60cbe0d6046e513f679 +EBUILD libtommath-1.0-r1.ebuild 1509 SHA256 7065fe8b2221c47a5fc731603c22308bfb1d33b1d55006cca85447e2e2285651 SHA512 dcaca3dd34a3b669ea284bf63e61f473bbdf25936d16e7bb9fbe49285afdad4d3ce32c7a2dda8b3fce3fbc54231d172209836692b82f2809309b27589588d72e WHIRLPOOL 168942bd1694e5d920132e7a0d7740f4acba01c093f47859509ba8b31fc4691af92ba256fcc500745961636d443a79798f2d2b538eaa914cf358e8b243c7ed08 +EBUILD libtommath-1.0.ebuild 1396 SHA256 f8bc6fc9400323e49b0800d1e79f20b2dc9a6f71fd12750ca777b1d725660cc5 SHA512 28f0b82b39166e74f7a6e87f5a992815f6465c05301a735ec4f2dcd9f6f64734d2cd0073fac5c015a06c79fb005cc2796497e104ad5e9bc6c2b5f41ae9e6d0f0 WHIRLPOOL 5bd85eeddc2238129e4ce75ca561c22db8620443088ffd49919593aee8d45cf9e3c77dff4a826d0eb405dedea6ff3f868859f5197976f2130ec8beba5cc96aa7 +MISC ChangeLog 3120 SHA256 d601cbb19e1615733ddf447197bee043defde42041167de50a44349f3094bb66 SHA512 bec1ff924395022ca2c57d11c550d0acd744c7ae18e3a5fd444097b49fe2065e1c1d47d84a4e48aa25b726fedb6865e6979636aefa690ad0d64ea9d8d702fd36 WHIRLPOOL 16afc8e7b15858eb9558860b8f217da69f7ec04c02e663543df5ba9ecf78114eca7999e423a4d8ebd73e2de26116e4b0535b27859fc2de9d22de06fe7d912293 +MISC ChangeLog-2015 9170 SHA256 907288dbb5a91c79144acee6b3e4fb4dd101dd2cd61f6da6a53c0420fab463ed SHA512 b76cb087936bcacad5915ad501128eeb7b372bd4c1451e4795c238502a26a82b52e1b4fd875b28b336738d7a7bd2c5d5416fc25dbd9d7ea900718d6b109bb658 WHIRLPOOL 661efd23bf99000df45be4c0de0d942ae3d8bec7f6ab2f057bfee97f574031f88f6cccab5b1a46f7ff901f3fd08b29db5ad89644a1f2e412bc72c4c814937144 +MISC metadata.xml 2967 SHA256 1c64de36bbf559b98c5207cac4a37f225aff5040f642f764a8457b307ff34b6d SHA512 73ce667c4bd2943f848274ee3952961d8b09c2c1faa4920cb74f9d8630470119c7e55a112b3c7dc2243c3746f75fa15db5c143e05e6739d2c9c19536f09a937f WHIRLPOOL ffca8c379624e4d03baab2eb148079fd12f0015e70d65868bc39721af9fe46d07a83a498f7a8cfff2ca8f72983975e1677bbe824029f389c7daac0698cc8f2b6 diff --git a/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch b/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch new file mode 100644 index 000000000000..b3f1ed6252c8 --- /dev/null +++ b/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch @@ -0,0 +1,47 @@ +--- makefile.shared ++++ makefile.shared +@@ -3,7 +3,8 @@ + #Tom St Denis + VERSION=0:41 + +-CC = libtool --mode=compile --tag=CC gcc ++LT ?= libtool ++LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC) + + CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare + +@@ -82,21 +83,24 @@ + + objs: $(OBJECTS) + ++%.lo: %.c ++ $(LTCOMPILE) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< ++ +-$(LIBNAME): $(OBJECTS) +- libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) ++$(LIBNAME): $(OBJECTS:.o=.lo) ++ $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) + + install: $(LIBNAME) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) +- libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) +- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) ++ install -d $(DESTDIR)$(LIBPATH) ++ $(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) ++ install -d $(DESTDIR)$(INCPATH) ++ install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH) + + test: $(LIBNAME) demo/demo.o +- gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o +- libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S) ++ $(CC) $(CFLAGS) $(CPPFLAGS) -c demo/demo.c -o demo/demo.o ++ $(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) + + mtest: test +- cd mtest ; gcc $(CFLAGS) mtest.c -o mtest ++ cd mtest ; $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) mtest.c -o mtest + + timing: $(LIBNAME) +- gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest ++ $(LT) --mode=link $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest diff --git a/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild new file mode 100644 index 000000000000..32bd1cb9e072 --- /dev/null +++ b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION="Optimized and portable routines for integer theoretic applications" +HOMEPAGE="https://github.com/libtom/libtommath" +SRC_URI="https://github.com/libtom/libtommath/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="doc examples static-libs" + +DEPEND="sys-devel/libtool" +RDEPEND="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch + + # 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 LT="${S}"/libtool +} + +src_configure() { + econf $(use_enable static-libs static) +} + +_emake() { + emake CC="$(tc-getCC)" -f makefile.shared \ + IGNORE_SPEED=1 \ + LIBPATH="${EPREFIX}/usr/$(get_libdir)" \ + INCPATH="${EPREFIX}/usr/include" \ + "$@" +} + +src_compile() { + _emake +} + +src_install() { + _emake DESTDIR="${ED}" install + # We only link against -lc, so drop the .la file. + find "${ED}" -name '*.la' -delete + + dodoc changes.txt + + use doc && dodoc *.pdf + + if use examples ; then + docinto demo + dodoc demo/*.c + fi +} diff --git a/dev-libs/libtommath/libtommath-1.0-r1.ebuild b/dev-libs/libtommath/libtommath-1.0-r1.ebuild new file mode 100644 index 000000000000..c647c55ef31d --- /dev/null +++ b/dev-libs/libtommath/libtommath-1.0-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION="Optimized and portable routines for integer theoretic applications" +HOMEPAGE="http://www.libtom.net/" +SRC_URI="https://github.com/libtom/libtommath/releases/download/v${PV}/ltm-${PV}.tar.xz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="doc examples static-libs" + +DEPEND="sys-devel/libtool" +RDEPEND="" + +src_prepare() { + # 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 LT="${S}"/libtool +} + +src_configure() { + econf $(use_enable static-libs static) +} + +_emake() { + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + -f makefile.shared \ + IGNORE_SPEED=1 \ + LIBPATH="${EPREFIX}/usr/$(get_libdir)" \ + INCPATH="${EPREFIX}/usr/include" \ + "$@" +} + +src_compile() { + _emake +} + +src_test() { + _emake test_standalone + ./test || die +} + +src_install() { + _emake DESTDIR="${D}" install + # We only link against -lc, so drop the .la file. + find "${ED}" -name '*.la' -delete + + dodoc changes.txt + + use doc && dodoc *.pdf + + if use examples ; then + docinto demo + dodoc demo/*.c + fi +} diff --git a/dev-libs/libtommath/libtommath-1.0.ebuild b/dev-libs/libtommath/libtommath-1.0.ebuild new file mode 100644 index 000000000000..855b05e61649 --- /dev/null +++ b/dev-libs/libtommath/libtommath-1.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils multilib toolchain-funcs + +DESCRIPTION="Optimized and portable routines for integer theoretic applications" +HOMEPAGE="http://www.libtom.net/" +SRC_URI="https://github.com/libtom/libtommath/releases/download/v${PV}/ltm-${PV}.tar.xz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="doc examples static-libs" + +DEPEND="sys-devel/libtool" +RDEPEND="" + +src_prepare() { + # 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 LT="${S}"/libtool +} + +src_configure() { + econf $(use_enable static-libs static) +} + +_emake() { + emake CC="$(tc-getCC)" -f makefile.shared \ + IGNORE_SPEED=1 \ + LIBPATH="${EPREFIX}/usr/$(get_libdir)" \ + INCPATH="${EPREFIX}/usr/include" \ + "$@" +} + +src_compile() { + _emake +} + +src_install() { + _emake DESTDIR="${D}" install + # We only link against -lc, so drop the .la file. + find "${ED}" -name '*.la' -delete + + dodoc changes.txt + + use doc && dodoc *.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 new file mode 100644 index 000000000000..ff7228943422 --- /dev/null +++ b/dev-libs/libtommath/metadata.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <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. + + 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. + + * 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>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> |