about summary refs log tree commit diff
path: root/externals
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-05-12T22·13+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-05-12T22·13+0000
commitaa45027818af8976dc73e6a299d5d918e5c51df1 (patch)
tree6086eb0642bc90477397169d0ee3993c1789200e /externals
parenta0e3b84fac56cad6377ecd1462058a6b29bb1ea8 (diff)
parent8032f26ca0bd2233de066ce5786ff976bbd641ae (diff)
* Sync with the trunk.
Diffstat (limited to 'externals')
-rw-r--r--externals/Makefile.am40
-rw-r--r--externals/max-long.patch77
-rw-r--r--externals/sizeof.patch56
3 files changed, 4 insertions, 169 deletions
diff --git a/externals/Makefile.am b/externals/Makefile.am
index 2fde866ea2b9..060ae2c52fd4 100644
--- a/externals/Makefile.am
+++ b/externals/Makefile.am
@@ -1,35 +1,3 @@
-# CWI ATerm
-
-ATERM = aterm-$(ATERM_VERSION)
-
-$(ATERM).tar.gz:
-	@echo "Nix requires the CWI ATerm library to build."
-	@echo "Please download version $(ATERM_VERSION) from"
-	@echo "  http://nixos.org/tarballs/aterm-$(ATERM_VERSION).tar.gz"
-	@echo "and place it in the externals/ directory."
-	false
-
-$(ATERM): $(ATERM).tar.gz
-	gzip -d < $(srcdir)/$(ATERM).tar.gz | tar xvf -
-	patch -d $(ATERM) -p1 < ./max-long.patch
-	patch -d $(ATERM) -p1 < ./sizeof.patch
-
-if HAVE_ATERM
-build-aterm:
-else
-build-aterm: $(ATERM)
-	(cd $(ATERM) && \
-	CC="$(CC)" ./configure --prefix=$(pkglibdir)/dummy --libdir=${pkglibdir} $(SUB_CONFIGURE_FLAGS) && \
-	$(MAKE) && \
-	$(MAKE) check)
-	touch build-aterm
-
-install-exec-local:: build-aterm
-	cd $(ATERM) && make install
-	rm -rf "$(DESTDIR)/$(pkglibdir)/dummy"
-endif
-
-
 # bzip2
 
 BZIP2 = bzip2-1.0.5
@@ -89,11 +57,11 @@ install-exec-local:: build-sqlite
 endif
 
 
-all: build-aterm build-bzip2 build-sqlite
+all: build-bzip2 build-sqlite
 
-EXTRA_DIST = $(ATERM).tar.gz $(BZIP2).tar.gz $(SQLITE_TAR) max-long.patch sizeof.patch
+EXTRA_DIST = $(BZIP2).tar.gz $(SQLITE_TAR)
 
 clean:
-	$(RM) -f build-aterm build-bzip2 build-sqlite
-	$(RM) -rf $(ATERM) $(BZIP2) $(SQLITE)
+	$(RM) -f build-bzip2 build-sqlite
+	$(RM) -rf $(BZIP2) $(SQLITE)
 	$(RM) -rf inst-bzip2
diff --git a/externals/max-long.patch b/externals/max-long.patch
deleted file mode 100644
index a2f260b970b3..000000000000
--- a/externals/max-long.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -rc aterm-2.8-orig/aterm/hash.c aterm-2.8/aterm/hash.c
-*** aterm-2.8-orig/aterm/hash.c	2008-11-10 13:54:22.000000000 +0100
---- aterm-2.8/aterm/hash.c	2009-01-27 18:14:14.000000000 +0100
-***************
-*** 93,146 ****
-  }
-  
-  /*}}}  */
-- /*{{{  static long calc_long_max() */
-- static long calc_long_max()
-- {
--   long try_long_max;
--   long long_max;
--   long delta;
-- 
--   try_long_max = 1;
--   do {
--     long_max = try_long_max;
--     try_long_max = long_max * 2;
--   } while (try_long_max > 0);
-- 
--   delta = long_max;
--   while (delta > 1) {
--     while (long_max + delta < 0) {
--       delta /= 2;
--     }
--     long_max += delta;
--   }
-- 
--   return long_max;
-- 
-- }
-- /*}}}  */
-  /*{{{  static long calculateNewSize(sizeMinus1, nrdel, nrentries) */
-  
-  static long calculateNewSize
-  (long sizeMinus1, long nr_deletions, long nr_entries)
-  { 
-- 
--   /* Hack: LONG_MAX (limits.h) is often unreliable, we need to find
--    * out the maximum possible value of a signed long dynamically.
--    */
--   static long st_long_max = 0;
-- 
--   /* the resulting length has the form 2^k-1 */
-- 
-    if (nr_deletions >= nr_entries/2) { 
-      return sizeMinus1;
-    }
-  
-!   if (st_long_max == 0) {
-!     st_long_max = calc_long_max();
-!   }
-! 
-!   if (sizeMinus1 > st_long_max / 2) {
-!     return st_long_max-1;
-    }
-  
-    return (2*sizeMinus1)+1;
---- 93,109 ----
-  }
-  
-  /*}}}  */
-  /*{{{  static long calculateNewSize(sizeMinus1, nrdel, nrentries) */
-  
-  static long calculateNewSize
-  (long sizeMinus1, long nr_deletions, long nr_entries)
-  { 
-    if (nr_deletions >= nr_entries/2) { 
-      return sizeMinus1;
-    }
-  
-!   if (sizeMinus1 > LONG_MAX / 2) {
-!     return LONG_MAX-1;
-    }
-  
-    return (2*sizeMinus1)+1;
diff --git a/externals/sizeof.patch b/externals/sizeof.patch
deleted file mode 100644
index 2649cc564913..000000000000
--- a/externals/sizeof.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff -rc -x '*~' aterm-2.5-orig/aterm/aterm.c aterm-2.5/aterm/aterm.c
-*** aterm-2.5-orig/aterm/aterm.c	2007-02-27 23:41:31.000000000 +0100
---- aterm-2.5/aterm/aterm.c	2010-02-23 15:10:38.000000000 +0100
-***************
-*** 150,155 ****
---- 150,157 ----
-    if (initialized)
-      return;
-  
-+   assert(sizeof(long) == sizeof(void *));
-+ 
-    /*{{{  Handle arguments */
-  
-    for (lcv=1; lcv < argc; lcv++) {
-diff -rc -x '*~' aterm-2.5-orig/aterm/encoding.h aterm-2.5/aterm/encoding.h
-*** aterm-2.5-orig/aterm/encoding.h	2007-02-27 23:41:31.000000000 +0100
---- aterm-2.5/aterm/encoding.h	2010-02-23 15:36:05.000000000 +0100
-***************
-*** 10,24 ****
-  {
-  #endif/* __cplusplus */
-  
-! #if SIZEOF_LONG > 4
-! #define AT_64BIT
-  #endif
-  
-! #if SIZEOF_LONG != SIZEOF_VOID_P
-! #error Size of long is not the same as the size of a pointer
-  #endif
-  
-! #if SIZEOF_INT > 4
-  #error Size of int is not 32 bits
-  #endif
-  
---- 10,30 ----
-  {
-  #endif/* __cplusplus */
-  
-! #include <limits.h>
-! 
-! #ifndef SIZEOF_LONG
-! #if ULONG_MAX > 4294967295
-! #define SIZEOF_LONG 8
-! #else
-! #define SIZEOF_LONG 4
-! #endif
-  #endif
-  
-! #if SIZEOF_LONG > 4
-! #define AT_64BIT
-  #endif
-  
-! #if UINT_MAX > 4294967295
-  #error Size of int is not 32 bits
-  #endif
-