Bug 229517 - games/xptools won't build on anything newer than 11.1
Summary: games/xptools won't build on anything newer than 11.1
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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-04 14:59 UTC by Anonymized Account
Modified: 2018-07-29 18:50 UTC (History)
3 users (show)

See Also:


Attachments
12.0-CURRENT (21.26 KB, text/plain)
2018-07-04 14:59 UTC, Anonymized Account
no flags Details
11.2-RELEASE (670.29 KB, text/plain)
2018-07-04 15:01 UTC, Anonymized Account
no flags Details
svn-diff-xptools (105.69 KB, patch)
2018-07-07 18:51 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-xptools_v2 (52.97 KB, patch)
2018-07-07 19:37 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-xptools_v3 (58.30 KB, patch)
2018-07-09 18:15 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-xptools_v4 (59.23 KB, patch)
2018-07-15 04:03 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-xptools_v5 (59.49 KB, patch)
2018-07-15 04:31 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-xptools_v6 (59.39 KB, patch)
2018-07-15 09:02 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anonymized Account freebsd_committer freebsd_triage 2018-07-04 14:59:24 UTC
Created attachment 194879 [details]
12.0-CURRENT

I've been getting the same email for build failures for 12.0-CURRENT for a while, but was unable to do anything about it because I don't have it. But now I'm affected by this as well. It fails in different places, however.

I am incompetent to fix this.
Comment 1 Anonymized Account freebsd_committer freebsd_triage 2018-07-04 15:01:18 UTC
Created attachment 194880 [details]
11.2-RELEASE
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-07-05 22:39:20 UTC
I had a look into the code. There are a lot of syntax errors. 

this error could solved with:
-paired_files.push_back(make_pair<string,string>(files[i], files[i+1]));
+paired_files.push_back(make_pair(files[i], files[i+1]));

but I think there are other errors after this one.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-07-07 18:51:50 UTC
Created attachment 194934 [details]
svn-diff-xptools

I know this should fixed upstream.
I try it. Builds fine now.
But I did not know this tool, needs runtests..
I hope everything is right (the brackets in patch-unzip.c should checked again).
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-07-07 19:21:34 UTC
Comment on attachment 194934 [details]
svn-diff-xptools

Forgot one change.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-07-07 19:37:12 UTC
Created attachment 194936 [details]
svn-diff-xptools_v2
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-07-09 18:15:05 UTC
Created attachment 195005 [details]
svn-diff-xptools_v3

New try. This should work. 
Please, check patch-DEMDefs.h and patch-libs_Makefile. I am not sure, if this changes are right.
Comment 7 Anonymized Account freebsd_committer freebsd_triage 2018-07-14 16:11:55 UTC
Comment on attachment 195005 [details]
svn-diff-xptools_v3

Hi,

Sorry about the huge delay -- it builds on 11.1-RELEASE! \o/

Thank you!
Comment 8 Anonymized Account freebsd_committer freebsd_triage 2018-07-14 16:22:38 UTC
About patch-DEMDefs.h -- I'm not sure, because DEM_NO_DATA is -32768, and there are some asserts elsewhere that check for equality with it later, I guess we be better just change the type of those functions to int instead?

And patch-libs_Makefile -- I had originally hoped to reduce bloat by using as many system-installed libs as I could -- maybe it will be enough just to have the changes related to CGAL that you did there?
Comment 9 Anonymized Account freebsd_committer freebsd_triage 2018-07-14 16:37:20 UTC
"And patch-libs_Makefile " -- ignore this bit, I had misread your patch, it seems ok.
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-07-15 04:03:18 UTC
Created attachment 195135 [details]
svn-diff-xptools_v4
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-07-15 04:10:58 UTC
No I think  bool is right.
I asked only if the logic is right (false, true).
And  it was not.

DEM_NO_DATA returns -32768 if no data.

DEMDef.h
357         inline bool             operator()(int, int) const;
358         inline bool             get(int x, int y) const;
=>                                // Get value at x,y, false

So I think the last patch was wrong. 

I changed bool b to true.
And added one more patch (I overlooked one warning).
Comment 12 Walter Schwarzenfeld freebsd_triage 2018-07-15 04:12:52 UTC
Forgot:

 343 struct  DEMMask {
    344 
    345         DEMMask();
    346         DEMMask(int w, int h, bool ini);
    347         DEMMask(const DEMGeo&);
    348 
    349         DEMMask& operator=(bool);                       // Fill
    350         DEMMask& operator=(const DEMGeo&);      // Copy
    351         DEMMask& operator=(const DEMMask&);     // Copy
    352 
    353         void    resize(int width, int height, bool ini);                // Resize, reset t
o X
    354         void    copy_geo_from(const DEMGeo& rhs);
    355         void    copy_geo_from(const DEMMask& rhs);
    356 
    357         inline bool             operator()(int, int) const;
    358         inline bool             get(int x, int y) const;
                                // Get value at x,y, false
    359         inline void             set(int x, int y, bool v);
                                // Safe set - no-op if off
    360 
    361         double  mWest;
    362         double  mSouth;
    363         double  mEast;
    364         double  mNorth;
    365 
    366         int             mWidth;
    367         int             mHeight;
    368         int             mPost;
    369 
=====>>    370         vector<bool>    mData;
    371 };
Comment 13 Walter Schwarzenfeld freebsd_triage 2018-07-15 04:31:25 UTC
Created attachment 195136 [details]
svn-diff-xptools_v5
Comment 14 Walter Schwarzenfeld freebsd_triage 2018-07-15 04:32:27 UTC
Changed the patch-DEMDef.h once more.
Commented the original line, to see the original intension.
Comment 15 Walter Schwarzenfeld freebsd_triage 2018-07-15 09:02:40 UTC
Created attachment 195138 [details]
svn-diff-xptools_v6

There was an error in (bool b was in the wrong line).
Comment 16 Anonymized Account freebsd_committer freebsd_triage 2018-07-21 21:17:57 UTC
Comment on attachment 195138 [details]
svn-diff-xptools_v6

Thank you, builds&works here!
Comment 17 Anonymized Account freebsd_committer freebsd_triage 2018-07-24 13:18:43 UTC
By the way, it seems a new version is out -- I will try adapting your changes to it once I get it to build.
Comment 18 Kurt Jaeger freebsd_committer freebsd_triage 2018-07-29 18:50:00 UTC
Committed, thanks!
Comment 19 commit-hook freebsd_committer freebsd_triage 2018-07-29 18:50:01 UTC
A commit references this bug:

Author: pi
Date: Sun Jul 29 18:49:44 UTC 2018
New revision: 475671
URL: https://svnweb.freebsd.org/changeset/ports/475671

Log:
  games/xptools: fix build for 11.2 and current

  - lots of fixes

  PR:		229517
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:	Michael Danilov <mike.d.ft402@gmail.com> (maintainer)

Changes:
  head/games/xptools/files/patch-AptIO.cpp
  head/games/xptools/files/patch-DEMDefs.h
  head/games/xptools/files/patch-DEMIO.cpp
  head/games/xptools/files/patch-DEMTables.cpp
  head/games/xptools/files/patch-DSF2Text.cpp
  head/games/xptools/files/patch-FileUtils.cpp
  head/games/xptools/files/patch-GUI__Application.cpp
  head/games/xptools/files/patch-GUI__Clipboard.cpp
  head/games/xptools/files/patch-GUI__Packer.cpp
  head/games/xptools/files/patch-GUI__TextTable.cpp
  head/games/xptools/files/patch-RF__Main.cpp
  head/games/xptools/files/patch-RF__Selection.cpp
  head/games/xptools/files/patch-WED__ATCLayer.cpp
  head/games/xptools/files/patch-WED__AboutBox.cpp
  head/games/xptools/files/patch-WED__AptIE.cpp
  head/games/xptools/files/patch-WED__CreateEdgeTool.cpp
  head/games/xptools/files/patch-WED__CreatePolygonTool.cpp
  head/games/xptools/files/patch-WED__FileCache.cpp
  head/games/xptools/files/patch-WED__GatewayExport.cpp
  head/games/xptools/files/patch-WED__GroupCommands.cpp
  head/games/xptools/files/patch-WED__HandleToolBase.cpp
  head/games/xptools/files/patch-WED__Package.cpp
  head/games/xptools/files/patch-WED__PreviewLayer.cpp
  head/games/xptools/files/patch-WED__StructureLayer.cpp
  head/games/xptools/files/patch-WED__TCEVertexTool.cpp
  head/games/xptools/files/patch-WED__VertexTool.cpp
  head/games/xptools/files/patch-libs_Makefile
_U  head/games/xptools/files/patch-makerules_Meshtool
_U  head/games/xptools/files/patch-makerules_RenderFarmUI
_U  head/games/xptools/files/patch-makerules_global_paths.mk
_U  head/games/xptools/files/patch-makerules_global_toplevel.mk
  head/games/xptools/files/patch-obj8__export.cpp
  head/games/xptools/files/patch-obj8__import.cpp
  head/games/xptools/files/patch-obj__editor.cpp
  head/games/xptools/files/patch-obj__model.cpp
_U  head/games/xptools/files/patch-src_GUI_GUI_Resources.cpp
_U  head/games/xptools/files/patch-src_Network_PCSBSocket.lin.cpp
_U  head/games/xptools/files/patch-src_Obj_XDefs.h
_U  head/games/xptools/files/patch-src_UI_XGUIApp.cpp
_U  head/games/xptools/files/patch-src_Utils_GISUtils.cpp
_U  head/games/xptools/files/patch-src_Utils_PlatformUtils.lin.cpp
_U  head/games/xptools/files/patch-src_WEDCore_WED_AppMain.cpp
  head/games/xptools/files/patch-src_XESCore_Airports.cpp
_U  head/games/xptools/files/patch-src__WEDImportExport__WED_DSFExport.cpp.patch
_U  head/games/xptools/files/patch-src_linuxinit_initializer.cpp
  head/games/xptools/files/patch-unzip.c
  head/games/xptools/files/patch-zip.c