diff options
author | jaapb <jaapb> | 2013-06-16 09:45:19 +0000 |
---|---|---|
committer | jaapb <jaapb> | 2013-06-16 09:45:19 +0000 |
commit | 31a0170348914293b9abbb361d953820c483c819 (patch) | |
tree | be60f6389786330df2e2cf6de0e4a27b256f2d21 /textproc/ocaml-expat/patches/patch-Makefile | |
parent | 5e5e99ea9e8d8deb1a43cff85f59bb9b7a30e528 (diff) | |
download | pkgsrc-31a0170348914293b9abbb361d953820c483c819.tar.gz |
- Updated package to also install the cmxs (dynamic link) file.
Diffstat (limited to 'textproc/ocaml-expat/patches/patch-Makefile')
-rw-r--r-- | textproc/ocaml-expat/patches/patch-Makefile | 26 |
1 files changed, 22 insertions, 4 deletions
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 |