Bug 199848

Summary: [maintainer][patch] games/wesnoth update to 1.13.0
Product: Ports & Packages Reporter: Torsten Zühlsdorff <ports>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Many People CC: amdmi3, wen
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch for update to 1.13.0 none

Description Torsten Zühlsdorff 2015-05-01 19:51:29 UTC
Created attachment 156220 [details]
patch for update to 1.13.0

Update to wesnoth 1.13.0. Patch attached :)
Comment 1 Torsten Zühlsdorff 2015-05-01 19:52:22 UTC
Poudriere-Test-Log (4.3 MB):
ports.toco-domains.de/poudriere-test-logs/wesnoth-1.13.0.log
Comment 3 Wen Heping freebsd_committer freebsd_triage 2015-05-02 06:29:32 UTC
Hi,

   Do you test it on 9.x platform ? It failed build on my box, the last lines of the build log is as below.

Regards,
wen

...
[ 76%] Building CXX object src/CMakeFiles/wesnothd.dir/loadscreen_empty.cpp.o
cd /wrkdirs/usr/ports/games/wesnoth/work/wesnoth-1.13.0/src && /usr/bin/c++   -DHAS_RELATIVE_LOCALEDIR=0 -DHAVE_CONFIG_H -DHAVE_FRIBIDI -DHAVE_HISTORY -DHAVE_LIBDBUS -DHAVE_LIBPNG -DLUA_USE_POSIX -D_X11 -std=c++98 -W -Wall  -O2 -pipe -fno-strict-aliasing -isystem /usr/local/include -isystem /usr/local/include/freetype2 -isystem /usr/local/include/SDL -isystem /usr/local/include/pango-1.0 -isystem /usr/local/include/cairo -isystem /usr/local/include/glib-2.0 -isystem /usr/local/lib/glib-2.0/include -isystem /usr/local/include/pixman-1 -isystem /usr/local/include/libpng16 -isystem /usr/local/include/dbus-1.0 -isystem /usr/local/include/dbus-1.0/include -I/wrkdirs/usr/ports/games/wesnoth/work/wesnoth-1.13.0/src -isystem /usr/local/include/fribidi    -I/usr/local/include/SDL -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -DWESNOTH_PATH=\"/usr/local/share/wesnoth\" -DLOCALEDIR=\"/usr/local/share/locale\" -DFIFODIR=\"/var/run/wesnothd\" -o CMakeFiles/wesnothd.dir/loadscreen_empty.cpp.o -c /wrkdirs/usr/ports/games/wesnoth/work/wesnoth-1.13.0/src/loadscreen_empty.cpp
Linking CXX executable ../wesnothd
cd /wrkdirs/usr/ports/games/wesnoth/work/wesnoth-1.13.0/src && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/wesnothd.dir/link.txt --verbose=1
/usr/bin/c++    -std=c++98 -W -Wall  -O2 -pipe -fno-strict-aliasing   -L/usr/local/lib -lboost_system CMakeFiles/wesnothd.dir/server/ban.cpp.o CMakeFiles/wesnothd.dir/server/game.cpp.o CMakeFiles/wesnothd.dir/server/input_stream.cpp.o CMakeFiles/wesnothd.dir/server/metrics.cpp.o CMakeFiles/wesnothd.dir/server/player.cpp.o CMakeFiles/wesnothd.dir/server/player_network.cpp.o CMakeFiles/wesnothd.dir/server/proxy.cpp.o CMakeFiles/wesnothd.dir/server/room.cpp.o CMakeFiles/wesnothd.dir/server/room_manager.cpp.o CMakeFiles/wesnothd.dir/server/server.cpp.o CMakeFiles/wesnothd.dir/server/simple_wml.cpp.o CMakeFiles/wesnothd.dir/server/user_handler.cpp.o CMakeFiles/wesnothd.dir/server/forum_user_handler.cpp.o CMakeFiles/wesnothd.dir/server/sample_user_handler.cpp.o CMakeFiles/wesnothd.dir/network.cpp.o CMakeFiles/wesnothd.dir/network_worker.cpp.o CMakeFiles/wesnothd.dir/loadscreen_empty.cpp.o  -o ../wesnothd  -L/usr/local/lib  libwesnoth-core.a /usr/local/lib/libSDLmain.a /usr/local/lib/libSDL.so -pthread /usr/local/lib/libboost_iostreams.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_locale.so /usr/local/lib/libSDL_net.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_random.so -Wl,-rpath,/usr/local/lib: 
/usr/local/bin/cmake -E cmake_progress_report /wrkdirs/usr/ports/games/wesnoth/work/wesnoth-1.13.0/CMakeFiles  100
[ 76%] Built target wesnothd
1 error
*** [all] Error code 2
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/games/wesnoth.
build of games/wesnoth ended at Sat May  2 16:45:31 CST 2015
build time: 00:05:19
!!! build failure encountered !!!
Comment 4 Torsten Zühlsdorff 2015-05-04 15:39:51 UTC
Very interesting. I've created a poudriere jail with 9.3-RELEASE and can reproduce the failure.

The cause is not clear to me, i will need some time for investigation.

Thanks for your report!
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-15 01:06:27 UTC
What kind of investigation do you need? The cause is obvious:

cc1plus: error: unrecognized command line option "-Wno-unused-result"

this warning seems to be not known to old gcc4.2. Even without warning, it can't build wesnoth. So you'll need:

USES= compiler:features ...
...
.include <bsd.port.pre.mk>

.if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
USE_GCC=       yes
.endif

Also, the port fails with DOCS disabled:

https://people.freebsd.org/~amdmi3/wesnoth-noportdocs.log

Probably it'd be better to disable manual installation with patching related CMakeLists.txt with REINPLACE_CMD.

Finally, there seems to be no need in LDFLAGS line.
Comment 6 Torsten Zühlsdorff 2015-05-15 15:23:32 UTC
(In reply to Dmitry Marakasov from comment #5)

> What kind of investigation do you need? The cause is obvious:

I'm sorry Dmitry, i'm not very familiar with this type of problems. I'm just harvesting experience. I could not see the "obvious" cause, because it wasn't in the poudriere test-log and i have no 8.x or 9.x system.

I've tried you're suggestion, but did not get it to work. Clearly i'm making something wrong.

The ".include <bsd.port.pre.mk>" conflics with the line ".include <bsd.port.mk>" when executing. Removing the second makes "make showconfig" unusable. 

I could not find a working solutions without duplicating code from compiler.mk. And i'm at the moment very short at time.

If you could create a patch this would be very handy. Otherwise it will take a while longer.

I'm sorry for the delay :(
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-05-15 18:15:20 UTC
A commit references this bug:

Author: amdmi3
Date: Fri May 15 18:14:28 UTC 2015
New revision: 386467
URL: https://svnweb.freebsd.org/changeset/ports/386467

Log:
  - Update to 1.13.0

  PR:		199848
  Submitted by:	ports@toco-domains.de (maintainer)

Changes:
  head/games/wesnoth/Makefile
  head/games/wesnoth/distinfo
  head/games/wesnoth/pkg-plist
Comment 8 Torsten Zühlsdorff 2015-05-15 18:31:50 UTC
@Dmitry

Thanks for your patch! I don't know why this doesn't work when i did it. But i will figure this out and hopefully get the next patch without your time.

Thanks,
Torsten
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-15 19:28:33 UTC
(In reply to Torsten Zühlsdorff from comment #6)

Sorry if that sounded harsh.

> I'm sorry Dmitry, i'm not very familiar with this type of problems. I'm just harvesting experience. I could not see the "obvious" cause, because it wasn't in the poudriere test-log and i have no 8.x or 9.x system.

It was there. It may not have been in the end of the log or it could be mixed in other output because make runs multiple commands in parallel, so it's usually most practical to just grep for "error:"

> The ".include <bsd.port.pre.mk>" conflics with the line ".include <bsd.port.mk>" when executing. Removing the second makes "make showconfig" unusable.

port.pre.mk and port.post.mk are just two halves to port.mk, so if you use port.pre.mk you should've changed port.mk to port.post.mk to not include "post" part twice. FYI, using port.pre.mk is required as COMPILER_* variables are set there.

> If you could create a patch this would be very handy. Otherwise it will take a while longer.

Ok. Be sure to examine final diff:

https://svnweb.freebsd.org/ports/head/games/wesnoth/Makefile?r1=386467&r2=386466&pathrev=386467

Additional changes:
- Force newer gcc version if gcc is used
- Remove unneeded LDFLAGS
- Better handling of disabled DOCS option (I was incorrect to advice patching CMakeLists.txt; actually PORTDOCS=* handles this just fine)
Comment 10 Torsten Zühlsdorff 2015-05-16 09:43:56 UTC
(In reply to Dmitry Marakasov from comment #9)

Originally it sounded harsh, but i'm fine. :) Thanks for your explanation, that helped me a lot for a better understanding! And thanks again for your help and patch. :)
Comment 11 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-26 17:52:03 UTC
Though wesnoth was rolled back, we can still have wesnoth-devel with the same set of changes. I find it useful for people who want to check out bleeding edge version and for testing and fixing FreeBSD compatibility early. Would you like me to add the port?