Previously, setup.py had been the main build process, and would
probe the system for dependencies. Now that all dependencies are
available on all platforms, and cross-compiling is done by renpy-build,
setup.py has been simplified by assuming everything is present.
(Optional probing is done using pkg-config.)
Various includes have been changed to be more canonical.
It's now fine to use the system fribidi, so we use that. This
also upgrades the interface to use Python unicode functions that
are no longer deprecated.
The correct triplets for various arches are:
x86_64-linux-gnu
arm-linux-gnueabihf
powerpc64-linux-gnu
powerpc64le-linux-gnu
The uname-based instructions produced the following:
x86_64-linux-gnu (correct)
armv7l-linux-gnu (wrong)
ppc64-linux-gnu (wrong)
ppc64le-linux-gnu (wrong)
gcc produces the correct results for all four. I suspect this will also
fix non-GNU triplets such as musl, but didn't test those.
Some systems don't have libjpeg-turbo8-dev, and need libjpeg62-turbo-dev instead. Use the libjpeg-dev metapackage like https://github.com/renpy/pygame_sdl2/blob/master/README.rst does, which seems to work everywhere. Also, use `$(uname -m)` instead of hardcoding `x86_64` so the same instructions work on ARM systems too.
This is the start of a series of changes that will embrace future's
philosophy - that Python 2/3 source should be as close to Python 3
as possible - and even extended a bit, like with dictviews.
We do have to pick and choose with future - it's important that
Ren'Py remain performant over the transition period - but things
like using sys.modules to map modules to their new Python 3
locations does appeal to me.