summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproc/ocaml-expat/Makefile5
-rw-r--r--textproc/ocaml-expat/PLIST3
-rw-r--r--textproc/ocaml-expat/distinfo4
-rw-r--r--textproc/ocaml-expat/patches/patch-Makefile26
4 files changed, 29 insertions, 9 deletions
diff --git a/textproc/ocaml-expat/Makefile b/textproc/ocaml-expat/Makefile
index 8d510ae9066..6f08bea818c 100644
--- a/textproc/ocaml-expat/Makefile
+++ b/textproc/ocaml-expat/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2012/12/26 10:27:14 jaapb Exp $
+# $NetBSD: Makefile,v 1.4 2013/06/16 09:45:19 jaapb Exp $
#
DISTNAME= ocaml-expat-0.9.1
+PKGREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://mmzeeman.home.xs4all.nl/ocaml/
@@ -19,7 +20,7 @@ PLIST_VARS+= opt
(${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "x86_64") || \
(${MACHINE_ARCH} == "arm")
PLIST.opt= yes
-BUILD_TARGET+= allopt
+BUILD_TARGET+= allopt expat.cmxs
.endif
.include "../../devel/ocaml-findlib/buildlink3.mk"
diff --git a/textproc/ocaml-expat/PLIST b/textproc/ocaml-expat/PLIST
index c7dbb154d34..d8410f4267e 100644
--- a/textproc/ocaml-expat/PLIST
+++ b/textproc/ocaml-expat/PLIST
@@ -1,10 +1,11 @@
-@comment $NetBSD: PLIST,v 1.1 2012/10/10 11:25:57 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.2 2013/06/16 09:45:19 jaapb Exp $
@unexec %D/libexec/ocaml-findlib-register del %D/lib/ocaml/site-lib/expat
lib/ocaml/site-lib/expat/META
lib/ocaml/site-lib/expat/dllmlexpat.so
${PLIST.opt}lib/ocaml/site-lib/expat/expat.a
lib/ocaml/site-lib/expat/expat.cma
${PLIST.opt}lib/ocaml/site-lib/expat/expat.cmxa
+${PLIST.opt}lib/ocaml/site-lib/expat/expat.cmxs
lib/ocaml/site-lib/expat/expat.cmi
lib/ocaml/site-lib/expat/expat.mli
lib/ocaml/site-lib/expat/libmlexpat.a
diff --git a/textproc/ocaml-expat/distinfo b/textproc/ocaml-expat/distinfo
index c1351dcf1c4..72aad97e7e1 100644
--- a/textproc/ocaml-expat/distinfo
+++ b/textproc/ocaml-expat/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2012/12/26 10:27:14 jaapb Exp $
+$NetBSD: distinfo,v 1.3 2013/06/16 09:45:19 jaapb Exp $
SHA1 (ocaml-expat-0.9.1.tar.gz) = c0a65558cf996ac727fe5c61224d3e19dfd7d02a
RMD160 (ocaml-expat-0.9.1.tar.gz) = be731eacff0a114d948cfaedfafe9b9fc6dc54e7
Size (ocaml-expat-0.9.1.tar.gz) = 25223 bytes
-SHA1 (patch-Makefile) = f2739f8dc4aa53ad038d6b52793bf9c3671d4c24
+SHA1 (patch-Makefile) = 3058f21e05c664dcb2799bdf987191876056c9cc
diff --git a/textproc/ocaml-expat/patches/patch-Makefile b/textproc/ocaml-expat/patches/patch-Makefile
index f2538d2eb44..f1a09ef3265 100644
--- a/textproc/ocaml-expat/patches/patch-Makefile
+++ b/textproc/ocaml-expat/patches/patch-Makefile
@@ -1,6 +1,7 @@
-$NetBSD: patch-Makefile,v 1.2 2012/12/26 10:27:14 jaapb Exp $
+$NetBSD: patch-Makefile,v 1.3 2013/06/16 09:45:19 jaapb Exp $
Correct location for expat, add DESTDIR support, and correct depend for clang
+Also, make possible compilation of shared library
--- Makefile.orig 2005-03-13 14:00:29.000000000 +0000
+++ Makefile
@@ -3,8 +3,8 @@
@@ -14,7 +15,15 @@ Correct location for expat, add DESTDIR support, and correct depend for clang
NAME=expat
OBJECTS=expat.cmo
-@@ -32,7 +32,7 @@ all: $(ARCHIVE)
+@@ -13,6 +13,7 @@ C_OBJECTS=expat_stubs.o
+
+ ARCHIVE=$(NAME).cma
+ XARCHIVE=$(ARCHIVE:.cma=.cmxa)
++XSARCHIVE=$(ARCHIVE:.cma=.cmxs)
+ CARCHIVE_NAME=mlexpat
+ CARCHIVE=lib$(CARCHIVE_NAME).a
+
+@@ -32,7 +33,7 @@ all: $(ARCHIVE)
allopt: $(XARCHIVE)
depend: *.c *.ml *.mli
@@ -23,11 +32,20 @@ Correct location for expat, add DESTDIR support, and correct depend for clang
$(OCAMLDEP) *.mli *.ml >> depend
## Library creation
-@@ -50,7 +50,8 @@ $(XARCHIVE): $(CARCHIVE) $(XOBJECTS)
+@@ -45,12 +46,16 @@ $(ARCHIVE): $(CARCHIVE) $(OBJECTS)
+ $(XARCHIVE): $(CARCHIVE) $(XOBJECTS)
+ $(OCAMLMKLIB) -o $(NAME) $(XOBJECTS) -oc $(CARCHIVE_NAME) \
+ -L$(EXPAT_LIBDIR) $(EXPAT_LIB)
++$(XSARCHIVE): $(XOBJECTS) $(CARCHIVE)
++ $(OCAMLOPT) -linkall -shared -o $(XSARCHIVE) $(XOBJECTS) $(CARCHIVE) \
++ -ccopt -L$(EXPAT_LIBDIR) -cclib $(EXPAT_LIB)
+
+ ## Installation
.PHONY: install
install: all
- { test ! -f $(XARCHIVE) || extra="$(XARCHIVE) $(NAME).a"; }; \
+- { test ! -f $(XARCHIVE) || extra="$(XARCHIVE) $(NAME).a"; }; \
- $(OCAMLFIND) install $(NAME) META $(NAME).cmi $(NAME).mli $(ARCHIVE) \
++ { test ! -f $(XARCHIVE) || extra="$(XARCHIVE) $(XSARCHIVE) $(NAME).a"; }; \
+ $(OCAMLFIND) install -destdir ${DESTDIR}${PREFIX}/lib/ocaml/site-lib \
+ -ldconf ignore $(NAME) META $(NAME).cmi $(NAME).mli $(ARCHIVE) \
dll$(CARCHIVE_NAME).so lib$(CARCHIVE_NAME).a $$extra