diff options
-rw-r--r-- | sci-mathematics/ggnfs/ChangeLog | 10 | ||||
-rw-r--r-- | sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch | 158 | ||||
-rw-r--r-- | sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild (renamed from sci-mathematics/ggnfs/ggnfs-0.77.1-r1.ebuild) | 36 | ||||
-rw-r--r-- | sci-mathematics/ggnfs/metadata.xml | 8 |
4 files changed, 195 insertions, 17 deletions
diff --git a/sci-mathematics/ggnfs/ChangeLog b/sci-mathematics/ggnfs/ChangeLog index 25af661f0cc7..8504913c62d2 100644 --- a/sci-mathematics/ggnfs/ChangeLog +++ b/sci-mathematics/ggnfs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-mathematics/ggnfs -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/ggnfs/ChangeLog,v 1.5 2012/11/30 08:00:06 patrick Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/ggnfs/ChangeLog,v 1.6 2013/03/07 08:34:59 jlec Exp $ + +*ggnfs-0.77.1-r2 (07 Mar 2013) + + 07 Mar 2013; Justin Lecher <jlec@gentoo.org> -ggnfs-0.77.1-r1.ebuild, + +ggnfs-0.77.1-r2.ebuild, +files/ggnfs-0.77.1-gentoo.patch, metadata.xml: + Respect CC and CFLAGS and link properly respecting LDFLAGS, #451046 30 Nov 2012; Patrick Lauer <patrick@gentoo.org> ggnfs-0.77.1-r1.ebuild: Correctify displayed version number diff --git a/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch b/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch new file mode 100644 index 000000000000..ac7516034147 --- /dev/null +++ b/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch @@ -0,0 +1,158 @@ + src/Makefile | 34 +++++++++++++++++----------------- + src/lasieve4/Makefile | 6 +++--- + src/pol5/Makefile | 8 ++++---- + 3 files changed, 24 insertions(+), 24 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 01f66be..59b433f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -1,15 +1,15 @@ + # Workaround for PPC + # Due to unknown reason -march isn't supported there + ifeq ($(ARCH),970) +- ALLOPT=-mcpu=$(ARCH) -m64 -pipe ++ ALLOPT= + else +- ALLOPT=-march=$(ARCH) -pipe ++ ALLOPT= + endif + + INC=-I. -I.. -I../include $(LOCALINC) + LIBS=-lgmp -lm + BINDIR=../bin +-LIBFLAGS=$(LOCALLIB) ++LDFLAGS+=$(LOCALLIB) + + MATBUILD_TPIE=0 + TPIE_DIR=../../tpie +@@ -17,7 +17,7 @@ TPIE_DIR=../../tpie + # Turn on\off workaround for GMP 4.2 bug + # Consult http://swox.com/list-archives/gmp-bugs/2006-May/000475.html + # for more info +-GMP_BUG=1 ++GMP_BUG=0 + + ifeq ($(HOST),generic) + ALLOPT+= -DGGNFS_HOST_GENERIC +@@ -32,10 +32,10 @@ ifeq ($(ARCH),prescott) + ALLOPT+= -DL2_CACHE_SIZE=1024 + endif + +-DEBUGOPT=-W -Wall -g -pg ++DEBUGOPT=-W -Wall + +-CFLAGS=-DNDEBUG -O3 -funroll-loops -finline-functions \ +- -ftracer -fomit-frame-pointer -W -Wall $(ALLOPT) ++CFLAGS+=-DNDEBUG \ ++ -W -Wall $(ALLOPT) + # CFLAGS=$(DEBUGOPT) $(ALLOPT) + # -ffast-math removed since -funsafe-math-optimizations seems to cause occasional problems, especially in sqrt + +@@ -71,7 +71,7 @@ endif + ifeq ($(MATBUILD_TPIE),1) + BINS+= $(BINDIR)/matbuild-tpie + INC+= -I$(TPIE_DIR)/include +- LIBFLAGS+= -L$(TPIE_DIR)/lib ++ LDFLAGS+= -L$(TPIE_DIR)/lib + LIBS+=-ltpie + endif + +@@ -97,35 +97,35 @@ bins : $(BINS) + $(CC) $(CFLAGS) -o $@ -c $*.S + + $(BINDIR)/sieve : sieve.c clsieve.c $(OBJS) makefb.o +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ $^ $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + + $(BINDIR)/makefb : makefb.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -D_MAKEFB_STANDALONE -o $@ \ ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -D_MAKEFB_STANDALONE -o $@ \ + makefb.c $(OBJS) $(LIBS) + + $(BINDIR)/procrels : procrels.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ procrels.c $(OBJS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ procrels.c $(OBJS) $(LIBS) + + $(BINDIR)/matbuild : matbuild.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matbuild.c combparts.c \ ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matbuild.c combparts.c \ + $(OBJS) $(LIBS) + + $(BINDIR)/matbuild-tpie : matbuild.c $(OBJS) +- $(CPP) $(INC) $(CFLAGS) $(LIBFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \ ++ $(CPP) $(INC) $(CFLAGS) $(LDFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \ + experimental/combparts_tpie.cpp experimental/llist_tpie.cpp \ + $(OBJS) $(LIBS) + + $(BINDIR)/matprune : matprune.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matprune.c $(OBJS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matprune.c $(OBJS) $(LIBS) + + $(BINDIR)/matsolve : matsolve.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS) + + $(BINDIR)/sqrt : sqrt.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS) + + $(BINDIR)/polyselect : polyselect.c $(OBJS) +- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS) + + latsiever : + $(MAKE) -C lasieve4 +diff --git a/src/lasieve4/Makefile b/src/lasieve4/Makefile +index 31e05a9..6886b16 100644 +--- a/src/lasieve4/Makefile ++++ b/src/lasieve4/Makefile +@@ -10,8 +10,8 @@ + # 6/13/04: Hacked up for use in GGNFS by Chris Monico. + + INC=-I.. -I../../include $(LOCALINC) +-LIBFLAGS=-L. $(LOCALLIB) +-CFLAGS+=-Os ++LDFLAGS+=-L. $(LOCALLIB) ++CFLAGS+= + + BINDIR=../../bin + FACT=prho.o +@@ -58,7 +58,7 @@ gnfs-lasieve4eI%.o: gnfs-lasieve4e.c lasieve.h asm/siever-config.h + + $(BINDIR)/gnfs-lasieve4I%e: gnfs-lasieve4eI%.o $(OBJS) libgmp-aux.a \ + asm/liblasieve.a asm/liblasieveI%.a $(FACT) +- $(CC) $(CFLAGS) $(INC) $(LIBFLAGS) -o $@ $^ $(LIBS) ++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -o $@ $^ $(LIBS) + + asm/lib%.a: + $(MAKE) -C asm +diff --git a/src/pol5/Makefile b/src/pol5/Makefile +index 44b08be..e474ffb 100644 +--- a/src/pol5/Makefile ++++ b/src/pol5/Makefile +@@ -1,6 +1,6 @@ + BINDIR=../../bin + INC=-I.. -I../../include $(LOCALINC) +-LIBFLAGS=$(LOCALLIB) ++LDFLAGS+=$(LOCALLIB) + LIBS=-lm -lgmp + CFLAGS2= + +@@ -46,13 +46,13 @@ all: $(BINS) + $(CC) $(INC) -c $(CFLAGS) $(CFLAGS2) $^ + + $(BINDIR)/pol51m0b: pol51m0b.o $(OBJS) $(OBJS2) +- $(CC) $(INC) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBFLAGS) $(LIBS) ++ $(CC) $(INC) $(LDFLAGS) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBS) + + $(BINDIR)/pol51m0n: pol51m0n.o $(OBJS) $(OBJS3) +- $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS) + + $(BINDIR)/pol51opt: pol51opt.o $(OBJS) $(OBJS4) +- $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS) ++ $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS) + + clean : ; + rm -f $(BINS) *.o core diff --git a/sci-mathematics/ggnfs/ggnfs-0.77.1-r1.ebuild b/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild index 6de63de483b1..0019df5d801f 100644 --- a/sci-mathematics/ggnfs/ggnfs-0.77.1-r1.ebuild +++ b/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild @@ -1,32 +1,45 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/ggnfs/ggnfs-0.77.1-r1.ebuild,v 1.3 2012/11/30 08:00:06 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild,v 1.1 2013/03/07 08:34:59 jlec Exp $ + +EAPI=5 + +inherit eutils -EAPI=4 DESCRIPTION="A suite of algorithms to help factoring large integers" # inactive old homepage exists, this is a fork HOMEPAGE="https://github.com/radii/ggnfs" # snapshot because github makes people stupid -SRC_URI="http://dev.gentooexperimental.org/~dreeevil/${P}.zip +SRC_URI=" + http://dev.gentooexperimental.org/~dreeevil/${P}.zip http://stuff.mit.edu/afs/sipb/project/pari-gp/ggnfs/Linux/src/def-par.txt http://stuff.mit.edu/afs/sipb/project/pari-gp/ggnfs/Linux/src/def-nm-params.txt" -inherit eutils - -LICENSE="GPL-2" SLOT="0" -# Need to test if it actually compiles on x86 +LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" IUSE="" -DEPEND="" +DEPEND=">=dev-libs/gmp-4.3:0" RDEPEND="${DEPEND} !sci-mathematics/cado-nfs" # file collisions, fixable S=${WORKDIR}/${PN}-master +pkg_setup() { + einfo "There are several internal tuning options" + einfo "Please export ARCH being on of the following" + einfo " prescott" + einfo " pentium2" + einfo " pentium4" + einfo "if your cpu is of that type" + + [[ -z ${ARCH} ]] && export ARCH=generic +} + src_prepare() { - echo "#define GGNFS_VERSION \"0.77.1-$ARCH\"" > include/version.h + epatch "${FILESDIR}"/${P}-gentoo.patch + echo "#define GGNFS_VERSION \"0.77.1-$ARCH\"" > include/version.h || die # fix directory symlink, add missing targets, rewrite variable used by portage internally cd src/lasieve4 && rm -f -r asm && ln -s ppc32 asm || die sed -i -e 's/all: liblasieve.a/all: liblasieve.a liblasieveI11.a liblasieveI15.a liblasieveI16.a/' asm/Makefile || die @@ -34,6 +47,7 @@ src_prepare() { sed -i -e 's/ARCH/MARCH/g' Makefile src/Makefile || die sed -i -e 's/$(LSBINS) strip/$(LSBINS)/' src/Makefile || die #No stripping! sed -i -e 's/SVN \$Revision\$/0.77.1 snapshot/' src/experimental/lasieve4_64/gnfs-lasieve4e.c src/lasieve4/gnfs-lasieve4e.c || die + tc-export CC } src_configure() { :; } @@ -42,7 +56,7 @@ src_compile() { # setting MARCH like this is fugly, but it uses -march=$ARCH - better fix welcome # it also assumes a recent-ish compiler cd src - HOST="generic" MARCH="native" emake -j1 + HOST="generic" MARCH="${ARCH}" emake -j1 } src_install() { diff --git a/sci-mathematics/ggnfs/metadata.xml b/sci-mathematics/ggnfs/metadata.xml index 24cbb90cf0c4..6719fcd2bb35 100644 --- a/sci-mathematics/ggnfs/metadata.xml +++ b/sci-mathematics/ggnfs/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer> - <email>patrick@gentoo.org</email> - <name>Patrick Lauer</name> - </maintainer> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> </pkgmetadata> |