ocaml-bitstring stable port information

Package: ocaml-bitstring
Version: 2.0.0
Revision: 2

Source: http://bitstring.googlecode.com/files/%n-%v.tar.gz
Source-MD5: 9f597c267318a88f2754ca10450e478f
PatchFile: %n.patch
PatchFile-MD5: f03e70d4c0a4e74bf779c3f3b8190e67

BuildDepends: fink (>= 0.24.12)
Depends: ocaml, ocaml-findlib

InstallScript: <<
mkdir -p %i/lib/ocaml/site-lib
make install prefix=%i
<<
DocFiles: examples/* COPYING.LIB README

PostInstScript: <<
if ! grep -q "%p/lib/ocaml/site-lib/bitstring" "%p/lib/ocaml/ld.conf"; then
echo "%p/lib/ocaml/site-lib/bitstring" >> "%p/lib/ocaml/ld.conf"
fi
<<
PreRmScript: <<
grep -v "%p/lib/ocaml/site-lib/bitstring" "%p/lib/ocaml/ld.conf" > "%p/lib/ocaml/ld.conf.tmp"
mv "%p/lib/ocaml/ld.conf.tmp" "%p/lib/ocaml/ld.conf"
<<

Description: Bitstrings and bitstring matching for OCaml
License: LGPL
Homepage: http://code.google.com/p/bitstring/
Maintainer: Brendan Cully

ocaml-bitstring stable port .patch

Fix srcdir declaration.
Add dynlink to linker for ocaml 3.11.
Use $prefix for installer.

diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -32,6 +32,7 @@

OCAMLLIB = @OCAMLLIB@
top_srcdir = @top_srcdir@
+srcdir = @srcdir@

pkg_cil = @pkg_cil@
pkg_extlib = @pkg_extlib@
@@ -109,11 +110,11 @@
-I +camlp4 -pp camlp4of -c $<

pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
- $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 camlp4lib.cma \
+ $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
-pp camlp4of -c $< -o $@

bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
- $(OCAMLFIND) ocamlc -I +camlp4 unix.cma camlp4lib.cma \
+ $(OCAMLFIND) ocamlc -I +camlp4 unix.cma dynlink.cma camlp4lib.cma \
$(OCAMLCLIBS) \
bitstring.cma bitstring_persistent.cma \
$< -o $@
@@ -155,7 +156,7 @@

create_test_pattern: create_test_pattern.cmo
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -pp camlp4of \
- unix.cma -I +camlp4 camlp4lib.cma \
+ unix.cma -I +camlp4 dynlink.cma camlp4lib.cma \
$(OCAMLCLIBS) \
-I . bitstring.cma bitstring_persistent.cma $< -o $@

@@ -268,7 +269,7 @@
# Install.

install:
- ocamlfind install bitstring META *.mli *.cmx *.cma *.cmxa *.a *.so \
+ ocamlfind install -ldconf ignore -destdir $(prefix)/lib/ocaml/site-lib bitstring META *.mli *.cmx *.cma *.cmxa *.a *.so \
bitstring.cmi \
bitstring_persistent.cmi \
pa_bitstring.cmo

ocaml-bitstring _unstable_ port .patch