Bug 217913 - games/eduke32: Fix build, fix fetch, add option
Summary: games/eduke32: Fix build, fix fetch, add option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthew Rezny
URL:
Keywords:
: 218474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-19 05:43 UTC by Matthew Rezny
Modified: 2017-04-18 17:18 UTC (History)
2 users (show)

See Also:
pkubaj: maintainer-feedback+


Attachments
fix eduke32 (6.57 KB, patch)
2017-03-19 05:43 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rezny freebsd_committer 2017-03-19 05:43:28 UTC
Created attachment 180956 [details]
fix eduke32

This port fails to build after the last update. The post-patch actions are all incorrect.

CC and CXX defaults are now set in Common.mak, not GNUMakefile. A simpler solution is to pass CC and CXX in MAKE_ARGS rather than patching makefiles. The same fix can be applied to the ASM option, which was also broken in the same way.

The remaining piece of post-patch is meant to set the correct search path for the game data files, but not only was it working on the wrong files again, the varaible used for the replacement value, DN3DDATA, has not been defined since the duke3d-data port was eliminated. Patch the correct file and use DATADIR for the value.

The URL for the XXX pack was not correct. While there, add another option, VOXEL, for the Voxel Pack from the same source.

The eduke32 wiki states both duke3d.grp an duke.rts files are needed from the original media, so make the SHAREWARE option install both files and mention both in the pkg-message. Also, mention the Voxel pack in the pkg-message and drop the mention of passing the path to the .grp file since there is no need to do so now that the search path is correctly patched.

Drop the MIDI options. Timidity is not used directly, audio is handled by SDL_mixer which uses FluidSynth for MIDI playback.

Re-order the LICENSE lines to appease portlint.
Comment 1 Piotr Kubaj freebsd_committer 2017-03-19 15:03:18 UTC
(In reply to Matthew Rezny from comment #0)
What do you mean by "fails to build"? Could you send some logs? I have the ports installed on 10.3-RELEASE and 11.0-RELEASE - it builds and runs fine?
Comment 2 Matthew Rezny freebsd_committer 2017-03-19 21:39:32 UTC
(In reply to Piotr Kubaj from comment #1)

The post-patch step targets the wrong file, and neither gcc nor g++ are installed by the gcc ports, it will be g++49, g++5, g++6, etc.

Here is a build log of the port as it currently stands without my fixes (XXX pack was already fetched from correct URL):

===>  Found saved configuration for eduke32-20170225
===>   eduke32-20170225 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by eduke32-20170225 for building
===>  Extracting for eduke32-20170225
=> SHA256 Checksum OK for eduke32_src_20170225-6079.tar.xz.
=> SHA256 Checksum OK for duke3d_hrp.zip.
=> SHA256 Checksum OK for duke3d_xxx.zip.
===>  Patching for eduke32-20170225
===>   eduke32-20170225 depends on file: /usr/local/bin/sdl2-config - found
===>   eduke32-20170225 depends on executable: gmake - found
===>   eduke32-20170225 depends on package: pkgconf>=1.3.0_1 - found
===>   eduke32-20170225 depends on executable: gcc5 - found
===>   eduke32-20170225 depends on file: /usr/local/bin/as - found
===>   eduke32-20170225 depends on package: libGL>0 - found
===>   eduke32-20170225 depends on file: /usr/local/libdata/pkgconfig/glproto.pc - found
===>   eduke32-20170225 depends on file: /usr/local/libdata/pkgconfig/dri2proto.pc - found
===>   eduke32-20170225 depends on file: /usr/local/libdata/pkgconfig/glproto.pc - found
===>   eduke32-20170225 depends on file: /usr/local/libdata/pkgconfig/dri2proto.pc - found
===>   eduke32-20170225 depends on shared library: libFLAC.so - found (/usr/local/lib/libFLAC.so)
===>   eduke32-20170225 depends on shared library: libogg.so - found (/usr/local/lib/libogg.so)
===>   eduke32-20170225 depends on shared library: libvorbis.so - found (/usr/local/lib/libvorbis.so)
===>   eduke32-20170225 depends on shared library: libvpx.so - found (/usr/local/lib/libvpx.so)
===>   eduke32-20170225 depends on shared library: libpng16.so - found (/usr/local/lib/libpng16.so)
===>   eduke32-20170225 depends on shared library: libSDL2.so - found (/usr/local/lib/libSDL2.so)
===>   eduke32-20170225 depends on shared library: libSDL2_mixer.so - found (/usr/local/lib/libSDL2_mixer.so)
===>   eduke32-20170225 depends on shared library: libatk-1.0.so - found (/usr/local/lib/libatk-1.0.so)
===>   eduke32-20170225 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so)
===>   eduke32-20170225 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   eduke32-20170225 depends on shared library: libgtk-x11-2.0.so - found (/usr/local/lib/libgtk-x11-2.0.so)
===>   eduke32-20170225 depends on shared library: libpango-1.0.so - found (/usr/local/lib/libpango-1.0.so)
===>   eduke32-20170225 depends on shared library: libGLU.so - found (/usr/local/lib/libGLU.so)
===>  Configuring for eduke32-20170225
===>  Building for eduke32-20170225
gmake[2]: Entering directory '/usr/obj/usr/ports/games/eduke32/work/eduke32_20170225-6079'
gmake[2]: gcc: Command not found
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
Build started using:
compiler: "g++ -std=gnu++03 -fno-exceptions -fno-rtti -O3 -pipe -march=amdfam10 -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing   -Wl,-rpath=/usr/local/lib/gcc5  -O2   -funswitch-loops -fomit-frame-pointer -flto -funsigned-char -fno-strict-aliasing  -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -O3 -pipe -march=amdfam10  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing  -DNDEBUG -DUSING_LTO -W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized -Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -DUSE_LIBPNG -DUSE_LIBVPX -DSTARTUP_WINDOW -DHAVE_VORBIS -DHAVE_FLAC -I/usr/local/include -DSDL_TARGET=2 -DHAVE_GTK2 -I/usr/local/include/gtk-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/libdrm -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/atk-1.0 -D_THREAD_SAFE -pthread -pthread  -DRENDERTYPESDL=1 -DMIXERTYPESDL=1 -DUSE_OPENGL -DNOASM -DPOLYMER -Isource/build/include -Isource/mact/include -Isource/audiolib/include -Isource/enet/include"
linker: "g++ -std=gnu++03 -fno-exceptions -fno-rtti -O3 -pipe -march=amdfam10 -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing   -Wl,-rpath=/usr/local/lib/gcc5   -O2   -funswitch-loops -fomit-frame-pointer -flto -funsigned-char -fno-strict-aliasing  -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -O3 -pipe -march=amdfam10  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing   -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -L/usr/local/lib/gcc5  -lm -lvpx -lSDL2_mixer -L/usr/local/lib -lSDL2 -pthread -lpng -lz -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo"
/bin/sh: g++: not founde3d/global.o...
Failed building obj/duke3d/game.o from source/duke3d/src/game.cpp!
gmake[2]: *** [GNUmakefile:923: obj/duke3d/game.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/bin/sh: g++: not found
Failed building obj/duke3d/global.o from source/duke3d/src/global.cpp!
gmake[2]: *** [GNUmakefile:923: obj/duke3d/global.o] Error 1
gmake[2]: Leaving directory '/usr/obj/usr/ports/games/eduke32/work/eduke32_20170225-6079'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/games/eduke32
*** Error code 1

Stop.
make: stopped in /usr/ports/games/eduke32

The port must respect CC and CXX, and the easiest way to do that is by passing them as to make as arguments. That way you need not worry about chasing the patch targets when upstream refactors their build infrastructure.
Comment 3 Piotr Kubaj freebsd_committer 2017-03-22 19:11:42 UTC
LGTM.
Comment 4 commit-hook freebsd_committer 2017-04-07 21:40:26 UTC
A commit references this bug:

Author: rezny
Date: Fri Apr  7 21:39:53 UTC 2017
New revision: 437958
URL: https://svnweb.freebsd.org/changeset/ports/437958

Log:
  * Build fixes: add CC and CXX to MAKE_ARGS, pass NOASM via MAKE_ARGS
  * Fetch fix: correct the URL for VOXEL and XXX packs
  * Add option VOXEL and remove obsolete MIDI options
  * Correct patching of game data path so the full path need not be specified
  * Install (SHAREWARE) or instruct (pkg-message) to copy both game data files

  PR:		217913
  Approved by:	pkubaj@anongoth.pl (maintainer), swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D10107

Changes:
  head/games/eduke32/Makefile
  head/games/eduke32/distinfo
  head/games/eduke32/files/pkg-message.in
Comment 5 Gerald Pfeifer freebsd_committer 2017-04-18 17:18:24 UTC
*** Bug 218474 has been marked as a duplicate of this bug. ***