summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c926dbd33c90ab7123245dc03e87f8d09067bea (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
# Maintainer: Darjan Krijan [https://disc-kuraudo.eu]

_target_alias="ppu"
_pkgname="zstd"
pkgname="ps3-${_pkgname}"
pkgver="1.5.6"
pkgrel=1
pkgdesc="Zstandard - Fast real-time compression algorithm"
arch=(x86_64 aarch64 powerpc64le powerpc64 powerpc riscv64)
url="https://www.zlib.net/"
license=(custom)
depends=(ps3-env ps3-ppu-gcc)
options=(!emptydirs !strip staticlibs)
source=(
	"https://github.com/facebook/zstd/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.zst"
)
sha256sums=(
	'4aa8dd1c1115c0fd6b6b66c35c7f6ce7bd58cc1dfd3e4f175b45b39e84b14352'
)

source /opt/ps3dev/ps3toolchain.sh

build() {
	cd "${srcdir}/${_pkgname}-${pkgver}/lib"

	export AR="${_target_alias}-ar" CC="${_target_alias}-gcc" RANLIB="${_target_alias}-ranlib"	
	export CFLAGS="-O3 -flto=auto -ffat-lto-objects -DNDEBUG"
	make libzstd.a-nomt-release
}

package() {
	cd "${srcdir}/${_pkgname}-${pkgver}/lib"

	make PREFIX="${PS3DEV}/portlibs/${_target_alias}" DESTDIR="${pkgdir}" install-includes install-pc install-static
}