summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2acbc3b778176de2d65e64e4034afa09dd7334ed (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
55
56
# Maintainer: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: Alfonso Saavedra "Son Link" <sonlink.dourden@gmail.com>

pkgname=zesarux-git
pkgver=ZEsarUX.11.1.Beta1.r7.ga6460d4
_ver=11.1
pkgrel=1
epoch=3
pkgdesc="A Zx80/Zx81/Z88, Zx Spectrum 16/48/128/+2/+2A and ZX-Uno emulator with ULAPlus support. Development version."
arch=('i686' 'x86_64')
url="https://github.com/chernandezba/zesarux"
license=('GPL-3.0-or-later')
conflicts=('zesarux')
depends=('libxxf86vm' 'aalib' 'libcaca' 'alsa-lib' 'python')
optdepends=('libpulse: for support Pulseaudio'
	'openssl: for enable SSL functions'
	'sdl: for support sdl video and audio output')
options=(!debug)
source=('zesarux-code::git+https://github.com/chernandezba/zesarux.git'
	zesarux.desktop
	zesarux.png)
install="zesarux.install"
sha256sums=('SKIP'
	    'a2b56a0349c52dc3826094cd587cc775033f4e206f4dafa4345b509c548736e1'
            'e11be8695f0f75ac2ad5c32e225a3a7aca35ca97b4d1f04726bda476aa460eb5')

pkgver() {
  	cd "$srcdir/zesarux-code"
        #printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
        git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "$srcdir/zesarux-code/src"
	# Disable -Wimplicit-function-declaration errors 
	# because gcc 14.x+ is very sensible
	export CFLAGS+=" -Wno-error=implicit-function-declaration"
	export CXXFLAGS+=" -Wno-error=implicit-function-declaration"
	
	./configure --prefix /usr --enable-memptr --enable-visualmem --enable-cpustats --enable-sdl2
	sed -i 's/tar -C/#tar -C/g' Makefile
	make bintargz
}
package(){
	if [  ! -d "${pkgdir}/usr" ]; then
		mkdir -p "${pkgdir}/usr/bin"
		mkdir -p "${pkgdir}/usr/share/zesarux/"
		mkdir -p "${pkgdir}/usr/share/applications"
	fi
	cd ${srcdir}/zesarux-code/src
	cp zesarux "${pkgdir}/usr/bin/"
	cp bintargztemp/ZEsarUX-${_ver}/* -r "${pkgdir}/usr/share/zesarux/"
	cp ${srcdir}/zesarux.desktop "${pkgdir}/usr/share/applications/"
	cp ${srcdir}/zesarux.png "${pkgdir}/usr/share/zesarux/"
	rm "${pkgdir}/usr/share/zesarux/zesarux"
}