We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3262

Summary: Premake scripts are not compatible with "Genie" (premake fork)
Product: SDL Reporter: jfverdon
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: icculus
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   
Attachments: Genie patch

Description jfverdon 2016-02-17 19:26:22 UTC
Created attachment 2379 [details]
Genie patch

Genie (https://github.com/bkaradzic/genie) is a well known premake fork which uses internally Lua 5.3 (as opposed to version 5.1 used in premake4).
As there is some Lua's API breaks in Lua 5.2, SDL premake scripts do not works with premake.

The two incompatibilities I noticed were:
* unhandle modes "rt" and "wt" for io.open. Has io.open opens files in text mode by default, the "t" flag is not needed (this flag is not supported in Genie).
* os.execute signature change, the return value is a tuple from Lua 5.2, before it was just the called program exit code.

I made a patch with those modifications, tested on linux-64 with "premake4" from official website and genie both.

Would be great to merge in trunk :)
Comment 1 Sam Lantinga 2016-10-01 19:56:59 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/34fb2e531f7c

FYI, I don't know of anyone else using the premake support, so it may go away in the future.
Comment 2 Ryan C. Gordon 2016-10-01 23:52:53 UTC
(In reply to Sam Lantinga from comment #1)
> FYI, I don't know of anyone else using the premake support, so it may go
> away in the future.

(I'm actually planning to remove this after 2.0.5 ships.)

--ryan.
Comment 3 Ryan C. Gordon 2016-11-03 15:14:55 UTC
(In reply to Ryan C. Gordon from comment #2)
> (I'm actually planning to remove this after 2.0.5 ships.)

Premake support is gone now, in commit https://hg.libsdl.org/SDL/rev/3cc0fe7f98d7

--ryan.