initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

83
mesa/LICENSE Normal file
View File

@@ -0,0 +1,83 @@
The Mesa 3D Graphics Library
Disclaimer
Mesa is a 3-D graphics library with an API which is very similar to
that of [1]OpenGL.* To the extent that Mesa utilizes the OpenGL command
syntax or state machine, it is being used with authorization from
[2]Silicon Graphics, Inc.(SGI). However, the author does not possess an
OpenGL license from SGI, and makes no claim that Mesa is in any way a
compatible replacement for OpenGL or associated with SGI. Those who
want a licensed implementation of OpenGL should contact a licensed
vendor.
Please do not refer to the library as MesaGL (for legal reasons). It's
just Mesa or The Mesa 3-D graphics library.
* OpenGL is a trademark of [3]Silicon Graphics Incorporated.
License / Copyright Information
The Mesa distribution consists of several components. Different
copyrights and licenses apply to different components. For example, the
GLX client code uses the SGI Free Software License B, and some of the
Mesa device drivers are copyrighted by their authors. See below for a
list of Mesa's main components and the license for each.
The core Mesa library is licensed according to the terms of the MIT
license. This allows integration with the XFree86, Xorg and DRI
projects.
The default Mesa license is as follows:
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Attention, Contributors
When contributing to the Mesa project you must agree to the licensing
terms of the component to which you're contributing. The following
section lists the primary components of the Mesa distribution and their
respective licenses.
Mesa Component Licenses
Component Location License
------------------------------------------------------------------
Main Mesa code src/mesa/ MIT
Device drivers src/mesa/drivers/* MIT, generally
Gallium code src/gallium/ MIT
Ext headers include/GL/glext.h Khronos
include/GL/glxext.h
GLX client code src/glx/ SGI Free Software License B
C11 thread include/c11/threads*.h Boost (permissive) emulation
In general, consult the source files for license terms.
References
1. https://www.opengl.org/
2. https://www.sgi.com/
3. https://www.sgi.com/

178
mesa/PKGBUILD Normal file
View File

@@ -0,0 +1,178 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
# Based on mesa package
pkgbase=mesa
pkgname=('mesa' 'mesa-libgl')
pkgdesc="A free software implementation for graphics drivers and rendering specifications"
pkgver=20.3.5
_debver=$pkgver
_debrel=1
pkgrel=10
arch=('i686' 'x86_64')
makedepends=('python-mako' 'libxml2' 'libx11' 'xenocara-proto' 'libdrm' 'libxshmfence' 'libxxf86vm'
'libxdamage' 'elfutils' 'llvm' 'clang' 'libunwind' 'libxrandr' 'glslang' 'meson' 'quilt')
url='https://www.mesa3d.org/'
license=('Expat')
source=("https://archive.mesa3d.org//older-versions/20.x/mesa-${pkgver}.tar.xz"
"https://deb.debian.org/debian/pool/main/m/mesa/mesa_${_debver}-${_debrel}.diff.gz"
"LICENSE"
"drirc")
sha512sums=('481e710ed80d8f215a8d541cfe51b960862c2403c2b9e7e6932c8236b8decb5d478871d6c73559d6d795ada143803764f3a93b2329588c80f62e2e5ec98c78a9'
'68f030adedc00fd1b607055e3b99cfa855062c43310d326c838d16515c2f652b3b2b1cdb62bdecf5bf067a583d8cdcfc2f46083db614c22585e23ff416ac07d0'
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7'
'03438356f152cbfede359314c100f4a93c04a856a12a6daafe3bdbf749661bdc8a28f11c92b73c317cfccf5c1f022f80434cd918a53ebe2c3df1fe1504164bee')
prepare() {
cd $srcdir/mesa-$pkgver
if [ ${pkgver%.*} = ${_debver%.*} ]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
patch -p1 -i "$srcdir"/mesa_$_debver-$_debrel.diff
# Doesn't apply
rm -v debian/patches/fix-python-shebang.diff || true
quilt push -av
fi
}
build() {
DRI=i915,i965,r100,r200,nouveau
GALLIUM=iris,r300,r600,radeonsi,nouveau,lima,panfrost,etnaviv,kmsro,virgl,svga,swrast,swr
SWR_ARCHES=avx,avx2,knl,skx
# Configure
hyperbola-meson mesa-$pkgver build \
-D b_lto=true \
-D b_ndebug=true \
-D platforms=x11 \
-D dri-drivers=$DRI \
-D gallium-drivers=$GALLIUM \
-D swr-arches=$SWR_ARCHES \
-D zstd=disabled \
-D dri3=enabled \
-D egl=enabled \
-D gallium-extra-hud=true \
-D gallium-nine=true \
-D gallium-omx=disabled \
-D gallium-opencl=disabled \
-D gallium-va=disabled \
-D gallium-vdpau=disabled \
-D gallium-xa=enabled \
-D gallium-xvmc=disabled \
-D gbm=enabled \
-D gles1=enabled \
-D gles2=enabled \
-D glvnd=false \
-D glx=dri \
-D libunwind=enabled \
-D llvm=enabled \
-D lmsensors=disabled \
-D opencl-spirv=false \
-D osmesa=gallium \
-D shared-glapi=enabled \
-D shared-llvm=enabled \
-D valgrind=disabled
# Print configuration
meson configure build
# Build
ninja -C build
meson compile -C build
}
package_mesa() {
depends=('libdrm' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf' 'libunwind' 'llvm-libs')
provides=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri'
'swrast-dri' 'virgl-dri' 'swr-dri' 'mesa-dri' 'opengl-driver')
conflicts=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri'
'swrast-dri' 'virgl-dri' 'swr-dri' 'mesa-dri'
'nvidia-'{,{390,340,304,173,96}xx-}'utils' 'catalyst-utils'
'libtxc_dxtn')
replaces=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri'
'swrast-dri' 'virgl-dri' 'swr-dri' 'mesa-dri'
'nvidia-'{,{390,340,304,173,96}xx-}'utils' 'catalyst-utils'
'libtxc_dxtn')
backups=('etc/drirc')
# Fake installation to be seperated into packages
# outside of fakeroot but mesa does not need to chown and chmod
DESTDIR=$srcdir/fakeinstall meson install -C build
# Copy drirc
install -Dm 644 $srcdir/drirc -t $pkgdir/etc
# Move usr/include/d3dadapter and usr/include/*.h
install -dm 755 $pkgdir/usr/include
mv -v $srcdir/fakeinstall/usr/include/d3dadapter $pkgdir/usr/include
mv -v $srcdir/fakeinstall/usr/include/*.h $pkgdir/usr/include
# Move usr/lib/d3d
install -dm 755 $pkgdir/usr/lib
for i in d3d; do
mv -v $srcdir/fakeinstall/usr/lib/${i} $pkgdir/usr/lib
done
unset i
# Move usr/lib/dri/*_dri.so
install -dm 755 $pkgdir/usr/lib/dri
mv -v $srcdir/fakeinstall/usr/lib/dri/*_dri.so $pkgdir/usr/lib/dri
# Move usr/lib/pkgconfig/{d3d,dri,gbm,osmesa,xatracker}.pc
install -dm 755 $pkgdir/usr/lib/pkgconfig
for i in d3d dri gbm osmesa xatracker; do
mv -v $srcdir/fakeinstall/usr/lib/pkgconfig/${i}.pc \
$pkgdir/usr/lib/pkgconfig
done
unset i
# Move usr/lib/lib{OS,gbm,glapi,swr,xatracker}*.so*
for i in OS gbm glapi swr xatracker; do
mv -v $srcdir/fakeinstall/usr/lib/lib${i}*.so* $pkgdir/usr/lib
done
unset i
# Copy LICENSE
install -Dm 644 $srcdir/LICENSE -t $pkgdir/usr/share/licenses/$pkgname
}
package_mesa-libgl() {
pkgdesc="Mesa 3D graphics library"
depends=('mesa')
provides=('libgl' 'libegl' 'libgles')
conflicts=('nvidia-libgl' 'nvidia-340xx-libgl' 'nvidia-304xx-libgl' 'nvidia-cg-toolkit' 'catalyst-libgl')
replaces=('nvidia-libgl' 'nvidia-340xx-libgl' 'nvidia-304xx-libgl' 'nvidia-cg-toolkit' 'catalyst-libgl')
# Move usr/include/{EGL,GL,GLES2,GLES3,KHR}
install -dm 755 $pkgdir/usr/include
for i in EGL GL GLES GLES2 GLES3 KHR; do
mv -v $srcdir/fakeinstall/usr/include/${i} $pkgdir/usr/include
done
unset i
# Move usr/lib/pkgconfig/{egl,gl,glesv1_cm,glesv2}.pc
install -dm 755 $pkgdir/usr/lib/pkgconfig
for i in egl gl glesv1_cm glesv2; do
mv -v $srcdir/fakeinstall/usr/lib/pkgconfig/${i}.pc \
$pkgdir/usr/lib/pkgconfig
done
unset i
# Move usr/lib/lib{EGL,GL,GLESv1_CM,GLES2}.so
for i in EGL GL GLESv1_CM GLESv2; do
mv -v $srcdir/fakeinstall/usr/lib/lib${i}.so* $pkgdir/usr/lib
done
unset i
# Make sure there are no files left to install
find fakeinstall -depth -print0 | xargs -0 rm -rf
# Copy LICENSE
install -Dm 644 $srcdir/LICENSE -t $pkgdir/usr/share/licenses/$pkgname
}

20
mesa/drirc Normal file
View File

@@ -0,0 +1,20 @@
<driconf>
<!-- Please always enable app-specific workarounds for all drivers and screens. -->
<device>
<application name="Warsow" executable="warsow">
<option name="allow_glsl_extension_directive_midshader" value="true"/>
</application>
</device>
<!-- vmwgfx doesn't like full buffer swaps and can't sync to vertical retraces.-->
<device driver="vmwgfx">
<application name="gnome-shell" executable="gnome-shell">
<option name="glx_disable_ext_buffer_age" value="true"/>
<option name="glx_disable_oml_sync_control" value="true"/>
<option name="glx_disable_sgi_video_sync" value="true"/>
</application>
<application name="Compiz" executable="Compiz">
<option name="glx_disable_ext_buffer_age" value="true"/>
<option name="glx_disable_oml_sync_control" value="true"/>
</application>
</device>
</driconf>