[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'ubuntu'



 debian/changelog                |   15 +++++++++++++++
 debian/libgl1-mesa-dev.links    |    1 +
 debian/libgl1-mesa-glx.postinst |   26 ++++++++++++++++++++++++++
 debian/libgl1-mesa-glx.prerm    |   23 +++++++++++++++++++++++
 debian/rules                    |   15 +++++++++++++++
 5 files changed, 80 insertions(+)

New commits:
commit 1ae93fc243f46d78fb87f61ac8e5efc43a740755
Author: Alberto Milone <alberto.milone@canonical.com>
Date:   Mon Jan 11 14:46:19 2010 +0100

    * debian/libgl1-mesa-dev.links:
      - Add link to /usr/lib/mesa/libGL.so in /usr/lib so as not to break
        software that build against mesa (LP: #505359).
    * debian/libgl1-mesa-glx.{postinst|prerm}:
      - Use alternatives so that /usr/lib/GL is a slave which points to
        /usr/lib/mesa.
    * debian/rules:
      - Install /usr/lib/mesa/ld.so.conf
      - Create an empty directory (for alternatives) just to be sure:
        /usr/lib/xorg/x11-extra-modules.

diff --git a/debian/changelog b/debian/changelog
index 3fd74b3..5acc597 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+mesa (7.7-0ubuntu3) lucid; urgency=low
+
+  * debian/libgl1-mesa-dev.links:
+    - Add link to /usr/lib/mesa/libGL.so in /usr/lib so as not to break
+      software that build against mesa (LP: #505359).
+  * debian/libgl1-mesa-glx.{postinst|prerm}:
+    - Use alternatives so that /usr/lib/GL is a slave which points to
+      /usr/lib/mesa.
+  * debian/rules:
+    - Install /usr/lib/mesa/ld.so.conf
+    - Create an empty directory (for alternatives) just to be sure:
+      /usr/lib/xorg/x11-extra-modules.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 11 Jan 2010 12:04:53 +0100
+
 mesa (7.7-0ubuntu2) lucid; urgency=low
 
   * Moving just libGL.so.* to /usr/lib/mesa broke all builds depending on
diff --git a/debian/libgl1-mesa-dev.links b/debian/libgl1-mesa-dev.links
new file mode 100644
index 0000000..f40fe08
--- /dev/null
+++ b/debian/libgl1-mesa-dev.links
@@ -0,0 +1 @@
+/usr/lib/libGL.so /usr/lib/mesa/libGL.so
diff --git a/debian/libgl1-mesa-glx.postinst b/debian/libgl1-mesa-glx.postinst
new file mode 100644
index 0000000..77df041
--- /dev/null
+++ b/debian/libgl1-mesa-glx.postinst
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+THIS_PACKAGE=libgl1-mesa-glx
+THIS_SCRIPT=postinst
+
+case "$1" in
+  configure)
+  # Use alternatives to make it easier to switch between Mesa and 3rd party modules
+  update-alternatives \
+    --install /etc/ld.so.conf.d/GL.conf gl_conf /usr/lib/GL/ld.so.conf 500 \
+    --slave /usr/lib/GL gl_libraries /usr/lib/mesa \
+    --slave /usr/lib/xorg/extra-modules xorg_extra_modules /usr/lib/xorg/x11-extra-modules
+
+  # explicit ldconfig due to alternatives
+  ldconfig
+
+esac
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sw=2 ts=2 tw=80:
+
diff --git a/debian/libgl1-mesa-glx.prerm b/debian/libgl1-mesa-glx.prerm
new file mode 100644
index 0000000..d3d78e4
--- /dev/null
+++ b/debian/libgl1-mesa-glx.prerm
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+THIS_PACKAGE=libgl1-mesa-glx
+THIS_SCRIPT=prerm
+
+case "$1" in
+  remove)
+  # Use alternatives to make it easier to switch between Mesa and 3rd party modules
+  update-alternatives --remove gl_conf /usr/lib/GL/ld.so.conf
+
+  # explicit ldconfig due to alternatives
+  ldconfig
+
+esac
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sw=2 ts=2 tw=80:
+
diff --git a/debian/rules b/debian/rules
index 71d3a49..002524e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -230,6 +230,21 @@ binary-arch: install
 	dh_installdocs -s
 	dh_installexamples -s
 	dh_install -s --sourcedir=debian/tmp --list-missing
+
+	# Create an ld.so.conf which says where to find libGL from Mesa
+	$(INSTALL) -d $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/mesa
+	echo "/usr/lib/mesa" \
+	> $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/mesa/ld.so.conf
+
+ifeq ($(DEB_BUILD_ARCH),amd64)
+	# Add the path to 32bit libGL from Mesa (on 64 bit)
+	echo "/usr/lib32/mesa" \
+	>> $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/mesa/ld.so.conf
+endif
+
+	# Empty directory for the alternative
+	mkdir -p $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/xorg/x11-extra-modules
+
 	dh_installman -s
 	dh_lintian -s
 	dh_link -s


Reply to: