summaryrefslogtreecommitdiff
path: root/math/ntl/patches
diff options
context:
space:
mode:
authorjtb <jtb>2003-03-02 09:04:03 +0000
committerjtb <jtb>2003-03-02 09:04:03 +0000
commit8e5d26222748dccddd1b001096fa9772a7d5cc90 (patch)
tree9dcda2fb7dc9f828a38993107a0e2c2e7a7f810e /math/ntl/patches
parent4599fae0f45f9ab79ec975f561bac4784a288720 (diff)
downloadpkgsrc-8e5d26222748dccddd1b001096fa9772a7d5cc90.tar.gz
Update to version 5.3.1.
Changes between NTL 5.3 and 5.3.1 * Fixed a bug affecting the BuildIrred routines for ZZ_pEX and zz_pEX. Changes between NTL 5.2 and 5.3 * Minimized and isolated constructs that do not adhere to C/C++ standards, and added flags NTL_CLEAN_INT and NTL_CLEAN_PTR which force stricter compliance with these standards. * Added functions IsWhiteSpace, CharToIntVal, and IntValToChar to the tools module. * Added methods allocated, position1 to generic vector classes. * Added method allocated to the class vec_GF2. * Added conversion routines from unsigned int/long to int, long, float, and double. * Added routines AddPrec, SubPrec, etc., to the RR module, and declared the practice of directly assigning to the variable RR::prec obsolete. * Fixed a number of minor bugs. Changes between NTL 5.1a and 5.2 * Implemented Mark van Hoeij's new algorithm for factorining polynomials with rational coefficients. This new algorithm is much more efficient than the previous algorithm used by NTL, and is the default (one can switch back to the old algorithm with a run-time switch). * Added routines LLL_plus that are just like the all-integer LLL routines, except that they return the exact values of the squared lengths of the Gramm-Schmidt basis vectors. This is useful in implementing van Hoeij's algorithm. * Made a small change to quad_float.c to make it compile under gcc version 3.0 without errors. This is the one place in NTL where I resort to just a little assmebly code (but only on x86/Linux platforms), and wouldn't you know it, this is the one place where gcc 3.0 had problems. * Made a small change to the procedure for generating a distribution, so that now all files in the "tar" file comprising the distribution come without any annoyingly excessive access control restrictions. * Changed the version numbering scheme so that it is now closer to "standard practice". This is version "5.2". Any small bug fixes to this version will be named "5.2.1", "5.2.2", etc. Also, macros are now defined so that the numerical components of the version number are available to the programmer.
Diffstat (limited to 'math/ntl/patches')
-rw-r--r--math/ntl/patches/patch-aa147
1 files changed, 121 insertions, 26 deletions
diff --git a/math/ntl/patches/patch-aa b/math/ntl/patches/patch-aa
index aa244495923..819f2c52123 100644
--- a/math/ntl/patches/patch-aa
+++ b/math/ntl/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
+$NetBSD: patch-aa,v 1.5 2003/03/02 09:04:04 jtb Exp $
---- makefile.orig Fri Jun 8 14:23:17 2001
+--- makefile.orig Tue Dec 17 15:43:30 2002
+++ makefile
@@ -7,7 +7,7 @@
###############################################################
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# A C or C++ compiler, e. g., gcc, cc, xlc.
# There are a few components written in C which may be compiled
# under C++, but C compilers tend to generate slightly better code.
-@@ -15,11 +15,11 @@
+@@ -15,11 +15,11 @@ CC=gcc
# compatible code.
@@ -25,7 +25,7 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# Flags for the C compiler
# Some useful flags:
# -O2 -- recommended level of optimization
-@@ -31,7 +31,7 @@
+@@ -31,7 +31,7 @@ CFLAGS=-O2
@@ -34,7 +34,7 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# Flags for the C++ compiler (usually the same as CFLAGS)
# Some useful flags:
# -+ -- needed with xlC to make it treat .c files as C++ files
-@@ -40,16 +40,16 @@
+@@ -40,16 +40,16 @@ CXXFLAGS=$(CFLAGS)
# The defaults should almost always be OK.
@@ -42,7 +42,8 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
+#AR=ar
# command to make a library
- ARFLAGS=ruv
+-ARFLAGS=ruv
++#ARFLAGS=ruv
# arguments for AR
-RANLIB=ranlib
@@ -54,7 +55,7 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# arguments for linker for C++ programs
LDFLAGS_CXX=$(LDFLAGS)
-@@ -61,13 +61,13 @@
+@@ -61,13 +61,13 @@ LDLIBS=-lm
LDLIBS_CXX=$(LDLIBS)
# libraries for linking C++ programs
@@ -71,17 +72,17 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# where to install NTL
###############################################################
-@@ -87,15 +87,15 @@
+@@ -87,15 +87,15 @@ DOCDIR=$(PREFIX)/doc
###############################################################
-GMP_INCDIR=
-+GMP_INCDIR= -I${GMP_PREFIX}/include
++GMP_INCDIR= -I${BUILDLINK_PREFIX.gmp}/include
# Set to -I<directory containing gmp.h> if using GMP and GMP
# is not installed in a standard system directory, empty otherwise
-GMP_LIBDIR=
-+GMP_LIBDIR= -Wl,-R${GMP_PREFIX}/lib -L${GMP_PREFIX}/lib
++GMP_LIBDIR= -Wl,-R${BUILDLINK_PREFIX.gmp}/lib -L${BUILDLINK_PREFIX.gmp}/lib
# Set to -L<directory containing libgmp.a> if using GMP and GMP
# is not installed in a standard system directory, empty otherwise
@@ -90,7 +91,68 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
# Set to -lgmp if using GMP, empty otherwise
###############################################################
-@@ -285,11 +285,11 @@
+@@ -147,7 +147,7 @@ OBJ=$(O19)
+ S01=FFT.c FacVec.c GF2.c GF2E.c GF2EX.c GF2EXFactoring.c GF2X.c GF2X1.c
+ S02=$(S01) GF2XFactoring.c GF2XVec.c HNF.c ctools.c LLL.c LLL_FP.c LLL_QP.c
+ S03=$(S02) LLL_RR.c LLL_XD.c RR.c WordVector.c ZZ.c ZZVec.c ZZX.c ZZX1.c
+-S04=$(S03) ZZXCharPoly.c ZZXFactoring.c ZZ_p.c ZZ_pE.c ZZ_pEX.c
++S04=$(S03) ZZXCharPoly.c ZZXFactoring.c ZZ_p.c ZZ_pE.c ZZ_pEX.c
+ S05=$(S04) ZZ_pEXFactoring.c ZZ_pX.c ZZ_pX1.c ZZ_pXCharPoly.c
+ S06=$(S05) ZZ_pXFactoring.c fileio.c lip.c lzz_p.c lzz_pE.c lzz_pEX.c
+ S07=$(S06) lzz_pEXFactoring.c lzz_pX.c lzz_pX1.c
+@@ -162,8 +162,8 @@ S15=$(S14) vec_long.c vec_lzz_p.c vec_lz
+ S16=$(S15) vec_vec_GF2.c vec_vec_GF2E.c vec_vec_RR.c vec_vec_ZZ.c
+ S17=$(S16) vec_vec_ZZ_p.c vec_vec_ZZ_pE.c vec_vec_long.c vec_vec_lzz_p.c
+ S18=$(S17) vec_vec_lzz_pE.c vec_xdouble.c xdouble.c
+-S19=$(S18) G_LLL_FP.c G_LLL_QP.c G_LLL_XD.c G_LLL_RR.c
+-S20=$(S19) vec_ulong.c vec_vec_ulong.c
++S19=$(S18) G_LLL_FP.c G_LLL_QP.c G_LLL_XD.c G_LLL_RR.c
++S20=$(S19) vec_ulong.c vec_vec_ulong.c
+
+ SRC = $(S20)
+
+@@ -178,7 +178,7 @@ SINC = c_lip_impl.h g_lip_impl.h
+ # library header files
+
+ IN01= FFT.h FacVec.h GF2.h GF2E.h GF2EX.h GF2EXFactoring.h GF2X.h
+-IN02=$(IN01) GF2XFactoring.h GF2XVec.h HNF.h ctools.h LLL.h
++IN02=$(IN01) GF2XFactoring.h GF2XVec.h HNF.h ctools.h LLL.h
+ IN03=$(IN02) RR.h WordVector.h ZZ.h ZZVec.h ZZX.h ZZXFactoring.h ZZ_p.h
+ IN04=$(IN03) ZZ_pE.h ZZ_pEX.h ZZ_pEXFactoring.h ZZ_pX.h ZZ_pXFactoring.h
+ IN05=$(IN04) fileio.h lip.h lzz_p.h lzz_pE.h lzz_pEX.h lzz_pEXFactoring.h
+@@ -202,9 +202,9 @@ INCL=$(IN18)
+
+ # test data
+
+-TD1=BerlekampTestIn BerlekampTestOut CanZassTestIn CanZassTestOut
+-TD2=$(TD1) ZZXFacTestIn ZZXFacTestOut MoreFacTestIn LLLTestIn LLLTestOut RRTestIn RRTestOut
+-TD3=$(TD2) MatrixTestIn MatrixTestOut CharPolyTestIn
++TD1=BerlekampTestIn BerlekampTestOut CanZassTestIn CanZassTestOut
++TD2=$(TD1) ZZXFacTestIn ZZXFacTestOut MoreFacTestIn LLLTestIn LLLTestOut RRTestIn RRTestOut
++TD3=$(TD2) MatrixTestIn MatrixTestOut CharPolyTestIn
+ TD4=$(TD3) CharPolyTestOut QuadTestIn QuadTestOut
+
+ TD = $(TD4)
+@@ -260,15 +260,15 @@ DOC = $(D18)
+ # test program executables
+
+ PROG1=QuickTest BerlekampTest CanZassTest ZZXFacTest MoreFacTest LLLTest BitMatTest
+-PROG2=$(PROG1) MatrixTest CharPolyTest RRTest QuadTest
++PROG2=$(PROG1) MatrixTest CharPolyTest RRTest QuadTest
+ PROG3=$(PROG2) GF2EXTest subset ZZ_pEXTest lzz_pEXTest
+ PROGS = $(PROG3)
+
+ # things to save to a tar file
+
+-SFI1=makefile $(SRC) $(SINC) $(SCRIPTS) $(MD) $(GT) $(TS) $(TD) mach_desc.win
++SFI1=makefile $(SRC) $(SINC) $(SCRIPTS) $(MD) $(GT) $(TS) $(TD) mach_desc.win
+ SFI2=$(SFI1) MulTimeTest.c PolyTimeTest.c clr_AVOID_BRANCHING clr_AVOID_FLOAT
+-SFI3=$(SFI2) clr_FFT_PIPELINE clr_LONG_LONG clr_TBL_REM clr_WIZARD_HACK
++SFI3=$(SFI2) clr_FFT_PIPELINE clr_LONG_LONG clr_TBL_REM clr_WIZARD_HACK
+ SFI4=$(SFI3) InitSettings.c mul_banner poly_banner set_AVOID_BRANCHING set_AVOID_FLOAT
+ SFI5=$(SFI4) set_FFT_PIPELINE set_LONG_LONG set_TBL_REM set_WIZARD_HACK
+ SFI6=$(SFI5) WizComp.c DispSettings.c config_template WizardAux Wizard def_makefile
+@@ -285,11 +285,11 @@ SFILES=$(SFI6)
NTL_INCLUDE = -I../include -I.
# NTL needs this to find its include files
@@ -106,7 +168,7 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
-@@ -298,14 +298,14 @@
+@@ -298,14 +298,14 @@ all:
make setup2
make setup3
make setup4
@@ -123,29 +185,49 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
./MakeDesc
mv mach_desc.h ../include/NTL/mach_desc.h
-@@ -332,9 +332,9 @@
+@@ -332,9 +332,10 @@ setup4:
sh Wizard $(WIZARD)
-ntl.a: $(OBJ)
- $(AR) $(ARFLAGS) ntl.a $(OBJ)
- - $(RANLIB) ntl.a
-+libntl.la: $(OBJ)
-+ $(LIBTOOL) $(CC) -o libntl.la $(OBJ:.o=.lo) -rpath $(LIBDIR) \
-+ --version-info 0:0
++libntl.la: $(OBJ)
++ $(LIBTOOL) $(CC) -o libntl.la $(OBJ:.o=.lo) \
++ $(GMP_LIBDIR) $(GMP_LIB) -rpath $(LIBDIR) \
++ -version-info 0:1
lip.o: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h
$(COMPILE) $(GMP_INCDIR) lip.c
-@@ -351,7 +351,7 @@
+@@ -343,15 +344,15 @@ ctools.o: ctools.c
+ $(COMPILE) ctools.c
+
+
+-GetTime.o: GetTime.c
++GetTime.o: GetTime.c
+ $(COMPILE) GetTime.c
+
+
+-.c.o:
++.c.o:
$(COMPILE_CXX) $<
- .c:
+-.c:
- $(LINK_CXX) -o $@ $< ntl.a $(GMP_LIBDIR) $(GMP_LIB) $(LDLIBS_CXX)
-+ $(LINK_CXX) -o $@ $< libntl.la $(GMP_LIBDIR) $(GMP_LIB) $(LDLIBS_CXX)
++.c:
++ $(LINK_CXX) -o $@ $< libntl.la $(GMP_LIBDIR) $(GMP_LIB) $(LDLIBS_CXX)
#################################################################
#
-@@ -379,17 +379,12 @@
+@@ -372,25 +373,20 @@ check:
+ # make install just does a simple copy of the include file
+ # and library
+ # make uninstall removes these files
+-#
++#
+ #################################################################
+
+
install:
@@ -160,22 +242,26 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
- mkdir $(DOCDIR)/NTL
- cp ../doc/*.txt $(DOCDIR)/NTL
- cp ../doc/*.html $(DOCDIR)/NTL
+- cp ../doc/*.gif $(DOCDIR)/NTL
+ $(LIBTOOL) $(BSD_INSTALL_DATA) libntl.la $(LIBDIR)
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/NTL
+ $(BSD_INSTALL_DATA) ../include/NTL/*.h $(INCLUDEDIR)/NTL
+ $(BSD_INSTALL_DATA_DIR) $(DOCDIR)/NTL
+ $(BSD_INSTALL_DATA) ../doc/*.txt $(DOCDIR)/NTL
+ $(BSD_INSTALL_DATA) ../doc/*.html $(DOCDIR)/NTL
++
uninstall:
-@@ -409,16 +404,16 @@
+@@ -409,17 +405,17 @@ uninstall:
+ #
#################################################################
- clobber:
+-clobber:
- - rm ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c
- - rm lip_gmp_aux_impl.h ../include/NTL/gmp_aux.h
-+ - rm -fr libntl.la .libs mach_desc.h ../include/NTL/mach_desc.h GetTime.c
++clobber:
++ - rm -fr libntl.la .libs mach_desc.h ../include/NTL/mach_desc.h GetTime.c
+ - rm -f lip_gmp_aux_impl.h ../include/NTL/gmp_aux.h
- sh RemoveProg $(PROGS) MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux
- - rm *.o
@@ -192,16 +278,25 @@ $NetBSD: patch-aa,v 1.4 2001/06/20 10:19:28 jtb Exp $
#################################################################
#
-@@ -464,17 +459,17 @@
+@@ -436,7 +432,7 @@ DIRNAME=ntl-5.3.1
+ WINDIR=WinNTL-5_3_1
+
+ package:
+- sh unixify "$(SFILES)" "$(INCL)" "$(DOC)"
++ sh unixify "$(SFILES)" "$(INCL)" "$(DOC)"
+ -rm -r $(DIRNAME)
+ mv unix $(DIRNAME)
+ chmod -R a+rX $(DIRNAME)
+@@ -467,17 +463,17 @@ WO2 = $(WO1) ZZ_pX1.o lip.o tools.o vec_
WOBJ = $(WO2)
-wntl.a: $(WOBJ)
- $(AR) $(ARFLAGS) wntl.a $(WOBJ)
- - $(RANLIB) wntl.a
-+libwntl.la: $(WOBJ)
++libwntl.la: $(WOBJ)
+ $(LIBTOOL) $(CC) -o libwntl.la $(WOBJ:.o=.lo) -rpath $(LIBDIR) \
-+ --version-info 0:0
++ -version-info 0:0