From: Christoph Martin <christoph.martin@uni-mainz.de>
Date: Fri, 6 May 2016 14:55:01 -0400
Subject: use system cryptokit

Use the system cryptokit instead of the one shipped in upstream source
---
 Makefile | 31 ++-----------------------------
 1 file changed, 2 insertions(+), 29 deletions(-)

diff --git a/Makefile b/Makefile
index 15ab3ea..eb56758 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ WARNERR=-warn-error A
 endif
 
 CAMLP4=-pp $(CAMLP4O)
-CAMLINCLUDE= -I lib -I bdb
+CAMLINCLUDE= -I lib -I bdb -I +cryptokit
 COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLLDFLAGS) -ccopt -Lbdb -dtypes $(WARNERR)
 OCAMLDEP=ocamldep $(CAMLP4)
 CAMLLIBS=unix.cma str.cma bdb.cma nums.cma bigarray.cma cryptokit.cma
@@ -109,7 +109,7 @@ ALLOBJS=$(ALLOBJS.bc:.cmo=.cmx)
 
 EXEOBJS.bc=$(RSERVOBJS.bc) build.cmo fastbuild.cmo dbserver.cmo pdiskTest.cmo
 
-LIBS.bc= lib/cryptokit.cma bdb/bdb.cma
+LIBS.bc= bdb/bdb.cma
 LIBS=$(LIBS.bc:.cma=.cmxa)
 
 VERSION := $(shell cat VERSION)
@@ -280,32 +280,6 @@ prepared:
 	touch prepared
 
 
-CKVER=cryptokit-1.7
-CKDIR=$(CKVER)/src
-
-$(CKVER)/README.txt:
-	tar xmvfz $(CKVER).tar.gz
-	patch -p 0 < $(CKVER)-sks.patch
-	patch -p 0 < $(CKVER)-sks-custom_compare.patch
-
-$(CKDIR)/cryptokit.cma: $(CKVER)/README.txt
-	cd $(CKDIR) && $(MAKE) all
-
-$(CKDIR)/cryptokit.cmxa: $(CKVER)/README.txt
-	cd $(CKDIR) && $(MAKE) allopt
-
-lib/cryptokit.cma: $(CKDIR)/cryptokit.cma $(CKDIR)/cryptokit.cmxa prepared
-	cp $(CKDIR)/cryptokit.cmi $(CKDIR)/cryptokit.cma \
-	   $(CKDIR)/cryptokit.mli lib
-	cp $(CKDIR)/libcryptokit.a lib
-	if test -f $(CKDIR)/dllcryptokit.so; then \
-	   cp $(CKDIR)/dllcryptokit.so lib; fi
-	if test -f $(CKDIR)/cryptokit.cmxa; then \
-	   cp $(CKDIR)/cryptokit.cmxa $(CKDIR)/cryptokit.cmx \
-	   $(CKDIR)/cryptokit.a lib; fi
-
-lib/cryptokit.cmxa: lib/cryptokit.cma
-
 ################################
 # old stuff
 ################################
@@ -404,7 +378,6 @@ clean: mlclean
 
 cleanall: clean bdbclean
 	rm -f lib/*
-	rm -rf $(CKVER)
 
 distclean: cleanall
 	rm -rf Makefile.local
