Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions patches/boost-1_64.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/boost/spirit/home/support/attributes.hpp b/boost/spirit/home/support/attributes.hpp
index 889e3a3..da8f981 100644
--- a/boost/spirit/home/support/attributes.hpp
+++ b/boost/spirit/home/support/attributes.hpp
@@ -1033,7 +1033,7 @@ namespace boost { namespace spirit { namespace traits
void swap_impl(T& a, T& b)
{
using namespace std;
- swap(a, b);
+ std::swap(a, b);
}

template <typename A>
2 changes: 1 addition & 1 deletion scripts/build-targets.csx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ List<KeyValuePair<string, string>> target_mapnik = new List<KeyValuePair<string,
proj4,
protobuf,
sparsehash,
osmpbf,
// osmpbf,
bzip2,
pixman,
cairo,
Expand Down
48 changes: 38 additions & 10 deletions scripts/build_boost.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ IF "%BOOSTADDRESSMODEL%"=="64" IF EXIST %ROOTDIR%\tmp-bin\python2 SET PATH=%ROOT
IF "%BOOSTADDRESSMODEL%"=="64" IF NOT EXIST %ROOTDIR%\tmp-bin\python2 ECHO no Python in tmp-bin && SET ERRORLEVEL=1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET BOOSTARCHITECTURE=x86
if "%BOOSTADDRESSMODEL%"=="64" (
SET BOOSTARCHITECTURE=ia64
IF %BUILD_TYPE% EQU Release (
SET ICU_LINK="/LIBPATH:%PKGDIR%\icu\lib64 icuuc.lib icuin.lib icudt.lib"
) ELSE (
Expand All @@ -58,6 +60,9 @@ if "%BOOSTADDRESSMODEL%"=="64" (
if "%TOOLS_VERSION%" == "14.0" (
CALL "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x86
)
if "%TOOLS_VERSION%" == "15.0" (
REM CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=amd64 -app_platform=Desktop
)
) ELSE (
IF %BUILD_TYPE% EQU Release (
SET ICU_LINK="/LIBPATH:%PKGDIR%\icu\lib icuuc.lib icuin.lib icudt.lib"
Expand All @@ -74,11 +79,21 @@ ECHO ICU_LINK %ICU_LINK%

::NOTE: you cannot have both pythons installed otherwise it appears bjam will still find the 64 bit one

if NOT EXIST b2.exe (
echo calling bootstrap bat
CALL bootstrap.bat --with-toolset=msvc-%TOOLS_VERSION%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
)
IF EXIST b2.exe GOTO ALREADY_BOOTSTRAPPED

SET BOOST_TOOLS_VERSION=%TOOLS_VERSION%
IF "%TOOLS_VERSION%"=="15.0" SET BOOST_TOOLS_VERSION=14.1
ECHO calling bootstrap bat
CALL bootstrap.bat --with-toolset=msvc-%BOOST_TOOLS_VERSION%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

IF NOT "%TOOLS_VERSION%"=="15.0" GOTO ALREADY_BOOTSTRAPPED
ECHO using VS2017^: writing custom 'project-config.jam' to make boost find VS2017's cl.exe
scriptcs %ROOTDIR%\scripts\vs2017-write-boost-project-config-jam.csx
IF %ERRORLEVEL% NEQ 0 GOTO ERROR


:ALREADY_BOOTSTRAPPED

::VS2010/MSBuild 10: toolset=msvc-10.0
::VS2012/MSBuild 11: toolset=msvc-11.0
Expand All @@ -102,14 +117,15 @@ ECHO BOOST_BUILD_TYPE %BOOST_BUILD_TYPE%

REM link=shared ^

CALL b2 -j%NUMBER_OF_PROCESSORS% ^
SET BOOST_BUILD_CMD=b2 -j%NUMBER_OF_PROCESSORS% ^
-a ^
-d2 %BOOST_BUILD_TYPE% stage ^
--build-type=minimal ^
toolset=msvc-%TOOLS_VERSION% -q ^
toolset=msvc-%BOOST_TOOLS_VERSION% -q ^
runtime-link=shared ^
link=static ^
address-model=%BOOSTADDRESSMODEL% ^
architecture=%BOOSTARCHITECTURE% ^
--with-iostreams ^
--with-test ^
--with-thread ^
Expand All @@ -125,23 +141,35 @@ address-model=%BOOSTADDRESSMODEL% ^
-sZLIB_SOURCE=%PKGDIR%\zlib ^
-sBUILD=boost_unit_test_framework

ECHO 1st build step:
ECHO %BOOST_BUILD_CMD%

%BOOST_BUILD_CMD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: build boost_python now
:: we do this separately because
:: we want to dynamically link python

CALL b2 -j%NUMBER_OF_PROCESSORS% ^
SET BOOST_BUILD_CMD=b2 -j%NUMBER_OF_PROCESSORS% ^
-a ^
-d2 %BOOST_BUILD_TYPE% stage ^
--build-type=minimal toolset=msvc-%TOOLS_VERSION% -q ^
--build-type=minimal toolset=msvc-%BOOST_TOOLS_VERSION% -q ^
runtime-link=shared link=shared ^
cxxflags="-DBOOST_MSVC_ENABLE_2014_JUN_CTP" ^
address-model=%BOOSTADDRESSMODEL% ^
--with-python python=2.7

ECHO 2nd build step:
ECHO %BOOST_BUILD_CMD%

IF "%TOOLS_VERSION%"=="15.0" ECHO !!!!! SKIPPING 2nd build step 'boost_python' - does not work yet with VS2017 && GOTO SKIPPED_PYTHON_BUILD

%BOOST_BUILD_CMD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:SKIPPED_PYTHON_BUILD


GOTO DONE

:ERROR
Expand Down
13 changes: 9 additions & 4 deletions scripts/build_osmpbf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ IF %BUILDPLATFORM% EQU x64 (
SET PROTOLIB=%PKGDIR%\protobuf\vsprojects\%BUILD_TYPE%\libprotobuf-lite.lib
)

cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=%PKGDIR%\OSM-binary\deploy ^
SET CMAKE_CMD=cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=%PKGDIR%\OSM-binary\deploy ^
-DPROTOBUF_PROTOC_EXECUTABLE=%PROTOC% ^
-DPROTOBUF_LIBRARY=%PROTOLIB% ^
-DPROTOBUF_INCLUDE_DIR=%PKGDIR%\protobuf\src
IF ERRORLEVEL 1 GOTO ERROR
-DProtobuf_INCLUDE_DIR=%PKGDIR%\protobuf\src

ECHO about to run cmake:
ECHO %CMAKE_CMD%

%CMAKE_CMD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

nmake src install
IF ERRORLEVEL 1 GOTO ERROR
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

Expand Down
54 changes: 54 additions & 0 deletions scripts/omnisharp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"FormattingOptions": {
//"NewLine": "\n",
"UseTabs": true,
"TabSize": 4,
"IndentationSize": 4,
"SpacingAfterMethodDeclarationName": false,
"SpaceWithinMethodDeclarationParenthesis": false,
"SpaceBetweenEmptyMethodDeclarationParentheses": false,
"SpaceAfterMethodCallName": false,
"SpaceWithinMethodCallParentheses": false,
"SpaceBetweenEmptyMethodCallParentheses": false,
"SpaceAfterControlFlowStatementKeyword": true,
"SpaceWithinExpressionParentheses": false,
"SpaceWithinCastParentheses": false,
"SpaceWithinOtherParentheses": false,
"SpaceAfterCast": false,
"SpacesIgnoreAroundVariableDeclaration": false,
"SpaceBeforeOpenSquareBracket": false,
"SpaceBetweenEmptySquareBrackets": false,
"SpaceWithinSquareBrackets": false,
"SpaceAfterColonInBaseTypeDeclaration": true,
"SpaceAfterComma": true,
"SpaceAfterDot": false,
"SpaceAfterSemicolonsInForStatement": true,
"SpaceBeforeColonInBaseTypeDeclaration": true,
"SpaceBeforeComma": false,
"SpaceBeforeDot": false,
"SpaceBeforeSemicolonsInForStatement": false,
"SpacingAroundBinaryOperator": "single",
"IndentBraces": false,
"IndentBlock": true,
"IndentSwitchSection": true,
"IndentSwitchCaseSection": true,
"LabelPositioning": "oneLess",
"WrappingPreserveSingleLine": true,
"WrappingKeepStatementsOnSingleLine": true,
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInAccessors": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLineForElse": false,
"NewLineForCatch": false,
"NewLineForFinally": false,
"NewLineForMembersInObjectInit": false,
"NewLineForMembersInAnonymousTypes": false,
"NewLineForClausesInQuery": false
}
}
50 changes: 50 additions & 0 deletions scripts/vs2017-write-boost-project-config-jam.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using "System";
using "System.Diagnostics";
using "System.IO";

string clPath;
try {
using (Process p = new Process()) {
p.StartInfo = new ProcessStartInfo("cl.exe") {
UseShellExecute = false,
CreateNoWindow = true,
};
p.Start();
clPath = p.MainModule.FileName;
}
} catch (Exception ex) {
Console.Error.WriteLine($"ERROR executing 'cl.exe':{Environment.NewLine}{ex}");
Environment.Exit(1);
}

if (string.IsNullOrWhiteSpace(clPath)) {
Console.Error.WriteLine("could not determine path of 'cl.exe");
Environment.Exit(1);
}
Console.WriteLine($"cl.exe found: [{clPath}]");

string pkgDir = Environment.GetEnvironmentVariable("PKGDIR");
if (string.IsNullOrWhiteSpace(pkgDir)) {
Console.Error.WriteLine("environment variable %PKGDIR% not set");
Environment.Exit(1);
}

string boostDir = Path.Combine(pkgDir, "boost");
if (!Directory.Exists(boostDir)) {
Console.Error.WriteLine("boost directory not found");
Environment.Exit(1);
}

string projectConfigJam = Path.Combine(boostDir, "project-config.jam");
Console.WriteLine($"about to write [{projectConfigJam}]");
try {
// new UTF8Encoding(false) false:without BOM
using (TextWriter tw = new StreamWriter(projectConfigJam, false, new UTF8Encoding(false))) {
tw.WriteLine($"import option ; {Environment.NewLine} ");
tw.WriteLine($"using msvc : 14.1 : {clPath} ; {Environment.NewLine} ");
tw.WriteLine($"option.set keep-going : false ; {Environment.NewLine} ");
}
} catch (Exception ex) {
Console.Error.WriteLine($"ERROR writing '{projectConfigJam}':{Environment.NewLine}{ex}");
Environment.Exit(1);
}
36 changes: 28 additions & 8 deletions settings.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
:: see bottom of this file

:::::::::::::: OVERRIDABLE PARAMETERS
set TARGET_ARCH=64
SET TOOLS_VERSION=14.0
SET TARGET_ARCH=64
SET MAPNIKBRANCH=master
SET BUILDMAPNIKPYTHON=0
SET MAPNIKGYPBRANCH=master
Expand All @@ -31,7 +32,7 @@ SET USE_LOCAL_MAPNIK_SDK=1
SET BUNDLE_RUNTIME=0

::try to stay in sync with https://github.com/mapnik/mapnik/blob/master/bootstrap.sh
SET BOOST_VERSION=63
SET BOOST_VERSION=64
SET ICU_VERSION=56.1
SET ICU_VERSION2=56_1
SET WEBP_VERSION=0.5.1
Expand Down Expand Up @@ -79,12 +80,12 @@ GOTO NEXT-ARG

::BAIL OUT IF DEBUG or VS2013
IF DEFINED BUILD_TYPE IF NOT "%BUILD_TYPE%"=="Release" (SET BUILD_TYPE=) && ECHO only Release builds supported! && SET EL=1 && GOTO ERROR
IF DEFINED TOOLS_VERSION IF NOT "%TOOLS_VERSION%"=="14.0" (SET TOOLS_VERSION=) && ECHO only Visual Studio 2015 supported! && SET EL=1 && GOTO ERROR
IF DEFINED TOOLS_VERSION IF NOT "%TOOLS_VERSION%"=="14.0" IF NOT "%TOOLS_VERSION%"=="15.0" (SET TOOLS_VERSION=) && ECHO only Visual Studio 2015^/2017 supported! && SET EL=1 && GOTO ERROR


:::::::::::::: FIXED PARAMETERS
SET BUILD_TYPE=Release
SET TOOLS_VERSION=14.0
IF NOT DEFINED TOOLS_VERSION SET TOOLS_VERSION=14.0
SET RUNTIME_VERSION=vcredist-VS2015


Expand Down Expand Up @@ -142,16 +143,35 @@ SET PATH=%CD%\tmp-bin;%PATH%
::make.exe that comes with gnu-win-tools cannot compile cairo
SET PATH=%CD%\tmp-bin\make;%PATH%

IF "%TOOLS_VERSION%"=="15.0" GOTO SETUPVS2017

ECHO ------- setting up for VS 2015
SET MSVC_VER=1900
SET PLATFORM_TOOLSET=v140
REM :: CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
REM :: >..\..\src\agg\process_markers_symbolizer.cpp(108): fatal error C1060: compiler is out of heap space [C:\dev2\mapnik-dependencies\packages\mapnik-3.x\mapnik-gyp\build\mapnik.vcxproj]
REM :: configure this Command Prompt window for 64-bit command-line builds that target x86 platforms
REM :: http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx
IF "%TARGET_ARCH%" == "32" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64_x86
IF "%TARGET_ARCH%" == "64" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
IF %ERRORLEVEL% NEQ 0 ECHO error calling vcvarsall.bat && GOTO ERROR
GOTO VSSETUPFINISHED

:SETUPVS2017
ECHO ------- setting up for VS 2017
REM test for VS2017 is _MSC_VER > 1900
REM VS2017 has '19xx' to indicate binary-compatible toolsets with VS2015
SET MSVC_VER=1911
SET PLATFORM_TOOLSET=v141
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO TODO: figure out how to get correct path
ECHO to VS2017 install
ECHO ^%VS150COMNTOOLS^% has the right path
ECHO only *AFTER* 'VsDevCmd.bat' has run
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IF "%TARGET_ARCH%" == "32" ECHO setting up for 32bit build && CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=amd64 -app_platform=Desktop
IF "%TARGET_ARCH%" == "64" ECHO setting up for 64bit build && CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -app_platform=Desktop
IF %ERRORLEVEL% NEQ 0 ECHO error calling VsDevCmd.bat && GOTO ERROR


:VSSETUPFINISHED


WHERE msbuild >NUL
IF %ERRORLEVEL% NEQ 0 ECHO msbuild not found && GOTO ERROR
Expand Down