Bug 141410 - [patch] games/vavoom - unbreak build (cmake problem?)
Summary: [patch] games/vavoom - unbreak build (cmake problem?)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-12 21:40 UTC by Barbara
Modified: 2009-12-29 02:20 UTC (History)
0 users

See Also:


Attachments
file.diff (2.29 KB, patch)
2009-12-12 21:40 UTC, Barbara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara 2009-12-12 21:40:02 UTC
To solve the build failure for games/vavoom (http://lists.freebsd.org/pipermail/cvs-ports/2009-December/184634.html), I wrote the attached patch. This will detach the build of vlaunch and it should let the build complete successfully.
I preferred commenting some parts and giving a message while keeping the options, so they could be used again when the problem will be completely fixed.


Anyway, digging more deeply into the problem, I think that the problem is how cmake plays with wxgtk.
In fact, running wxgtk2u-2.8-config (unicode) to get the correct cxxflags, I get:
# /usr/local/bin/wxgtk2u-2.8-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -D_THREAD_SAFE

but after the failure, in work/vavoom-1.30/utils/vlaunch/CMakeFiles/vlaunch.dir/flags.make, I see
-----------------------------------------------------------------
CXX_FLAGS = -O2 -pipe -march=athlon-mp -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8   _FILE_OFFSET_BITS=64 _LARGE_FILES __WXGTK__ _THREAD_SAFE

CXX_DEFINES = -DHAVE_INTTYPES_H=1
-----------------------------------------------------------------
which are clearly wrong.

The problem should be in /usr/local/share/cmake/Modules/FindwxWidgets.cmake
Patching it with the following, should fix also when building with WITH_LAUCHER
-----------------------------------------------------------------
--- FindwxWidgets.cmake.orig	2009-12-09 23:46:45.000000000 +0100
+++ FindwxWidgets.cmake	2009-12-12 21:07:46.000000000 +0100
@@ -718,10 +718,10 @@
         # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix
         STRING(REGEX MATCHALL "-D[^;]+"
           wxWidgets_DEFINITIONS  "${wxWidgets_CXX_FLAGS}")
-        STRING(REGEX REPLACE "-D[^;]+;" ""
-          wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
-        STRING(REPLACE "-D" ""
-          wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
+        #STRING(REGEX REPLACE "-D[^;]+;" ""
+        #  wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+        #STRING(REPLACE "-D" ""
+        #  wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
 
         # parse include dirs from cxxflags; drop -I prefix
         STRING(REGEX MATCHALL "-I[^;]+"
-----------------------------------------------------------------

I think that this could break other ports depending on wxgtk and cmake (if any).
I don't know if it's worth patching cmake port as well. Anyway I'll try to report it to cmake authors.

Barbara

Fix: Patch attached with submission follows:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-12-12 22:49:42 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

ports PR.
Comment 2 Barbara 2009-12-13 11:20:06 UTC
I wrote a new patch that should fix the problem even with wxgtk.
In the new 
Makefile I also tried using an if statement to check the wxgtk version, but I 
have commented it as it's not working and I have no clue about the reason.
I 
don't event know for sure if the check is really required or if the replaced 
cmake commands could be used also with previous cmake versions.
Anyway you can 
find the patch here:
http://pastebin.com/f6361a92a

Barbara
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2009-12-15 21:11:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 4 herold.oliver 2009-12-28 18:50:16 UTC
The first patch works like a charm, the second patch doesn't even work.

Cheers Oliver
Comment 5 Barbara 2009-12-29 00:07:38 UTC
> The first patch works like a charm, the second patch doesn't even work.=

> 
> Cheers Oliver
> 

This is caused by pastebin.com, which seems stripping leading "@@" (??).
This http://pastebin.ca/1730049 should work, or try manually adding two "=
@" at the beginning of line 3 and 12 to the old one.

Regards
Barbara
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2009-12-29 02:17:45 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2009-12-29 02:17:55 UTC
amdmi3      2009-12-29 02:17:41 UTC

  FreeBSD ports repository

  Modified files:
    games/vavoom         Makefile 
  Log:
  - Fix build with newer cmake
  
  PR:             141410
  Submitted by:   Barbara <barbara.xxx1975@libero.it>
  
  Revision  Changes    Path
  1.49      +13 -2     ports/games/vavoom/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"