Commit 93344115 authored by Jakub Jirutka's avatar Jakub Jirutka

main/mesa: modernize abuild

parent acf8d280
......@@ -64,13 +64,13 @@ prepare() {
cd "$builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
*.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
esac
done
libtoolize --force \
&& aclocal \
&& automake --add-missing \
&& autoreconf || return 1
&& autoreconf
}
build() {
......@@ -106,69 +106,67 @@ build() {
--enable-texture-float \
--enable-xa \
--enable-vdpau \
$_arch_opts \
|| return 1
make || return 1
$_arch_opts
make
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
make -j1 DESTDIR="$pkgdir" install
}
egl() {
replaces="mesa"
pkgdesc="Mesa libEGL runtime libraries"
replaces="mesa"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libEGL.so* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libEGL.so* "$subpkgdir"/usr/lib/
}
gl() {
replaces="mesa"
pkgdesc="Mesa libGL runtime libraries"
replaces="mesa"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libGL.so* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libGL.so* "$subpkgdir"/usr/lib/
}
glapi() {
replaces="$pkgname-gles"
pkgdesc="Mesa shared glapi"
replaces="$pkgname-gles"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libglapi.so.* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libglapi.so.* "$subpkgdir"/usr/lib/
}
gles() {
replaces="mesa"
pkgdesc="Mesa libGLESv2 runtime libraries"
replaces="mesa"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libGLES*.so* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libGLES*.so* "$subpkgdir"/usr/lib/
}
xatracker() {
pkgdesc="Mesa XA state tracker for vmware"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libxatracker*.so.* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libxatracker*.so.* "$subpkgdir"/usr/lib/
}
osmesa() {
pkgdesc="Mesa offscreen rendering libraries"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libOSMesa.so.* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libOSMesa.so.* "$subpkgdir"/usr/lib/
}
gbm() {
pkgdesc="Mesa gbm library"
replaces="mesa"
install -d "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgbm.so.* \
"$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgbm.so.* "$subpkgdir"/usr/lib/
}
_mv_dri() {
......@@ -176,7 +174,7 @@ _mv_dri() {
while [ $# -gt 0 ]; do
mv "$pkgdir"/$_dri_driverdir/${1}.so \
"$subpkgdir"/$_dri_driverdir/ || return 1
"$subpkgdir"/$_dri_driverdir/
shift
done
}
......@@ -186,7 +184,7 @@ _mv_vdpau() {
install -d "$subpkgdir"/usr/lib/vdpau
for i in "$@"; do
mv "$pkgdir"/usr/lib/vdpau/libvdpau_$i.* \
"$subpkgdir"/usr/lib/vdpau/ || return 1
"$subpkgdir"/usr/lib/vdpau/
done
}
......@@ -198,13 +196,14 @@ _mv_gpipe() {
# install -d "$subpkgdir"/usr/lib/gallium-pipe
# for i in "$@"; do
# mv "$pkgdir"/usr/lib/gallium-pipe/pipe_$i.* \
# "$subpkgdir"/usr/lib/gallium-pipe/ || return 1
# "$subpkgdir"/usr/lib/gallium-pipe/
# done
}
_dri() {
local n=${subpkgname##*-dri-}
pkgdesc="Mesa DRI driver for $n"
case $n in
ati)
_mv_dri radeon_dri r200_dri r300_dri r600_dri radeonsi_dri \
......@@ -236,9 +235,9 @@ _dri() {
_wayland() {
pkgdesc="Mesa libwayland-egl library"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libwayland-egl.so.* "$subpkgdir"/usr/lib/ \
|| return 1
mv "$pkgdir"/usr/lib/libwayland-egl.so.* "$subpkgdir"/usr/lib/
}
sha512sums="cb8369f0edd3e17b4eee8da159b9dc487f8144d69fe4b95901e9aa6a924759866f26f91fc2ead7036707eecea41582185e7ce73d54f97bf310f198b72ee0a8e4 mesa-17.1.4.tar.xz
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment