summaryrefslogtreecommitdiff
path: root/databases/ocaml-dbm
diff options
context:
space:
mode:
authorjaapb <jaapb>2016-07-03 10:44:49 +0000
committerjaapb <jaapb>2016-07-03 10:44:49 +0000
commit9ccb7eacfd6e7821957e3248162e2e2dfca962f4 (patch)
tree5fd2b7f6bfd0d7caf04ba226c82435ffc900b631 /databases/ocaml-dbm
parent8847da09788af0ac142a8d9f433a8bb27f00069c (diff)
downloadpkgsrc-9ccb7eacfd6e7821957e3248162e2e2dfca962f4.tar.gz
Updated the Makefile patch to conform with Debian's, which has been
submitted upstream. Also removed the patch to META as this Makefile actually does install the files in the site-lib directory. No upstream changes.
Diffstat (limited to 'databases/ocaml-dbm')
-rw-r--r--databases/ocaml-dbm/Makefile12
-rw-r--r--databases/ocaml-dbm/PLIST21
-rw-r--r--databases/ocaml-dbm/distinfo5
-rw-r--r--databases/ocaml-dbm/patches/patch-META10
-rw-r--r--databases/ocaml-dbm/patches/patch-Makefile65
5 files changed, 73 insertions, 40 deletions
diff --git a/databases/ocaml-dbm/Makefile b/databases/ocaml-dbm/Makefile
index b2ddf4f51bd..033efcdeb05 100644
--- a/databases/ocaml-dbm/Makefile
+++ b/databases/ocaml-dbm/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.10 2016/05/05 11:45:36 jaapb Exp $
+# $NetBSD: Makefile,v 1.11 2016/07/03 10:44:49 jaapb Exp $
#
PKGNAME= ocaml-dbm-${VERSION}
DISTNAME= camldbm-${VERSION}
VERSION= 1.0
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= databases
MASTER_SITES= http://forge.ocamlcore.org/frs/download.php/728/
EXTRACT_SUFX= .tgz
@@ -17,13 +17,13 @@ LICENSE= gnu-lgpl-v2
CONFLICTS= ocaml-findlib<1.4nb1
HAS_CONFIGURE= yes
-MAKE_ENV+= DESTDIR="${DESTDIR}"
-
-INSTALLATION_DIRS= lib/ocaml/stublibs lib/ocaml/site-lib/dbm
+USE_TOOLS+= gmake
+MAKE_ENV+= HAS_OCAMLOPT="${OCAML_USE_OPT_COMPILER}"
+OCAML_USE_FINDLIB= yes
post-install:
${INSTALL_DATA} ${WRKSRC}/META ${DESTDIR}${PREFIX}/lib/ocaml/site-lib/dbm
.include "../../databases/gdbm/buildlink3.mk"
-.include "../../lang/ocaml/buildlink3.mk"
+.include "../../mk/ocaml.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/ocaml-dbm/PLIST b/databases/ocaml-dbm/PLIST
index 9816c635fd6..74888e47ed4 100644
--- a/databases/ocaml-dbm/PLIST
+++ b/databases/ocaml-dbm/PLIST
@@ -1,10 +1,11 @@
-@comment $NetBSD: PLIST,v 1.2 2013/07/06 11:18:39 jaapb Exp $
-lib/ocaml/dbm.a
-lib/ocaml/dbm.cma
-lib/ocaml/dbm.cmi
-lib/ocaml/dbm.cmxa
-lib/ocaml/dbm.cmxs
-lib/ocaml/dbm.mli
-lib/ocaml/libcamldbm.a
-lib/ocaml/site-lib/dbm/META
-lib/ocaml/stublibs/dllcamldbm.so
+@comment $NetBSD: PLIST,v 1.3 2016/07/03 10:44:49 jaapb Exp $
+${PLIST.ocaml-opt}${OCAML_SITELIB}/dbm/dbm.a
+${OCAML_SITELIB}/dbm/dbm.cma
+${OCAML_SITELIB}/dbm/dbm.cmi
+${PLIST.ocaml-opt}${OCAML_SITELIB}/dbm/dbm.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/dbm/dbm.cmxa
+${PLIST.ocaml-opt}${OCAML_SITELIB}/dbm/dbm.cmxs
+${OCAML_SITELIB}/dbm/dbm.mli
+${OCAML_SITELIB}/dbm/libcamldbm.a
+${OCAML_SITELIB}/dbm/META
+${OCAML_SITELIB}/dbm/dllcamldbm.so
diff --git a/databases/ocaml-dbm/distinfo b/databases/ocaml-dbm/distinfo
index ec5a7faf1cd..01f7f938c45 100644
--- a/databases/ocaml-dbm/distinfo
+++ b/databases/ocaml-dbm/distinfo
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 01:56:16 agc Exp $
+$NetBSD: distinfo,v 1.4 2016/07/03 10:44:49 jaapb Exp $
SHA1 (camldbm-1.0.tgz) = e3f17c9cd9c72930fd39e3bc1025bea57241e3f9
RMD160 (camldbm-1.0.tgz) = 0691f84ac43c97fddaf796c04729baa8bcb280ca
SHA512 (camldbm-1.0.tgz) = d0b752754650efb400f13f957e83fddccf1fc9ac9e1d11f453af94e9aa599546a316eb110685b3728b593c99cbf859cdc7bcf924c878cf8b6dead3dc413ccfbf
Size (camldbm-1.0.tgz) = 14397 bytes
-SHA1 (patch-META) = 2691ffc5e6a4a8fbd2de88a177b79b5c5812ffb8
-SHA1 (patch-Makefile) = 49402bd4ea4178932fd363baaae236d2e5ee56e1
+SHA1 (patch-Makefile) = 20c4d5b50fea2829c69bb8c5bb69085dafca64b4
diff --git a/databases/ocaml-dbm/patches/patch-META b/databases/ocaml-dbm/patches/patch-META
deleted file mode 100644
index 861715dffc1..00000000000
--- a/databases/ocaml-dbm/patches/patch-META
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-META,v 1.1 2013/07/21 17:04:29 jaapb Exp $
-
-point to correct directory for library files
---- META.orig 2011-11-22 15:56:49.000000000 +0000
-+++ META
-@@ -3,3 +3,4 @@ requires = ""
- version = "1.0"
- archive(byte) = "dbm.cma"
- archive(native) = "dbm.cmxa"
-+directory = "^"
diff --git a/databases/ocaml-dbm/patches/patch-Makefile b/databases/ocaml-dbm/patches/patch-Makefile
index c1e15f46971..48031331793 100644
--- a/databases/ocaml-dbm/patches/patch-Makefile
+++ b/databases/ocaml-dbm/patches/patch-Makefile
@@ -1,9 +1,40 @@
-$NetBSD: patch-Makefile,v 1.1 2012/12/15 10:25:52 jaapb Exp $
+$NetBSD: patch-Makefile,v 1.2 2016/07/03 10:44:49 jaapb Exp $
-Install into DESTDIR
+Make native code compilation optional and integrate with findlib
--- Makefile.orig 2011-11-22 15:56:49.000000000 +0000
+++ Makefile
-@@ -57,13 +57,14 @@ depend:
+@@ -11,7 +11,7 @@
+ # #
+ #########################################################################
+
+-include Makefile.config
++-include Makefile.config
+
+ OCAMLC=ocamlc
+ OCAMLOPT=ocamlopt
+@@ -21,11 +21,18 @@ OCAMLRUN=ocamlrun
+ O=o
+ A=a
+ SO=so
+-LIBDIR=`ocamlc -where`
+-STUBLIBDIR=$(LIBDIR)/stublibs
+
++HAS_OCAMLOPT?= $(shell if which ocamlopt >/dev/null; then echo yes; else echo no; fi)
+
+-all: libcamldbm.$(A) dbm.cma dbm.cmxa dbm.cmxs
++TARGETS := libcamldbm.$(A) dbm.cma
++FILES := META dllcamldbm.$(SO) libcamldbm.$(A) dbm.cma dbm.cmi dbm.mli
++
++ifeq ($(HAS_OCAMLOPT),yes)
++ TARGETS += dbm.cmxa dbm.cmxs
++ FILES += dbm.cmxa dbm.cmxs dbm.cmx dbm.$(A)
++endif
++
++all: $(TARGETS)
+
+ dbm.cma: dbm.cmo
+ $(OCAMLMKLIB) -o dbm -oc camldbm -linkall dbm.cmo $(DBM_LINK)
+@@ -57,13 +64,7 @@ depend:
$(OCAMLDEP) *.ml *.mli > .depend
install::
@@ -14,14 +45,26 @@ Install into DESTDIR
- cp dbm.$(A) $(LIBDIR)/
- cd $(LIBDIR) && ranlib dbm.$(A)
- if test -f dbm.cmxs; then cp dbm.cmxs $(LIBDIR)/; fi
-+ if test -f dllcamldbm.$(SO); then cp dllcamldbm.$(SO) \
-+ $(DESTDIR)/$(STUBLIBDIR)/; fi
-+ cp libcamldbm.$(A) $(DESTDIR)/$(LIBDIR)/
-+ cd $(DESTDIR)/$(LIBDIR) && ranlib libcamldbm.$(A)
-+ cp dbm.cma dbm.cmxa dbm.cmi dbm.mli $(DESTDIR)/$(LIBDIR)/
-+ cp dbm.$(A) $(DESTDIR)/$(LIBDIR)/
-+ cd $(DESTDIR)/$(LIBDIR) && ranlib dbm.$(A)
-+ if test -f dbm.cmxs; then cp dbm.cmxs $(DESTDIR)/$(LIBDIR)/; fi
++ ocamlfind install dbm $(FILES)
clean::
rm -f *.cm* *.$(O) *.$(A) *.$(SO)
+@@ -77,12 +78,16 @@ testdbm.opt: dbm.cmxa testdbm.ml
+ clean::
+ rm -f testdbm.byte testdbm.opt testdatabase.*
+
+-test: testdbm.byte testdbm.opt
++test:: testdbm.byte
+ rm -f testdatabase.*
+ ocamlrun -I . ./testdbm.byte
+ rm -f testdatabase.*
++
++ifeq ($(HAS_OCAMLOPT),yes)
++test:: testdbm.opt
++ rm -f testdatabase.*
+ ./testdbm.opt
+ rm -f testdatabase.*
+-
++endif
+
+ include .depend