arch1t3cht / Aegisub

Cross-platform advanced subtitle editor, with new feature branches. Read the README on the feature branch.
http://www.aegisub.org
Other
695 stars 32 forks source link

Array concatenation error on LuaJIT meson script #98

Closed jgmdev closed 8 months ago

jgmdev commented 8 months ago

Hi, I was using your meson build scripts for pragtical editor for which I created a PR https://github.com/pragtical/pragtical/pull/43 and when building on the github CI got the error:

ERROR: Could not get define '1'

I thought it was a meson error and even opened some issue on meson repo :facepalm: https://github.com/mesonbuild/meson/issues/12512 but in reality it is just an array concatenation mistake which the following patch fixes.

subprojects/packagefiles/luajit/src/host/meson.build

 if host_machine.cpu_family() == 'x86'
-    checkdefs += ['__SSE2__', '1', ['-D', 'SSE']]
+    checkdefs += [
+        ['__SSE2__', '1', ['-D', 'SSE']]
+    ]
 endif

 foreach def: checkdefs

Thanks for your contributions!

arch1t3cht commented 8 months ago

Hi - GitHub decided to not send me a notification for this, so I missed this until now. I also have no idea how this didn't error on this repo's CI before, but oh well. Thanks for pointing this out, I fixed it now.

arch1t3cht commented 8 months ago

...oh https://github.com/arch1t3cht/Aegisub/blob/6a60f9a02ef8e75db9c11eed84c7c346f2544fb8/subprojects/packagefiles/luajit/src/host/meson.build#L28

arch1t3cht commented 8 months ago

Looking into it more, I'm not sure where this check and define even comes from. Maybe this was in the Makefile back when myaa initially wrote this wrap (though I couldn't even find it anywhere in the luajit history), but it's certainly not in there now. So I'll just remove the whole if block.

jgmdev commented 8 months ago

but it's certainly not in there now. So I'll just remove the whole if block.

Thanks for the heads up!