Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] hedgewars: fix ppc build
@ 2019-12-24 18:19 voidlinux-github
  2019-12-24 18:32 ` voidlinux-github
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-24 18:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

There is a new pull request by nashimus against master on the void-packages repository

https://github.com/nashimus/void-packages hedgewars
https://github.com/void-linux/void-packages/pull/17759

hedgewars: fix ppc build


A patch file from https://github.com/void-linux/void-packages/pull/17759.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hedgewars-17759.patch --]
[-- Type: text/x-diff, Size: 1089 bytes --]

From 2ec8ad47bb4568e6b61d8c466e905741ca0e9ab4 Mon Sep 17 00:00:00 2001
From: Dylan Nash <nashimus@dismail.de>
Date: Tue, 24 Dec 2019 11:20:15 -0700
Subject: [PATCH] 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/}
 		;;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
@ 2019-12-24 18:32 ` voidlinux-github
  2019-12-24 18:35 ` voidlinux-github
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-24 18:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-568788965

Comment:
I think this template could use a better refactor. Also, what are the differences between the C and fpc engine?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
  2019-12-24 18:32 ` voidlinux-github
@ 2019-12-24 18:35 ` voidlinux-github
  2019-12-24 18:36 ` voidlinux-github
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-24 18:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-568788965

Comment:
I think this template could use a better refactor. Also, what are the differences between the C and fpc engine?

Some suggestions:

- only add `fpc` in `hostmakedepends` conditionally instead of sed'ing it away
- don't conditionalize the C engine for `ppc*`, instead use it for everything except `x86_64`, as a single `case`, since `fpc` is only available on x86

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
  2019-12-24 18:32 ` voidlinux-github
  2019-12-24 18:35 ` voidlinux-github
@ 2019-12-24 18:36 ` voidlinux-github
  2019-12-25 13:28 ` voidlinux-github
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-24 18:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-568788965

Comment:
I think this template could use a better refactor. Also, what are the differences between the C and fpc engine?

Some suggestions:

- only add `fpc` in `hostmakedepends` conditionally instead of sed'ing it away
- don't conditionalize the C engine for `ppc*`, instead use it for everything except `x86_64`, as a single `case`, since `fpc` is only available on x86
- for the cflags removal, conditionalize it with some kind of `$_use_c` variable and set `_use_c=yes` when using the C engine

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (2 preceding siblings ...)
  2019-12-24 18:36 ` voidlinux-github
@ 2019-12-25 13:28 ` voidlinux-github
  2019-12-25 16:45 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-25 13:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

New comment by nashimus on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-568899735

Comment:
Thank you for the suggestions. I wasn't aware of the state of fpc on other archs, that's good to know, it would be nice to fix it for as many as possible.

[Hedgewars pas2CTutorial](https://www.hedgewars.org/kb/pas2CTutorial)

> Pas2C is an alternative way to build the engine. It is disabled by default.
> 
> Pas2C is intended to be used when building the engine natively (e.g. with FreePascal) fails for some reason. However, Pas2C does have some limitations and you should try to first build Hedgewars normally before attempting a Pas2C build.
> 
> Pas2C is our hand-written Pascal-to-C-compiler. It works by converting all Pascal code to C, and then compiling the C code with a C compiler. Pas2C itself is written in Haskell. Yes, we're a little crazy. :-) 

>The Pas2C build currently doesn't support the video recorder.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (3 preceding siblings ...)
  2019-12-25 13:28 ` voidlinux-github
@ 2019-12-25 16:45 ` voidlinux-github
  2019-12-25 23:14 ` voidlinux-github
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-25 16:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

There is an updated pull request by nashimus against master on the void-packages repository

https://github.com/nashimus/void-packages hedgewars
https://github.com/void-linux/void-packages/pull/17759

hedgewars: fix ppc build


A patch file from https://github.com/void-linux/void-packages/pull/17759.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hedgewars-17759.patch --]
[-- Type: text/x-diff, Size: 3229 bytes --]

From 2ec8ad47bb4568e6b61d8c466e905741ca0e9ab4 Mon Sep 17 00:00:00 2001
From: Dylan Nash <nashimus@dismail.de>
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 <nashimus@dismail.de>
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() {

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (4 preceding siblings ...)
  2019-12-25 16:45 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-12-25 23:14 ` voidlinux-github
  2019-12-26  1:46 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-25 23:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-568937222

Comment:
Also, please squash your commits and reword the commit message as something more up to date

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (5 preceding siblings ...)
  2019-12-25 23:14 ` voidlinux-github
@ 2019-12-26  1:46 ` voidlinux-github
  2019-12-26 11:22 ` voidlinux-github
  2019-12-26 11:23 ` [PR PATCH] [Merged]: " voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-26  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

There is an updated pull request by nashimus against master on the void-packages repository

https://github.com/nashimus/void-packages hedgewars
https://github.com/void-linux/void-packages/pull/17759

hedgewars: fix ppc build


A patch file from https://github.com/void-linux/void-packages/pull/17759.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hedgewars-17759.patch --]
[-- Type: text/x-diff, Size: 2066 bytes --]

From 94cff0d1732f60df0793e2446ccae9436b3a3524 Mon Sep 17 00:00:00 2001
From: Dylan Nash <nashimus@dismail.de>
Date: Wed, 25 Dec 2019 18:48:48 -0700
Subject: [PATCH] hedgewars: improve support for arch lacking freepascal

---
 srcpkgs/hedgewars/template | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template
index 80d7258552b..40cdb1086b4 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,22 +24,30 @@ 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"
+	x86_64*)
+		hostmakedepends+=" fpc"
+		;;
+	*)
+		# use C engine for architectures lacking freepascal support
+		# https://www.hedgewars.org/kb/pas2CTutorial
+		# i686 has a 32 bit freepascal bug
+		# https://travis-ci.org/void-linux/void-packages/jobs/596458977#L4316
+		_use_c_engine=1
 		;;
 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*)
+	if [ -n "$_use_c_engine" ]; then
 		CFLAGS=${CFLAGS/-fstack-clash-protection/}
 		CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/}
-		;;
-	esac
+	fi
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (6 preceding siblings ...)
  2019-12-26  1:46 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-12-26 11:22 ` voidlinux-github
  2019-12-26 11:23 ` [PR PATCH] [Merged]: " voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-26 11:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 141 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/17759#issuecomment-569041369

Comment:
lgtm

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: hedgewars: fix ppc build
  2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
                   ` (7 preceding siblings ...)
  2019-12-26 11:22 ` voidlinux-github
@ 2019-12-26 11:23 ` voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-12-26 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

There's a merged pull request on the void-packages repository

hedgewars: fix ppc build
https://github.com/void-linux/void-packages/pull/17759

Description:


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-12-26 11:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24 18:19 [PR PATCH] hedgewars: fix ppc build voidlinux-github
2019-12-24 18:32 ` voidlinux-github
2019-12-24 18:35 ` voidlinux-github
2019-12-24 18:36 ` voidlinux-github
2019-12-25 13:28 ` voidlinux-github
2019-12-25 16:45 ` [PR PATCH] [Updated] " voidlinux-github
2019-12-25 23:14 ` voidlinux-github
2019-12-26  1:46 ` [PR PATCH] [Updated] " voidlinux-github
2019-12-26 11:22 ` voidlinux-github
2019-12-26 11:23 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).