comparison graphics/mesa/mesa.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 9867e578b1a9
comparison
equal deleted inserted replaced
1221:a47aaf9743a0 1222:325631424c65
101 else 101 else
102 with_dri="-D dri3=false" 102 with_dri="-D dri3=false"
103 with_glx="-D glx=disabled" 103 with_glx="-D glx=disabled"
104 fi 104 fi
105 105
106 rm -rf $PKGNAME-$PKGVERSION 106 build()
107 tar xvf $PKGNAME-$PKGVERSION.tar.xz 107 {
108 cd $PKGNAME-$PKGVERSION 108 rm -rf $PKGNAME-$PKGVERSION
109 tar xvf $PKGNAME-$PKGVERSION.tar.xz
110 cd $PKGNAME-$PKGVERSION
109 111
110 patch -p0 < ../disable-tls.patch 112 patch -p0 < ../disable-tls.patch
111 # https://git.alpinelinux.org/aports/plain/main/mesa/musl-fix-includes.patch 113 # https://git.alpinelinux.org/aports/plain/main/mesa/musl-fix-includes.patch
112 patch -p1 < ../musl.patch 114 patch -p1 < ../musl.patch
113 CC="$CC" \ 115 CC="$CC" \
114 CFLAGS="$CFLAGS" \ 116 CFLAGS="$CFLAGS" \
115 CXX="$CXX" \ 117 CXX="$CXX" \
116 CXXFLAGS="$CXXFLAGS" \ 118 CXXFLAGS="$CXXFLAGS" \
117 LDFLAGS="$LDFLAGS" \ 119 LDFLAGS="$LDFLAGS" \
118 meson . build \ 120 meson . build \
119 --prefix / \ 121 --prefix / \
120 --buildtype release \ 122 --buildtype release \
121 --default-library shared \ 123 --default-library shared \
122 -D libdir=lib \ 124 -D libdir=lib \
123 -D bpm=true \ 125 -D bpm=true \
124 -D platforms="$with_platforms" \ 126 -D platforms="$with_platforms" \
125 -D dri-drivers="$with_dri_drivers" \ 127 -D dri-drivers="$with_dri_drivers" \
126 -D gallium-drivers="$with_gallium_drivers" \ 128 -D gallium-drivers="$with_gallium_drivers" \
127 -D vulkan-drivers="$with_vulkan_drivers" \ 129 -D vulkan-drivers="$with_vulkan_drivers" \
128 $with_dri \ 130 $with_dri \
129 $with_egl \ 131 $with_egl \
130 $with_glvnd \ 132 $with_glvnd \
131 $with_glx \ 133 $with_glx \
132 $with_llvm 134 $with_llvm
133 ninja -C build 135 ninja -C build
134 DESTDIR=$DESTDIR ninja -C build install 136 DESTDIR=$DESTDIR ninja -C build install
135 sed -i -e "s|prefix=/|prefix=|" $DESTDIR/lib/pkgconfig/*.pc 137 sed -i -e "s|prefix=/|prefix=|" $DESTDIR/lib/pkgconfig/*.pc
136 138
137 cd .. 139 cd ..
138 rm -rf $PKGNAME-$PKGVERSION 140 rm -rf $PKGNAME-$PKGVERSION
141 }