Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2017 11:31:17 +0000 (UTC)
From:      Torsten Zuehlsdorff <tz@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r454683 - in head/games: . xptools xptools/files
Message-ID:  <201711221131.vAMBVHqb043570@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tz
Date: Wed Nov 22 11:31:17 2017
New Revision: 454683
URL: https://svnweb.freebsd.org/changeset/ports/454683

Log:
  New port: games/xptools
  
  The X-Plane Scenery Tools (XPTools) code base is the source code tree for all
  of the Laminar Research scenery creation/editing tools.  This code does not
  include X-Plane and the "X-Apps" (PlaneMaker, WorldMaker, AirfoilMaker, and
  Briefer).  It does include source to the ac3d x-plane plugin, WED, the various
  tools, and our global scenery generator.
  
  WWW: https://developer.x-plane.com/code/
  
  PR:           223649
  Submitted by: Michael Danilov <mike.d.ft402@gmail.com>

Added:
  head/games/xptools/
  head/games/xptools/Makefile   (contents, props changed)
  head/games/xptools/distinfo   (contents, props changed)
  head/games/xptools/files/
  head/games/xptools/files/patch-libs_Makefile   (contents, props changed)
  head/games/xptools/files/patch-makerules_Meshtool   (contents, props changed)
  head/games/xptools/files/patch-makerules_RenderFarmUI   (contents, props changed)
  head/games/xptools/files/patch-makerules_global_paths.mk   (contents, props changed)
  head/games/xptools/files/patch-makerules_global_toplevel.mk   (contents, props changed)
  head/games/xptools/files/patch-src_GUI_GUI_Resources.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_Network_PCSBSocket.lin.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_Obj_XDefs.h   (contents, props changed)
  head/games/xptools/files/patch-src_UI_XGUIApp.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_Utils_GISUtils.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_Utils_PlatformUtils.lin.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_WEDCore_WED_AppMain.cpp   (contents, props changed)
  head/games/xptools/files/patch-src_XESCore_Airports.cpp   (contents, props changed)
  head/games/xptools/files/patch-src__WEDImportExport__WED_DSFExport.cpp.patch   (contents, props changed)
  head/games/xptools/files/patch-src_linuxinit_initializer.cpp   (contents, props changed)
  head/games/xptools/pkg-descr   (contents, props changed)
  head/games/xptools/pkg-message   (contents, props changed)
  head/games/xptools/pkg-plist   (contents, props changed)
Modified:
  head/games/Makefile

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Wed Nov 22 11:06:43 2017	(r454682)
+++ head/games/Makefile	Wed Nov 22 11:31:17 2017	(r454683)
@@ -1149,6 +1149,7 @@
     SUBDIR += xpilot-ng-server
     SUBDIR += xpipeman
     SUBDIR += xpired
+    SUBDIR += xptools
     SUBDIR += xpuyopuyo
     SUBDIR += xpuzzletama
     SUBDIR += xpyraminx

Added: head/games/xptools/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/Makefile	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,102 @@
+# $FreeBSD$
+
+PORTNAME=	xptools
+DISTVERSION=	wed_161r1
+CATEGORIES=	games
+
+MAINTAINER=	mike.d.ft402@gmail.com
+COMMENT=	X-Plane Scenery Tools
+
+LICENSE=	MIT
+
+# Platform-specific defines in patch-src_XESCore_Airports.cpp.
+# Somewhere on FlightGear wiki it is said WED would only work for AMD64 anyway.
+ONLY_FOR_ARCHS=	amd64
+
+BUILD_DEPENDS=	gnustat:sysutils/coreutils \
+		${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
+		${LOCALBASE}/lib/libntl.a:math/ntl \
+		cmake:devel/cmake
+LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
+		libcurl.so:ftp/curl \
+		libexpat.so:textproc/expat2 \
+		libfreetype.so:print/freetype2 \
+		libgmp.so:math/gmp \
+		libjasper.so:graphics/jasper \
+		libgeotiff.so:graphics/libgeotiff \
+		libproj.so:graphics/proj \
+		libmpfr.so:math/mpfr \
+		libpng.so:graphics/png \
+		libshp.so:devel/shapelib \
+		libsquish.so:graphics/squish \
+		libtiff.so:graphics/tiff \
+		lib3ds.so:graphics/lib3ds \
+		libGLw.so:graphics/libGLw \
+		libGLU.so:graphics/libGLU
+
+USES=		gmake jpeg sqlite ssl
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	X-Plane
+GH_SUBDIR=	libs:xptools_libs
+GH_TAGNAME=	982173e:xptools_libs
+
+USE_CXXSTD=	c++11
+USE_BINUTILS=	yes
+USE_QT4=	corelib gui moc opengl
+USE_GL+=	gl
+
+BINARIES=	DDSTool DSFTool MeshTool ObjConverter ObjView RenderFarm RenderFarmUI WED XGrinder XPlaneSupportLin.p
+
+OPTIONS_DEFINE=	OPTIMIZED_CFLAGS DEBUG
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUG}
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
+IGNORE=	the Makefile has no flags for both debug and optimization
+.else
+ALL_TARGET=		debug
+.endif
+.else
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
+ALL_TARGET=		release-opt
+.else
+ALL_TARGET=		release
+.endif
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e's:g++:${CXX}:g' \
+		-e's|gcc|${CC}|g' \
+		${WRKSRC}/makerules/global/toplevel.mk \
+		${WRKSRC}/src/OneOffs/Makefile
+	@${REINPLACE_CMD} \
+		-e's:-Wl,--exclude-libs,libpng.a::g' \
+		-e's:\./libs/local$$(MULTI_SUFFIX)/lib/libCGAL.a:XYZZY&:g' \
+		-e's: \./libs/local$$(MULTI_SUFFIX)/lib/libCGAL_Core.a::g' \
+		-e's:\./libs/local$$(MULTI_SUFFIX)/lib/libdime.a:XYZZY&:g' \
+		-e's: .*libz.a: /usr/lib/libz.a /usr/lib/libbz2.a /usr/lib/liblzma.a:g' \
+		-e's: \./libs/local$$(MULTI_SUFFIX)/lib: ${PREFIX}/lib:g' \
+		-e's: ${PREFIX}/lib/libtiff.a:& ${PREFIX}/lib/libjbig.a:g' \
+		-e's:XYZZY::g' \
+		-e's: -ldl: -lexecinfo -lelf:g' \
+		${WRKSRC}/makerules/ac3d \
+		${WRKSRC}/makerules/DDSTool \
+		${WRKSRC}/makerules/DSFTool \
+		${WRKSRC}/makerules/ObjConverter \
+		${WRKSRC}/makerules/ObjView \
+		${WRKSRC}/makerules/RenderFarm \
+		${WRKSRC}/makerules/WED \
+		${WRKSRC}/makerules/XGrinder
+
+pre-build:
+	cd ${WRKSRC}/libs && ${GMAKE}
+
+do-install:
+.for f in ${BINARIES}
+	${INSTALL_PROGRAM} ${WRKSRC}/build/*/*/${f} ${STAGEDIR}${PREFIX}/bin
+.endfor
+
+.include <bsd.port.mk>

Added: head/games/xptools/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/distinfo	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1511276611
+SHA256 (X-Plane-xptools-wed_161r1_GH0.tar.gz) = eede9732b24dea94be1c21bf0b6c6dec475a25bbb2de2ce234f3ce701a216b82
+SIZE (X-Plane-xptools-wed_161r1_GH0.tar.gz) = 20419334
+SHA256 (X-Plane-xptools-982173e_GH0.tar.gz) = 9c705ded5e83e264e12cb36bacd7bbfc9adbce06eb2d523e6ac32aae08e0eecd
+SIZE (X-Plane-xptools-982173e_GH0.tar.gz) = 115284556

Added: head/games/xptools/files/patch-libs_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-libs_Makefile	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,66 @@
+--- libs/Makefile.orig	2015-11-30 20:55:15 UTC
++++ libs/Makefile
+@@ -111,6 +111,10 @@
+ 	PLAT_LINUX := Yes
+ 	VIS	:= -fvisibility=hidden
+ endif
++ifeq ($(PLATFORM), FreeBSD)
++	PLAT_LINUX := Yes
++	VIS	:= -fvisibility=hidden
++endif
+ 
+ # boost
+ ARCHIVE_BOOST		:= boost_$(VER_BOOST).tar.gz
+@@ -368,9 +372,7 @@
+ libexpat libgmp libmpfr libssl libcurl libjasper
+ 
+ all: ./local$(MULTI_SUFFIX)/.xpt_libs
+-./local$(MULTI_SUFFIX)/.xpt_libs: boost mesa_headers zlib libpng \
+-libfreetype libjpeg libtiff libproj libgeotiff libsqlite lib3ds libcgal \
+-libsquish libdime libshp libexpat libgmp libmpfr libssl libcurl libjasper
++./local$(MULTI_SUFFIX)/.xpt_libs: libcgal libdime
+ 	@touch ./local$(MULTI_SUFFIX)/.xpt_libs
+ 	
+ clean:
+@@ -629,11 +631,7 @@
+ 
+ 
+ libcgal: ./local$(MULTI_SUFFIX)/lib/.xpt_libcgal
+-./local$(MULTI_SUFFIX)/lib/.xpt_libcgal: \
+-./local$(MULTI_SUFFIX)/lib/.xpt_zlib \
+-./local$(MULTI_SUFFIX)/lib/.xpt_libgmp \
+-./local$(MULTI_SUFFIX)/lib/.xpt_libmpfr \
+-./local$(MULTI_SUFFIX)/lib/.xpt_boost
++./local$(MULTI_SUFFIX)/lib/.xpt_libcgal:
+ 	@echo "building libcgal..."
+ 	@-mkdir -p "./local$(MULTI_SUFFIX)/include"
+ 	@-mkdir -p "./local$(MULTI_SUFFIX)/lib"
+@@ -663,24 +661,17 @@
+ endif
+ ifdef PLAT_LINUX
+ 	@cd "CGAL-$(VER_CGAL)" && \
++	sed -i.orig 81d src/CMakeLists.txt && \
+ 	cmake . -DCMAKE_INSTALL_PREFIX=$(DEFAULT_PREFIX) \
+ 	-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=FALSE \
+ 	-DCGAL_CXX_FLAGS="$(VIS) -I$(DEFAULT_INCDIR)" \
+ 	-DCGAL_MODULE_LINKER_FLAGS="-L$(DEFAULT_LIBDIR)" \
+ 	-DCGAL_SHARED_LINKER_FLAGS="-L$(DEFAULT_LIBDIR)" \
+ 	-DCGAL_EXE_LINKER_FLAGS="-L$(DEFAULT_LIBDIR)" \
+-	-DGMP_INCLUDE_DIR=$(DEFAULT_INCDIR) \
+-	-DGMP_LIBRARIES_DIR=$(DEFAULT_LIBDIR) \
+-	-DGMP_LIBRARIES=$(DEFAULT_LIBDIR)/libgmp.a \
+-	-DGMPXX_INCLUDE_DIR=$(DEFAULT_INCDIR) \
+-	-DGMPXX_LIBRARIES=$(DEFAULT_LIBDIR)/libgmpxx.a \
+-	-DMPFR_INCLUDE_DIR=$(DEFAULT_INCDIR) \
+-	-DMPFR_LIBRARIES_DIR=$(DEFAULT_LIBDIR) \
+-	-DMPFR_LIBRARIES=$(DEFAULT_LIBDIR)/libmpfr.a \
+ 	-DWITH_CGAL_ImageIO=OFF -DWITH_CGAL_PDB=OFF -DWITH_CGAL_Qt3=OFF \
+-	-DWITH_CGAL_Qt4=OFF -DBoost_INCLUDE_DIR=$(DEFAULT_PREFIX)/include \
+-	-DBOOST_ROOT=$(DEFAULT_PREFIX) $(BE_QUIET) && \
+-	make $(BE_QUIET) && make install $(BE_QUIET)
++	-DWITH_CGAL_Qt4=OFF \
++	$(BE_QUIET) && \
++	gmake $(BE_QUIET) && gmake install $(BE_QUIET)
+ endif
+ ifdef PLAT_MINGW
+ 	@cd "CGAL-$(VER_CGAL)" && \

Added: head/games/xptools/files/patch-makerules_Meshtool
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-makerules_Meshtool	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,34 @@
+--- makerules/MeshTool.orig	2017-04-14 14:21:02 UTC
++++ makerules/MeshTool
+@@ -11,18 +11,20 @@
+ ifdef PLAT_LINUX
+ LDFLAGS		+= -static
+ LIBS		:= ./libs/local$(MULTI_SUFFIX)/lib/libCGAL.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libboost_thread.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libboost_system.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libsquish.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libgeotiff.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libshp.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libproj.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libtiff.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libjpeg.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libpng.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libz.a
+-LIBS		+= ./libs/local$(MULTI_SUFFIX)/lib/libjasper.a
++LIBS		+= ${PREFIX}/lib/libboost_thread.a
++LIBS		+= ${PREFIX}/lib/libboost_system.a
++LIBS		+= ${PREFIX}/lib/libsquish.a
++LIBS		+= ${PREFIX}/lib/libgeotiff.a
++LIBS		+= ${PREFIX}/lib/libshp.a
++LIBS		+= ${PREFIX}/lib/libproj.a
++LIBS		+= ${PREFIX}/lib/libtiff.a
++LIBS		+= ${PREFIX}/lib/libjbig.a
++LIBS		+= ${PREFIX}/lib/libjpeg.a
++LIBS		+= ${PREFIX}/lib/libpng.a
++LIBS		+= -lz -llzma
++LIBS		+= ${PREFIX}/lib/libjasper.a
+ LIBS		+= -lpthread -lrt
++LIBS		+= -lexecinfo -lelf
+ endif #PLAT_LINUX
+ 
+ ifdef PLAT_MINGW

Added: head/games/xptools/files/patch-makerules_RenderFarmUI
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-makerules_RenderFarmUI	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,25 @@
+--- makerules/RenderFarmUI.orig	2017-04-14 14:21:02 UTC
++++ makerules/RenderFarmUI
+@@ -14,10 +14,10 @@
+ LIBS		+= -Wl,--as-needed
+ LIBS		+= -Wl,-Bstatic -Wl,--start-group
+ LIBS		+= -lexpat -lsquish -lsqlite3 -lshp -lgeotiff
+-LIBS		+= -lCGAL -lCGAL_Core -lproj -lfreetype -ltiff -ljpeg -lpng -lz -ljasper
+-LIBS		+= -lgmp -lmpfr -lstdc++ -lm -lgcc -lgcc_eh
++LIBS		+= -lCGAL -lproj -lfreetype -ltiff -ljbig -ljpeg -lpng -lz -lbz2 -llzma -ljasper
++LIBS		+= -lgmp -lmpfr -lc++ -lm -lgcc -lgcc_eh
+ LIBS		+= -Wl,--end-group -Wl,-Bdynamic
+-LIBS		+= -lQtCore -lQtGui -lQtOpenGL -lGL -lGLU -ldl -lc
++LIBS		+= -lQtCore -lQtGui -lQtOpenGL -lGL -lGLU -lexecinfo -lelf -lc
+ LIBS		+= -lboost_thread -lboost_system -lpthread
+ endif #PLAT_LINUX
+ 
+@@ -39,7 +39,7 @@
+ LIBS		+= ./libs/local/lib/libpng.a
+ LIBS		+= ./libs/local/lib/libfreetype.a
+ LIBS		+= ./libs/local/lib/libexpat.a
+-LIBS		+= ./libs/local/lib/libz.a
++LIBS		+= /usr/lib/libz.a /usr/lib/libbz2.a /usr/lib/liblzma.a
+ endif #PLAT_DARWIN
+ 
+ ##

Added: head/games/xptools/files/patch-makerules_global_paths.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-makerules_global_paths.mk	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,20 @@
+--- makerules/global/paths.mk.orig	2017-04-14 14:21:02 UTC
++++ makerules/global/paths.mk
+@@ -2,6 +2,8 @@
+ # project wide include and library searchpaths
+ ##############################################
+ 
++LIBPATHS += -L${PREFIX}/lib
++LIBPATHS += -L${PREFIX}/lib/qt4
+ LIBPATHS += -L./libs/local$(MULTI_SUFFIX)/lib
+ 
+ INCLUDEPATHS += -I./libs/local$(MULTI_SUFFIX)/include
+@@ -43,5 +44,7 @@
+ 
+ ifdef PLAT_LINUX
+ INCLUDEPATHS += -I./libs/local$(MULTI_SUFFIX)/include/mesa
+-INCLUDEPATHS += -I/usr/include/qt4
++INCLUDEPATHS += -I${PREFIX}/include
++INCLUDEPATHS += -I${PREFIX}/include/qt4
++INCLUDEPATHS += -I${PREFIX}/include/freetype2
+ endif #PLAT_LINUX

Added: head/games/xptools/files/patch-makerules_global_toplevel.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-makerules_global_toplevel.mk	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,34 @@
+--- makerules/global/toplevel.mk.orig	2017-04-14 14:21:02 UTC
++++ makerules/global/toplevel.mk
+@@ -8,7 +8,7 @@
+ .PHONY: all clean linkclean
+ 
+ PLATFORM	:= $(shell uname)
+-ARCHITECTURE	:= $(shell uname -m)
++ARCHITECTURE	:= $(shell uname -m |sed s/amd64/x86_64/)
+ WD		:= $(PWD)
+ 
+ 
+@@ -23,6 +23,9 @@
+ ifeq ($(PLATFORM), Linux)
+ 	PLAT_LINUX	:= Yes
+ endif
++ifeq ($(PLATFORM), FreeBSD)
++	PLAT_LINUX	:= Yes
++endif
+ ifeq ($(PLATFORM), Darwin)
+ 	PLAT_DARWIN	:= Yes
+ endif
+@@ -110,9 +113,9 @@
+ # if someone has a ppc linux machine, please define -DLIL/-DBIG in the code,
+ # remove them here and use the __ppc__ macro to resolve endianess issues
+ 	DEFINES		:= -DLIN=1 -DIBM=0 -DAPL=0 -DLIL=1 -DBIG=0
+-	CFLAGS		:= $(M32_SWITCH) -Wno-deprecated-declarations -Wno-multichar -pipe -frounding-math
+-	CXXFLAGS	:= $(M32_SWITCH) -Wno-deprecated -Wno-deprecated-declarations -Wno-multichar -pipe -frounding-math
+-	LDFLAGS		:= $(M32_SWITCH) -static-libgcc
++	CFLAGS		:= $(M32_SWITCH) -Wno-deprecated-declarations -Wno-multichar -pipe
++	CXXFLAGS	:= $(M32_SWITCH) -Wno-deprecated -Wno-deprecated-declarations -Wno-multichar -pipe
++	LDFLAGS		:= $(M32_SWITCH)
+ 	BARE_LDFLAGS	:=
+ 	STRIPFLAGS	:= -s -x
+ endif

Added: head/games/xptools/files/patch-src_GUI_GUI_Resources.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_GUI_GUI_Resources.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,11 @@
+--- src/GUI/GUI_Resources.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/GUI/GUI_Resources.cpp
+@@ -242,7 +242,7 @@
+ 
+ GUI_Resource	GUI_LoadResource(const char* in_resource)
+ {
+-	if (sResMap.empty()) gModuleHandle = dlopen(0, RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND);
++	if (sResMap.empty()) gModuleHandle = dlopen(0, RTLD_NOW | RTLD_LOCAL);
+ 	if (!gModuleHandle)
+ 	{
+ 		printf("error opening module\n");

Added: head/games/xptools/files/patch-src_Network_PCSBSocket.lin.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_Network_PCSBSocket.lin.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,12 @@
+--- src/Network/PCSBSocket.lin.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/Network/PCSBSocket.lin.cpp
+@@ -30,9 +30,6 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <sys/ioctl.h>
+-#if LIN
+-	#include <asm/ioctls.h>
+-#endif
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <unistd.h>

Added: head/games/xptools/files/patch-src_Obj_XDefs.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_Obj_XDefs.h	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,48 @@
+--- src/Obj/XDefs.h.orig	2017-04-14 14:21:02 UTC
++++ src/Obj/XDefs.h
+@@ -177,40 +177,21 @@
+ //		#define __powerpc__
+ //	#endif
+ 
+-	#if APL || LIN || MINGW_BUILD
+-// TODO: replace this hack with standard conform <unordered_map>, <hash_map> will disappear in the near future
+-	#define GCC_VERSION (__GNUC__ * 10000 \
+-                               + __GNUC_MINOR__ * 100 \
+-                               + __GNUC_PATCHLEVEL__)
+-	#if GCC_VERSION >= 40300
+-		#include <backward/hash_fun.h>
+-		#include <backward/hash_map>
+-	#else
+		#include <ext/hash_map>
+-		#include <ext/hash_fun.h>
+-	#endif
+-
+ 		namespace __gnu_cxx {
+ 			template<>
+ 			struct hash<std::string>
+ 			{
+ 				size_t
+ 				operator()(const std::string& __s) const
+-				{ return __stl_hash_string(__s.c_str()); }
+-			};
+-
+-			template<>
+-			struct hash<float>
+-			{
+-				size_t
+-				operator()(const float& __s) const
+-				{ return (size_t) __s; }
++				{
++					std::hash<std::string> hash_fn;
++					return hash_fn(__s);
++				}
+ 			};
+ 
+ 		}
+-	#else
+-		#include <hash_map>
+-	#endif
++
+ 	using namespace	std;				// DEC THIS TO GET THE NEW IOS FUNCTIONS IN fstream, iomanip, and string, which are all new, unlike the old fstream.h, iomanip.h, and string.h
+ 	using namespace __gnu_cxx;			// DEC THIS TO GET THE NEW IOS FUNCTIONS IN fstream, iomanip, and string, which are all new, unlike the old fstream.h, iomanip.h, and string.h
+ 	using __gnu_cxx::hash_map;

Added: head/games/xptools/files/patch-src_UI_XGUIApp.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_UI_XGUIApp.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,11 @@
+--- src/UI/XGUIApp.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/UI/XGUIApp.cpp
+@@ -26,6 +26,8 @@
+ #include "PlatformUtils.h"
+ #include "ObjCUtils.h"
+ 
++#include <locale.h>
++
+ class	XGrinderWin;
+ 
+ #if IBM

Added: head/games/xptools/files/patch-src_Utils_GISUtils.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_Utils_GISUtils.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,15 @@
+--- src/Utils/GISUtils.cpp.orig	2017-11-07 02:12:22 UTC
++++ src/Utils/GISUtils.cpp
+@@ -40,12 +40,7 @@
+ // set to 1 to save geotiff inside geojp2 to disk
+ #define DUMP_GTIF 0
+ 
+-#if defined(IBM)
+-	#include <libxtiff/xtiffio.h>
+-	#include "GUI_Unicode.h"
+-#else
+ 	#include <xtiffio.h>
+-#endif
+ void	make_cache_file_path(const char * cache_base, int west, int south, const char * cache_name, char path[1024])
+ {
+ 	sprintf(path, "%s%s%+03d%+04d%s%+03d%+04d.%s.txt", cache_base, DIR_STR, latlon_bucket (south), latlon_bucket (west), DIR_STR, (int) south, (int) west, cache_name);

Added: head/games/xptools/files/patch-src_Utils_PlatformUtils.lin.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_Utils_PlatformUtils.lin.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,10 @@
+--- src/Utils/PlatformUtils.lin.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/Utils/PlatformUtils.lin.cpp
+@@ -28,7 +28,6 @@
+ #include <pwd.h>
+ #include <cstring>
+ #include <string>
+-#include <linux/limits.h>
+ 
+ string GetApplicationPath()
+ {

Added: head/games/xptools/files/patch-src_WEDCore_WED_AppMain.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_WEDCore_WED_AppMain.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,11 @@
+--- src/WEDCore/WED_AppMain.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/WEDCore/WED_AppMain.cpp
+@@ -27,6 +27,8 @@
+ #include <stdio.h>
+ #endif
+ 
++#include <locale.h>
++
+ #include "WED_AboutBox.h"
+ // Stuff we need to init
+ //#include "XESInit.h"

Added: head/games/xptools/files/patch-src_XESCore_Airports.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_XESCore_Airports.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,14 @@
+/usr/local/include/boost/numeric/interval/hw_rounding.hpp:42:4: error: Boost.Numeric.Interval: Please specify rounding control mechanism.
+--- src/XESCore/Airports.cpp.orig	2017-11-07 03:31:14 UTC
++++ src/XESCore/Airports.cpp
+@@ -38,6 +38,10 @@
+ #include "CompGeomUtils.h"
+ #include "MapBuffer.h"
+ #include <CGAL/convex_hull_2.h>
++// FIXME Arch-specific!
++#define __x86_64__ YES
++#define __USE_ISOC99 YES
++// END FIXME
+ #include <CGAL/Sweep_line_2_algorithms.h>
+ #include <CGAL/Boolean_set_operations_2/Gps_polygon_validation.h>
+ #if DEV

Added: head/games/xptools/files/patch-src__WEDImportExport__WED_DSFExport.cpp.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src__WEDImportExport__WED_DSFExport.cpp.patch	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,38 @@
+--- src/WEDImportExport/WED_DSFExport.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/WEDImportExport/WED_DSFExport.cpp
+@@ -685,7 +685,7 @@
+ 
+ }
+ 
+-static void	DSF_AccumChainBezier(
++static void	DSF_AccumChainBezier2p(
+ 						vector<Bezier2p>::const_iterator		start,
+ 						vector<Bezier2p>::const_iterator		end,
+ 						const Bbox2&							bounds,
+@@ -802,7 +802,7 @@
+ 	}	
+ }
+ 
+-static void	DSF_AccumChain(
++static void	DSF_AccumChain2p(
+ 						vector<Segment2p>::const_iterator	start,
+ 						vector<Segment2p>::const_iterator	end,
+ 						const Bbox2&						bounds,
+@@ -1370,7 +1370,7 @@
+ 						if(fac_is_auto_closed && bad_match(chain.front(),chain.back()))
+ 							problem_children.insert(what);
+ 						else
+-							DSF_AccumChainBezier(chain.begin(),chain.end(), safe_bounds, cbs,writer, idx, fac->GetHeight(), fac_is_auto_closed);
++							DSF_AccumChainBezier2p(chain.begin(),chain.end(), safe_bounds, cbs,writer, idx, fac->GetHeight(), fac_is_auto_closed);
+ 					}
+ 				}
+ 				else
+@@ -1391,7 +1391,7 @@
+ 						if(fac_is_auto_closed && bad_match(chain.front(),chain.back()))
+ 							problem_children.insert(what);
+ 						else						
+-							DSF_AccumChain(chain.begin(),chain.end(), safe_bounds, cbs,writer, idx, fac->GetHeight(), fac_is_auto_closed);
++							DSF_AccumChain2p(chain.begin(),chain.end(), safe_bounds, cbs,writer, idx, fac->GetHeight(), fac_is_auto_closed);
+ 					}
+ 				}
+ 			}

Added: head/games/xptools/files/patch-src_linuxinit_initializer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/files/patch-src_linuxinit_initializer.cpp	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,13 @@
+--- src/linuxinit/initializer.cpp.orig	2017-04-14 14:21:02 UTC
++++ src/linuxinit/initializer.cpp
+@@ -102,9 +102,7 @@
+ 	}
+ 	m_init = true;
+ 	// Try to resolve /proc/self/exe first
+-	if (!(m_abspath = canonicalize_file_name("/proc/self/exe")))
+-		// Try argv[0]
+-		if (!(m_abspath = canonicalize_file_name(*argv[0])))
++	if (!(m_abspath = *argv[0]))
+ 			goto critical;
+ 
+ 	temp = strdup(const_cast<const char* const>(m_abspath));

Added: head/games/xptools/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/pkg-descr	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,7 @@
+The X-Plane Scenery Tools (XPTools) code base is the source code tree for all
+of the Laminar Research scenery creation/editing tools.  This code does not
+include X-Plane and the "X-Apps" (PlaneMaker, WorldMaker, AirfoilMaker, and
+Briefer).  It does include source to the ac3d x-plane plugin, WED, the various
+tools, and our global scenery generator.
+
+WWW: https://developer.x-plane.com/code/

Added: head/games/xptools/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/pkg-message	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,16 @@
+X-Plane itself does not need to be installed before using WED. However, WED will
+require that you choose the X-Plane folder before it will allow you to do
+anything. Create a working directory with the following structure before
+starting WED for the first time.
+
+working directory <-- Pick a name
+   |--Custom Scenery
+   |--Global Scenery
+   |--Resources
+         |--default scenery
+
+You can create it with the following commands:
+
+$ mkdir working_directory
+$ cd working_directory
+$ mkdir -p 'Custom Scenery' 'Global Scenery' 'Resources/default scenery'

Added: head/games/xptools/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xptools/pkg-plist	Wed Nov 22 11:31:17 2017	(r454683)
@@ -0,0 +1,10 @@
+bin/DDSTool
+bin/DSFTool
+bin/MeshTool
+bin/ObjConverter
+bin/ObjView
+bin/RenderFarm
+bin/RenderFarmUI
+bin/WED
+bin/XGrinder
+bin/XPlaneSupportLin.p



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711221131.vAMBVHqb043570>