Bug 213907 - [NEW PORT] games/gzdoom: Gl-Enhanced Doom Source Port
Summary: [NEW PORT] games/gzdoom: Gl-Enhanced Doom Source Port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-30 06:00 UTC by Kyle Evans
Modified: 2017-09-14 17:23 UTC (History)
2 users (show)

See Also:


Attachments
shar(1) archive of games/gzdoom (6.71 KB, text/plain)
2016-10-30 06:00 UTC, Kyle Evans
no flags Details
shar(1) archive of games/gzdoom (6.38 KB, text/plain)
2016-11-08 14:50 UTC, Kyle Evans
no flags Details
shar(1) archive of games/gzdoom (6.38 KB, text/plain)
2016-11-08 14:52 UTC, Kyle Evans
no flags Details
shar(1) archive of games/gzdoom (6.36 KB, text/plain)
2016-11-09 22:53 UTC, Kyle Evans
no flags Details
shar(1) archive of games/gzdoom (7.75 KB, text/plain)
2017-06-22 15:13 UTC, Kyle Evans
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2016-10-30 06:00:55 UTC
Created attachment 176299 [details]
shar(1) archive of games/gzdoom

games/gzdoom is technically a fork of games/zdoom that includes a GL renderer in addition to the standard software renderer.

It is developed very closely in line with ZDoom, given that the primary developer of GZDoom is also a primary developer of ZDoom, but it releases more frequently than its upstream does. Due to this, I believe it best to add this port with no dependency on its upstream games/zdoom. It is more likely to diverge more quickly from the upstream, leaving maintenance to be moderately annoying, and the distfiles are distinctly different.

The LICENSE situation on this one is identical to games/zdoom, with the addition of the LGPL3-licensed renderer. I'm not sure of the best approach to capture this fact, but given that we've used the over-arching DOOM license on games/zdoom despite having a similar hodge-podge of licenses, I suspected this is the way to go here as well.

`portlint -AC` and `poudriere testport` runs are both satisfied with the results of this port. Also, I've got a good couple of hours of play-time in on this port both with shareware Doom and Final Doom.
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2016-11-08 14:50:31 UTC
Created attachment 176788 [details]
shar(1) archive of games/gzdoom

Updated to address some issues expressed by jbeich@ on a related PR (games/zdoom update)
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2016-11-08 14:52:20 UTC
Created attachment 176789 [details]
shar(1) archive of games/gzdoom

Failed to properly obsolete previous shar(1) archive, can't figure out how to obsolete/delete it otherwise, so re-uploading and obsoleting both previous attachments. =(
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2016-11-09 22:53:21 UTC
Created attachment 176837 [details]
shar(1) archive of games/gzdoom
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2017-06-22 15:13:21 UTC
Created attachment 183715 [details]
shar(1) archive of games/gzdoom

Update to 3.1.0
Comment 5 Steve Wills freebsd_committer freebsd_triage 2017-08-21 20:28:37 UTC
Nice port, works well and looks nice. Unfortunately it does fail to build on 10.3 with this error:

src/CMakeFiles/zdoom.dir/scripting/vm/vmexec.cpp.o: In function `_ZTH13GlobalVMStack':
/wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.1.0/src/scripting/vm/vmexec.cpp:(.text+0x294): undefined reference to `__cxa_thread_atexit'
src/CMakeFiles/zdoom.dir/scripting/vm/vmexec.cpp.o: In function `_ZTW13GlobalVMStack':
/wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.1.0/src/scripting/vm/vmexec.cpp:(.text._ZTW13GlobalVMStack[_ZTW13GlobalVMStack]+0x41): undefined reference to `__cxa_thread_atexit'
c++: error: linker command failed with exit code 1 (use -v to see invocation)

Can we solve it or should we just mark it broken there?
Comment 6 Kyle Evans freebsd_committer freebsd_triage 2017-08-22 01:53:42 UTC
(In reply to Steve Wills from comment #5)

Ah, probably missing a USES= compiler for some of the stuff in newer versions that I forgot about. I'll double check tomorrow-- I believe it needs compiler:c++14-lang.
Comment 7 Kyle Evans freebsd_committer freebsd_triage 2017-08-23 20:00:09 UTC
(In reply to Steve Wills from comment #5)

Alright, I can't fix it after all. =p However- it builds fine on stable/10 (which is what I was mistakenly using for build-testing as of the last update) and beyond. Would it suffice to just mark it BROKEN for OPSYS == "FreeBSD", OSVERSION < 1004000 and let it naturally fix itself on 10.* as 10.4 releases?

If not, I'll consult with dim@ to see if he knows when it might've been fixed -- I think this is a libc++ thing, and there's only so many commits to stable/10's libc++ since releng/10.3 was branched at r281149.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2017-09-03 16:16:08 UTC
Comment on attachment 183715 [details]
shar(1) archive of games/gzdoom

(This has been sitting in my drafts folder for almost a year, still incomplete.)

Unless unused convert the following to audio/libgme

  $ make
  [...]
  -- Could NOT find GME (missing:  GME_LIBRARIES GME_INCLUDE_DIR)
  -- Using internal gme library
  [...]

https://www.freebsd.org/doc/en/books/porters-handbook/bundled-libs.html

> LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
> 		libfreetype.so:print/freetype2 \
[...]
> USES=		... gettext jpeg openal pkgconfig
> USE_GNOME=	atk cairo gdkpixbuf2 gtk20 pango

Drop Gtk dependency pollution via LDFLAGS += -Wl,--as-needed

  --- before
  +++ after
  @@ -1,20 +1,8 @@
    0x0000000000000001 (NEEDED)             Shared library: [libgtk-x11-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libgdk-x11-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libpangocairo-1.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libatk-1.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.2]
    0x0000000000000001 (NEEDED)             Shared library: [libthr.so.3]
  - 0x0000000000000001 (NEEDED)             Shared library: [libgdk_pixbuf-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libpangoft2-1.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libpango-1.0.so.0]
    0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
    0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libintl.so.8]
  - 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
  - 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
    0x0000000000000001 (NEEDED)             Shared library: [libSDL2-2.0.so.0]
  - 0x0000000000000001 (NEEDED)             Shared library: [libGLU.so.1]
    0x0000000000000001 (NEEDED)             Shared library: [libGL.so.1]
    0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
    0x0000000000000001 (NEEDED)             Shared library: [libz.so.6]

> PORTSCOUT=	limit:^.+\.[1-9]{1,3}[1-8]?$$

3.1.0 (current version) doesn't match this pattern.

> CXXFLAGS+=	-DSHARE_DIR=\\\"${DATADIR}\\\"

With :Q variable modifier you can reduce escaping

> DESKTOP_ENTRIES=	"GZDoom" "" "gzdoom" "${PORTNAME}" "Game;Shooter;" ""

Don't hardcode "gzdoom" when later using ${PORTNAME} for installing the icon.

> src/scripting/vm/vmexec.cpp:(.text._ZTW13GlobalVMStack[_ZTW13GlobalVMStack]+0x41): undefined reference to `__cxa_thread_atexit'

FreeBSD 10.3 (unlike 10.4) doesn't support thread_local because libc lacks __cxa_thread_atexit, see base r304527.
Would it be hard to revert https://github.com/coelckers/gzdoom/commit/86544086df64 or replace thread_local with __thread?

EXTRA_PATCHES+=	${EXTRA_PATCHES_${OPSYS}_${OSREL}}
EXTRA_PATCHES_FreeBSD_10.3=	${PATCHDIR}/extra-patch-no-thread_local
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-09-14 17:18:26 UTC
A commit references this bug:

Author: swills
Date: Thu Sep 14 17:17:54 UTC 2017
New revision: 449841
URL: https://svnweb.freebsd.org/changeset/ports/449841

Log:
  games/gzdoom: create port

  GZDoom is a GL-enhanced fork of ZDoom, a source port of ID Software's DOOM
  engine. It is based on the source code of id Software's DOOM. GZDoom boasts
  enhanced modding support, as well as support for the following games:

  * Ultimate Doom
  * Doom II
  * Final Doom
  * Heretic
  * Hexen
  * Strife
  * Chex Quest (1 & 3)
  * Action Doom II
  * Harmony v1.1
  * Hacx
  * The Adventures of Square

  WWW: http://gzdoom.drdteam.org/

  PR:		213907
  Submitted by:	kevans

Changes:
  head/games/Makefile
  head/games/gzdoom/
  head/games/gzdoom/Makefile
  head/games/gzdoom/distinfo
  head/games/gzdoom/files/
  head/games/gzdoom/files/gzdoom.xpm
  head/games/gzdoom/files/patch-src_dobject.h
  head/games/gzdoom/files/patch-src_scripting_vm_vm.h
  head/games/gzdoom/files/patch-src_scripting_vm_vmexec.cpp
  head/games/gzdoom/pkg-descr
Comment 10 Steve Wills freebsd_committer freebsd_triage 2017-09-14 17:23:26 UTC
Committed, thanks!