diff mbox series

[bug#74054,v2,2/3] gnu: plib: Build with -fPIC.

Message ID 50a1e682b5774829dbc1a9b0e625c69b38fd070a.1730096728.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#74054,v2,1/3] gnu: Add freesolid. | expand

Commit Message

Maxim Cournoyer Oct. 28, 2024, 6:26 a.m. UTC
* gnu/packages/game-development.scm (plib) [configure-flags]: New argument.
[inputs]: Move field after...
[native-inputs]: ... this one.

Change-Id: Ieddfb8814632f74c98d0e2cda949709b718c7a0d
---

(no changes since v1)

 gnu/packages/game-development.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Liliana Marie Prikler Oct. 28, 2024, 8:10 a.m. UTC | #1
Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
> * gnu/packages/game-development.scm (plib) [configure-flags]: New
> argument.
That may be a typo – I think we use the #: part.
Alternatively you could write [arguments]: Add #:configure-flags.
> [inputs]: Move field after...
> [native-inputs]: ... this one.
> 
> Change-Id: Ieddfb8814632f74c98d0e2cda949709b718c7a0d
> ---
Cheers
Maxim Cournoyer Oct. 29, 2024, 12:04 a.m. UTC | #2
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
>> * gnu/packages/game-development.scm (plib) [configure-flags]: New
>> argument.
> That may be a typo – I think we use the #: part.
> Alternatively you could write [arguments]: Add #:configure-flags.

I see multiple variants in use.  That's hard for newcomer and bad
consistency, but until someone distills 'The One True Changelog Format'
style to use, I think they are all acceptable.  For example:

'(plib) [phases]: Add some phase.' is common for example.

'(plib) [configure-flags]: New argument.' is similar style.

A more verbose alternative, which is also used could be:

'(plib) [arguments] <configure-flags>: New argument.'

Thanks for taking a look.
Liliana Marie Prikler Oct. 29, 2024, 7 a.m. UTC | #3
Am Dienstag, dem 29.10.2024 um 09:04 +0900 schrieb Maxim Cournoyer:
> Hi Liliana,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > Am Montag, dem 28.10.2024 um 15:26 +0900 schrieb Maxim Cournoyer:
> > > * gnu/packages/game-development.scm (plib) [configure-flags]: New
> > > argument.
> > That may be a typo – I think we use the #: part.
> > Alternatively you could write [arguments]: Add #:configure-flags.
> 
> I see multiple variants in use.  That's hard for newcomer and bad
> consistency, but until someone distills 'The One True Changelog
> Format' style to use, I think they are all acceptable.  For example:
> 
> '(plib) [phases]: Add some phase.' is common for example.
> 
> '(plib) [configure-flags]: New argument.' is similar style.
> 
> A more verbose alternative, which is also used could be:
> 
> '(plib) [arguments] <configure-flags>: New argument.'
> 
> Thanks for taking a look.
I'm fine with dropping the [arguments] part, but IMHO the #: marker
should be there, as it marks the thing as a keyword argument (thus also
making arguments superfluous – it's implied).  That is, I'd also write
the phases example as #:phases.

But I haven't done a survey, so if you want to keep the ChangeLog as-
is, by all means do so.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 25cc021f6f..73ae3ef084 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2573,10 +2573,12 @@  (define-public plib
               (patches (search-patches "plib-CVE-2011-4620.patch"
                                        "plib-CVE-2012-4552.patch"))))
     (build-system gnu-build-system)
-    (inputs
-     (list mesa libxi libxmu))
-    (native-inputs
-     (list pkg-config))
+    ;; plib exists only as a static library, per the author's choice (see:
+    ;; https://sourceforge.net/p/plib/mailman/message/10289018/).  Build it
+    ;; with PIC, so that shared programs can at least "link" to it.
+    (arguments (list #:configure-flags #~(list "CXXFLAGS=-fPIC")))
+    (native-inputs (list autoconf automake pkg-config))
+    (inputs (list mesa libxi libxmu))
     (home-page "https://plib.sourceforge.net/")
     (synopsis "Suite of portable game libraries")
     (description "PLIB is a set of libraries that will permit programmers to