From 8184fc462b1994458d228dd8fc05c0c61c957ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 11 Jan 2021 02:15:13 +0100 Subject: [PATCH] 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 --- srcpkgs/kristall/template | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/srcpkgs/kristall/template b/srcpkgs/kristall/template index 182781c2ac3..b5d6dbfb12c 100644 --- a/srcpkgs/kristall/template +++ b/srcpkgs/kristall/template @@ -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 " 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" }