diff --git a/math/ntl/Makefile b/math/ntl/Makefile index 2ae58dbb253..ea8c753e9c5 100644 --- a/math/ntl/Makefile +++ b/math/ntl/Makefile @@ -1,40 +1,46 @@ -# $OpenBSD: Makefile,v 1.11 2007/09/15 18:44:36 steven Exp $ +# $OpenBSD: Makefile,v 1.12 2009/05/22 09:03:24 benoit Exp $ -COMMENT= Victor Shoup's Number Theory Library +COMMENT = Victor Shoup's Number Theory Library -DISTNAME= ntl-5.3.1 -PKGNAME= ${DISTNAME}p0 -CATEGORIES= math -HOMEPAGE= http://www.shoup.net/ntl/ +DISTNAME = ntl-5.5.1 +SHARED_LIBS = ntl 0.0 # .0.1 +CATEGORIES = math -MAINTAINER= Tom Knienieder +HOMEPAGE = http://www.shoup.net/ntl/ -# GPL -PERMIT_PACKAGE_FTP= Yes -PERMIT_PACKAGE_CDROM= Yes -PERMIT_DISTFILES_FTP= Yes -PERMIT_DISTFILES_CDROM= Yes +MAINTAINER = Benoit Lecocq -MASTER_SITES= ${HOMEPAGE} +# GPLv2 +PERMIT_PACKAGE_FTP = Yes +PERMIT_PACKAGE_CDROM = Yes +PERMIT_DISTFILES_FTP = Yes +PERMIT_DISTFILES_CDROM = Yes -BUILD_DEPENDS= :gmp-*:devel/gmp +WANTLIB = m -WRKBUILD= ${WRKSRC}/src -MAKE_FILE= makefile +MASTER_SITES = ${HOMEPAGE} -CONFIGURE_STYLE= simple -CONFIGURE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - NTL_GMP_LIP=on GMP_PREFIX="${LOCALBASE}" +LIB_DEPENDS = gmp.>=7::devel/gmp -REGRESS_TARGET= check +MAKE_FILE = makefile + +CONFIGURE_STYLE = simple +CONFIGURE_ARGS = CC="${CC}" CFLAGS="${CFLAGS}" \ + CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ + NTL_GMP_LIP=on GMP_PREFIX="${LOCALBASE}" \ + NTL_STD_CXX=on LIBntl_VERSION=${LIBntl_VERSION} \ + SHARED=on DEF_PREFIX="${LOCALBASE}" + +WRKBUILD = ${WRKSRC}/src + +REGRESS_TARGET = check do-install: @${INSTALL_DATA_DIR} ${PREFIX}/include/NTL @cd ${WRKSRC}/include/NTL; ${INSTALL_DATA} *.h ${PREFIX}/include/NTL - @cd ${WRKBUILD}; ${INSTALL_DATA} ntl.a ${PREFIX}/lib/libntl.a + @cd ${WRKBUILD}; ${INSTALL_DATA} .libs/libntl.a ${PREFIX}/lib/libntl.a + @cd ${WRKBUILD}; ${INSTALL_DATA} .libs/libntl.so.${LIBntl_VERSION} ${PREFIX}/lib/libntl.so.${LIBntl_VERSION} @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/NTL - @cd ${WRKSRC}/doc; ${INSTALL_DATA} *.txt ${PREFIX}/share/doc/NTL - @cd ${WRKSRC}/doc; ${INSTALL_DATA} *.html ${PREFIX}/share/doc/NTL + @cd ${WRKSRC}/doc; ${INSTALL_DATA} * ${PREFIX}/share/doc/NTL .include diff --git a/math/ntl/distinfo b/math/ntl/distinfo index e994b678232..62234a56989 100644 --- a/math/ntl/distinfo +++ b/math/ntl/distinfo @@ -1,5 +1,5 @@ -MD5 (ntl-5.3.1.tar.gz) = B+KFmLm1AZezZyP39Tbikw== -RMD160 (ntl-5.3.1.tar.gz) = LuxrjHLzQudMgfykMkNIGM42Fes= -SHA1 (ntl-5.3.1.tar.gz) = IvkATVlZXd+TEVDjmAWIDMpn+Lw= -SHA256 (ntl-5.3.1.tar.gz) = a3tb0pW4f+zyuw4/boD6+FZSygvGbc5SSZuyOo03TW0= -SIZE (ntl-5.3.1.tar.gz) = 669649 +MD5 (ntl-5.5.1.tar.gz) = PaoeUe+gDg/pgKKw+SLHdw== +RMD160 (ntl-5.5.1.tar.gz) = zYDQniQFiZIpgS1cJqbXmsX8EdI= +SHA1 (ntl-5.5.1.tar.gz) = FOg1Ol0x442gdxx0ChZP4GgNxSc= +SHA256 (ntl-5.5.1.tar.gz) = C6UEeq5FIrDzQv4yorUp/Cmn4OtIGLWnJ0q3ptZoT3A= +SIZE (ntl-5.5.1.tar.gz) = 704256 diff --git a/math/ntl/patches/patch-src_DoConfig b/math/ntl/patches/patch-src_DoConfig new file mode 100644 index 00000000000..99b07114422 --- /dev/null +++ b/math/ntl/patches/patch-src_DoConfig @@ -0,0 +1,31 @@ +--- src/DoConfig.orig Tue May 5 08:46:39 2009 ++++ src/DoConfig Thu May 21 21:46:51 2009 +@@ -12,9 +12,9 @@ + + %MakeVal = ( + +-'CC' => 'gcc', +-'CXX' => 'g++', +-'CFLAGS' => '-O2', ++'CC' => '${CC}', ++'CXX' => '${CXX}', ++'CFLAGS' => '-O2 -g', + 'CXXFLAGS' => '$(CFLAGS)', + 'AR' => 'ar', + 'ARFLAGS' => 'ruv', +@@ -27,12 +27,14 @@ + 'LDLIBS_CXX' => '$(LDLIBS)', + 'CPPFLAGS' => '', + +-'DEF_PREFIX' => '/usr/local', ++'DEF_PREFIX' => '${LOCALBASE}', + + 'PREFIX' => '$(DEF_PREFIX)', + 'LIBDIR' => '$(PREFIX)/lib', + 'INCLUDEDIR' => '$(PREFIX)/include', + 'DOCDIR' => '$(PREFIX)/share/doc', ++ ++'LIBntl_VERSION' => '$(LIBntl_VERSION)', + + 'GMP_PREFIX' => '$(DEF_PREFIX)', + 'GMP_INCDIR' => '$(GMP_PREFIX)/include', diff --git a/math/ntl/patches/patch-src_GF2EX_c b/math/ntl/patches/patch-src_GF2EX_c new file mode 100644 index 00000000000..68a9507344a --- /dev/null +++ b/math/ntl/patches/patch-src_GF2EX_c @@ -0,0 +1,11 @@ +--- src/GF2EX.c.orig Sat Mar 14 18:32:20 2009 ++++ src/GF2EX.c Sat Mar 14 18:32:46 2009 +@@ -5,6 +5,8 @@ + + #include + ++#include ++ + NTL_START_IMPL + + diff --git a/math/ntl/patches/patch-src_VERSION_INFO b/math/ntl/patches/patch-src_VERSION_INFO new file mode 100644 index 00000000000..0982edc84ba --- /dev/null +++ b/math/ntl/patches/patch-src_VERSION_INFO @@ -0,0 +1,5 @@ +--- src/VERSION_INFO~ Tue May 5 08:46:39 2009 ++++ src/VERSION_INFO Fri May 22 09:58:36 2009 +@@ -1 +1 @@ +-0:1:0 ++0:0:0 diff --git a/math/ntl/patches/patch-src_WordVector_c b/math/ntl/patches/patch-src_WordVector_c new file mode 100644 index 00000000000..60ee4e3fdea --- /dev/null +++ b/math/ntl/patches/patch-src_WordVector_c @@ -0,0 +1,11 @@ +--- src/WordVector.c.orig Sat Mar 14 18:36:31 2009 ++++ src/WordVector.c Sat Mar 14 18:36:53 2009 +@@ -3,6 +3,8 @@ + + #include + ++#include ++ + NTL_START_IMPL + + diff --git a/math/ntl/patches/patch-src_tools_c b/math/ntl/patches/patch-src_tools_c new file mode 100644 index 00000000000..9f2dd1f2fc7 --- /dev/null +++ b/math/ntl/patches/patch-src_tools_c @@ -0,0 +1,47 @@ +--- src/tools.c.orig Sat Mar 14 18:37:45 2009 ++++ src/tools.c Sat Mar 14 18:37:57 2009 +@@ -5,6 +5,8 @@ + + #include + ++#include ++ + NTL_START_IMPL + + +@@ -8,8 +8,35 @@ + NTL_START_IMPL + + ++/* ++ The following code differs from vanilla NTL 5.4.2. ++ ++ We add a SetErrorCallbackFunction(). This sets a global callback function _function_, ++ which gets called with parameter _context_ and an error message string whenever Error() ++ gets called. ++ ++ Note that if the custom error handler *returns*, then NTL will dump the error message ++ back to stderr and abort() as it habitually does. ++ ++ -- David Harvey (2008-04-12) ++*/ ++ ++void (*ErrorCallbackFunction)(const char*, void*) = NULL; ++void *ErrorCallbackContext = NULL; ++ ++ ++void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context) ++{ ++ ErrorCallbackFunction = function; ++ ErrorCallbackContext = context; ++} ++ ++ + void Error(const char *s) + { ++ if (ErrorCallbackFunction != NULL) ++ ErrorCallbackFunction(s, ErrorCallbackContext); ++ + cerr << s << "\n"; + abort(); + } diff --git a/math/ntl/patches/patch-src_tools_h b/math/ntl/patches/patch-src_tools_h new file mode 100644 index 00000000000..2bab7318fb1 --- /dev/null +++ b/math/ntl/patches/patch-src_tools_h @@ -0,0 +1,15 @@ +--- include/NTL/tools.h 2008-03-04 15:35:02.000000000 -0800 ++++ include/NTL/tools.h.modified 2008-04-17 12:24:41.000000000 -0700 +@@ -249,6 +249,12 @@ + char IntValToChar(long a); + + ++/* ++ This function is not present in vanilla NTL 5.4.2. ++ See tools.c for documentation. ++ */ ++void SetErrorCallbackFunction(void (*func)(const char *s, void *context), void *context); ++ + + void Error(const char *s); + diff --git a/math/ntl/patches/patch-src_vec_GF2_c b/math/ntl/patches/patch-src_vec_GF2_c new file mode 100644 index 00000000000..07f2add3b67 --- /dev/null +++ b/math/ntl/patches/patch-src_vec_GF2_c @@ -0,0 +1,11 @@ +--- src/vec_GF2.c.orig Sat Mar 14 18:38:29 2009 ++++ src/vec_GF2.c Sat Mar 14 18:38:42 2009 +@@ -3,6 +3,8 @@ + + #include + ++#include ++ + NTL_START_IMPL + + void vec_GF2::SetLength(long n) diff --git a/math/ntl/pkg/PFRAG.shared b/math/ntl/pkg/PFRAG.shared new file mode 100644 index 00000000000..99e32e47288 --- /dev/null +++ b/math/ntl/pkg/PFRAG.shared @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1 2009/05/22 09:03:33 benoit Exp $ +@lib lib/libntl.so.${LIBntl_VERSION} diff --git a/math/ntl/pkg/PLIST b/math/ntl/pkg/PLIST index 03a0c9d6340..dec64dfb754 100644 --- a/math/ntl/pkg/PLIST +++ b/math/ntl/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.4 2004/09/15 09:11:59 espie Exp $ +@comment $OpenBSD: PLIST,v 1.5 2009/05/22 09:03:33 benoit Exp $ +%%SHARED%% include/NTL/ include/NTL/FFT.h include/NTL/FacVec.h @@ -12,6 +13,7 @@ include/NTL/GF2XVec.h include/NTL/HNF.h include/NTL/LLL.h include/NTL/RR.h +include/NTL/SPMM_ASM.h include/NTL/WordVector.h include/NTL/ZZ.h include/NTL/ZZVec.h @@ -111,6 +113,9 @@ share/doc/NTL/ZZ_pEX.txt share/doc/NTL/ZZ_pEXFactoring.txt share/doc/NTL/ZZ_pX.txt share/doc/NTL/ZZ_pXFactoring.txt +share/doc/NTL/arrow1.gif +share/doc/NTL/arrow2.gif +share/doc/NTL/arrow3.gif share/doc/NTL/config.txt share/doc/NTL/conversions.txt share/doc/NTL/copying.txt @@ -147,6 +152,7 @@ share/doc/NTL/tour-ex4.html share/doc/NTL/tour-ex5.html share/doc/NTL/tour-ex6.html share/doc/NTL/tour-examples.html +share/doc/NTL/tour-gf2x.html share/doc/NTL/tour-gmp.html share/doc/NTL/tour-impl.html share/doc/NTL/tour-intro.html @@ -155,6 +161,7 @@ share/doc/NTL/tour-roadmap.html share/doc/NTL/tour-stdcxx.html share/doc/NTL/tour-struct.html share/doc/NTL/tour-time.html +share/doc/NTL/tour-tips.html share/doc/NTL/tour-unix.html share/doc/NTL/tour-win.html share/doc/NTL/tour.html