dev-libs/ntl: version bump to 9.6.4

* EAPI=6

Package-Manager: portage-2.2.27
This commit is contained in:
David Seifert
2016-03-05 13:51:22 +01:00
parent 332fb28f0f
commit 3f736ff207
3 changed files with 246 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
DIST ntl-5.5.2.tar.gz 707247 SHA256 ef7fe7c8b60ec6e05b2a279caad0081263f7fb68b7360120846644cde726ff56 SHA512 44892e00051ca743b1184c9ae30e62c8e2605edaa394358979ff990a535993a6f282d882871ca9ebb3c632971f806c41d9b8024c8fb2cc6fa0d22bc26c66db06 WHIRLPOOL 4587463c4b52be721a7feb164fab73341af97c6f451c0bb2fbf675503c8a5262a5d7615d628e97f082dde23ce49db0f0b314c625dae0526bb1abdfc88732896f
DIST ntl-6.1.0.tar.gz 715439 SHA256 e16c30ceef1d47e94b8a37a8c4a1fb58729b8f8449c648e2a96280a3eecf9b6f SHA512 8c013bd4a250c8e29d57864585492be1f392c84356959d8100d5c45b420e411e5cd677524e2d50bbe265dda4c364185395780ba5d8490f6ac46da73c6a9728de WHIRLPOOL cf2a48cfe33cb58d8bda35d4a18d57a20ae23f2ba53f0f757d1bacc58ffa0bfdfd38363db38996e2e4069f5e3f2ad6a3ae9a859437a93404308512652190c765
DIST ntl-9.3.0.tar.gz 888710 SHA256 8f31508a9176b3fc843f08468b1632017f2450677bfd5147ead5136e0f24b68f SHA512 dfb4ac7a66aaddcf5d0d0c9fcaff253b0196a9d9f727788127dd18e131528fe60dedf8bfb864503225fc5796987aec9c7019b74e0fc12cd12c20aa33a9cf9d7d WHIRLPOOL a1f7cf573d49a277f0b2f1d50d18e66ef83a54430c517fd5d3c75e800216b706e8b5ff10e6ed2dc02b6eb4f9290671b249c67f1937cced96ac987055aaa3ab99
DIST ntl-9.6.4.tar.gz 915256 SHA256 c4a1f015a879b4a20f6b76a98eb6033a7936b0ff3b3f3ca6159d7e7b2afd89eb SHA512 ec8a4deb6996b31140edff978e07844ea8e30327491a6777d3982bffec01599b0cb5cc5dca297c8610ecb7ac9a4eae3407a59736fed840a2415a52a159370868 WHIRLPOOL 31ab69dc19b206868d1a9ac4f3d1cb52180980e751fe1431b738921b3816998797cf33a0ea9db8e1017e4face98efa897a4e42aa5be58365d1bc12e320a34354

View File

@@ -0,0 +1,160 @@
--- ntl-9.6.4/src/DoConfig
+++ ntl-9.6.4/src/DoConfig
@@ -24,14 +24,16 @@
'LDFLAGS' => '',
'LDLIBS' => '-lm',
+'PICFLAG' => '-fPIC',
'CPPFLAGS' => '',
-'DEF_PREFIX' => '/usr/local',
+'DEF_PREFIX' => '/usr',
'PREFIX' => '$(DEF_PREFIX)',
'LIBDIR' => '$(PREFIX)/lib',
'INCLUDEDIR' => '$(PREFIX)/include',
'DOCDIR' => '$(PREFIX)/share/doc',
+'SHMAKE' => 'non-gld',
'GMP_PREFIX' => '$(DEF_PREFIX)',
'GMP_INCDIR' => '$(GMP_PREFIX)/include',
--- ntl-9.6.4/src/mfile
+++ ntl-9.6.4/src/mfile
@@ -113,6 +113,18 @@
# Set to off if you want to bypass the wizard; otherwise, set to on.
+###############################################################
+#
+# New addition for shared library building. With gcc you need to
+# choose the Position Indepent Code flag. You have a choice of
+# -fpic better code but in rare case not available (ppc)
+# -fPIC slightly slower code but guaranted to work anywhere.
+#
+###############################################################
+
+PICFLAG=@{PICFLAG}
+
+
#################################################################
#
# That's it! You can ignore everything else in this file!
@@ -144,6 +156,8 @@
OBJ=$(O19)
+SHOBJ=$(subst .o,.lo,$(OBJ))
+
# library source files
@@ -317,6 +331,7 @@
LINK = $(CXX) $(NTL_INCLUDE) $(CPPFLAGS) $(CXXAUTOFLAGS) $(CXXFLAGS) $(LDFLAGS)
+.SUFFIXES: .lo
# 'make all' does a complete make, including all setup.
@@ -325,11 +340,11 @@
# again.
all:
- make setup1
- make setup2
- make setup3
- make setup4
- make ntl.a
+ ${MAKE} setup1
+ ${MAKE} setup2
+ ${MAKE} setup3
+ ${MAKE} setup4
+ ${MAKE} ntl.a
touch all
@@ -378,16 +393,28 @@
lip.o: lip.c g_lip_impl.h c_lip_impl.h
$(LCOMP) $(COMPILE) $(GMP_OPT_INCDIR) lip.c
+lip.lo: lip.c g_lip_impl.h c_lip_impl.h
+ $(LCOMP) $(COMPILE) $(PICFLAG) $(GMP_OPT_INCDIR) lip.c -o lip.lo
+
ctools.o: ctools.c
$(LCOMP) $(COMPILE) ctools.c
+ctools.lo: ctools.c
+ $(LCOMP) $(COMPILE) $(PICFLAG) ctools.c -o ctools.lo
+
GetTime.o: GetTime.c
$(LCOMP) $(COMPILE) GetTime.c
+GetTime.lo: GetTime.c
+ $(LCOMP) $(COMPILE) $(PICFLAG) GetTime.c -o GetTime.lo
+
GetPID.o: GetPID.c
$(LCOMP) $(COMPILE) GetPID.c
+GetPID.lo: GetPID.c
+ $(LCOMP) $(COMPILE) $(PICFLAG) GetPID.c -o GetPID.lo
+
CheckCompile: CheckCompile.c
$(LINK) -o CheckCompile CheckCompile.c $(LDLIBS)
@@ -395,6 +422,9 @@
.c.o:
$(LCOMP) $(COMPILE) $(GF2X_OPT_INCDIR) $<
+.c.lo:
+ $(LCOMP) $(COMPILE) $(PICFLAG) $(GF2X_OPT_INCDIR) -o $@ $<
+
.c:
@{LSTAT} $(LINK) -o $@ $< ntl.a $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB) $(LDLIBS) #LSTAT
@{LSHAR} $(LIBTOOL) --tag=CXX --mode=link $(LINK) -o $@ $< libntl.la #LSHAR
@@ -408,7 +438,7 @@
check:
sh RemoveProg $(PROGS)
- make QuickTest
+ ${MAKE} QuickTest
./QuickTest
sh RemoveProg QuickTest
sh TestScript
@@ -465,20 +495,18 @@
#
#################################################################
-clobber:
+clobber: clean
rm -f ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c GetPID.c
sh ResetFeatures '..'
rm -f ../include/NTL/gmp_aux.h
- sh RemoveProg $(PROGS) MakeDesc $(AUXPROGS) gen_gmp_aux
- rm -f *.o
- rm -rf small
+ sh RemoveProg $(PROGS)
rm -f cfileout mfileout
rm -rf .libs *.lo libntl.la
rm -f all
clean:
sh RemoveProg $(PROGS) MakeDesc $(AUXPROGS) gen_gmp_aux
- rm -f *.o
+ rm -f *.o *.lo
rm -rf small
@{LSHAR} - $(LIBTOOL) --mode=clean rm -f libntl.la *.lo #LSHAR
@@ -570,5 +598,11 @@
$(LINK) -o DispSettings DispSettings.c $(LDLIBS)
-
+sharedso: DIRNAME $(SHOBJ)
+ $(LINK) $(PICFLAG) -shared -Wl,-soname,lib`cat DIRNAME`.so -o lib`cat DIRNAME`.so $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB)
+ ln -s lib`cat DIRNAME`.so libntl.so
+
+shareddylib: DIRNAME $(SHOBJ)
+ $(LINK) $(PICFLAG) -dynamiclib -install_name $(LIBDIR)/lib`cat DIRNAME`.dylib -o lib`cat DIRNAME`.dylib $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB)
+ ln -s lib`cat DIRNAME`.dylib libntl.dylib

View File

@@ -0,0 +1,85 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit flag-o-matic toolchain-funcs
DESCRIPTION="High-performance and portable Number Theory C++ library"
HOMEPAGE="http://shoup.net/ntl/"
SRC_URI="http://www.shoup.net/ntl/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc static-libs test"
RDEPEND="dev-libs/gmp:0=
>=dev-libs/gf2x-0.9"
DEPEND="${RDEPEND}
dev-lang/perl"
S="${WORKDIR}/${P}/src"
PATCHES=(
"${FILESDIR}/${P}-sanitize-makefile.patch"
"${FILESDIR}/${PN}-9.2.0-singular.patch"
)
src_prepare() {
# fix parallel make
sed -i -e "s/make/make ${MAKEOPTS}/g" WizardAux || die
cd .. || die
default
replace-flags -O[3-9] -O2
}
src_configure() {
perl DoConfig \
PREFIX="${EPREFIX}"/usr \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
CXX="$(tc-getCXX)" \
AR="$(tc-getAR)" \
RANLIB="$(tc-getRANLIB)" \
NTL_GMP_LIP=on NTL_GF2X_LIB=on NTL_LEGACY_SP_MULMOD=on \
|| die "DoConfig failed"
}
src_compile() {
# split the targets to allow parallel make to run properly
emake setup1 setup2
emake setup3
sh Wizard on || die "Tuning wizard failed"
if use static-libs; then
emake ntl.a
fi
local trg=so
[[ ${CHOST} == *-darwin* ]] && trg=dylib
emake shared${trg}
}
src_install() {
if use static-libs; then
newlib.a ntl.a libntl.a
fi
dolib.so lib*$(get_libname)
cd .. || die
insinto /usr/include
doins -r include/NTL
dodoc README
if use doc ; then
dodoc doc/*.txt
docinto html
dodoc doc/*.html doc/*.gif
fi
}
src_test(){
# the current ebuild need static library to run tests
emake ntl.a
default
}