summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2021-06-04 13:07:44 +0000
committerDaniel Bermond2021-06-04 13:07:44 +0000
commit88b28efcc177b701d620e644ee42598a31535ffe (patch)
tree3b70f644a73869d85db3a66655d4bbf17080689d
parentc49135efafd6f9fa34bb3275393ef69cd29bcabf (diff)
downloadaur-88b28efcc177b701d620e644ee42598a31535ffe.tar.gz
Major rewrite
-rw-r--r--.SRCINFO26
-rw-r--r--010-astc-encoder-fix-install.patch19
-rw-r--r--PKGBUILD61
3 files changed, 71 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2858b19f2fa9..701c4a163b4a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
-# Generated by mksrcinfo v8
-# Thu Apr 12 18:38:45 UTC 2018
pkgbase = astc-encoder-git
- pkgdesc = An ASTC (Adaptive Scalable Texture Compression) encoder and decoder
- pkgver = r43.a47b80f
+ pkgdesc = A tool for compressing and decompressing images using the ASTC texture compression standard (git version)
+ pkgver = 3.0.r0.gd21d551
pkgrel = 1
- url = https://github.com/ARM-software/astc-encoder
- arch = i686
+ url = https://github.com/ARM-software/astc-encoder/
arch = x86_64
- arch = armv7h
- arch = aarch64
- license = CUSTOM
- makedepends = clang
- depends = openexr
- source = git+https://github.com/ARM-software/astc-encoder.git
+ license = Apache
+ makedepends = git
+ makedepends = cmake
+ makedepends = python
+ depends = gcc-libs
+ source = git+https://github.com/ARM-software/astc-encoder.git#branch=main
+ source = git+https://github.com/google/googletest.git
+ source = 010-astc-encoder-fix-install.patch
sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 32cb972d67318166273e6ca508270630bf329f5e1855502f6a493cd803ab2447
pkgname = astc-encoder-git
-
diff --git a/010-astc-encoder-fix-install.patch b/010-astc-encoder-fix-install.patch
new file mode 100644
index 000000000000..32ee55f35a39
--- /dev/null
+++ b/010-astc-encoder-fix-install.patch
@@ -0,0 +1,19 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -146,7 +146,7 @@ set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+-set(PACKAGE_ROOT astcenc)
++set(PACKAGE_ROOT bin)
+ include(CTest)
+
+ # Subcomponents
+--- a/Source/UnitTest/cmake_core.cmake
++++ b/Source/UnitTest/cmake_core.cmake
+@@ -114,5 +114,3 @@ target_link_libraries(test-simd-${ISA_SIMD}
+
+ add_test(NAME test-simd-${ISA_SIMD}
+ COMMAND test-simd-${ISA_SIMD})
+-
+-install(TARGETS test-simd-${ISA_SIMD} DESTINATION ${PACKAGE_ROOT})
diff --git a/PKGBUILD b/PKGBUILD
index 56c40b8ae970..cc1ffd22abfc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,50 @@
-# Maintainer: Dario Ostuni <another.code.996@gmail.com>
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
+# Contributor: Dario Ostuni <another.code.996@gmail.com>
+
pkgname=astc-encoder-git
-pkgver=r43.a47b80f
+pkgver=3.0.r0.gd21d551
pkgrel=1
-pkgdesc="An ASTC (Adaptive Scalable Texture Compression) encoder and decoder"
-arch=('i686' 'x86_64' 'armv7h' 'aarch64')
-url="https://github.com/ARM-software/astc-encoder"
-license=('CUSTOM')
-depends=('openexr')
-makedepends=('clang')
-options=()
-source=("git+https://github.com/ARM-software/astc-encoder.git")
-sha256sums=('SKIP')
+pkgdesc='A tool for compressing and decompressing images using the ASTC texture compression standard (git version)'
+arch=('x86_64')
+url='https://github.com/ARM-software/astc-encoder/'
+license=('Apache')
+depends=('gcc-libs')
+makedepends=('git' 'cmake' 'python')
+source=('git+https://github.com/ARM-software/astc-encoder.git#branch=main'
+ 'git+https://github.com/google/googletest.git'
+ '010-astc-encoder-fix-install.patch')
+sha256sums=('SKIP'
+ 'SKIP'
+ '32cb972d67318166273e6ca508270630bf329f5e1855502f6a493cd803ab2447')
+
+prepare() {
+ git -C astc-encoder submodule init
+ git -C astc-encoder config --local submodule.Source/GoogleTest.url "${srcdir}/googletest"
+ git -C astc-encoder submodule update
+ patch -d astc-encoder -Np1 -i "${srcdir}/010-astc-encoder-fix-install.patch"
+}
pkgver() {
- cd "$srcdir/astc-encoder"
- echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+ git -C astc-encoder describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
build() {
- cd "$srcdir/astc-encoder/Source"
- sed -i -- 's/g++/clang++/g' Makefile
- sed -i -- 's/-msse2 -mfpmath=sse//g' Makefile
- make
- clang++ exr_to_htga.cpp $(pkg-config --cflags --libs OpenEXR) -o exr_to_htga
+ cmake -B build -S astc-encoder \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DISA_AVX2:BOOL='ON' \
+ -DISA_SSE41:BOOL='ON' \
+ -DISA_SSE2:BOOL='ON' \
+ -DUNITTEST:BOOL='ON' \
+ -Wno-dev
+ make -C build
+}
+
+check() {
+ make -C build test
}
package() {
- cd "$srcdir/astc-encoder/Source"
- install -Dm755 astcenc "$pkgdir/usr/bin/astcenc"
- install -Dm755 exr_to_htga "$pkgdir/usr/bin/exr_to_htga"
- install -Dm644 ../license.txt "$pkgdir/usr/share/licenses/astc-encoder-git/LICENSE"
+ make -C build DESTDIR="$pkgdir" install
+ ln -s astcenc-sse2 "${pkgdir}/usr/bin/astcenc"
}