[MacPorts] #64655: libsdl2: find some version to use for Tiger and Leopard
MacPorts
noreply at macports.org
Tue Mar 1 15:30:52 UTC 2022
#64655: libsdl2: find some version to use for Tiger and Leopard
---------------------------+------------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: powerpc, leopard
Port: libsdl2 |
---------------------------+------------------------------
Comment (by barracuda156):
Replying to [comment:3 kencu]:
> use the one from leopardports that everyone has been using for five
years now.
I have managed to build `libsdl2` v. 2.0.9.
{{{
Sergey-Fedorovs-Mac-mini:~ svacchanda$ port -v installed libsdl2
The following ports are currently installed:
libsdl2 @2.0.3_0 requested_variants='' platform='darwin 10' archs='ppc'
date='2022-02-26T03:41:25+0800'
libsdl2 @2.0.9_0 (active) requested_variants='' platform='darwin 10'
archs='ppc' date='2022-03-01T23:11:25+0800'
}}}
So far tested on 10.6 PPC and 10.6.8 Rosetta, but I am sure 10.5.8 gonna
build too.
The patch is ugly though and needs work. With one file, `cocoamodes`, I
gave up tweaking it and for now pulled it from 2.0.3. I should be possible
to fix the original one for PPC though.
Pretty much all troubles were with Cocoa Video components, and it is far
worse than it was with 2.0.3.
I have one technical question: **is there a way to force Cmake build
system accept `compiler.c_standard` and custom Object C flags?**
There are two systemic problems with `libsdl2` which I could not solve in
any reasonably nice way:
1) `ISO C90 forbids mixed declarations and code [-Wdeclaration-after-
statement]` – I had to manually delete -Werror-after-statement flag in
configure to get away and make these warnings and not errors. Setting C
standard in port file or command line had no effect.
2) There is some Objective C exception used in `cocoaopengl` which makes
the build fail. Solution should be as easy as passing `'-fobjc-
exceptions'` flag, however neither setting `configure.objc_flags-append`
in port file nor writing `EXTRA_OBJCFLAGS` in configure has any effect. I
had to stick the flag along other CFLAGS, and of course everything
complains about that (but builds).
UPD. Just now found something potentially promising:
https://github.com/macports/macports-
ports/blob/master/_resources/port1.0/group/cmake-1.1.tcl
Though it still mentions that Cmake may ignore Objective C flags.
--
Ticket URL: <https://trac.macports.org/ticket/64655#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list