From 2ec8ad47bb4568e6b61d8c466e905741ca0e9ab4 Mon Sep 17 00:00:00 2001 From: Dylan Nash Date: Tue, 24 Dec 2019 11:20:15 -0700 Subject: [PATCH 1/2] hedgewars: fix ppc build --- srcpkgs/hedgewars/template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template index 80d7258552b..278689f6729 100644 --- a/srcpkgs/hedgewars/template +++ b/srcpkgs/hedgewars/template @@ -30,12 +30,19 @@ case $XBPS_TARGET_MACHINE in hostmakedepends+=" glew-devel ghc libatomic-devel" nopie_files+=" /usr/bin/hedgewars" ;; + # forces usage of C engine and ghc due to PPC lacking freepascal compiler + ppc*) + hostmakedepends="${hostmakedepends// fpc/}" + hostmakedepends+=" libatomic-devel ghc" + configure_args+=" -DBUILD_ENGINE_C=1" + nopie_files+=" /usr/bin/hedgewars" + ;; esac pre_configure() { # remove option not supported by clang case $XBPS_TARGET_MACHINE in - i686*) + i686*|ppc*) CFLAGS=${CFLAGS/-fstack-clash-protection/} CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/} ;; From 0ef5b099eb99e88bc318e7131a8b025ecb027285 Mon Sep 17 00:00:00 2001 From: Dylan Nash Date: Wed, 25 Dec 2019 09:48:35 -0700 Subject: [PATCH 2/2] hedgewars: add for non x86_64 --- srcpkgs/hedgewars/template | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template index 278689f6729..8e1b7bb6a44 100644 --- a/srcpkgs/hedgewars/template +++ b/srcpkgs/hedgewars/template @@ -6,7 +6,7 @@ wrksrc="${pkgname}-src-${version}" build_style=cmake configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname} -DPHYSFS_SYSTEM=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DMINIMAL_FLAGS=1" -hostmakedepends="lua51 pkg-config fpc" +hostmakedepends="lua51 pkg-config" makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel" depends="hedgewars-data>=${version}_${revision} libfreeglut" @@ -24,29 +24,26 @@ if [ -n "$CROSS_BUILD" ]; then fi case $XBPS_TARGET_MACHINE in - # forces usage of C engine and ghc due to a 32 bit freepascal bug - # https://travis-ci.org/void-linux/void-packages/jobs/596458977#L4316 - i686*) - hostmakedepends+=" glew-devel ghc libatomic-devel" - nopie_files+=" /usr/bin/hedgewars" - ;; - # forces usage of C engine and ghc due to PPC lacking freepascal compiler - ppc*) - hostmakedepends="${hostmakedepends// fpc/}" - hostmakedepends+=" libatomic-devel ghc" - configure_args+=" -DBUILD_ENGINE_C=1" - nopie_files+=" /usr/bin/hedgewars" + x86_64*) + hostmakedepends+=" fpc" + ;; + *) + _use_c_engine=1 # https://www.hedgewars.org/kb/pas2CTutorial ;; esac +if [ -n "$_use_c_engine" ]; then + hostmakedepends+=" glew-devel libatomic-devel ghc" + configure_args+=" -DBUILD_ENGINE_C=1" + nopie_files+=" /usr/bin/hedgewars" +fi + pre_configure() { # remove option not supported by clang - case $XBPS_TARGET_MACHINE in - i686*|ppc*) + if [ -n "$_use_c_engine" ]; then CFLAGS=${CFLAGS/-fstack-clash-protection/} CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/} - ;; - esac + fi } post_install() {