void-packages/srcpkgs/openmsx/template

37 lines
1.4 KiB
Bash

# Template file for 'openmsx'
pkgname=openmsx
version=18.0
revision=1
hostmakedepends="pkg-config python3"
makedepends="SDL2-devel glew-devel libao-devel libtheora-devel libvorbis-devel
libpng-devel libxml2-devel SDL2_ttf-devel tcl-devel"
short_desc="MSX emulator that aims for perfection"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://openmsx.org"
changelog="https://raw.githubusercontent.com/openMSX/openMSX/master/doc/release-history.txt"
distfiles="https://github.com/openMSX/openMSX/releases/download/RELEASE_${version//\./_}/openmsx-${version}.tar.gz"
checksum=23db7756e6c6b5cfd157bb4720a0d96aa2bb75e88d1fdf5a0f76210eef4aff60
nocross="can't use CXX prefixed with triplet"
CXXFLAGS="-Wno-narrowing -O3"
case "$XBPS_TARGET_MACHINE" in
i686*) broken="can't find C++ compiler despite being given it"
esac
do_build() {
vsed -e 's@\(SYMLINK_FOR_BINARY:=\)true@\1false@' -i build/custom.mk
vsed -e 's@\(INSTALL_BASE:=\)/opt/openMSX@\1/usr/share/openmsx@' -i build/custom.mk
echo 'INSTALL_DOC_DIR:=/usr/share/doc/openmsx' >> build/custom.mk
echo 'INSTALL_SHARE_DIR:=/usr/share/openmsx' >> build/custom.mk
echo 'INSTALL_BINARY_DIR:=/usr/bin' >> build/custom.mk
echo "CXXFLAGS += ${CXXFLAGS}" >> build/flavour-void.mk
local ldflags=$(echo $LDFLAGS|sed 's/-Wl,//g')
echo "LDFLAGS += ${ldflags}" >> build/flavour-void.mk
make ${makejobs} OPENMSX_FLAVOUR=void
}
do_install() {
make DESTDIR=${DESTDIR} install OPENMSX_FLAVOUR=void
}