void-packages/srcpkgs/fbreader/template
Juergen Buchmueller fd9ff4fedf xbps-src: Define XBPS_GCC_VERSION
To simplify testing for the currently used gcc version introduce
global environment variables to avoid running `gcc --version`.
2016-10-25 23:19:58 +02:00

29 lines
978 B
Bash

# Template file for 'fbreader'
pkgname=fbreader
version=0.99.4
revision=2
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="fribidi-devel bzip2-devel expat-devel libcurl-devel libunibreak-devel sqlite-devel qt-devel zlib-devel"
short_desc="An e-book reader"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-3"
homepage="http://www.fbreader.org/"
distfiles="http://www.fbreader.org/files/desktop/${pkgname}-sources-${version}.tgz"
checksum=3d7c31d5ea314589d2a963290ad16f4d3d631a41e802b8b39f8be0c9f71eb8e9
if [ ${XBPS_GCC_VERSION_MAJOR} -gt 5 ]; then
CFLAGS="-Wno-error=narrowing"
CXXFLAGS="-Wno-error=narrowing"
fi
post_configure() {
sed -i makefiles/arch/desktop.mk \
-e"s;^\(CFLAGS.*=.*\);& $CFLAGS;" \
-e"s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \
-e"s;^\(LDFLAGS.*=.*\);& $LDFLAGS;"
}
do_build() {
sed -e "s:-llinebreak:-lunibreak:" -i makefiles/config.mk zlibrary/text/Makefile
make -j1 -C zlibrary/core TARGET_ARCH=desktop UI_TYPE=dummy
}