[RFC] Use gles-alternatives for tegra-libraries

Heiko Stübner heiko at sntech.de
Thu Jul 21 07:10:08 UTC 2011


Move the conflicting libraries libEGL.so, libGLESv1_CM.so and libGLESv2.so
to a separate subdirectory where gles-alternative-tegra can get them.

Signed-off-by: Heiko Stuebner <mmind at debian.org>

---
At the moment I'm still stumped on how to handle the .so-files.

From what I gathered from glx-alternatives the .so files are meant to
keep pointing to the original mesa-so, so stuff is still compiled
against it and not against the vendor specific libraries.

The nvidia libraries don't seem to have an soname which would conflict
with this functionality.

So my thought was on adding the missing soname to libEGL.so,
libGLESv1_CM.so and libGLESv2.so from the NVidia-release but it seems
these 3 libs also have dependencies between them (i.e. libGLESv1_CM.so
depends on libGLESv2.so).

Is there some way to update the dynamic section of the 3 libs to point
to the then correct ones [i.e. libGLESv2.so.2 instead of libGLESv2.so]
or should the libXXXX.so-master alternative simply point to the nvidia
ones for now?


 debian/control                 |    2 +-
 debian/tegra-libraries.install |    6 +++++-
 debian/tegra-libraries.links   |    6 +++---
 debian/tegra-libraries.postrm  |   19 -------------------
 debian/tegra-libraries.preinst |   19 -------------------
 5 files changed, 9 insertions(+), 43 deletions(-)

diff --git a/debian/control b/debian/control
index 13e12d0..80c32d2 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,7 @@ Description: NVIDIA Tegra binary driver - Xorg driver and firmware
 Package: tegra-libraries
 Architecture: armel
 Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, gles-alternative-tegra
 Provides: libegl1-tegra, libgles1-tegra, libgles2-tegra
 Multi-Arch: same
 Description: NVIDIA Tegra binary driver - Libraries
diff --git a/debian/tegra-libraries.install b/debian/tegra-libraries.install
index 373221e..06f33e7 100644
--- a/debian/tegra-libraries.install
+++ b/debian/tegra-libraries.install
@@ -1 +1,5 @@
-usr/lib/*.so usr/lib/arm-linux-gnueabi
+usr/lib/libnv*.so usr/lib/arm-linux-gnueabi
+usr/lib/libcgdrv.so usr/lib/arm-linux-gnueabi
+usr/lib/libKD.so usr/lib/arm-linux-gnueabi
+usr/lib/libGLES*.so usr/lib/arm-linux-gnueabi/tegra
+usr/lib/libEGL.so usr/lib/arm-linux-gnueabi/tegra
diff --git a/debian/tegra-libraries.links b/debian/tegra-libraries.links
index 53352e3..1eed9d3 100644
--- a/debian/tegra-libraries.links
+++ b/debian/tegra-libraries.links
@@ -1,3 +1,3 @@
-usr/lib/arm-linux-gnueabi/libEGL.so usr/lib/arm-linux-gnueabi/libEGL.so.1
-usr/lib/arm-linux-gnueabi/libGLESv1_CM.so usr/lib/arm-linux-gnueabi/libGLESv1_CM.so.1
-usr/lib/arm-linux-gnueabi/libGLESv2.so usr/lib/arm-linux-gnueabi/libGLESv2.so.2
+usr/lib/arm-linux-gnueabi/tegra/libEGL.so usr/lib/arm-linux-gnueabi/tegra/libEGL.so.1
+usr/lib/arm-linux-gnueabi/tegra/libGLESv1_CM.so usr/lib/arm-linux-gnueabi/tegra/libGLESv1_CM.so.1
+usr/lib/arm-linux-gnueabi/tegra/libGLESv2.so usr/lib/arm-linux-gnueabi/tegra/libGLESv2.so.2
diff --git a/debian/tegra-libraries.postrm b/debian/tegra-libraries.postrm
deleted file mode 100644
index a02da1a..0000000
--- a/debian/tegra-libraries.postrm
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-set -e
-
-files=/usr/lib/arm-linux-gnueabi/libEGL.so.1 \
-      /usr/lib/arm-linux-gnueabi/libEGL.so \
-      /usr/lib/arm-linux-gnueabi/libGLESv1_CM.so.1 \
-      /usr/lib/arm-linux-gnueabi/libGLESv1_CM.so \
-      /usr/lib/arm-linux-gnueabi/libGLESv2.so.2 \
-      /usr/lib/arm-linux-gnueabi/libGLESv2.so
-
-if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then
-    for file in $files; do
-        dpkg-divert --package tegra-libraries --remove --rename \
-                    --divert $file.diverted-by-tegra $file
-    done
-fi
-
-#DEBHELPER#
diff --git a/debian/tegra-libraries.preinst b/debian/tegra-libraries.preinst
deleted file mode 100644
index 13c555c..0000000
--- a/debian/tegra-libraries.preinst
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-set -e
-
-files=/usr/lib/arm-linux-gnueabi/libEGL.so.1 \
-      /usr/lib/arm-linux-gnueabi/libEGL.so \
-      /usr/lib/arm-linux-gnueabi/libGLESv1_CM.so.1 \
-      /usr/lib/arm-linux-gnueabi/libGLESv1_CM.so \
-      /usr/lib/arm-linux-gnueabi/libGLESv2.so.2 \
-      /usr/lib/arm-linux-gnueabi/libGLESv2.so
-
-if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then
-    for file in $files; do
-        dpkg-divert --package tegra-libraries --add --rename \
-                    --divert $file.diverted-by-tegra $file
-    done
-fi
-
-#DEBHELPER#
-- 
tg: (37d6e04..) topic/gles-alternatives (depends on: master)



More information about the pkg-nvidia-devel mailing list