Commit graph

156 commits

Author SHA1 Message Date
Gunter Labes
553b1a4511
Fix scons SDL version check
0aa8dc3 converted to a runtime test and broke the scons SDL version check since
it only links which trivially makes it work for cross compilation though.
2024-04-20 18:05:11 +02:00
Gunter Labes
9da0fbcc23 Keep python 2 compatibility 2024-03-28 17:06:00 +01:00
Rafael Fillipe Silva
65090cc1bb add scons rules do detect boost-graph
Signed-off-by: Rafael Fillipe Silva <rfsc.mori@gmail.com>
2024-02-26 10:12:43 -06:00
P. J. McDermott
69fa5c199e Add CMake and SCons options to use system Lua 5.4 C++
scons/lua.py makes use of the vestigial luadir option from commit
e94dcecf17.

Like FindLua.cmake, scons/lua.py searches for the Lua headers and
library, instead of using pkg-config like the old scons/lua.py (removed
in commit 9929d3ca1c) did, because even though distributions typically
provide .pc files for Lua, upstream Lua doesn't.  It's likely that all
distributions that compile Lua as a C++ library will also provide .pc
files, but this check doesn't rely on that (just as the CMake module
doesn't).

Unfortunately, SCons.Conftest.CheckLib() prints up to eight messages
like "Checking for C++ library lua54-c++... no" until a working library
name is found.

Also conditionally include system Lua headers in src/lua/*.h and update
documentation in src/modules/lua_README.md, src/wesnoth_lua_config.h,
and src/wesnoth_lua_config.md.  The two lines about "The primary commit,
after replacing the sources," in src/wesnoth_lua_config.md don't make
sense since the instructions were updated for submodule Lua in commit
d32cfb88c4 and make even less sense now with preceding commits for
updating CMake modules.
2024-02-11 23:21:15 -06:00
loonycyborg
41202b9bc5 Replace po4a-gettextize with po4a-updatepo
as recommended by error message in issue #7149
2023-05-22 14:01:47 +03:00
Pentarctagon
11fdf19e58 Fix SDL2 conftests with new msys2 image. 2023-03-09 20:40:42 -06:00
Pentarctagon
7a4037bb2f Fixup msys2 on windows. 2022-05-12 08:46:15 -05:00
Pentarctagon
9929d3ca1c Remove some unused scons code. 2022-05-03 20:36:00 -05:00
Pentarctagon
0aa8dc3c6c Have cmake also execute the conftests. 2022-05-03 18:10:46 -05:00
Pentarctagon
89424888c6 Add images solely for use in the scons conftests. 2022-04-29 20:08:06 -05:00
Pentarctagon
4698b9393f Use non-attic jpg file. 2022-03-21 13:26:17 -05:00
Pentarctagon
f44acd68c2 Add build support for webp images. 2022-03-12 13:47:46 -06:00
loonycyborg
5d8c476396
scons: remove file existence check from InstallData
It was breaking install of generated files. Also adjusted manpage
install which was relying on this behavior.
This helps with issue #5692
2021-04-25 03:11:56 +03:00
Sergey Popov
3933ebab5c
Use coroutines via boost::asio::spawn to improve overall code structure in servers (#5341)
* Convert server_base class to use coroutine instead of handlers

* Rework wesnothd's client login to use coroutine

* Merge 3 player handling functions into a single coroutine

* update cmakelists too

* Implement send_doc_queued in terms of coroutine

* Use brace initialization for making asio buffers

* Implement campaignd's request handling in coroutine

* Brace-initialize entire vector

* Remove old handler based send/receive helpers

* Document coroutine send/receive helpers

* Made coro_send_doc() helper take wml doc by reference

In most cases there is no need to rely on shared pointers to ensure
object lifetime if using coroutines since even when coroutine is
suspended args are still kept alive by its context.

* Document coro_send_file()

* Silence deprecation warning to fix build on earlier versions of boost

* Explicitly check for boost.context to allow linking against static boost libs

* Add boost.coroutine to flatpak manifest

* Port winapi TransmitFile codepath to coroutines

* Exception safety fix

* Add boost.scope_exit to vcpkg

* Fix build with pre-1.66 boost

* Move coro_* helpers into server_base class

Those helpers were in .ipp solely because they were templated on handler
types, this is no longer true after coroutine based rework.

* Make server_base::coro_send_file non-inline

* CleanUp Xcode project

Co-authored-by: Martin Hrubý (hrubymar10) <hrubymar10@gmail.com>
2020-12-30 19:08:34 +03:00
loonycyborg
d8e9588be7 Make ssh agent work for scons+distcc+ssh 2020-12-02 23:46:12 +03:00
loonycyborg
c71d57adc2 Address issue #4268 2019-08-24 15:12:28 +03:00
loonycyborg
83da28b4aa No longer install .mo files for manual and manpages textdomains
But still build them just to check those po files for errors.
This fixes #3522
2019-03-30 15:40:03 +03:00
Jyrki Vesterinen
f61856ff4f Fix #3926: SCons Boost test fails with -Werror=return-type
Based on the patch from @viy2 with a minor change.
2019-02-12 19:09:48 +02:00
loonycyborg
790d13e937 scons: fix strict hardened builds on Gentoo
(cherry-picked from commit 0c3ba36d68)
2018-10-07 03:23:46 +00:00
loonycyborg
ffb078c119 scons: don't let pkg-config to add prefix on msys2
This is workaround for windows style path confusing scons if they appear
in CPPATH etc. Paths without prefix still happen to be valid and they
start with "/", not "c:".

(cherry-picked from commit b347bc70b1)
2018-10-07 03:22:09 +00:00
loonycyborg
13c5f02e04 scons: use pkg-config on msys platform for sdl
(cherry-picked from commit aa925e1fc6)
2018-10-07 03:22:09 +00:00
loonycyborg
b7ee956d63 scons: set env["PLATFORM"] to "win32" on msys
(cherry-picked from commit d8743f8e6e)
2018-10-07 03:22:09 +00:00
loonycyborg
e54aa76700 scons: workaround for msys2's build's of sdl "#define main" breaking non-sdl checks
(cherry-picked from commit 2bc7cc3e61)
2018-10-07 03:22:09 +00:00
loonycyborg
2dbb8e48ee Change GL include in scons check so it actually works under mingw
(cherry-picked from commit f53237b20f)
2018-10-07 03:22:08 +00:00
Charles Dang
848062fde6 Remove the CMake/Scons compile-time check for IEEE 754 compliance
Now handled by a static assertion.

(cherry-picked from commit d9315199ee)
2018-10-07 03:21:31 +00:00
pentarctagon
a040d521a4 Updates cmake and scons to be able to compile with OGL.
Scons OpenGL/GLEW test taken mostly verbatim from 3e2eba22a9

(cherry-picked from commit 5e36a90039)
2018-10-07 03:20:04 +00:00
loonycyborg
a0c91ac41e Fix build against static libboost
(cherry-picked from commit c51065e39c)
2018-10-07 03:19:28 +00:00
loonycyborg
e637c55d50 scons: added a check for icu support in boost locale 2018-03-13 18:23:32 +03:00
Charles Dang
950a156712 Addressed most of the remaining whitespace issues from #2613
[ci skip]
2018-03-11 14:59:37 +11:00
sigurdfdragon
65cf6eb6af Fixup c4d78f8 2017-11-03 22:45:00 -04:00
loonycyborg
6163285ae0 Made ogg vorbis support check use dummy SDL audio driver 2017-11-01 19:54:17 +11:00
Gregory A Lundberg
c4d78f8fc6 Fix Scons for SDL2_mixer 2.0.2
With the change from SDL_mixer 2.0.1 to 2.0.2, we cannot simply check if SDL_mixer can open an OGG/Vorbis file, we must first open an audio device. [This is probably a mistake, since the documentation implies simply initializing the codec should be enough.] To avoid future problems, upgrade the feature-test program to perform a full initialization and shut-down; everything except actually playing the sound.

Closes #2137
2017-11-01 19:54:17 +11:00
loonycyborg
a180e09bb6 Made build with scons 3.0.0 work fixing issue #2093 2017-10-11 16:36:20 +03:00
loonycyborg
414659200d scons: ensure that if /usr/include is added to CPPPATH it won't be used with -isystem option 2017-09-22 19:18:38 +03:00
Alexander van Gessel
071b3635b7 Rename gettext scons module to avoid naming conflict 2017-09-21 15:33:48 +02:00
Alexander van Gessel
8d516df25b Don't use comma-separated arguments to print function 2017-09-21 11:45:00 +02:00
Alexander van Gessel
72fdcd78d4 Further python3 compatibility updates.
This has been tested with scons2, but not with scons3.
2to3 runs perform no further useful transformations.
2017-09-20 16:51:33 +02:00
Alexander van Gessel
6c3f774390 Basic 2to3 fixes 2017-09-20 15:04:50 +02:00
Alexander van Gessel
5e231ba190 Fix mix of tabs/spaces 2017-09-20 14:53:23 +02:00
Celtic Minstrel
f26fbe9aba Prevent gettext from checking format strings, since we don't use the printf family of functions 2017-05-29 22:50:35 -04:00
loonycyborg
691db62ecf scons: Add support for pkg-config files in custom path to cairo check 2017-05-07 03:40:24 +03:00
Jyrki Vesterinen
6b8273e003 Require Cairo 1.10 or above
This is needed because the CAIRO_STATUS_INVALID_SIZE constant was added in
that version.

1.10 is old enough that this change shouldn't cause problems for anyone.
For example, Debian Wheezy (2013) has Cairo 1.12.2.
2017-05-02 19:49:13 +03:00
loonycyborg
0801402dcf Fix out of tree build issue in scons/ieee_754.py 2017-01-17 04:22:47 +03:00
Jyrki Vesterinen
5fc50bf9ae SCons version of commit 7968f7ba 2016-12-22 22:27:30 +02:00
Celtic Minstrel
dc24fa16f7 Remove option to link libintl instead of Boost.Locale 2016-11-18 12:09:56 -05:00
Ignacio R. Morelle
c28e3b633c scons: Exclude Clang from GCC version checks
SCons stupidly treats Clang as if it were GCC (hint: it's not) and that
causes the config check to fail due to the version symbols being
absent/not what we expect. So just ignore the GCC version when Clang is
detected, in the config test program; we can probably expect whoever is
using Clang to be able to deal with any issues that may arise from
attempting to use a Clang version we don't support.

As for why we don't test the Clang version number, according to
<http://clang.llvm.org/docs/LanguageExtensions.html#builtin-macros>,
"marketing version numbers should not be used to check for language
features, as different vendors use different numbering schemes." And
indeed, it is the case with the versions of Clang shipped with XCode
that they do not accurately reflect the upstream version they correspond
to and have weird version numbers such as 5 (as of this writing upstrema
hasn't even released version 4.0 yet). Such is life.
2016-11-03 18:12:13 -03:00
loonycyborg
4b536bb0bc scons: compare paths in a different way to avoid error about /usr/include on macos 2016-08-05 21:27:58 +03:00
loonycyborg
35b9d7d5ed scons: fix logic error breaking compile on windows 2016-06-18 22:29:31 +03:00
loonycyborg
5a7b555d3a scons: don't add redundant include path for /usr/include 2016-06-10 21:54:08 +03:00
loonycyborg
8bff4829e6 scons: pass --backup=none --previous -U to msgmerge 2016-03-05 04:21:45 +03:00