void-packages/srcpkgs/XorCurses/template
Jürgen Buchmüller 9c1cbb2f83 XorCurses: needs -fcommon for gcc10
[ci skip]
2020-08-28 18:25:29 +02:00

38 lines
910 B
Bash

# Template file for 'XorCurses'
pkgname=XorCurses
version=0.2.2
revision=1
makedepends="ncurses-devel"
short_desc="Logic puzzle based on Xor by Astral Software"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-3"
homepage="http://jwm-art.net/?p=XorCurses"
distfiles="http://jwm-art.net/art/archive/${pkgname}-${version}.tar.bz2"
checksum=52ce28c4eb4d10fd51668d08e17e9e2a54d520f1d864bb2b659dbcf8e0187969
_cc() {
echo "$@"
$@
}
do_build() {
local f o objs
CFLAGS+=" -std=gnu99 -Wall -Wextra -fcommon"
CFLAGS+=" -DDATADIR=\"/usr/share/${pkgname}\""
CFLAGS+=" -DVERSION=\"${version}\""
for f in ./*.c; do
o=${f%.c}.o
objs+=" $o"
_cc $CC $CFLAGS -o $o -c $f
done
_cc $CC -o ${pkgname} ${objs} -lncurses
}
do_install() {
vbin ${pkgname}
vmkdir usr/share/${pkgname}/maps
vcopy maps/* usr/share/${pkgname}/maps
for f in ./help*.txt; do
vcopy $f usr/share/${pkgname}
done
}