This is for several reasons:
* It makes building the main OpenRS2 repository easier, as it no longer
requires a C compiler.
* Pre-built versions for all platforms will be available in the Maven
repository. Many versions might not have access to build environments
for all of the supported operating systems and architectures.
* The bundler module should be able to depend on the pre-built versions
in the Maven repository. The Maven reactor isn't quite clever enough
for this to work, especially when depending on .nar artifacts with a
different operating system or architecture.
This is to make cross-compiling for i386 on amd64 easier, by adding
-m32/64 or -arch flags where appropriate.
This commit also adds a gcc linker on Linux and macOS, replacing the
default g++ linker. It's roughly equivalent, but means the shared
library has fewer dependencies (e.g. it doesn't link against libstdc++).
I was torn for a long time over whether to license under the GPL or
AGPL. I've settled on the GPL as I think it'd be quite hard to enforce
the AGPL (because of the nature of the RuneScape private server
community), and honest people would be at a disadvantage compared to
people who would ignore the additional provisions of the AGPL.
The *-natives modules are licensed under the LGPL as they are intended
to be linked with the proprietary client software, so the GPL would not
be appropriate.
I've decided to use v3 (and only v3) of the GPL. I don't like the 'or
later' clause as it means placing a great deal of trust in the FSF not
to change the overall intention of the license in future versions.
It is similar to the existing unix profile. However, it doesn't include
the -fPIC flag, which the NAR plugin already includes on OS X. It also
uses -x to accept Objective-C code even though the file extension is .c
instead of .m.
On unsupported platforms we stub out the methods.
I'm thinking about using the Maven site plugin to manage the project
website, and it is nicer for documentation purposes for all of the
modules to be available in the site regardless of the platform it is
built on.