kristall: fix build

With build_style=gnu-makefile trying to build 'kristall' errored with:
error "You must build your code with position independent code if Qt was built with -reduce-relocations. "
      "Compile your code with -fPIC (and not with -fPIE)."
Switch to build_style=qmake to make sure all CXXFLAGS are set as required.

Unfortunately the data installation is no separate target in Makefile thus do it in post_install().

The kristall-mime-info.xml file is missing in the tarball yet installed in the Makefile.
Download it from https://github.com/MasterQ32/kristall/blob/master/kristall-mime-info.xml
This commit is contained in:
Jürgen Buchmüller 2021-01-11 02:15:13 +01:00
parent cdb80f035b
commit 8184fc462b
1 changed files with 22 additions and 6 deletions

View File

@ -2,17 +2,33 @@
pkgname=kristall
version=0.3
revision=1
build_style=gnu-makefile
build_helper=qmake
build_wrksrc=src
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools qt5-multimedia-devel qt5-svg-devel"
makedepends="qt5-devel qt5-multimedia-devel qt5-svg-devel"
short_desc="Small-Internet Browser"
maintainer="Isaac Freund <ifreund@ifreund.xyz>"
license="GPL-3.0-or-later"
homepage="https://kristall.random-projects.net"
distfiles="https://github.com/MasterQ32/kristall/archive/V${version}.tar.gz"
checksum=24733402e0e3924459222c87aa2137139ff8ae10410a2a88d56455c5ec172368
distfiles="https://github.com/MasterQ32/kristall/archive/V${version}.tar.gz
https://raw.githubusercontent.com/MasterQ32/kristall/master/kristall-mime-info.xml"
checksum="24733402e0e3924459222c87aa2137139ff8ae10410a2a88d56455c5ec172368
287f63fb3f1dfa0577fe2efb6f421a3299a928dfe139cb2a05c571aa171c2c9b"
skip_extraction="kristall-mime-info.xml"
pre_configure() {
vsed -i kristall.pro -e 's;/opt/$${TARGET}/;/usr/;'
cp -pv ${XBPS_SRCDISTDIR}/${pkgname}-${version}/kristall-mime-info.xml ${wrksrc}
}
post_install() {
local share=usr/share icons=usr/share/icons
vinstall icons/kristall.svg 644 ${icons}/hicolor/scalable/apps net.random-projects.kristall.svg
vinstall icons/kristall-16.png 644 ${icons}/hicolor/16x16/apps net.random-projects.kristall.png
vinstall icons/kristall-32.png 644 ${icons}/hicolor/32x32/apps net.random-projects.kristall.png
vinstall icons/kristall-64.png 644 ${icons}/hicolor/64x64/apps net.random-projects.kristall.png
vinstall icons/kristall-128.png 644 ${icons}/hicolor/128x128/apps net.random-projects.kristall.png
vinstall ${wrksrc}/Kristall.desktop 644 ${share}/applications
vinstall ${wrksrc}/kristall-mime-info.xml 644 ${share}/mime/packages kristall.xml
pre_install() {
export INSTALL="install -D"
}