#! /bin/sh -e
## 17_stddirs.dpatch by Stefano Zacchiroli <zack@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch upstream findlib.conf.in so that:
## DP: - default "manual" installation dir is /usr/local/lib/ocaml/3.08
## DP: - findlib path look first in /usr/local/lib... and then in the
## DP:   standard ocaml library this permit local overrides of libraries

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -E -p1 -R < $0;;
	*)
		echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac

exit 0
@DPATCH@
diff -urNad trunk~/findlib.conf.in trunk/findlib.conf.in
--- trunk~/findlib.conf.in	2005-11-01 00:36:34.000000000 +0000
+++ trunk/findlib.conf.in	2005-11-12 18:12:11.000000000 +0000
@@ -1,2 +1,2 @@
-destdir="@SITELIB@"
-path="@SITELIB@"
+destdir="/usr/local/lib/ocaml/@OCamlABI@"
+path="/usr/local/lib/ocaml/@OCamlABI@:@SITELIB@:@SITELIB@/METAS"
