Package: libgraphviz-dev
Version: 2.20.2-3
Severity: important

Hello, 

With last OCaml 3.11.1 upload, the location of the standard library has changed 
from
        /usr/lib/ocaml/$(OCAML_ABI)
to
        /usr/lib/ocaml/

libgv-ocaml and libgraphviz-dev still install files under
/usr/lib/ocaml/$(OCAML_ABI).  The packages still build fine but they
will be somehow unusable since the compiler won't find the library
when including it.

Attached, a patch to fix that.

Cheers,

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/bash
>From 9256566ac2fef1db639ccb6250b9c2cfdd3e6e24 Mon Sep 17 00:00:00 2001
From: Mehdi Dogguy <dog...@pps.jussieu.fr>
Date: Thu, 9 Jul 2009 15:57:24 +0200
Subject: [PATCH] OCaml's standard library's location changed

---
 debian/changelog                        |   14 ++++++++++++--
 debian/control                          |    2 +-
 debian/patches/0_bindings_documentation |    2 +-
 debian/rules                            |   20 ++++++++++----------
 4 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 40b776c..1a8dd41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+graphviz (2.20.2-3.1) unstable; urgency=low
+
+  * The location of the OCaml's standard library has changed:
+    - Add dh-ocaml (>= 0.4.1) as a build-dependency
+    - Use $(OCAML_STDLIB_DIR) instead of hard-coding the path
+      /usr/lib/ocaml/$(OCAMLABI)
+    - Use $(OCAML_DLL_DIR) instead of hard-coding the path
+      /usr/lib/ocaml/$(OCAMLABI)/stublibs
+    - Use $(OCAML_ABI) from ocamlvars.mk
+
+ -- Mehdi Dogguy <dog...@pps.jussieu.fr>  Thu, 09 Jul 2009 15:57:34 +0200
+
 graphviz (2.20.2-3) unstable; urgency=high
 
   * Backport patch to fix a stack overflow in the graph parser, reported
@@ -1057,5 +1069,3 @@ graphviz (1.5-1) unstable; urgency=low
   * Initial Release.  
 
  -- Stephen M. Moraco <step...@col.hp.com>  Fri, 31 Dec 1999 15:37:17 -0700
-
-
diff --git a/debian/control b/debian/control
index 88f27fa..10e9df0 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: graphics
 Priority: optional
 Maintainer: Cyril Brulebois <k...@debian.org>
 Standards-Version: 3.8.0
-Build-Depends: tk8.5-dev, tcl8.5-dev, debhelper (>= 5), libfreetype6-dev, 
zlib1g-dev, libjpeg62-dev, libpng12-dev, libxaw7-dev, bison, flex, 
autotools-dev, pdksh, libexpat1-dev, libfontconfig1-dev, libltdl3-dev, swig, 
libperl-dev, libgd2-noxpm-dev (>= 2.0.35), quilt (>= 0.40), groff-base, 
gs-common, lua5.1, liblua5.1-0-dev, ruby, ruby1.8-dev, php5-dev, php5-cli, 
ocaml-nox, python2.4-dev, python2.5-dev, python-minimal, libcairo2-dev, 
libpango1.0-dev, guile-1.6-dev, d-shlibs, python-support, chrpath
+Build-Depends: tk8.5-dev, tcl8.5-dev, debhelper (>= 5), libfreetype6-dev, 
zlib1g-dev, libjpeg62-dev, libpng12-dev, libxaw7-dev, bison, flex, 
autotools-dev, pdksh, libexpat1-dev, libfontconfig1-dev, libltdl3-dev, swig, 
libperl-dev, libgd2-noxpm-dev (>= 2.0.35), quilt (>= 0.40), groff-base, 
gs-common, lua5.1, liblua5.1-0-dev, ruby, ruby1.8-dev, php5-dev, php5-cli, 
ocaml-nox, python2.4-dev, python2.5-dev, python-minimal, libcairo2-dev, 
libpango1.0-dev, guile-1.6-dev, d-shlibs, python-support, chrpath, dh-ocaml (>= 
0.4.1)
 Vcs-Git: git://git.debian.org/git/collab-maint/graphviz.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/graphviz.git
 Homepage: http://www.graphviz.org/
diff --git a/debian/patches/0_bindings_documentation 
b/debian/patches/0_bindings_documentation
index ecd71af..4f09781 100644
--- a/debian/patches/0_bindings_documentation
+++ b/debian/patches/0_bindings_documentation
@@ -19,7 +19,7 @@
 +                      {- : unit = ()}
 +                      {}
 +                      {#require "gv";;}
-+                      {/usr/lib/ocaml/3.10.0/gv/gv.cma: loaded}
++                      {/usr/lib/ocaml/gv/gv.cma: loaded}
                }
                USAGE {
                }
diff --git a/debian/rules b/debian/rules
index 28c4c2f..93d96fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/ocaml/ocamlvars.mk
 include /usr/share/quilt/quilt.make
 
 # Get build platform info
@@ -14,7 +15,6 @@ export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture 
-qDEB_BUILD_GNU_TYPE)
 UPSTREAM_VERSION  = $(shell dpkg-parsechangelog | perl -ne 'print $$1 if 
/^Version: (.*?)-(.*)$$/')
 SONAME            = 4
 
-OCAMLABI          = $(shell ocamlc -version)
 OCAML_PACKAGE     = $(CURDIR)/debian/libgv-ocaml
 
 PHP_EXTENSION_DIR = $(shell php-config5 --extension-dir)
@@ -181,13 +181,13 @@ install: build
 
        # Some additional work for libgv-ocaml
        # 1. Move the shared object to the stublibs directory
-       install -d $(OCAML_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/stublibs
+       install -d $(OCAML_PACKAGE)$(OCAML_DLL_DIR)
        mv $(OCAML_PACKAGE)/usr/lib/graphviz/ocaml/libgv_ocaml.so \
-               $(OCAML_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/stublibs/dllgv.so
+               $(OCAML_PACKAGE)$(OCAML_DLL_DIR)/dllgv.so
        # 2. Move the devel files where they belong
-       install -d $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/gv
+       install -d $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/gv
        mv $(OCAML_PACKAGE)/usr/lib/graphviz/ocaml/*.ml* \
-               $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/gv
+               $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/gv
        # 3. Trash the (almost empty) directory (and its .la)
        rm -rf $(OCAML_PACKAGE)/usr/lib/graphviz
 
@@ -216,12 +216,12 @@ install: build
        rm -rf $(RUBY_PACKAGE)/usr/lib/graphviz
 
        # Install additional ocaml files
-       install -d $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/gv
+       install -d $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/gv
        cp debian/tmp/usr/lib/graphviz/ocaml/gv.cm* \
-               $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/gv
-       install -d $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/METAS
+               $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/gv
+       install -d $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/METAS
        mv debian/tmp/usr/lib/graphviz/ocaml/META.gv \
-               $(DEV_PACKAGE)/usr/lib/ocaml/$(OCAMLABI)/METAS
+               $(DEV_PACKAGE)$(OCAML_STDLIB_DIR)/METAS
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -261,7 +261,7 @@ binary-arch: build install
        dh_makeshlibs -plibgraphviz$(SONAME) -V 'libgraphviz4 (>= 2.20.0)'
        dh_installdeb -a
        dh_shlibdeps -a -L libgraphviz$(SONAME) 
$(CURDIR)/debian/libgraphviz$(SONAME)/usr/lib
-       dh_gencontrol -a -- -VF:OCamlABI="$(OCAMLABI)"
+       dh_gencontrol -a -- -VF:OCamlABI="$(OCAML_ABI)"
        dh_md5sums -a
        dh_builddeb -a
 
-- 
1.6.3.3

Reply via email to