blob: 27f45b452e9bbebaa58601e0bae7d3e38b527418 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=astc-encoder
pkgver=5.1.0
pkgrel=1
pkgdesc='A tool for compressing and decompressing images using the ASTC texture compression standard'
arch=('x86_64')
url='https://github.com/ARM-software/astc-encoder/'
license=('Apache-2.0')
depends=('gcc-libs')
makedepends=('git' 'cmake' 'python')
source=("git+https://github.com/ARM-software/astc-encoder.git#tag=${pkgver}"
'git+https://github.com/google/googletest.git'
'010-astc-encoder-remove-werror.patch'
'020-astc-encoder-remove-flags-unsupported-by-gcc14.patch')
sha256sums=('a7759786f0e7d7b8dfa91a88f5c918d3825d94ae51b9ca7521da5ccc97ce6a97'
'SKIP'
'92b879590c1a3c10cb52b314e7f763251f321bf2e29778882c48520982196053'
'd364bdd68fe4126df2114a61d254bac85b66d612345ef1b19a940179e6dcbf4c')
prepare() {
git -C astc-encoder submodule init
git -C astc-encoder config --local submodule.Source/GoogleTest.url "${srcdir}/googletest"
git -C astc-encoder -c protocol.file.allow='always' submodule update
patch -d astc-encoder -Np1 -i "${srcdir}/010-astc-encoder-remove-werror.patch"
patch -d astc-encoder -Np1 -i "${srcdir}/020-astc-encoder-remove-flags-unsupported-by-gcc14.patch"
}
build() {
cmake -B build -S astc-encoder \
-G 'Unix Makefiles' \
-DCMAKE_BUILD_TYPE:STRING='None' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-DASTCENC_SHAREDLIB:BOOL='ON' \
-DASTCENC_ISA_AVX2:BOOL='ON' \
-DASTCENC_ISA_SSE41:BOOL='ON' \
-DASTCENC_ISA_SSE2:BOOL='ON' \
-Wno-dev
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -D -m644 astc-encoder/Source/astcenc.h -t "${pkgdir}/usr/include"
ln -s astcenc-sse2 "${pkgdir}/usr/bin/astcenc"
ln -s libastcenc-sse2-shared.so "${pkgdir}/usr/lib/libastcenc.so"
}
|