Ticket #13026: cddlib-094g.p0-nodelete.diff

File cddlib-094g.p0-nodelete.diff, 19.8 KB (added by jdemeyer, 10 years ago)

Diff for the cddlib spkg without deletes. For reference / review only.

  • SPKG.txt

    # HG changeset patch
    # User R. Andrew Ohana <andrew.ohana@gmail.com>
    # Date 1338104096 25200
    # Node ID 4c099fcf44abe3da21608c9494a0acf33b76972a
    # Parent  0b3117810b4bb4b9496176c072deec9f08169073
    #13026: upgrade to 094g and cleanup spkg
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    3838
    3939== Special Update/Build Instructions ==
    4040From clean upstream sources:
    41  * remove directories doc, examples/*, src-mathlink/*, autom4te.cache     
     41 * remove directories doc, examples*, autom4te.cache     
    4242 * Important - when recreating spkg, must make sure to first use hard links
    4343   See Trac 11245, where this caused it to fail on Cygwin:
    4444   Instructions from Dima Pasechnik, where of course foo = cddlib-vers
     
    5050
    5151== Changelog ==
    5252
     53=== cddlib-094g.p0 (R. Andrew Ohana, 14 June 2012) ===
     54 * Update to 094g
     55 * Cleanup patch directory
     56 * Cleanup spkg-install
     57
    5358=== cddlib-094f.p11 (Jeroen Demeyer, 13 February 2012) ===
    5459 * Trac #12501: refresh autogenerated files using the
    5560   patches/refresh_autogenerated.sh script.
  • new file patches/lib-src-gmp_Makefile.am.patch

    diff --git a/patches/lib-src-gmp_Makefile.am.patch b/patches/lib-src-gmp_Makefile.am.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src-gmp/Makefile.am b/src/lib-src-gmp/Makefile.am
     2index b3ab11a..a9673b8 100644
     3--- a/src.bak/lib-src-gmp/Makefile.am
     4+++ b/src/lib-src-gmp/Makefile.am
     5@@ -13,7 +13,8 @@ cddmp_f.c \
     6 cddio_f.c \
     7 cddlib_f.c \
     8 cddproj_f.c \
     9-setoper.c
     10+setoper.c \
     11+random.c
     12 
     13 include_HEADERS = \
     14 cdd.h \
  • new file patches/lib-src-gmp_Makefile.in.patch

    diff --git a/patches/lib-src-gmp_Makefile.in.patch b/patches/lib-src-gmp_Makefile.in.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src-gmp/Makefile.in b/src/lib-src-gmp/Makefile.in
     2index 4ab9342..93ff335 100644
     3--- a/src.bak/lib-src-gmp/Makefile.in
     4+++ b/src/lib-src-gmp/Makefile.in
     5@@ -54,7 +54,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
     6 libcddgmp_la_LIBADD =
     7 am_libcddgmp_la_OBJECTS = cddcore.lo cddlp.lo cddmp.lo cddio.lo \
     8        cddlib.lo cddproj.lo cddcore_f.lo cddlp_f.lo cddmp_f.lo \
     9-       cddio_f.lo cddlib_f.lo cddproj_f.lo setoper.lo
     10+       cddio_f.lo cddlib_f.lo cddproj_f.lo setoper.lo random.lo
     11 libcddgmp_la_OBJECTS = $(am_libcddgmp_la_OBJECTS)
     12 DEFAULT_INCLUDES = -I.@am__isrc@
     13 depcomp = $(SHELL) $(top_srcdir)/depcomp
     14@@ -199,7 +199,8 @@ cddmp_f.c \
     15 cddio_f.c \
     16 cddlib_f.c \
     17 cddproj_f.c \
     18-setoper.c
     19+setoper.c \
     20+random.c
     21 
     22 include_HEADERS = \
     23 cdd.h \
     24@@ -293,6 +294,7 @@ distclean-compile:
     25 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddmp_f.Plo@am__quote@
     26 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddproj.Plo@am__quote@
     27 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddproj_f.Plo@am__quote@
     28+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
     29 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setoper.Plo@am__quote@
     30 
     31 .c.o:
  • new file patches/lib-src_Makefile.am.patch

    diff --git a/patches/lib-src_Makefile.am.patch b/patches/lib-src_Makefile.am.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src/Makefile.am b/src/lib-src/Makefile.am
     2index fe08dc3..5b964c6 100644
     3--- a/src.bak/lib-src/Makefile.am
     4+++ b/src/lib-src/Makefile.am
     5@@ -7,7 +7,8 @@ cddmp.c \
     6 cddio.c \
     7 cddlib.c \
     8 cddproj.c \
     9-setoper.c
     10+setoper.c \
     11+random.c
     12 
     13 include_HEADERS = \
     14 cdd.h \
  • new file patches/lib-src_Makefile.in.patch

    diff --git a/patches/lib-src_Makefile.in.patch b/patches/lib-src_Makefile.in.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src/Makefile.in b/src/lib-src/Makefile.in
     2index bd3c2b5..ccf4a6c 100644
     3--- a/src.bak/lib-src/Makefile.in
     4+++ b/src/lib-src/Makefile.in
     5@@ -53,7 +53,7 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
     6 LTLIBRARIES = $(lib_LTLIBRARIES)
     7 libcdd_la_LIBADD =
     8 am_libcdd_la_OBJECTS = cddcore.lo cddlp.lo cddmp.lo cddio.lo cddlib.lo \
     9-       cddproj.lo setoper.lo
     10+       cddproj.lo setoper.lo random.lo
     11 libcdd_la_OBJECTS = $(am_libcdd_la_OBJECTS)
     12 DEFAULT_INCLUDES = -I.@am__isrc@
     13 depcomp = $(SHELL) $(top_srcdir)/depcomp
     14@@ -192,7 +192,8 @@ cddmp.c \
     15 cddio.c \
     16 cddlib.c \
     17 cddproj.c \
     18-setoper.c
     19+setoper.c \
     20+random.c
     21 
     22 include_HEADERS = \
     23 cdd.h \
     24@@ -277,6 +278,7 @@ distclean-compile:
     25 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddlp.Plo@am__quote@
     26 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddmp.Plo@am__quote@
     27 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddproj.Plo@am__quote@
     28+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
     29 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setoper.Plo@am__quote@
     30 
     31 .c.o:
  • new file patches/lib-src_cddcore.c.patch

    diff --git a/patches/lib-src_cddcore.c.patch b/patches/lib-src_cddcore.c.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src/cddcore.c b/src/lib-src/cddcore.c
     2index 9644788..a029bc3 100644
     3--- a/src.bak/lib-src/cddcore.c
     4+++ b/src/lib-src/cddcore.c
     5@@ -17,6 +17,7 @@
     6 #include <time.h>
     7 #include <math.h>
     8 #include <string.h>
     9+#include "random.h"   /* include last - overrides RAND_MAX */
     10 
     11 void dd_CheckAdjacency(dd_ConePtr cone,
     12     dd_RayPtr *RP1, dd_RayPtr *RP2, dd_boolean *adjacent)
     13@@ -1849,19 +1850,15 @@ void dd_QuickSort(dd_rowindex OV, long p, long r, dd_Amatrix A, long dmax)
     14 }
     15 
     16 
     17-#ifndef RAND_MAX
     18-#define RAND_MAX 32767
     19-#endif
     20-
     21 void dd_RandomPermutation(dd_rowindex OV, long t, unsigned int seed)
     22 {
     23   long k,j,ovj;
     24   double u,xk,r,rand_max=(double) RAND_MAX;
     25   dd_boolean localdebug=dd_FALSE;
     26 
     27-  srand(seed);
     28+  portable_srand(seed);
     29   for (j=t; j>1 ; j--) {
     30-    r=rand();
     31+    r=portable_rand();
     32     u=r/rand_max;
     33     xk=(double)(j*u +1);
     34     k=(long)xk;
  • new file patches/lib-src_cddlp.c.patch

    diff --git a/patches/lib-src_cddlp.c.patch b/patches/lib-src_cddlp.c.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/lib-src/cddlp.c b/src/lib-src/cddlp.c
     2index 855b197..dd1268b 100644
     3--- a/src.bak/lib-src/cddlp.c
     4+++ b/src/lib-src/cddlp.c
     5@@ -13,6 +13,7 @@
     6 
     7 #include "setoper.h"  /* set operation library header (Ver. May 18, 2000 or later) */
     8 #include "cdd.h"
     9+#include "random.h"
     10 #include <stdio.h>
     11 #include <stdlib.h>
     12 #include <time.h>
     13@@ -23,6 +24,8 @@
     14 #include "cdd_f.h"
     15 #endif
     16 
     17+#include "random.h"   /* include last - overrides RAND_MAX */
     18+
     19 #define dd_CDDLPVERSION  "Version 0.94b (August 25, 2005)"
     20 
     21 #define dd_FALSE 0
     22@@ -1755,9 +1758,9 @@ void dd_RandomPermutation2(dd_rowindex OV,long t,unsigned int seed)
     23   double u,xk,r,rand_max=(double) RAND_MAX;
     24   int localdebug=dd_FALSE;
     25 
     26-  srand(seed);
     27+  portable_srand(seed);
     28   for (j=t; j>1 ; j--) {
     29-    r=rand();
     30+    r=portable_rand();
     31     u=r/rand_max;
     32     xk=(double)(j*u +1);
     33     k=(long)xk;
  • new file patches/src-gmp_Makefile.am.patch

    diff --git a/patches/src-gmp_Makefile.am.patch b/patches/src-gmp_Makefile.am.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/src-gmp/Makefile.am b/src/src-gmp/Makefile.am
     2index e4dbb86..e579d71 100644
     3--- a/src.bak/src-gmp/Makefile.am
     4+++ b/src/src-gmp/Makefile.am
     5@@ -11,7 +11,8 @@ testcdd1_gmp \
     6 testcdd2_gmp \
     7 testlp1_gmp \
     8 testlp2_gmp \
     9-testlp3_gmp
     10+testlp3_gmp \
     11+cdd_both_reps_gmp
     12 #cddmathlink
     13 
     14 scdd_gmp_SOURCES                   = simplecdd.c
     15@@ -27,6 +28,7 @@ testcdd2_gmp_SOURCES               = testcdd2.c
     16 testlp1_gmp_SOURCES                = testlp1.c
     17 testlp2_gmp_SOURCES                = testlp2.c
     18 testlp3_gmp_SOURCES                = testlp3.c
     19+cdd_both_reps_gmp_SOURCES          = cdd_both_reps.c
     20 # cddmathlink_SOURCES                = cddmathlink.c cddmlio.h cddmlio.c
     21 
     22 LDADD        = ../lib-src-gmp/libcddgmp.la
  • new file patches/src-gmp_Makefile.in.patch

    diff --git a/patches/src-gmp_Makefile.in.patch b/patches/src-gmp_Makefile.in.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/src-gmp/Makefile.in b/src/src-gmp/Makefile.in
     2index f88c83f..3470dc9 100644
     3--- a/src.bak/src-gmp/Makefile.in
     4+++ b/src/src-gmp/Makefile.in
     5@@ -37,7 +37,8 @@ bin_PROGRAMS = scdd_gmp$(EXEEXT) lcdd_gmp$(EXEEXT) \
     6        projection_gmp$(EXEEXT) adjacency_gmp$(EXEEXT) \
     7        allfaces_gmp$(EXEEXT) testshoot_gmp$(EXEEXT) \
     8        testcdd1_gmp$(EXEEXT) testcdd2_gmp$(EXEEXT) \
     9-       testlp1_gmp$(EXEEXT) testlp2_gmp$(EXEEXT) testlp3_gmp$(EXEEXT)
     10+       testlp1_gmp$(EXEEXT) testlp2_gmp$(EXEEXT) testlp3_gmp$(EXEEXT) \
     11+       cdd_both_reps_gmp$(EXEEXT)
     12 subdir = src-gmp
     13 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     14 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     15@@ -57,6 +58,10 @@ am_allfaces_gmp_OBJECTS = allfaces.$(OBJEXT)
     16 allfaces_gmp_OBJECTS = $(am_allfaces_gmp_OBJECTS)
     17 allfaces_gmp_LDADD = $(LDADD)
     18 allfaces_gmp_DEPENDENCIES = ../lib-src-gmp/libcddgmp.la
     19+am_cdd_both_reps_gmp_OBJECTS = cdd_both_reps.$(OBJEXT)
     20+cdd_both_reps_gmp_OBJECTS = $(am_cdd_both_reps_gmp_OBJECTS)
     21+cdd_both_reps_gmp_LDADD = $(LDADD)
     22+cdd_both_reps_gmp_DEPENDENCIES = ../lib-src-gmp/libcddgmp.la
     23 am_fourier_gmp_OBJECTS = fourier.$(OBJEXT)
     24 fourier_gmp_OBJECTS = $(am_fourier_gmp_OBJECTS)
     25 fourier_gmp_LDADD = $(LDADD)
     26@@ -114,19 +119,19 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
     27        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
     28        $(LDFLAGS) -o $@
     29 SOURCES = $(adjacency_gmp_SOURCES) $(allfaces_gmp_SOURCES) \
     30-       $(fourier_gmp_SOURCES) $(lcdd_gmp_SOURCES) \
     31-       $(projection_gmp_SOURCES) $(redcheck_gmp_SOURCES) \
     32-       $(scdd_gmp_SOURCES) $(testcdd1_gmp_SOURCES) \
     33-       $(testcdd2_gmp_SOURCES) $(testlp1_gmp_SOURCES) \
     34-       $(testlp2_gmp_SOURCES) $(testlp3_gmp_SOURCES) \
     35-       $(testshoot_gmp_SOURCES)
     36+       $(cdd_both_reps_gmp_SOURCES) $(fourier_gmp_SOURCES) \
     37+       $(lcdd_gmp_SOURCES) $(projection_gmp_SOURCES) \
     38+       $(redcheck_gmp_SOURCES) $(scdd_gmp_SOURCES) \
     39+       $(testcdd1_gmp_SOURCES) $(testcdd2_gmp_SOURCES) \
     40+       $(testlp1_gmp_SOURCES) $(testlp2_gmp_SOURCES) \
     41+       $(testlp3_gmp_SOURCES) $(testshoot_gmp_SOURCES)
     42 DIST_SOURCES = $(adjacency_gmp_SOURCES) $(allfaces_gmp_SOURCES) \
     43-       $(fourier_gmp_SOURCES) $(lcdd_gmp_SOURCES) \
     44-       $(projection_gmp_SOURCES) $(redcheck_gmp_SOURCES) \
     45-       $(scdd_gmp_SOURCES) $(testcdd1_gmp_SOURCES) \
     46-       $(testcdd2_gmp_SOURCES) $(testlp1_gmp_SOURCES) \
     47-       $(testlp2_gmp_SOURCES) $(testlp3_gmp_SOURCES) \
     48-       $(testshoot_gmp_SOURCES)
     49+       $(cdd_both_reps_gmp_SOURCES) $(fourier_gmp_SOURCES) \
     50+       $(lcdd_gmp_SOURCES) $(projection_gmp_SOURCES) \
     51+       $(redcheck_gmp_SOURCES) $(scdd_gmp_SOURCES) \
     52+       $(testcdd1_gmp_SOURCES) $(testcdd2_gmp_SOURCES) \
     53+       $(testlp1_gmp_SOURCES) $(testlp2_gmp_SOURCES) \
     54+       $(testlp3_gmp_SOURCES) $(testshoot_gmp_SOURCES)
     55 ETAGS = etags
     56 CTAGS = ctags
     57 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     58@@ -254,6 +259,7 @@ testcdd2_gmp_SOURCES = testcdd2.c
     59 testlp1_gmp_SOURCES = testlp1.c
     60 testlp2_gmp_SOURCES = testlp2.c
     61 testlp3_gmp_SOURCES = testlp3.c
     62+cdd_both_reps_gmp_SOURCES = cdd_both_reps.c
     63 # cddmathlink_SOURCES                = cddmathlink.c cddmlio.h cddmlio.c
     64 LDADD = ../lib-src-gmp/libcddgmp.la
     65 AM_LDFLAGS = -L$(gmplibdir)
     66@@ -326,6 +332,9 @@ adjacency_gmp$(EXEEXT): $(adjacency_gmp_OBJECTS) $(adjacency_gmp_DEPENDENCIES)
     67 allfaces_gmp$(EXEEXT): $(allfaces_gmp_OBJECTS) $(allfaces_gmp_DEPENDENCIES)
     68        @rm -f allfaces_gmp$(EXEEXT)
     69        $(LINK) $(allfaces_gmp_OBJECTS) $(allfaces_gmp_LDADD) $(LIBS)
     70+cdd_both_reps_gmp$(EXEEXT): $(cdd_both_reps_gmp_OBJECTS) $(cdd_both_reps_gmp_DEPENDENCIES)
     71+       @rm -f cdd_both_reps_gmp$(EXEEXT)
     72+       $(LINK) $(cdd_both_reps_gmp_OBJECTS) $(cdd_both_reps_gmp_LDADD) $(LIBS)
     73 fourier_gmp$(EXEEXT): $(fourier_gmp_OBJECTS) $(fourier_gmp_DEPENDENCIES)
     74        @rm -f fourier_gmp$(EXEEXT)
     75        $(LINK) $(fourier_gmp_OBJECTS) $(fourier_gmp_LDADD) $(LIBS)
     76@@ -368,6 +377,7 @@ distclean-compile:
     77 
     78 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjacency.Po@am__quote@
     79 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allfaces.Po@am__quote@
     80+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdd_both_reps.Po@am__quote@
     81 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fourier.Po@am__quote@
     82 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lcdd.Po@am__quote@
     83 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projection.Po@am__quote@
  • new file patches/src_Makefile.am.patch

    diff --git a/patches/src_Makefile.am.patch b/patches/src_Makefile.am.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/src/Makefile.am b/src/src/Makefile.am
     2index 17f8625..ad50af2 100644
     3--- a/src.bak/src/Makefile.am
     4+++ b/src/src/Makefile.am
     5@@ -11,7 +11,8 @@ testshoot \
     6 testcdd2 \
     7 testlp1 \
     8 testlp2 \
     9-testlp3
     10+testlp3 \
     11+cdd_both_reps
     12 #cddmathlink
     13 
     14 scdd_SOURCES                   = simplecdd.c
     15@@ -27,6 +28,7 @@ testcdd2_SOURCES               = testcdd2.c
     16 testlp1_SOURCES                = testlp1.c
     17 testlp2_SOURCES                = testlp2.c
     18 testlp3_SOURCES                = testlp3.c
     19+cdd_both_reps_SOURCES          = cdd_both_reps.c
     20 # cddmathlink_SOURCES                = cddmathlink.c cddmlio.h cddmlio.c
     21 
     22 LDADD        = ../lib-src/libcdd.la
  • new file patches/src_Makefile.in.patch

    diff --git a/patches/src_Makefile.in.patch b/patches/src_Makefile.in.patch
    new file mode 100644
    - +  
     1diff --git a/src.bak/src/Makefile.in b/src/src/Makefile.in
     2index 8385e4d..b9f6a26 100644
     3--- a/src.bak/src/Makefile.in
     4+++ b/src/src/Makefile.in
     5@@ -36,7 +36,7 @@ bin_PROGRAMS = scdd$(EXEEXT) lcdd$(EXEEXT) redcheck$(EXEEXT) \
     6        fourier$(EXEEXT) projection$(EXEEXT) adjacency$(EXEEXT) \
     7        allfaces$(EXEEXT) testcdd1$(EXEEXT) testshoot$(EXEEXT) \
     8        testcdd2$(EXEEXT) testlp1$(EXEEXT) testlp2$(EXEEXT) \
     9-       testlp3$(EXEEXT)
     10+       testlp3$(EXEEXT) cdd_both_reps$(EXEEXT)
     11 subdir = src
     12 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     13 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     14@@ -56,6 +56,10 @@ am_allfaces_OBJECTS = allfaces.$(OBJEXT)
     15 allfaces_OBJECTS = $(am_allfaces_OBJECTS)
     16 allfaces_LDADD = $(LDADD)
     17 allfaces_DEPENDENCIES = ../lib-src/libcdd.la
     18+am_cdd_both_reps_OBJECTS = cdd_both_reps.$(OBJEXT)
     19+cdd_both_reps_OBJECTS = $(am_cdd_both_reps_OBJECTS)
     20+cdd_both_reps_LDADD = $(LDADD)
     21+cdd_both_reps_DEPENDENCIES = ../lib-src/libcdd.la
     22 am_fourier_OBJECTS = fourier.$(OBJEXT)
     23 fourier_OBJECTS = $(am_fourier_OBJECTS)
     24 fourier_LDADD = $(LDADD)
     25@@ -112,16 +116,16 @@ CCLD = $(CC)
     26 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
     27        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
     28        $(LDFLAGS) -o $@
     29-SOURCES = $(adjacency_SOURCES) $(allfaces_SOURCES) $(fourier_SOURCES) \
     30-       $(lcdd_SOURCES) $(projection_SOURCES) $(redcheck_SOURCES) \
     31-       $(scdd_SOURCES) $(testcdd1_SOURCES) $(testcdd2_SOURCES) \
     32-       $(testlp1_SOURCES) $(testlp2_SOURCES) $(testlp3_SOURCES) \
     33-       $(testshoot_SOURCES)
     34+SOURCES = $(adjacency_SOURCES) $(allfaces_SOURCES) \
     35+       $(cdd_both_reps_SOURCES) $(fourier_SOURCES) $(lcdd_SOURCES) \
     36+       $(projection_SOURCES) $(redcheck_SOURCES) $(scdd_SOURCES) \
     37+       $(testcdd1_SOURCES) $(testcdd2_SOURCES) $(testlp1_SOURCES) \
     38+       $(testlp2_SOURCES) $(testlp3_SOURCES) $(testshoot_SOURCES)
     39 DIST_SOURCES = $(adjacency_SOURCES) $(allfaces_SOURCES) \
     40-       $(fourier_SOURCES) $(lcdd_SOURCES) $(projection_SOURCES) \
     41-       $(redcheck_SOURCES) $(scdd_SOURCES) $(testcdd1_SOURCES) \
     42-       $(testcdd2_SOURCES) $(testlp1_SOURCES) $(testlp2_SOURCES) \
     43-       $(testlp3_SOURCES) $(testshoot_SOURCES)
     44+       $(cdd_both_reps_SOURCES) $(fourier_SOURCES) $(lcdd_SOURCES) \
     45+       $(projection_SOURCES) $(redcheck_SOURCES) $(scdd_SOURCES) \
     46+       $(testcdd1_SOURCES) $(testcdd2_SOURCES) $(testlp1_SOURCES) \
     47+       $(testlp2_SOURCES) $(testlp3_SOURCES) $(testshoot_SOURCES)
     48 ETAGS = etags
     49 CTAGS = ctags
     50 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     51@@ -249,6 +253,7 @@ testcdd2_SOURCES = testcdd2.c
     52 testlp1_SOURCES = testlp1.c
     53 testlp2_SOURCES = testlp2.c
     54 testlp3_SOURCES = testlp3.c
     55+cdd_both_reps_SOURCES = cdd_both_reps.c
     56 # cddmathlink_SOURCES                = cddmathlink.c cddmlio.h cddmlio.c
     57 LDADD = ../lib-src/libcdd.la
     58 INCLUDES = -I../lib-src
     59@@ -320,6 +325,9 @@ adjacency$(EXEEXT): $(adjacency_OBJECTS) $(adjacency_DEPENDENCIES)
     60 allfaces$(EXEEXT): $(allfaces_OBJECTS) $(allfaces_DEPENDENCIES)
     61        @rm -f allfaces$(EXEEXT)
     62        $(LINK) $(allfaces_OBJECTS) $(allfaces_LDADD) $(LIBS)
     63+cdd_both_reps$(EXEEXT): $(cdd_both_reps_OBJECTS) $(cdd_both_reps_DEPENDENCIES)
     64+       @rm -f cdd_both_reps$(EXEEXT)
     65+       $(LINK) $(cdd_both_reps_OBJECTS) $(cdd_both_reps_LDADD) $(LIBS)
     66 fourier$(EXEEXT): $(fourier_OBJECTS) $(fourier_DEPENDENCIES)
     67        @rm -f fourier$(EXEEXT)
     68        $(LINK) $(fourier_OBJECTS) $(fourier_LDADD) $(LIBS)
     69@@ -362,6 +370,7 @@ distclean-compile:
     70 
     71 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjacency.Po@am__quote@
     72 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allfaces.Po@am__quote@
     73+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdd_both_reps.Po@am__quote@
     74 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fourier.Po@am__quote@
     75 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lcdd.Po@am__quote@
     76 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projection.Po@am__quote@
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    3 if [ "$SAGE_LOCAL" = "" ]; then
    4    echo "SAGE_LOCAL undefined ... exiting";
    5    echo "Maybe run 'sage -sh'?"
    6    exit 1
    7 fi
     3#if [ "$SAGE_LOCAL" = "" ]; then
     4#    echo "SAGE_LOCAL undefined ... exiting";
     5#    echo "Maybe run 'sage -sh'?"
     6#    exit 1
     7#fi
    88
    99# Normaly for a 64-bit build, the -m64 option is added to
    1010# gcc, but other compilers will not accept that, so
     
    1212# be.
    1313
    1414if [ -z $CFLAG64 ] ; then
    15    CFLAG64=-m64
     15    CFLAG64=-m64
    1616fi
    1717
    1818if [ "x$SAGE64" = xyes ]; then
    19    echo "64 bit build of cddlib"
    20    CFLAGS="$CFLAGS $CFLAG64"; export CFLAGS
     19    echo "64 bit build of cddlib"
     20    CFLAGS="$CFLAGS $CFLAG64"; export CFLAGS
    2121fi
    22 
    23 
    24 # Patches to apply on top of the clean upstream source under src/.
    25 patch() {
    26     # A portable random number generator
    27     cp -p patches/random.[c,h] src/lib-src/
    28     cp -p patches/random.[c,h] src/lib-src-gmp/
    29     cp -p patches/cddcore.c src/lib-src/
    30     cp -p patches/cddcore.c src/lib-src-gmp/
    31     cp -p patches/cddlp.c src/lib-src/
    32     cp -p patches/cddlp.c src/lib-src-gmp/
    33 
    34     # Required by sage.geometry.polyhedra
    35     cp -p patches/cdd_both_reps.c src/src/
    36     cp -p patches/cdd_both_reps.c src/src-gmp/
    37 
    38     # Rewritten autotools source files
    39     cp -p patches/Makefile.am src/Makefile.am
    40     cp -p patches/src-gmp-Makefile.am src/src-gmp/Makefile.am
    41     cp -p patches/src-Makefile.am src/src/Makefile.am
    42     cp -p patches/lib-src-Makefile.am src/lib-src/Makefile.am
    43     cp -p patches/lib-src-gmp-Makefile.am src/lib-src-gmp/Makefile.am
    44     rm src/configure.in
    45     cp -p patches/configure.ac src/
    46    
    47     # remaining files are the result of running autoconf/automake
    48     cp -rp patches/autogenerated/* src/
    49 }
    50 
     22CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"; export CPPFLAGS
     23LDFLAGS="-I$SAGE_LOCAL/lib $LDFLAGS"; export LDFLAGS
    5124
    5225# sage-env sets RM which will break libtool
    5326# See http://trac.sagemath.org/sage_trac/ticket/7818#comment:28
    5427unset RM
    5528
    56 # apply patches on top of pristine upstream release under src/
    57 patch
    58 
    5929cd src
    6030
    61 ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" --with-gmp="$SAGE_LOCAL"
     31# A portable random number generator
     32mv ../patches/random.{c,h} lib-src/
     33ln -s ../lib-src/random.{c,h} lib-src-gmp/
     34
     35# Required by sage.geometry.polyhedra
     36mv ../patches/cdd_both_reps.c src/
     37ln -s ../src/cdd_both_reps.c src-gmp/cdd_both_reps.c
     38
     39# apply patch files
     40for patch in ../patches/*.patch; do
     41    patch -p2 < "$patch"
     42    if [ $? -ne 0 ]; then
     43        echo "Error patching cddlib"
     44        exit 1
     45    fi
     46done
     47
     48./configure --prefix="$SAGE_LOCAL"
    6249if [ $? -ne 0 ]; then
    6350   echo "Error configuring cddlib"
    6451   exit 1
     
    6653
    6754$MAKE
    6855if [ $? -ne 0 ]; then
    69    echo "Error building cddlib"
    70    exit 1
     56    echo "Error building cddlib"
     57    exit 1
    7158fi
    7259
    7360$MAKE install
    7461if [ $? -ne 0 ]; then
    75    echo "Error installing cddlib"
    76    exit 1
     62    echo "Error installing cddlib"
     63    exit 1
    7764fi
    78