summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3978b48272c4281d189c2632729f243f65cd4297 (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
53
54
# Maintainer: Martin Rys <https://rys.rs/contact>
# Contributor: nm10923 https://nm10923.xyz/contact
# Contributor: Erik Kallen <info@erikkallen.nl>

pkgname=sdl3_image-git
pkgver=r2046.0ee698e
pkgrel=1
pkgdesc="SDL3 image loading library"
arch=(
	"aarch64"
	"x86_64"
)
url="https://github.com/libsdl-org/SDL_image"
license=("Zlib")
depends=(
	"glibc"
	"sdl3"
	"libpng"
	"libtiff"
	"libjpeg-turbo"
	"libwebp"
	"libavif"
	"libjxl"
)
makedepends=(
	"cmake"
	"git"
)
source=("git+https://github.com/libsdl-org/SDL_image")
sha256sums=("SKIP")
provides=("sdl3_image")
conflicts=("sdl3_image")

pkgver() {
	cd "${srcdir}/SDL_image"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
	cmake \
		-B build \
		-S "SDL_image" \
		-D SDLIMAGE_SAMPLES=OFF \
		-D SDLIMAGE_TESTS=OFF \
		-D CMAKE_BUILD_TYPE=None \
		-D CMAKE_INSTALL_PREFIX=/usr

	cmake --build build
}

package() {
	DESTDIR="${pkgdir}" cmake --install build
	install -Dm644 "SDL_image/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}