From fc294a11bfafcc162b13e22b63a18a036f548640 Mon Sep 17 00:00:00 2001 From: Marcio Giaxa Date: Thu, 29 Mar 2018 14:37:43 -0300 Subject: [PATCH] libGL: update to 18.1.3. --- common/shlibs | 6 -- srcpkgs/libGL/patches/musl.patch | 59 ++++++++++++++ .../libGL/patches/use-new-llvm-flag-api.patch | 22 ----- srcpkgs/libGL/template | 80 ++++++++++++------- srcpkgs/mesa-tegra-dri | 1 + 5 files changed, 113 insertions(+), 55 deletions(-) delete mode 100644 srcpkgs/libGL/patches/use-new-llvm-flag-api.patch create mode 120000 srcpkgs/mesa-tegra-dri diff --git a/common/shlibs b/common/shlibs index 82b1e4d99b8..a531d286143 100644 --- a/common/shlibs +++ b/common/shlibs @@ -120,7 +120,6 @@ libXrender.so.1 libXrender-0.9.4_1 libXrandr.so.2 libXrandr-1.3.0_1 libGLU.so.1 glu-9.0.0_1 libEGL.so.1 libEGL-7.11_1 -libEGL.so.1 nvidia-libs-346.72_2 libGLESv1_CM.so.1 libGLES-1.0_1 libGLESv2.so.2 libGLES-1.0_1 libEGL.so rpi-userland-0.0.0.0.20150907_1 @@ -128,13 +127,8 @@ libGLESv2.so rpi-userland-0.0.0.0.20150907_1 libbrcmEGL.so rpi-userland-20180103_2 libbrcmGLESv2.so rpi-userland-20180103_2 libbrcmOpenVG.so rpi-userland-20180103_2 -libGLESv2.so opera-49.0.2725.39_1 libwayland-egl.so.1 libwayland-egl-9.0.1_4 libGL.so.1 libGL-7.11_1 -libGL.so.1 catalyst-libs-14.2_1 -libGL.so.1 nvidia-libs-346.47_1 -libGL.so.1 nvidia304-libs-304.00_1 -libGL.so.1 nvidia340-libs-340.46_1 libnvidia-ml.so.1 nvidia-libs-346.47_1 ignore libnvidia-ml.so.1 nvidia304-libs-304.00_1 ignore libnvidia-ml.so.1 nvidia340-libs-340.46_1 ignore diff --git a/srcpkgs/libGL/patches/musl.patch b/srcpkgs/libGL/patches/musl.patch index 41376cb835f..d89ca6e6a74 100644 --- a/srcpkgs/libGL/patches/musl.patch +++ b/srcpkgs/libGL/patches/musl.patch @@ -32,3 +32,62 @@ #include #include #else +--- src/mesa/drivers/dri/i965/brw_bufmgr.h ++++ src/mesa/drivers/dri/i965/brw_bufmgr.h +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include "util/u_atomic.h" + #include "util/list.h" + +--- src/gallium/state_trackers/nine/nine_debug.c ++++ src/gallium/state_trackers/nine/nine_debug.c +@@ -73,8 +73,8 @@ + } + + #if defined(HAVE_PTHREAD) +-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ +- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) ++# if defined(__linux__) && !(defined(__GLIBC__) || \ ++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) + if (dbg_flags & DBG_TID) + tid = pthread_self(); + # endif +--- src/util/u_thread.h ++++ src/util/u_thread.h +@@ -61,9 +61,8 @@ + static inline void u_thread_setname( const char *name ) + { + #if defined(HAVE_PTHREAD) +-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ +- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \ +- defined(__linux__) ++# if defined(__linux__) && !(defined(__GLIBC__) || \ ++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) + pthread_setname_np(pthread_self(), name); + # endif + #endif +@@ -93,8 +92,8 @@ + static inline bool u_thread_is_self(thrd_t thread) + { + #if defined(HAVE_PTHREAD) +-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ +- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) ++# if defined(__linux__) && !(defined(__GLIBC__) || \ ++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) + return pthread_equal(pthread_self(), thread); + # endif + #endif +--- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h ++++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +@@ -28,6 +28,8 @@ + #ifndef RADV_AMDGPU_WINSYS_H + #define RADV_AMDGPU_WINSYS_H + ++#include ++ + #include "radv_radeon_winsys.h" + #include "ac_gpu_info.h" + #include "addrlib/addrinterface.h" diff --git a/srcpkgs/libGL/patches/use-new-llvm-flag-api.patch b/srcpkgs/libGL/patches/use-new-llvm-flag-api.patch deleted file mode 100644 index 335dc7eb7ff..00000000000 --- a/srcpkgs/libGL/patches/use-new-llvm-flag-api.patch +++ /dev/null @@ -1,22 +0,0 @@ -Source: Upstream -Upstream: 5d61fa4e68b7eb6d481a37efdbb35fdce675a6ad -Reason: Fixes compilation with llvm6 - ---- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -+++ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -@@ -830,7 +830,11 @@ lp_create_builder(LLVMContextRef ctx, enum lp_float_mode float_mode) - llvm::unwrap(builder)->setFastMathFlags(flags); - break; - case LP_FLOAT_MODE_UNSAFE_FP_MATH: -+#if HAVE_LLVM >= 0x0600 -+ flags.setFast(); -+#else - flags.setUnsafeAlgebra(); -+#endif - llvm::unwrap(builder)->setFastMathFlags(flags); - break; - } --- -cgit v1.1 - - diff --git a/srcpkgs/libGL/template b/srcpkgs/libGL/template index ee82bf07489..7f135a08e8f 100644 --- a/srcpkgs/libGL/template +++ b/srcpkgs/libGL/template @@ -1,29 +1,25 @@ -# Template build file for 'libGL'. +# Template file for 'libGL' pkgname=libGL -version=17.3.3 -revision=5 +version=18.1.3 +revision=1 wrksrc="mesa-${version}" build_style=gnu-configure configure_args="--enable-shared-glapi --enable-gbm - --enable-gles1 --enable-gles2 --enable-egl --enable-vdpau - --enable-xvmc --enable-osmesa --enable-texture-float + --enable-egl --enable-vdpau --enable-xvmc --enable-osmesa + --enable-texture-float --enable-gles1 --enable-gles2 --with-platforms=x11,drm,$(vopt_if wayland wayland)" +hostmakedepends="automake flex libtool libxml2-python llvm pkg-config + python-Mako $(vopt_if wayland 'wayland-protocols wayland-devel')" +makedepends="elfutils-devel expat-devel libXdamage-devel libXvMC-devel + libXxf86vm-devel libatomic-devel libdrm-devel libffi-devel libva-devel + libvdpau-devel libxshmfence-devel ncurses-devel talloc-devel zlib-devel + $(vopt_if wayland 'wayland-protocols wayland-devel')" short_desc="Graphics library similar to SGI's OpenGL" maintainer="Juan RP " -homepage="http://www.mesa3d.org/" -license="MIT, LGPL-2.1" +license="MIT, LGPL-2.1-or-later" +homepage="https://www.mesa3d.org/" distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz" -checksum=41bac5de0ef6adc1f41a1ec0f80c19e361298ce02fa81b5f9ba4fdca33a9379b - -hostmakedepends=" - automake libtool flex pkg-config llvm python-Mako libxml2-python - $(vopt_if wayland 'wayland-protocols wayland-devel')" -makedepends=" - xorgproto libatomic-devel libXext-devel libXxf86vm-devel - eudev-libudev-devel libdrm-devel expat-devel talloc-devel libvdpau-devel libva-devel - libXdamage-devel libXvMC-devel libxshmfence-devel - $(vopt_if wayland 'wayland-protocols wayland-devel') - elfutils-devel ncurses-devel zlib-devel libffi-devel" +checksum=54f08deeda0cd2f818e8d40140040ed013de7852573002453b7f50da9ea738ce conf_files="/etc/drirc" # Package build options @@ -47,6 +43,12 @@ i686*|x86_64*) subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri" subpackages+=" mesa-vmwgfx-dri mesa-opencl" ;; +aarch64*) + configure_args+=" --with-gallium-drivers=nouveau,tegra,swrast,vc4" + configure_args+=" --with-dri-drivers=swrast" + configure_args+=" --enable-dri3" + subpackages+=" mesa-tegra-dri mesa-nouveau-dri mesa-vc4-dri" + ;; armv7l*) # Enable Videocore IV and swrast for RaspberryPi configure_args+=" --with-gallium-drivers=swrast,vc4" @@ -93,6 +95,7 @@ pre_configure() { ;; esac } + post_install() { vlicense docs/license.html vmkdir usr/lib/xorg/modules/extensions @@ -110,18 +113,21 @@ libglapi_package() { vmove "usr/lib/libglapi.so*" } } + libgbm_package() { short_desc="Mesa Generic buffer management API - runtime" pkg_install() { vmove "usr/lib/libgbm.so*" } } + libEGL_package() { short_desc="Free implementation of the EGL API - runtime" pkg_install() { vmove "usr/lib/libEGL*.so*" } } + libGLES_package() { depends="libudev" short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API" @@ -129,26 +135,27 @@ libGLES_package() { vmove "usr/lib/libGLES*.so*" } } + libOSMesa_package() { short_desc="Mesa Off-Screen interface library" pkg_install() { vmove "usr/lib/libOSMesa.so*" } } + libwayland-egl_package() { short_desc="Free implementation of the EGL API - wayland runtime" pkg_install() { vmove "usr/lib/libwayland-egl.so*" } } + MesaLib-devel_package() { - depends="xorgproto libxshmfence-devel - libXext-devel libXxf86vm-devel libXdamage-devel expat-devel - libXfixes-devel libX11-devel libxcb-devel libdrm-devel>=2.4.39 - libGL>=${version}_${revision} - libGLES>=${version}_${revision} libEGL>=${version}_${revision} - libOSMesa>=${version}_${revision} libgbm>=${version}_${revision} - $(vopt_if wayland "libwayland-egl>=${version}_${revision}")" + depends="xorgproto libxshmfence-devel libXext-devel libXxf86vm-devel + libXdamage-devel expat-devel libXfixes-devel libX11-devel libxcb-devel + libdrm-devel libGL>=${version}_${revision} libEGL>=${version}_${revision} + libOSMesa>=${version}_${revision} libgbm>=${version}_${revision} + $(vopt_if wayland "libwayland-egl>=${version}_${revision}")" case "$XBPS_TARGET_MACHINE" in i686*|x86_64*) depends+=" libxatracker>=${version}_${revision}";; esac @@ -158,12 +165,14 @@ MesaLib-devel_package() { vmove usr/lib/pkgconfig } } + libxatracker_package() { short_desc="Mesa XA tracker interface library" pkg_install() { vmove "usr/lib/libxatracker*.so*" } } + mesa-ati-dri_package() { short_desc="Mesa DRI drivers for ATI GPUs" pkg_install() { @@ -179,6 +188,7 @@ mesa-ati-dri_package() { vmove "usr/lib/libvulkan_radeon.so" } } + mesa-intel-dri_package() { short_desc="Mesa DRI drivers for Intel GPUs" pkg_install() { @@ -187,16 +197,21 @@ mesa-intel-dri_package() { vmove "usr/lib/libvulkan_intel.so" } } + mesa-nouveau-dri_package() { short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)" pkg_install() { vmove "usr/lib/libXvMCnouveau.so*" vmove "usr/lib/vdpau/libvdpau_nouveau.so*" vmove "usr/lib/xorg/modules/drivers/nouveau*" - vmove usr/lib/gallium-pipe/pipe_nouveau.so - vmove usr/lib/dri/nouveau* + vmove "usr/lib/dri/nouveau*" + case "$XBPS_TARGET_MACHINE" in + aarch64*) ;; + *) vmove usr/lib/gallium-pipe/pipe_nouveau.so ;; + esac } } + mesa-vmwgfx-dri_package() { short_desc="Mesa DRI drivers for VMware" pkg_install() { @@ -204,12 +219,14 @@ mesa-vmwgfx-dri_package() { vmove usr/lib/gallium-pipe/pipe_vmwgfx.so } } + mesa-vc4-dri_package() { short_desc="Mesa DRI drivers for Videocore IV GPU" pkg_install() { vmove "usr/lib/xorg/modules/drivers/vc4*" } } + mesa-opencl_package() { short_desc="Mesa implementation of OpenCL (r600+ only)" depends="libclc libOpenCL" @@ -218,3 +235,12 @@ mesa-opencl_package() { vmove "usr/lib/lib*OpenCL*" } } + +mesa-tegra-dri_package() { + short_desc="Mesa DRI drivers for Tegra GPU" + depends="mesa-nouveau-dri" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/tegra*" + vmove "usr/lib/vdpau/libvdpau_tegra*" + } +} diff --git a/srcpkgs/mesa-tegra-dri b/srcpkgs/mesa-tegra-dri new file mode 120000 index 00000000000..5ef01dc565e --- /dev/null +++ b/srcpkgs/mesa-tegra-dri @@ -0,0 +1 @@ +libGL \ No newline at end of file