On Fri, May 17, 2019 at 06:04:50AM +0300, Leonid Bobrov wrote:
> On Thu, May 16, 2019 at 06:41:06PM -0400, Brian Callahan wrote:
> > *Please* tell me you're going to send these patches upstream. There's a lot
> > here and as you say, you're trying to get this into more than just OpenBSD
> > ports, and your patches do far more than OpenBSD support.
> >
> 
> Yes, I sent these patches to both upstreams.
> 
> Meanwhile Warsow's new upstream is not collaborative because I used
> wallhack in the past and because more OS support "is a minor topic that
> has nothing with actual challenges in the game development":
> https://github.com/Warsow/qfusion/pull/40#issuecomment-492069962
> (at least I got some help from that person before he banned me at his
> organization)
> 
> So, I think only qfusion's upstream will accept these patches:
> https://github.com/Qfusion/qfusion/pull/434
> (but I doubt compatibility between qfusion and its fork intended to
> continue Warsow's development)
> 
> > I'm slowly going through everything and will write back when I'm finished.
> > There are definitely some things that need tweaking.
> >
> 
> Yeah, I forgot to remove some CFLAGS from CMakeLists.txt when I was
> sending this port. Also please don't commit this port yes, I will
> fork this game's release and apply more patches if you notice something
> wrong or if for some reason I fail to build it at other *BSD, then I'll
> send this port again ready to be committed. And this fork will let me
> avoid headaches keeping patches in sync.
> 
> > ~Brian
> > 
> 

Good, I am attaching a new tarball, it should give a perfect port
without patches directory, because it fetches my fork, so it's ready
to be committed to the ports tree.

Here's what I've done in general in this fork (it's intended only for
ports systems, all necessary patches are already sent to upstreams):
* No suffixes in libraries' and binaries' name which tell about for what
OS and processor architecture they were compiled.
* Removed C and C++ flags which should be given by ports systems.
* Support for pkgsrc and Ravenports in FindSDL2.cmake
* ar(1) won't receive linker flags.
* -std=gnu11 flag reduces amount of warnings.
* -Wpedantic flag should help cleaning code in the future.
* Use sendfile() at DragonFly BSD and FreeBSD, also implement one at all
other OSes.
* DATADIR macro defined by CMakeLists.txt to point to system-wide
directory with data files instead of current directory.
* Unquote library names in CMakeLists.txt files.
* BUILDSTRING, OSNAME, CPUSTRING, LIB_DIRECTORY, LIB_PREFIX and
LIB_SUFFIX macros are defined by CMakeLists.txt
* System-wide libraries will never be dlopen(3)'ed.
* AngelScript 2.29.2 is built and statically linked.
* Windows, MacOS and Linux libraries in modules_21.pk3 are ignored.
* Many matches for ${CMAKE_SYSTEM_NAME} were changed to WIN32, APPLE and
UNIX.
* <sys/param.h> is not only included at MacOS, but at every Unix-like
system.
* <alloca.h> should only be included at Linux.
* -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500 flags were removed to
fix build break at FreeBSD.
* find_package(OpenGL) should add -I/usr/X11R6/include flag.
* All #if defined() were carefully changed to something like:
```
#if defined(_WIN32)
...
#elif defined(__APPLE__)
...
#elif defined(__ANDROID__)
...
#else
...
#endif
```
* SDL_SetWindowIcon() is commented because of buffer overflow in SDL2:
https://github.com/mazocomp/openbsd-wip/blob/3924bc18d05ded21bf0f69def7f1826ae92b2150/games/warsow/BACKTRACE
* SDL2 is a required dependency.
* readdir64 and dirent64 are defined at systems other than Linux.
* Remove unnecessary files which make source tarball waste 500 MB of
disk space.

TODO:
* Remove snd_openal module because it can only dlopen(3) audio/openal,
but since I removed support for dlopen(3)'ing system-wide libraries,
this module only needs audio/openal at build time and doesn't link to
it, so we are using snd_qf anyway.
* Fix critical compiler warnings like
if (unsigned int variable == ULONGMAX)
* Merge warsow_2.1 branch from https://github.com/Qfusion/qfusion/
* Rewrite AngelScript code so that we can link to system-wide
AngelScript library (I will contact qfusion upstream on this one).
* Carefully port libRocket so that we can link to system-wide libRocket.
* Add install target to CMakeLists.txt (I don't know how to do this yet)
* Get rid of all alloca() calls (I am really surprised the game doesn't
crash).
* Get rid of GNU extensions.
* Avoid using what was deprecated in C++17 standard.

Attachment: warsow.tar.gz
Description: application/tar-gz

Reply via email to