Fix glshim and install it by default

This commit is contained in:
zador-blood-stained 2016-09-10 17:31:43 +03:00
parent aa007c70a1
commit 632b9d7e87
11 changed files with 105 additions and 8 deletions

View file

@ -13,5 +13,5 @@ package_checkbuild()
package_checkinstall()
{
false
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View file

@ -15,6 +15,9 @@ Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces:
libgl1-mesa-glx,
libgl1-mesa-dev,
Description: OpenGL 1.x shim to to OpenGL ES
This is a shim providing OpenGL 1.x functionality to OpenGL ES accelerated cards.
.

View file

@ -0,0 +1,14 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
case "$1" in
configure)
[ "Ubuntu" = "$DISTRIBUTION" ] && update-alternatives --force --install /etc/ld.so.conf.d/${DEB_HOST_MULTIARCH}_GL.conf \
${DEB_HOST_MULTIARCH}_gl_conf /usr/lib/${DEB_HOST_MULTIARCH}/${private_dir}/ld.so.conf 600
LDCONFIG_NOTRIGGER=y ldconfig
esac
#DEBHELPER#
exit 0

View file

@ -0,0 +1,18 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
DIVERT_TARGETS="libGL.so libGL.so.1 libGL.so.1.2.0"
if [ remove = "$1" -o abort-install = "$1" ] && [ "Debian" = "$DISTRIBUTION" ]; then
for f in $DIVERT_TARGETS; do
dpkg-divert --package libglshim1 --remove --rename \
--divert /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
rm -rf /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#
exit 0

View file

@ -0,0 +1,18 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
DIVERT_TARGETS="libGL.so libGL.so.1 libGL.so.1.2.0"
if [ "Debian" = "$DISTRIBUTION" ]; then
mkdir -p /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert
for f in $DIVERT_TARGETS; do
dpkg-divert --package libglshim1 --add --rename \
--divert /usr/lib/${DEB_HOST_MULTIARCH}/libglshim-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#
exit 0

View file

@ -0,0 +1,13 @@
#!/bin/sh
DISTRIBUTION="${distribution}"
case "$1" in
remove)
[ "Ubuntu" = "$DISTRIBUTION" ] && update-alternatives --remove ${DEB_HOST_MULTIARCH}_gl_conf /usr/lib/${DEB_HOST_MULTIARCH}/${private_dir}/ld.so.conf
LDCONFIG_NOTRIGGER=y ldconfig
esac
#DEBHELPER#
exit 0

View file

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13ac06b..167c714 100755
index 13ac06b..0cd8d0e 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,9 @@
@ -25,7 +25,7 @@ index 13ac06b..167c714 100755
add_definitions(-g -std=gnu99 -funwind-tables -O3 -fvisibility=hidden)
include_directories(include)
+include_directories(BEFORE SYSTEM include_mali)
+include_directories(include_mali)
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4cb3b30..3d926df 100755

View file

@ -2,11 +2,43 @@
#export DH_VERBOSE=1
# Get the architecture triplet:
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=-all,+format,+stackprotector,+pie
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
DEB_HOST_DISTRIBUTION = Ubuntu
else
DEB_HOST_DISTRIBUTION = Debian
endif
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
private_dir = glshim
else
private_dir =
endif
override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=OFF -DPRIVATEDIR=glshim
for file in debian/*.in; \
do \
sed -e"s,\$${DEB_HOST_MULTIARCH},$(DEB_HOST_MULTIARCH),g" \
-e"s,\$${private_dir},${private_dir},g" \
-e"s,\$${distribution},${DEB_HOST_DISTRIBUTION},g" \
$${file} > $${file%%.in}; \
done
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=OFF -DPRIVATEDIR=$(private_dir)
override_dh_auto_build:
dh_auto_build -- GL preload
override_dh_install:
dh_install
ifeq ($(DEB_HOST_DISTRIBUTION), Ubuntu)
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)" > $(CURDIR)/debian/libglshim1/usr/lib/$(DEB_HOST_MULTIARCH)/$(private_dir)/ld.so.conf
endif
override_dh_strip:
%:
dh $@

View file

@ -11,6 +11,7 @@ if [ remove = "$1" -o abort-install = "$1" ] && [ "Debian" = "$DISTRIBUTION" ];
--divert /usr/lib/${DEB_HOST_MULTIARCH}/mali-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
rm -rf /usr/lib/${DEB_HOST_MULTIARCH}/mali-divert
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#

View file

@ -29,6 +29,7 @@ if [ "Debian" = "$DISTRIBUTION" ]; then
dpkg-divert --package libmali-sunxi-r3p0 --add --rename \
--divert /usr/lib/${DEB_HOST_MULTIARCH}/mali-divert/${f} /usr/lib/${DEB_HOST_MULTIARCH}/${f}
done
LDCONFIG_NOTRIGGER=y ldconfig
fi
#DEBHELPER#

View file

@ -2,13 +2,10 @@
DISTRIBUTION="${distribution}"
DIVERT_TARGETS="libEGL.so libEGL.so.1 libEGL.so.1.0.0 libGLESv1_CM.so libGLESv1_CM.so.1 libGLESv1_CM.so.1.1.0 \
libGLESv2.so libGLESv2.so.2 libGLESv2.so.2.0.0"
case "$1" in
remove)
[ "Ubuntu" = "$DISTRIBUTION" ] && update-alternatives --remove ${DEB_HOST_MULTIARCH}_egl_conf /usr/lib/${DEB_HOST_MULTIARCH}/${private_dir}/ld.so.conf
ldconfig
LDCONFIG_NOTRIGGER=y ldconfig
esac
#DEBHELPER#