summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2009-08-10 21:17:51 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2009-08-10 21:17:51 +0000
commite9415adba6bc812cb2669e5a00461fe306d18bf9 (patch)
treece1b3cbb04376a1970b0ce74ac4135f7c2ab20c2 /dev-libs/gf2x
parentMove from dev-perl to perl-core (diff)
downloadgentoo-2-e9415adba6bc812cb2669e5a00461fe306d18bf9.tar.gz
gentoo-2-e9415adba6bc812cb2669e5a00461fe306d18bf9.tar.bz2
gentoo-2-e9415adba6bc812cb2669e5a00461fe306d18bf9.zip
Initial import
(Portage version: 2.2_rc36/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/gf2x')
-rw-r--r--dev-libs/gf2x/ChangeLog10
-rw-r--r--dev-libs/gf2x/files/gf2x-0.3.1-shared.patch64
-rw-r--r--dev-libs/gf2x/gf2x-0.3.1.ebuild35
-rw-r--r--dev-libs/gf2x/metadata.xml10
4 files changed, 119 insertions, 0 deletions
diff --git a/dev-libs/gf2x/ChangeLog b/dev-libs/gf2x/ChangeLog
new file mode 100644
index 000000000000..372fb54cf78a
--- /dev/null
+++ b/dev-libs/gf2x/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-libs/gf2x
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gf2x/ChangeLog,v 1.1 2009/08/10 21:17:50 bicatali Exp $
+
+*gf2x-0.3.1 (10 Aug 2009)
+
+ 10 Aug 2009; Sébastien Fabbro <bicatali@gentoo.org> +gf2x-0.3.1.ebuild,
+ +files/gf2x-0.3.1-shared.patch, +metadata.xml:
+ Initial import
+
diff --git a/dev-libs/gf2x/files/gf2x-0.3.1-shared.patch b/dev-libs/gf2x/files/gf2x-0.3.1-shared.patch
new file mode 100644
index 000000000000..e2932be0fa0b
--- /dev/null
+++ b/dev-libs/gf2x/files/gf2x-0.3.1-shared.patch
@@ -0,0 +1,64 @@
+--- Makefile.orig 2009-08-10 21:37:55.000000000 +0100
++++ Makefile 2009-08-10 22:07:35.000000000 +0100
+@@ -1,14 +1,11 @@
+
+ # Sorry, this makefile is kind of ugly, so pending a choice for an
+ # appropriate building tool, we'll simply avoid make -j for this one.
+-.NOTPARALLEL:
++#.NOTPARALLEL:
+
+ # Default flags
+-CFLAGS:=-O2 -DNDEBUG
+-CXXFLAGS:=$(CFLAGS)
+-
+-ALWAYS_CFLAGS:=-std=c99 -g -W -Wall
+-ALWAYS_CXXFLAGS:=-g -W -Wall
++ALWAYS_CFLAGS:=-std=c99 -W -Wall -DNDEBUG
++ALWAYS_CXXFLAGS:=-W -Wall -DNDEBUG
+
+ # Start with defaults that should never be overridden
+ MY_CFLAGS=$(ALWAYS_CFLAGS)
+@@ -37,10 +34,12 @@
+ .c.o:
+ $(CC) $(MY_CFLAGS) $< -c -o $@
+
++.SUFFIXES: .lo
++.c.lo:
++ $(CC) $(MY_CFLAGS) -fPIC $< -c -o $@
++
+ ifeq ($(shell arch),i686)
+ w:=32
+-CFLAGS+=-msse2
+-CXXFLAGS+=-msse2
+ endif
+
+ ifeq ($(shell arch),x86_64)
+@@ -52,7 +51,7 @@
+
+ .PHONY: all tune1
+
+-all: tune1 libgf2x.a tunetoom
++all: tune1 libgf2x.a libgf2x.so tunetoom
+
+ LIBGF2X_FILES:=mul-toom.c mul-gf2x.c mulfft-bit.c
+
+@@ -60,6 +59,11 @@
+ rm -f $@
+ ar qcv $@ $^
+
++libgf2x.so: $(patsubst %.c,%.lo,$(LIBGF2X_FILES))
++ rm -f $@
++ $(CC) -shared $(LDFLAGS) -Wl,-soname,libgf2x.so.0 -o libgf2x.so.0 $^
++ ln -s libgf2x.so.0 libgf2x.so
++
+ gen_bb_mul_code: gen_bb_mul_code.c
+ $(CC) $(MY_CFLAGS) $< -o $@
+
+@@ -141,6 +145,7 @@
+ -rm -f bench update-thresholds tunetoom tunefft libgf2x.a
+ -rm -f check*.res factor
+ -rm -f *.o
++ -rm -f *.lo libgf2x.so libgf2x.so.0
+
+ gf2x.h: mul-inlines.c mul-small.c mul-basecase.c thresholds.h
+ mul-kara.o: gf2x.h thresholds.h
diff --git a/dev-libs/gf2x/gf2x-0.3.1.ebuild b/dev-libs/gf2x/gf2x-0.3.1.ebuild
new file mode 100644
index 000000000000..07d32babb376
--- /dev/null
+++ b/dev-libs/gf2x/gf2x-0.3.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gf2x/gf2x-0.3.1.ebuild,v 1.1 2009/08/10 21:17:50 bicatali Exp $
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="C/C++ routines for fast arithmetic in GF(2)[x]"
+HOMEPAGE="http://wwwmaths.anu.edu.au/~brent/gf2x.html"
+SRC_URI="http://wwwmaths.anu.edu.au/~brent/ftp/trinom/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}"
+# tests need gmp and ntl, introducing a circle dependency
+RESTRICT=test
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-shared.patch
+}
+
+src_compile() {
+ # turned off explicitely by upstream
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ dolib.a libgf2x.a || die
+ dolib.so libgf2x.so* || die
+ dodoc Changelog README
+}
diff --git a/dev-libs/gf2x/metadata.xml b/dev-libs/gf2x/metadata.xml
new file mode 100644
index 000000000000..d00a4f3a6cbc
--- /dev/null
+++ b/dev-libs/gf2x/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-mathematics</herd>
+<longdescription lang="en">
+ gf2x is a C/C++ software package containing routines for fast
+ arithmetic in GF(2)[x] (multiplication, squaring, GCD) and searching
+ for irreducible/primitive trinomials.
+</longdescription>
+</pkgmetadata>