Commit graph

1315 commits

Author SHA1 Message Date
Kp 23f03d0a5e Add unit tests for partial_range 2021-09-04 12:17:14 +00:00
Kp 0f4c9f240e Make some SConstruct output respect SCons' -Q option 2021-08-26 03:13:45 +00:00
Kp 86e8e1d4f9 Remove Python2 dict compatibility symbols
Switch to calling the methods directly on the dict instances.  This
eliminates use of a global variable at each call site.
2021-06-28 03:37:51 +00:00
Kp f1606f7747 Simplify test for __builtin_bswap16
This test covered __builtin_bswap32 and __builtin_bswap16 separately,
because it was written to support gcc versions that predated the
introduction of __builtin_bswap16.  The minimum supported gcc version
now understands both intrinsics, so simplify the test to cover all three
at once.
2021-06-28 03:37:51 +00:00
Kp e1aac6949a Replace __attribute_warn_unused_result with C++17 [[nodiscard]]
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:51 +00:00
Kp 770ae0cea5 Replace __attribute_noreturn with C++11 [[noreturn]]
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:50 +00:00
Robert Menes c630191c29
Add Haiku as a built host option 2021-06-01 13:37:30 -04:00
Kp e226623ebe Fix advice in dylibbundler error path
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/591#issuecomment-841927157>
2021-05-18 03:00:48 +00:00
Kp e75cff028f Rework dylibbundler test
- Add support for a sequence of guard predicates for a test, rather than
  limiting to a single predicate.
- Use that support to skip the dylibbundler test when
  user_settings.macos_add_frameworks makes the test unnecessary.
- Use StaticSubprocess to avoid running dylibbundler repeatedly if
  building multiple targets for which the test is necessary.
- Capture stderr from the child process, and log it, instead of letting
  it be written directly to the stderr inherited from the caller of
  SCons.
- On failure, write to the SConf log the return code of dylibbundler,
  its stdout, and its stderr.  This may help users diagnose the problem
  if it is more complicated than the tool not being installed.
- On failure, show a more direct suggestion about how to avoid needing
  dylibbundler.
2021-05-16 23:15:14 +00:00
Kp ad4fb29920 Use super() in SConstruct to avoid repeating parent class names 2021-05-16 23:15:14 +00:00
Kp 88ff96f49e Change SConstruct classes not to inherit from object
This is not necessary in Python3, and Python2 is no longer supported.
2021-05-16 23:15:14 +00:00
Kreeblah 6b5ff851a3 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 5afd1d8e53 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah ef9c9a3b29 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah d9d1f5c0db Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 25556fa120 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah d82c52539c Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 66fe76b0c2 Updated dylibbundler test 2021-05-16 23:15:11 +00:00
Kreeblah 14562e74b3 Added test for dylibbundler on macOS 2021-05-16 23:15:11 +00:00
Kreeblah fb73b7fb8f
Tested on a fresh install and this needs to put dylibs in libs, not Frameworks 2021-03-29 23:19:32 -07:00
Kreeblah b7ff72c364
Embed dylibs in app bundles 2021-03-26 02:07:06 -07:00
Kp 791282aad7 Read physfs location from pkg-config
For consistency with other packages, ask pkg-config for the location
instead of assuming it is on the system search path.
2021-02-07 00:35:33 +00:00
Kp b0338164f7 Remove SDLMain.m
According to @raptor, this is not needed on modern OSX for SDL1 or SDL2,
and breaks the build on SDL2.  Remove it.

Reported-by: raptor <https://github.com/dxx-rebirth/dxx-rebirth/issues/565>
2021-02-06 17:53:53 +00:00
Kp ac97d00698 Remove support for PhysFS 1, PhysFS 2
The last PhysFS 1 release was in March 2009.  The last PhysFS 2 release
was in August 2017, shortly before the release of PhysFS 3 in September
2017.  Most distributions have moved to PhysFS 3.  Drop support for
PhysFS 1 and PhysFS 2.  PhysFS 2 support could be restored if there is
interest.
2020-12-27 22:03:09 +00:00
Kp 6af0595cfe Use platform-specific OpenGL libraries for GLU test 2020-10-28 04:02:31 +00:00
Kreeblah a36f6866da
Fixed macOS compilation by bypassing GL library check 2020-09-13 22:35:22 -07:00
Kp b40b48e6f9 Merge branch 'experimental/540/macos-no-framework' into master 2020-09-14 03:42:24 +00:00
Kp f0d3523128 Integrate MacOS no-framework mode into the general argument parser 2020-09-13 21:41:35 +00:00
Kp 969caa8c0c Add configure test to check for usable GL utility library
Rebirth built with OpenGL has a hard dependency on the GL utility
library, but did not have a configure time test to report this.  Add
one.

Reported-by: shoober420 <https://github.com/dxx-rebirth/dxx-rebirth/issues/468>
2020-09-11 03:08:02 +00:00
Kreeblah a4a977e9bc
Added scons option to use libraries instead of frameworks on macOS 2020-09-08 23:37:47 -07:00
Kp 0b141ea122 Show CHOST in show_partial_environ
This can influence other values, so it is useful to see it directly.
2020-08-16 00:43:12 +00:00
Kp 3a9bdbfa6e Use __slots__ for cached_property
Remove the redundant storage of the method's name, since it is only read
once in the getter.
2020-06-15 00:21:35 +00:00
Kp 17b9edcd47 Enable -Wredundant-decls when possible
Add an inclusion of <SDL.h> since, for Windows targets, this triggers a
chain of includes that leads to <intrin.h>, which causes
-Wredundant-decls to print a diagnostic.  This allows Windows targets to
declare -Wredundant-decls as unusable, while enabling it for non-Windows
targets.
2020-05-31 23:04:25 +00:00
Kp 3114874713 Delegate PCX loading to SDL_image
This adds a new dependency, but most systems likely already have
SDL_image installed.  Use of SDL_image can be disabled, but this is
discouraged, because various in-game interfaces assume the use of the
original background.

The old implementation automatically corrected for filename case.  The
new implementation expects that the supplied filename can be passed to
PYHSFS_openRead as-is.  All known uses in-game have been corrected to
satisfy this requirement.  If the new stricter match requirement becomes
a problem, a variant of PHYSFSRWOPS_openRead that adjusts filename case
could be created for use here.

- Update install instructions
- Update ebuild
- Update Arch PKGBUILD
2020-05-17 23:35:26 +00:00
Kp f577788665 Use C++17 fold expressions to simplify serialization code 2020-05-17 23:35:25 +00:00
Kp 9ed64013bc Decorate SConf C++ standard tests
Add per-test comments to ease identifying which test is responsible for
a given section.
2020-05-17 23:35:25 +00:00
Kp 6a4a8a62c9 Add unit tests for serialization code 2020-05-17 23:35:25 +00:00
Kp 619ac0abff Use structured bindings for enumerate+zip 2020-05-02 21:18:43 +00:00
Kp ea0f4eb02a Use C++17, not C++14
This only changes the version of the standard used.  It does not
introduce use of new functionality.
2020-05-02 21:18:43 +00:00
Kp 3ce1f2b3ed Require support for C++11 addressof 2020-05-02 21:18:43 +00:00
Kp 3add38df3d Require support for C++14 std::make_unique 2020-05-02 21:18:42 +00:00
Kp cc38cdf4b8 Qualify uses of std::make_unique 2020-05-02 21:18:42 +00:00
Kp 8839f538e0 Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 9cee93abb1 Require support for C++14 std::exchange 2020-05-02 21:18:42 +00:00
Kp e4323bf192 Fix gcc-7 build
The existing test for gcc pr #82541 was insufficient, and allowed using
-Wduplicated-branches with gcc-7 in some cases it should not.  Extend
the test to cover these cases.
2020-05-02 21:18:42 +00:00
Kp f0a47c358b Tell clang that GNU extensions are fine in GNU++14 mode 2020-04-28 04:09:47 +00:00
Kp 49138117e4 OSX: log FRAMEWORKPATH, FRAMEWORKS from the construction environment 2020-04-26 17:26:23 +00:00
Kp 03318382d0 Only search for frameworks in directories that exist
mmontag reported that the OS X linker warns when attempting to search a
framework directory that does not exist.  Suppress this warning by
checking for the directory and not adding it to the search path if it
does not exist.

Reported-by: mmontag <https://github.com/dxx-rebirth/dxx-rebirth/issues/503#issuecomment-619457491>
2020-04-26 17:26:23 +00:00
Kp a6590fa496 Update SConstruct test for -Wold-style-cast on OS X
mmontag reports that <HIServices/Processes.h> is no longer available,
and the change from 15b0ec7f42 needs to be
applied to SConstruct as well.

Reported-by: mmontag <https://github.com/dxx-rebirth/dxx-rebirth/issues/503#issuecomment-619463994>
2020-04-26 17:26:23 +00:00