Ticket #13325: spkg.diff

File spkg.diff, 13.9 KB (added by jpflori, 7 years ago)

Spkg diff, for review only. Committed in spkg.

  • SPKG.txt

    diff -r 356219ee2fe1 SPKG.txt
    a b  
    4242
    4343== Changelog ==
    4444
     45=== eclib-20120428.p0 (Jean-Pierre Flori, 21 August 2012) ===
     46 * #13325: let eclib build on Cygwin.
     47 * Put -lgmp after -lntl and -lpari in configure.ac.
     48 * Add $(EXEEXT) to the targets in tests/Makefile.am.
     49 * Add '-no-undefined' flag to libjc.la LDFLAGS so that a shared library
     50   is built on Cygwin.
     51 * automake and autoconf were run to regenerate the configure script and
     52   Makefiles.
     53
    4554=== eclib-20120428 (John Cremona, 28 April 2012) ===
    4655 * Source code update to revision 7fcd812213df  (as at 25 April 2012), from
    4756   http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/eclib-2012-04-25.tar.gz
  • new file patches/configure.ac.patch

    diff -r 356219ee2fe1 patches/configure.ac.patch
    - +  
     1--- src.orig/configure.ac       2012-08-21 12:10:34.935383860 +0200
     2+++ src/configure.ac    2012-08-21 12:25:58.363349817 +0200
     3@@ -61,7 +61,7 @@
     4   PARI_LIBS=""
     5   PARI_CFLAGS=""
     6 fi
     7-PARI_LIBS="${PARI_LIBS} -lpari"
     8+PARI_LIBS="${PARI_LIBS} -lpari -lgmp"
     9 AC_SUBST(PARI_LIBS)
     10 AC_SUBST(PARI_CFLAGS)
     11 
     12@@ -83,7 +83,7 @@
     13   NTL_LIBS=""
     14   NTL_CFLAGS="${NTL_ARITH}"
     15 fi
     16-NTL_LIBS="${NTL_LIBS} -lgmp -lntl"
     17+NTL_LIBS="${NTL_LIBS} -lntl -lgmp"
     18 AC_SUBST(NTL_LIBS)
     19 AC_SUBST(NTL_CFLAGS)
     20 
  • new file patches/configure.patch

    diff -r 356219ee2fe1 patches/configure.patch
    - +  
     1--- src.orig/configure  2012-08-21 12:10:35.843383826 +0200
     2+++ src/configure       2012-08-21 12:26:30.103348334 +0200
     3@@ -2179,11 +2179,11 @@
     4        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     5 /* end confdefs.h.  */
     6 $ac_includes_default
     7-            enum { N = $2 / 2 - 1 };
     8 int
     9 main ()
     10 {
     11-static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
     12+static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
     13+            0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
     14 test_array [0] = 0
     15 
     16   ;
     17@@ -2194,11 +2194,11 @@
     18   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     19 /* end confdefs.h.  */
     20 $ac_includes_default
     21-               enum { N = $2 / 2 - 1 };
     22 int
     23 main ()
     24 {
     25-static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
     26+static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
     27+               ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
     28                 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
     29 test_array [0] = 0
     30 
     31@@ -15263,7 +15263,7 @@
     32   PARI_LIBS=""
     33   PARI_CFLAGS=""
     34 fi
     35-PARI_LIBS="${PARI_LIBS} -lpari"
     36+PARI_LIBS="${PARI_LIBS} -lpari -lgmp"
     37 
     38 
     39 
     40@@ -15332,7 +15332,7 @@
     41   NTL_LIBS=""
     42   NTL_CFLAGS="${NTL_ARITH}"
     43 fi
     44-NTL_LIBS="${NTL_LIBS} -lgmp -lntl"
     45+NTL_LIBS="${NTL_LIBS} -lntl -lgmp"
     46 
     47 
     48 
  • new file patches/libsrc_Makefile.am.patch

    diff -r 356219ee2fe1 patches/libsrc_Makefile.am.patch
    - +  
     1--- src.orig/libsrc/Makefile.am 2012-08-21 12:10:34.127383890 +0200
     2+++ src/libsrc/Makefile.am      2012-08-21 12:26:01.179349819 +0200
     3@@ -30,5 +30,6 @@
     4 EXTRA_DIST = vec.cc mat.cc sub.cc smat.cc svec.cc smat_elim.cc random.cc
     5 
     6 libjc_la_SOURCES = $(DOTCCS)
     7+libjc_la_LDFLAGS = -no-undefined $(AM_LDFLAGS)
     8 nobase_include_HEADERS = $(DOTHS)
     9 ACLOCAL_AMFLAGS = -I m4
  • new file patches/libsrc_Makefile.in.patch

    diff -r 356219ee2fe1 patches/libsrc_Makefile.in.patch
    - +  
     1--- src.orig/libsrc/Makefile.in 2012-08-21 12:10:34.283383884 +0200
     2+++ src/libsrc/Makefile.in      2012-08-21 12:26:24.155348556 +0200
     3@@ -89,6 +89,9 @@
     4        $(am__objects_4)
     5 am_libjc_la_OBJECTS = $(am__objects_5)
     6 libjc_la_OBJECTS = $(am_libjc_la_OBJECTS)
     7+libjc_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
     8+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
     9+       $(CXXFLAGS) $(libjc_la_LDFLAGS) $(LDFLAGS) -o $@
     10 DEFAULT_INCLUDES = -I.@am__isrc@
     11 depcomp = $(SHELL) $(top_srcdir)/depcomp
     12 am__depfiles_maybe = depfiles
     13@@ -251,6 +254,7 @@
     14 # dist" so we must list them here:
     15 EXTRA_DIST = vec.cc mat.cc sub.cc smat.cc svec.cc smat_elim.cc random.cc
     16 libjc_la_SOURCES = $(DOTCCS)
     17+libjc_la_LDFLAGS = -no-undefined $(AM_LDFLAGS)
     18 nobase_include_HEADERS = $(DOTHS)
     19 ACLOCAL_AMFLAGS = -I m4
     20 all: all-am
     21@@ -319,7 +323,7 @@
     22          rm -f "$${dir}/so_locations"; \
     23        done
     24 libjc.la: $(libjc_la_OBJECTS) $(libjc_la_DEPENDENCIES)
     25-       $(CXXLINK) -rpath $(libdir) $(libjc_la_OBJECTS) $(libjc_la_LIBADD) $(LIBS)
     26+       $(libjc_la_LINK) -rpath $(libdir) $(libjc_la_OBJECTS) $(libjc_la_LIBADD) $(LIBS)
     27 
     28 mostlyclean-compile:
     29        -rm -f *.$(OBJEXT)
  • new file patches/tests_Makefile.am.patch

    diff -r 356219ee2fe1 patches/tests_Makefile.am.patch
    - +  
     1--- src.orig/tests/Makefile.am  2012-08-21 12:10:35.255383848 +0200
     2+++ src/tests/Makefile.am       2012-08-21 12:26:01.191349463 +0200
     3@@ -6,7 +6,7 @@
     4 test_input_dir = $(srcdir)/in
     5 test_output_dir = $(srcdir)/out
     6 
     7-PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace tconic tleg thilbert rcubic lcubic tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert
     8+PROCS_TESTS = smattest$(EXEEXT) comptest$(EXEEXT) rattest$(EXEEXT) bigrattest$(EXEEXT) ptest$(EXEEXT) mptest$(EXEEXT) tbessel$(EXEEXT) mvectest$(EXEEXT) mmattest$(EXEEXT) mspace$(EXEEXT) tconic$(EXEEXT) tleg$(EXEEXT) thilbert$(EXEEXT) rcubic$(EXEEXT) lcubic$(EXEEXT) tp2points$(EXEEXT) tilll$(EXEEXT) vectest1$(EXEEXT) vectest2$(EXEEXT) mattest1$(EXEEXT) mattest2$(EXEEXT) space1$(EXEEXT) space2$(EXEEXT) svectest1$(EXEEXT) svectest2$(EXEEXT) tcon2$(EXEEXT) tlegcert$(EXEEXT)
     9 procs_tests: $(PROCS_TESTS)
     10 
     11 # NB tcon2 and tlegcert are not currently tested in check_procs
     12@@ -70,7 +70,7 @@
     13        ./lcubic < $(test_input_dir)/lcubic.in > lcubic.testout && diff lcubic.testout $(test_output_dir)/lcubic.out
     14        ./tp2points < $(test_input_dir)/tp2points.in > tp2points.testout && diff tp2points.testout $(test_output_dir)/tp2points$(OBJ_SUF).out
     15 
     16-QCURVES_TESTS = tcurve tpoints theight thtconst tegr telog tdivpol tperiods tsat tsat2 tsat3 conductor tate torsion twist allisog findinf indep
     17+QCURVES_TESTS = tcurve$(EXEEXT) tpoints$(EXEEXT) theight$(EXEEXT) thtconst$(EXEEXT) tegr$(EXEEXT) telog$(EXEEXT) tdivpol$(EXEEXT) tperiods$(EXEEXT) tsat$(EXEEXT) tsat2$(EXEEXT) tsat3$(EXEEXT) conductor$(EXEEXT) tate$(EXEEXT) torsion$(EXEEXT) twist$(EXEEXT) allisog$(EXEEXT) findinf$(EXEEXT) indep$(EXEEXT)
     18 qcurves_tests: $(QCURVES_TESTS)
     19 
     20 tcurve_SOURCES=tcurve.cc
     21@@ -113,7 +113,7 @@
     22        ./findinf < $(test_input_dir)/findinf.in > findinf.testout 2>/dev/null && diff findinf.testout $(test_output_dir)/findinf.out
     23        ./indep < $(test_input_dir)/indep.in > indep.testout 2>/dev/null && diff indep.testout $(test_output_dir)/indep.out
     24 
     25-QRANK_TESTS = tmrank tequiv tred mwrank ratpoint d2
     26+QRANK_TESTS = tmrank$(EXEEXT) tequiv$(EXEEXT) tred$(EXEEXT) mwrank$(EXEEXT) ratpoint$(EXEEXT) d2$(EXEEXT)
     27 qrank_tests: $(QRANK_TESTS)
     28 # NB d2 is not currently tested in check_qrank
     29 
     30@@ -131,7 +131,7 @@
     31        ./mwrank < $(test_input_dir)/mwrank.in > mwrank.testout 2>/dev/null && diff mwrank.testout $(test_output_dir)/mwrank.out
     32        rm -f PRIMES 1
     33 
     34-G0N_TESTS = modtest homtest hecketest nftest mhcount oftest tmanin h1bsd h1curve pcurve nfhpcurve nfhpmcurve h1clist checkap h1bsdcurisog h1degphi nfcount ecnf h1first moreap qexp
     35+G0N_TESTS = modtest$(EXEEXT) homtest$(EXEEXT) hecketest$(EXEEXT) nftest$(EXEEXT) mhcount$(EXEEXT) oftest$(EXEEXT) tmanin$(EXEEXT) h1bsd$(EXEEXT) h1curve$(EXEEXT) pcurve$(EXEEXT) nfhpcurve$(EXEEXT) nfhpmcurve$(EXEEXT) h1clist$(EXEEXT) checkap$(EXEEXT) h1bsdcurisog$(EXEEXT) h1degphi$(EXEEXT) nfcount$(EXEEXT) ecnf$(EXEEXT) h1first$(EXEEXT) moreap$(EXEEXT) qexp$(EXEEXT)
     36 g0n_tests: $(G0N_TESTS)
     37 
     38 # NB aplist, checkgens and tnfd are not currently tested in check_g0n
  • new file patches/tests_Makefile.in.patch

    diff -r 356219ee2fe1 patches/tests_Makefile.in.patch
    - +  
     1--- src.orig/tests/Makefile.in  2012-08-21 12:10:35.323383845 +0200
     2+++ src/tests/Makefile.in       2012-08-21 12:26:24.395348551 +0200
     3@@ -35,8 +35,8 @@
     4 build_triplet = @build@
     5 host_triplet = @host@
     6 @ALLPROGS_FALSE@bin_PROGRAMS = mwrank$(EXEEXT)
     7-@ALLPROGS_TRUE@bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) \
     8-@ALLPROGS_TRUE@        $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5)
     9+@ALLPROGS_TRUE@bin_PROGRAMS = $(PROCS_TESTS) $(QCURVES_TESTS) \
     10+@ALLPROGS_TRUE@        $(QRANK_TESTS) $(G0N_TESTS) $(am__EXEEXT_1)
     11 subdir = tests
     12 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     13 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     14@@ -46,31 +46,7 @@
     15 mkinstalldirs = $(install_sh) -d
     16 CONFIG_CLEAN_FILES =
     17 CONFIG_CLEAN_VPATH_FILES =
     18-am__EXEEXT_1 = smattest$(EXEEXT) comptest$(EXEEXT) rattest$(EXEEXT) \
     19-       bigrattest$(EXEEXT) ptest$(EXEEXT) mptest$(EXEEXT) \
     20-       tbessel$(EXEEXT) mvectest$(EXEEXT) mmattest$(EXEEXT) \
     21-       mspace$(EXEEXT) tconic$(EXEEXT) tleg$(EXEEXT) \
     22-       thilbert$(EXEEXT) rcubic$(EXEEXT) lcubic$(EXEEXT) \
     23-       tp2points$(EXEEXT) tilll$(EXEEXT) vectest1$(EXEEXT) \
     24-       vectest2$(EXEEXT) mattest1$(EXEEXT) mattest2$(EXEEXT) \
     25-       space1$(EXEEXT) space2$(EXEEXT) svectest1$(EXEEXT) \
     26-       svectest2$(EXEEXT) tcon2$(EXEEXT) tlegcert$(EXEEXT)
     27-am__EXEEXT_2 = tcurve$(EXEEXT) tpoints$(EXEEXT) theight$(EXEEXT) \
     28-       thtconst$(EXEEXT) tegr$(EXEEXT) telog$(EXEEXT) \
     29-       tdivpol$(EXEEXT) tperiods$(EXEEXT) tsat$(EXEEXT) \
     30-       tsat2$(EXEEXT) tsat3$(EXEEXT) conductor$(EXEEXT) tate$(EXEEXT) \
     31-       torsion$(EXEEXT) twist$(EXEEXT) allisog$(EXEEXT) \
     32-       findinf$(EXEEXT) indep$(EXEEXT)
     33-am__EXEEXT_3 = tmrank$(EXEEXT) tequiv$(EXEEXT) tred$(EXEEXT) \
     34-       mwrank$(EXEEXT) ratpoint$(EXEEXT) d2$(EXEEXT)
     35-am__EXEEXT_4 = modtest$(EXEEXT) homtest$(EXEEXT) hecketest$(EXEEXT) \
     36-       nftest$(EXEEXT) mhcount$(EXEEXT) oftest$(EXEEXT) \
     37-       tmanin$(EXEEXT) h1bsd$(EXEEXT) h1curve$(EXEEXT) \
     38-       pcurve$(EXEEXT) nfhpcurve$(EXEEXT) nfhpmcurve$(EXEEXT) \
     39-       h1clist$(EXEEXT) checkap$(EXEEXT) h1bsdcurisog$(EXEEXT) \
     40-       h1degphi$(EXEEXT) nfcount$(EXEEXT) ecnf$(EXEEXT) \
     41-       h1first$(EXEEXT) moreap$(EXEEXT) qexp$(EXEEXT)
     42-am__EXEEXT_5 = aplist$(EXEEXT) checkgens$(EXEEXT) tnfd$(EXEEXT) \
     43+am__EXEEXT_1 = aplist$(EXEEXT) checkgens$(EXEEXT) tnfd$(EXEEXT) \
     44        d2$(EXEEXT) tcon2$(EXEEXT) tlegcert$(EXEEXT)
     45 am__installdirs = "$(DESTDIR)$(bindir)"
     46 PROGRAMS = $(bin_PROGRAMS)
     47@@ -494,7 +470,7 @@
     48 AM_CPPFLAGS = -I$(top_srcdir)/libsrc $(NTL_CFLAGS) $(PARI_CFLAGS)
     49 test_input_dir = $(srcdir)/in
     50 test_output_dir = $(srcdir)/out
     51-PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace tconic tleg thilbert rcubic lcubic tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert
     52+PROCS_TESTS = smattest$(EXEEXT) comptest$(EXEEXT) rattest$(EXEEXT) bigrattest$(EXEEXT) ptest$(EXEEXT) mptest$(EXEEXT) tbessel$(EXEEXT) mvectest$(EXEEXT) mmattest$(EXEEXT) mspace$(EXEEXT) tconic$(EXEEXT) tleg$(EXEEXT) thilbert$(EXEEXT) rcubic$(EXEEXT) lcubic$(EXEEXT) tp2points$(EXEEXT) tilll$(EXEEXT) vectest1$(EXEEXT) vectest2$(EXEEXT) mattest1$(EXEEXT) mattest2$(EXEEXT) space1$(EXEEXT) space2$(EXEEXT) svectest1$(EXEEXT) svectest2$(EXEEXT) tcon2$(EXEEXT) tlegcert$(EXEEXT)
     53 
     54 # NB tcon2 and tlegcert are not currently tested in check_procs
     55 ptest_SOURCES = ptest.cc
     56@@ -530,7 +506,7 @@
     57 svectest1_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=1
     58 svectest2_SOURCES = svectest.cc
     59 svectest2_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=2
     60-QCURVES_TESTS = tcurve tpoints theight thtconst tegr telog tdivpol tperiods tsat tsat2 tsat3 conductor tate torsion twist allisog findinf indep
     61+QCURVES_TESTS = tcurve$(EXEEXT) tpoints$(EXEEXT) theight$(EXEEXT) thtconst$(EXEEXT) tegr$(EXEEXT) telog$(EXEEXT) tdivpol$(EXEEXT) tperiods$(EXEEXT) tsat$(EXEEXT) tsat2$(EXEEXT) tsat3$(EXEEXT) conductor$(EXEEXT) tate$(EXEEXT) torsion$(EXEEXT) twist$(EXEEXT) allisog$(EXEEXT) findinf$(EXEEXT) indep$(EXEEXT)
     62 tcurve_SOURCES = tcurve.cc
     63 tpoints_SOURCES = tpoints.cc
     64 theight_SOURCES = theight.cc
     65@@ -549,14 +525,14 @@
     66 allisog_SOURCES = allisog.cc
     67 findinf_SOURCES = findinf.cc
     68 indep_SOURCES = indep.cc
     69-QRANK_TESTS = tmrank tequiv tred mwrank ratpoint d2
     70+QRANK_TESTS = tmrank$(EXEEXT) tequiv$(EXEEXT) tred$(EXEEXT) mwrank$(EXEEXT) ratpoint$(EXEEXT) d2$(EXEEXT)
     71 # NB d2 is not currently tested in check_qrank
     72 tmrank_SOURCES = tmrank.cc
     73 tequiv_SOURCES = tequiv.cc
     74 tred_SOURCES = tred.cc
     75 mwrank_SOURCES = mwrank.cc
     76 ratpoint_SOURCES = ratpoint.cc
     77-G0N_TESTS = modtest homtest hecketest nftest mhcount oftest tmanin h1bsd h1curve pcurve nfhpcurve nfhpmcurve h1clist checkap h1bsdcurisog h1degphi nfcount ecnf h1first moreap qexp
     78+G0N_TESTS = modtest$(EXEEXT) homtest$(EXEEXT) hecketest$(EXEEXT) nftest$(EXEEXT) mhcount$(EXEEXT) oftest$(EXEEXT) tmanin$(EXEEXT) h1bsd$(EXEEXT) h1curve$(EXEEXT) pcurve$(EXEEXT) nfhpcurve$(EXEEXT) nfhpmcurve$(EXEEXT) h1clist$(EXEEXT) checkap$(EXEEXT) h1bsdcurisog$(EXEEXT) h1degphi$(EXEEXT) nfcount$(EXEEXT) ecnf$(EXEEXT) h1first$(EXEEXT) moreap$(EXEEXT) qexp$(EXEEXT)
     79 
     80 # NB aplist, checkgens and tnfd are not currently tested in check_g0n
     81 modtest_SOURCES = modtest.cc
  • spkg-install

    diff -r 356219ee2fe1 spkg-install
    a b  
    5757
    5858
    5959cd src/
     60echo
     61echo "Now patching eclib..."
     62for patch in ../patches/*.patch; do
     63    patch -p1 <"$patch"
     64    if [ $? -ne 0 ]; then
     65        echo >&2 "Error applying '$patch'"
     66        exit 1
     67    fi
     68done
     69# The following is needed to fool autotools and avoid regeneration of the build
     70# system (which would fail anyway because the m4 directory is not included).
     71echo "Touching patched file..."
     72touch aclocal.m4 && \
     73touch Makefile.in && \
     74touch configure
     75if [ $? -ne 0 ]; then
     76    echo >&2 "Error touching patched files"
     77    exit 1
     78fi
    6079
    6180echo
    6281echo "Now configuring eclib..."