summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/libtommath
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/libtommath')
-rw-r--r--dev-libs/libtommath/Manifest1
-rw-r--r--dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch47
-rw-r--r--dev-libs/libtommath/libtommath-0.42.0-r1.ebuild66
-rw-r--r--dev-libs/libtommath/metadata.xml63
4 files changed, 177 insertions, 0 deletions
diff --git a/dev-libs/libtommath/Manifest b/dev-libs/libtommath/Manifest
new file mode 100644
index 000000000000..741f0885a748
--- /dev/null
+++ b/dev-libs/libtommath/Manifest
@@ -0,0 +1 @@
+DIST libtommath-0.42.0.tar.gz 1732144 SHA256 5246356ba18c1b6edf4a7bc836a3d223842b86914cdba6dd8c112bfc59e227c8 SHA512 d26e7737e5750530a7b96432502f0d458931e67af528872c46ad8dfc921b8f6ef4b3e05cb07d22bd13a8b24db65812928ae4c381250a4df95f6ca55efc3dae23 WHIRLPOOL beab5007a204042fd0a5b86ccc639ee37d82bb4afe2ceebcfe062deffaa259c8a699c81a52e804c2a79cb36914d805c81826a6e456523f729063240d1bfca9e6
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..075e7f4ac5e2
--- /dev/null
+++ b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils multilib toolchain-funcs
+
+DESCRIPTION="highly optimized and portable routines for integer based number 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 ~x86-freebsd ~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/metadata.xml b/dev-libs/libtommath/metadata.xml
new file mode 100644
index 000000000000..8de78c577823
--- /dev/null
+++ b/dev-libs/libtommath/metadata.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </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&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>