summaryrefslogtreecommitdiff
path: root/cad/kicad
diff options
context:
space:
mode:
Diffstat (limited to 'cad/kicad')
-rw-r--r--cad/kicad/Makefile7
-rw-r--r--cad/kicad/distinfo62
-rw-r--r--cad/kicad/patches/patch-CMakeLists.txt22
-rw-r--r--cad/kicad/patches/patch-CMakeModules_Functions.cmake28
-rw-r--r--cad/kicad/patches/patch-CMakeModules_WriteVersionHeader.cmake30
-rw-r--r--cad/kicad/patches/patch-CMakeModules_config.h.cmake18
-rw-r--r--cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt24
-rw-r--r--cad/kicad/patches/patch-common_CMakeLists.txt34
-rw-r--r--cad/kicad/patches/patch-common_richio.cpp16
-rw-r--r--cad/kicad/patches/patch-common_tool_tool_manager.cpp19
-rw-r--r--cad/kicad/patches/patch-cvpcb_CMakeLists.txt14
-rw-r--r--cad/kicad/patches/patch-eeschema_CMakeLists.txt30
-rw-r--r--cad/kicad/patches/patch-eeschema_sch_component.cpp18
-rw-r--r--cad/kicad/patches/patch-eeschema_sch_sheet.cpp18
-rw-r--r--cad/kicad/patches/patch-gerbview_CMakeLists.txt14
-rw-r--r--cad/kicad/patches/patch-include-kicad_string.h14
-rw-r--r--cad/kicad/patches/patch-include_hashtables.h18
-rw-r--r--cad/kicad/patches/patch-include_kiway.h18
-rw-r--r--cad/kicad/patches/patch-include_tool_coroutine.h308
-rw-r--r--cad/kicad/patches/patch-include_tool_tool_base.h33
-rw-r--r--cad/kicad/patches/patch-include_tool_tool_interactive.h22
-rw-r--r--cad/kicad/patches/patch-pagelayout_editor_CMakeLists.txt14
-rw-r--r--cad/kicad/patches/patch-pcb_calculator_CMakeLists.txt14
-rw-r--r--cad/kicad/patches/patch-pcbnew_CMakeLists.txt30
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp18
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_track.cpp18
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_zone.cpp22
-rw-r--r--cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp114
-rw-r--r--cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp178
-rw-r--r--cad/kicad/patches/patch-pcbnew_xchgmod.cpp18
30 files changed, 778 insertions, 415 deletions
diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile
index ccf63b9127f..67a2282120a 100644
--- a/cad/kicad/Makefile
+++ b/cad/kicad/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.10 2016/08/03 10:22:33 adam Exp $
+# $NetBSD: Makefile,v 1.11 2016/09/08 09:32:28 bouyer Exp $
#
-V= 4.0.1
+V= 4.0.4
DISTNAME= kicad-${V}
-PKGREVISION= 1
+#PKGREVISION= 1
CATEGORIES= cad
MASTER_SITES= https://launchpad.net/kicad/4.0/${V}/+download/
EXTRACT_SUFX= .tar.xz
@@ -53,6 +53,7 @@ SUBST_SED.netbsd5= -e 's/fabsl/fabs/g'
.if !empty(PKGSRC_COMPILER:Mclang)
CXXFLAGS+= -Wno-error=non-pod-varargs
.endif
+CXXFLAGS+= -std=c++11
.include "../../devel/swig/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
diff --git a/cad/kicad/distinfo b/cad/kicad/distinfo
index 5e22a6a0e54..78b54a769bf 100644
--- a/cad/kicad/distinfo
+++ b/cad/kicad/distinfo
@@ -1,31 +1,33 @@
-$NetBSD: distinfo,v 1.4 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: distinfo,v 1.5 2016/09/08 09:32:28 bouyer Exp $
-SHA1 (kicad-4.0.1.tar.xz) = d46ffab97eff1420326515456fd2bd12d3a20fb8
-RMD160 (kicad-4.0.1.tar.xz) = 9d50f41675b2d06f56e5454951da8c7101163c30
-SHA512 (kicad-4.0.1.tar.xz) = da9d5ba7f6a323d80621304e368c9783febedf7c545f31a6ca69bddc8573e7c7aa127c774cc29e173eae947debd444b5a04b0483800d6c0d1303e32a714e3d26
-Size (kicad-4.0.1.tar.xz) = 10837804 bytes
-SHA1 (patch-CMakeLists.txt) = 3d5ed10c9ec1fb464312001ac5fb1de62073687c
-SHA1 (patch-CMakeModules_FindwxWidgets.cmake) = da39a3ee5e6b4b0d3255bfef95601890afd80709
-SHA1 (patch-CMakeModules_Functions.cmake) = e1ef61ae6c4675f70120fa65dd39525d315f5864
-SHA1 (patch-CMakeModules_WriteVersionHeader.cmake) = 9c494d470540fd48949ab0938281bfb5c8e02127
-SHA1 (patch-CMakeModules_config.h.cmake) = cdf0fcafdeef542db1b150ebbdf1ec5bacd459d7
-SHA1 (patch-bitmaps_png_CMakeLists.txt) = 1e41133cdcf540bfd183ffee08126037f16076e7
-SHA1 (patch-common_CMakeLists.txt) = 7d620b50e5651a19c9fdc4edb15eb51242c6c7e4
-SHA1 (patch-common_richio.cpp) = 3689e98ad76fef4b353c8cc0969a3312846cf5bd
-SHA1 (patch-cvpcb_CMakeLists.txt) = 45d77f698b96bb5ebc741dcb9fcb25f68e15c718
-SHA1 (patch-eeschema_CMakeLists.txt) = 3848fb41481b32300ebddbc8f9aa7f234cdfa6bc
-SHA1 (patch-eeschema_sch_component.cpp) = f7b3ffb7cecdb0f845e298c401e35cc85d17277c
-SHA1 (patch-eeschema_sch_sheet.cpp) = 22489b2100c8f20d47cd82aad27971351f678fc8
-SHA1 (patch-gerbview_CMakeLists.txt) = b9b3e5d001a442919a2f10b408ea091b71fcee9f
-SHA1 (patch-include-kicad_string.h) = 0fbc35c18d8f6042423b75967438078820271ea9
-SHA1 (patch-include_hashtables.h) = f7ba85f94ea33baac1476e930e1d07dab0864766
-SHA1 (patch-include_kiway.h) = 3e772f67f2b68a3eedae988300e51c9e15fc16b7
-SHA1 (patch-pagelayout_editor_CMakeLists.txt) = 25cde7e9f427cacb411f59faae4bc19be8b2ded2
-SHA1 (patch-pcb_calculator_CMakeLists.txt) = 0fb4ff4270bd2c53f9d6c7408ebe666a0d133af5
-SHA1 (patch-pcbnew_CMakeLists.txt) = 619acc6375c67be1a0f62fac0bc521871f82fd8b
-SHA1 (patch-pcbnew_class_edge_mod.cpp) = 6b09f52eaf94bca2ab502e2cf173f5bdfb88f20f
-SHA1 (patch-pcbnew_class_track.cpp) = 324793f496c14686f6905d4bf5facd10a83440a4
-SHA1 (patch-pcbnew_class_zone.cpp) = 3e492beba7bb76d0cb469221364de231e356221b
-SHA1 (patch-pcbnew_kicad_plugin.cpp) = 0998771aba506872e8227a72f8d6258d3c117d13
-SHA1 (patch-pcbnew_legacy_plugin.cpp) = e6f56a0e92a0a23f23640e44748c21218ce38e37
-SHA1 (patch-pcbnew_xchgmod.cpp) = 1c27a02cd3e51418fd8ce597e8455079892ac1a7
+SHA1 (kicad-4.0.4.tar.xz) = d0a124218f91cd40958ca0d68f8fe1f36d368cc3
+RMD160 (kicad-4.0.4.tar.xz) = 563b5168bd94b8c4a34f720fdb60e677c75f75fe
+SHA512 (kicad-4.0.4.tar.xz) = 230eb10d42e004c51d790db0d21dc08653944ca6cc4b728ad34b506f1a2b009c23369ddae417c8fafd420cb8045900dd4145cd1071867c759ab406dd12be3242
+Size (kicad-4.0.4.tar.xz) = 10672424 bytes
+SHA1 (patch-CMakeLists.txt) = 8b1b7f5fa321958e303dff44bdc2a612085f14b8
+SHA1 (patch-CMakeModules_Functions.cmake) = ef22da244c8ed43aec6c149ae6b05a8e464cf809
+SHA1 (patch-CMakeModules_WriteVersionHeader.cmake) = e442f73b466039ef3b08fd75a2b686377d26258d
+SHA1 (patch-CMakeModules_config.h.cmake) = 3988783a0058ed1b5489bc54d903cab2a724f755
+SHA1 (patch-bitmaps_png_CMakeLists.txt) = 1202783b39af4ddf83b9def91eb72b058f2da5bb
+SHA1 (patch-common_CMakeLists.txt) = 18446b8aa7abbfa8c8598dda0fa7d98216a6f123
+SHA1 (patch-common_richio.cpp) = 1e47e1ab5c2f0a2cee5b7bd20b47fc62930feda4
+SHA1 (patch-common_tool_tool_manager.cpp) = 242a0755b7aff280e5eb2b423a546f1dc4fdea2c
+SHA1 (patch-cvpcb_CMakeLists.txt) = 2eaa753054851efab680f402fbf808d78d84205a
+SHA1 (patch-eeschema_CMakeLists.txt) = a6dec7f84f5854ccedc2cae5e8c290ea3d41bfa3
+SHA1 (patch-eeschema_sch_component.cpp) = 2c858779f6359e2baa1fb06e599c6085b85d9c2d
+SHA1 (patch-eeschema_sch_sheet.cpp) = 83dd03910b1a7f78f46d3fc591bf5ec2670f2ce4
+SHA1 (patch-gerbview_CMakeLists.txt) = 817f7fa3f27e77e42d37e0df4fab1525cfb35053
+SHA1 (patch-include-kicad_string.h) = 16f2db87cab7716171360220a6c41d9a8ee5b8d1
+SHA1 (patch-include_hashtables.h) = 4b26adef481406b61c1c9cf660f69847aa76142d
+SHA1 (patch-include_kiway.h) = b8438a192222a4d70266ac612552fd0c76d2867c
+SHA1 (patch-include_tool_coroutine.h) = 635534de04d268a5718ec21e4f86c7dd20f1ffe1
+SHA1 (patch-include_tool_tool_base.h) = e679ef52ebf39f5a3234c71f57381569836b2df3
+SHA1 (patch-include_tool_tool_interactive.h) = 4ef06e99001ee6db6828d2285ca2b77a0604564d
+SHA1 (patch-pagelayout_editor_CMakeLists.txt) = 3e3d7bc448a3c9908ee4ed889b8e8c7bf3ac1b4a
+SHA1 (patch-pcb_calculator_CMakeLists.txt) = 97c34f8f2926b904275f36129a60fb7c523f506d
+SHA1 (patch-pcbnew_CMakeLists.txt) = 5898d0c2541ecdae4101906c5dc52250480260e6
+SHA1 (patch-pcbnew_class_edge_mod.cpp) = 3b868e0fd20bc091749f92cdb2124725df944104
+SHA1 (patch-pcbnew_class_track.cpp) = 6b11cba5b7c7f4b8b72a5a97263d95f2032a0854
+SHA1 (patch-pcbnew_kicad_plugin.cpp) = 6d5a1643bb234d8a6c0ddd3d7651c6360e59974d
+SHA1 (patch-pcbnew_legacy_plugin.cpp) = 594ed6627be91662991c19624d45e0d3e944f3bf
+SHA1 (patch-pcbnew_xchgmod.cpp) = d2f6750cd49ff25d73984d0eeb1141c5bf86c357
diff --git a/cad/kicad/patches/patch-CMakeLists.txt b/cad/kicad/patches/patch-CMakeLists.txt
index 8865c72527e..226bc640e65 100644
--- a/cad/kicad/patches/patch-CMakeLists.txt
+++ b/cad/kicad/patches/patch-CMakeLists.txt
@@ -1,16 +1,16 @@
-$NetBSD: patch-CMakeLists.txt,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
---- CMakeLists.txt.orig 2015-12-14 20:13:21.000000000 +0100
-+++ CMakeLists.txt 2015-12-14 20:15:13.000000000 +0100
+--- CMakeLists.txt.orig 2016-09-03 22:47:43.000000000 +0200
++++ CMakeLists.txt 2016-09-07 18:46:48.000000000 +0200
@@ -826,7 +826,7 @@
- # "make uninstall" rules
- #================================================
- configure_file(
-- "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
-+ "${PROJECT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY )
-
+ # "make uninstall" rules
+ #================================================
+ configure_file(
+- "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
++ "${PROJECT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY )
+
diff --git a/cad/kicad/patches/patch-CMakeModules_Functions.cmake b/cad/kicad/patches/patch-CMakeModules_Functions.cmake
index 40135e681a7..5c2a00cb222 100644
--- a/cad/kicad/patches/patch-CMakeModules_Functions.cmake
+++ b/cad/kicad/patches/patch-CMakeModules_Functions.cmake
@@ -1,19 +1,19 @@
-$NetBSD: patch-CMakeModules_Functions.cmake,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-CMakeModules_Functions.cmake,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
---- CMakeModules/Functions.cmake.orig 2015-12-14 20:13:21.000000000 +0100
-+++ CMakeModules/Functions.cmake 2015-12-14 20:14:40.000000000 +0100
+--- CMakeModules/Functions.cmake.orig 2016-09-03 22:47:43.000000000 +0200
++++ CMakeModules/Functions.cmake 2016-09-07 18:48:08.000000000 +0200
@@ -36,9 +36,9 @@
- -DinputFile=${inputFile}
- -DoutHeaderFile=${outHeaderFile}
- -DoutCppFile=${outCppFile}
-- -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/TokenList2DsnLexer.cmake
- DEPENDS ${inputFile}
-- ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
-+ ${PROJECT_SOURCE_DIR}/CMakeModules/TokenList2DsnLexer.cmake
- COMMENT "TokenList2DsnLexer.cmake creating:
- ${outHeaderFile} and
- ${outCppFile} from
+ -DinputFile=${inputFile}
+ -DoutHeaderFile=${outHeaderFile}
+ -DoutCppFile=${outCppFile}
+- -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/TokenList2DsnLexer.cmake
+ DEPENDS ${inputFile}
+- ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake
++ ${PROJECT_SOURCE_DIR}/CMakeModules/TokenList2DsnLexer.cmake
+ COMMENT "TokenList2DsnLexer.cmake creating:
+ ${outHeaderFile} and
+ ${outCppFile} from
diff --git a/cad/kicad/patches/patch-CMakeModules_WriteVersionHeader.cmake b/cad/kicad/patches/patch-CMakeModules_WriteVersionHeader.cmake
index 3eb3f0d2735..68bd3186436 100644
--- a/cad/kicad/patches/patch-CMakeModules_WriteVersionHeader.cmake
+++ b/cad/kicad/patches/patch-CMakeModules_WriteVersionHeader.cmake
@@ -1,4 +1,4 @@
-$NetBSD: patch-CMakeModules_WriteVersionHeader.cmake,v 1.1 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-CMakeModules_WriteVersionHeader.cmake,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
@@ -6,17 +6,17 @@ and containt multiple directories
--- CMakeModules/WriteVersionHeader.cmake.orig 2015-12-14 20:13:21.000000000 +0100
+++ CMakeModules/WriteVersionHeader.cmake 2015-12-14 20:14:58.000000000 +0100
@@ -32,12 +32,12 @@
- # Detect the appropiate VCS and set the version string.
- if( EXISTS "${SRC_PATH}/.bzr" )
- message( STATUS "Using Bazaar to determine build version string." )
-- include( ${CMAKE_MODULE_PATH}/CreateBzrVersionHeader.cmake )
-+ include( ${PROJECT_SOURCE_DIR}/CMakeModules/CreateBzrVersionHeader.cmake )
- create_bzr_version_header( ${SRC_PATH} )
- set( _wvh_version_str ${KICAD_BUILD_VERSION} )
- elseif( EXISTS "${SRC_PATH}/.git" )
- message( STATUS "Using Git to determine build version string." )
-- include( ${CMAKE_MODULE_PATH}/CreateGitVersionHeader.cmake )
-+ include( ${PROJECT_SOURCE_DIR}/CMakeModules/CreateGitVersionHeader.cmake )
- create_git_version_header( ${SRC_PATH} )
- set( _wvh_version_str ${KICAD_BUILD_VERSION} )
- endif()
+ # Detect the appropiate VCS and set the version string.
+ if( EXISTS "${SRC_PATH}/.bzr" )
+ message( STATUS "Using Bazaar to determine build version string." )
+- include( ${CMAKE_MODULE_PATH}/CreateBzrVersionHeader.cmake )
++ include( ${PROJECT_SOURCE_DIR}/CMakeModules/CreateBzrVersionHeader.cmake )
+ create_bzr_version_header( ${SRC_PATH} )
+ set( _wvh_version_str ${KICAD_BUILD_VERSION} )
+ elseif( EXISTS "${SRC_PATH}/.git" )
+ message( STATUS "Using Git to determine build version string." )
+- include( ${CMAKE_MODULE_PATH}/CreateGitVersionHeader.cmake )
++ include( ${PROJECT_SOURCE_DIR}/CMakeModules/CreateGitVersionHeader.cmake )
+ create_git_version_header( ${SRC_PATH} )
+ set( _wvh_version_str ${KICAD_BUILD_VERSION} )
+ endif()
diff --git a/cad/kicad/patches/patch-CMakeModules_config.h.cmake b/cad/kicad/patches/patch-CMakeModules_config.h.cmake
index 0bdb4eaedea..a322f775c36 100644
--- a/cad/kicad/patches/patch-CMakeModules_config.h.cmake
+++ b/cad/kicad/patches/patch-CMakeModules_config.h.cmake
@@ -1,15 +1,15 @@
-$NetBSD: patch-CMakeModules_config.h.cmake,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-CMakeModules_config.h.cmake,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Fix compile problem due to ciso646.
--- ./CMakeModules/config.h.cmake.orig 2015-11-29 20:57:27.000000000 +0100
+++ ./CMakeModules/config.h.cmake 2015-12-11 17:46:32.000000000 +0100
@@ -36,7 +36,7 @@
- #cmakedefine HAVE_ISO646_H
-
- #if defined( HAVE_ISO646_H )
--#include <iso646.h>
-+#include <ciso646>
- #endif
-
- #if defined( HAVE_STRCASECMP )
+ #cmakedefine HAVE_ISO646_H
+
+ #if defined( HAVE_ISO646_H )
+-#include <iso646.h>
++#include <ciso646>
+ #endif
+
+ #if defined( HAVE_STRCASECMP )
diff --git a/cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt b/cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt
index 7bdf3337559..529d79f083e 100644
--- a/cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt
+++ b/cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt
@@ -1,4 +1,4 @@
-$NetBSD: patch-bitmaps_png_CMakeLists.txt,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-bitmaps_png_CMakeLists.txt,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
@@ -6,14 +6,14 @@ and containt multiple directories
--- bitmaps_png/CMakeLists.txt.orig 2015-12-14 20:13:21.000000000 +0100
+++ bitmaps_png/CMakeLists.txt 2015-12-14 20:14:25.000000000 +0100
@@ -636,9 +636,9 @@
- OUTPUT ${outFile}
-
- COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile} -DoutCppFile=${outFile}
-- -P ${CMAKE_MODULE_PATH}/PNG2cpp.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/PNG2cpp.cmake
-
-- DEPENDS ${inputFile} ${CMAKE_MODULE_PATH}/PNG2cpp.cmake
-+ DEPENDS ${inputFile} ${PROJECT_SOURCE_DIR}/CMakeModules/PNG2cpp.cmake
- COMMENT "Creating ${outFile}"
- )
- endfunction()
+ OUTPUT ${outFile}
+
+ COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile} -DoutCppFile=${outFile}
+- -P ${CMAKE_MODULE_PATH}/PNG2cpp.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/PNG2cpp.cmake
+
+- DEPENDS ${inputFile} ${CMAKE_MODULE_PATH}/PNG2cpp.cmake
++ DEPENDS ${inputFile} ${PROJECT_SOURCE_DIR}/CMakeModules/PNG2cpp.cmake
+ COMMENT "Creating ${outFile}"
+ )
+ endfunction()
diff --git a/cad/kicad/patches/patch-common_CMakeLists.txt b/cad/kicad/patches/patch-common_CMakeLists.txt
index 175ae93d7e4..bee779a1467 100644
--- a/cad/kicad/patches/patch-common_CMakeLists.txt
+++ b/cad/kicad/patches/patch-common_CMakeLists.txt
@@ -1,4 +1,4 @@
-$NetBSD: patch-common_CMakeLists.txt,v 1.1 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-common_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
@@ -6,20 +6,20 @@ and containt multiple directories
--- common/CMakeLists.txt.orig 2015-12-14 20:13:21.000000000 +0100
+++ common/CMakeLists.txt 2015-12-14 20:16:14.000000000 +0100
@@ -17,7 +17,7 @@
- COMMAND ${CMAKE_COMMAND}
- -DinputFiles="${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.vert\\;${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.frag"
- -DoutputFile="shader_src.h"
-- -P ${CMAKE_MODULE_PATH}/Shaders.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Shaders.cmake
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/common/gal/opengl
- COMMENT "Generating headers containing GLSL source code"
- )
+ COMMAND ${CMAKE_COMMAND}
+ -DinputFiles="${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.vert\\;${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.frag"
+ -DoutputFile="shader_src.h"
+- -P ${CMAKE_MODULE_PATH}/Shaders.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Shaders.cmake
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/common/gal/opengl
+ COMMENT "Generating headers containing GLSL source code"
+ )
@@ -127,7 +127,7 @@
- -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h
- -DSRC_PATH=${PROJECT_SOURCE_DIR}
- -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
-- -P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/WriteVersionHeader.cmake
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Generating version string header"
- )
+ -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h
+ -DSRC_PATH=${PROJECT_SOURCE_DIR}
+ -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
+- -P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/WriteVersionHeader.cmake
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Generating version string header"
+ )
diff --git a/cad/kicad/patches/patch-common_richio.cpp b/cad/kicad/patches/patch-common_richio.cpp
index 94eb1e8b9ea..d4e18dc4b8e 100644
--- a/cad/kicad/patches/patch-common_richio.cpp
+++ b/cad/kicad/patches/patch-common_richio.cpp
@@ -1,4 +1,4 @@
-$NetBSD: patch-common_richio.cpp,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-common_richio.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Fix non-portable use of setvbuf()
Reported upstream as bug id 1280897
@@ -6,11 +6,11 @@ Reported upstream as bug id 1280897
--- common/richio.cpp.orig 2015-12-11 17:40:20.000000000 +0100
+++ common/richio.cpp 2015-12-11 17:39:05.000000000 +0100
@@ -215,7 +215,7 @@
- {
- if( doOwn && ftell( aFile ) == 0L )
- {
--#ifndef __WXMAC__
+ {
+ if( doOwn && ftell( aFile ) == 0L )
+ {
+-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && !defined(__NetBSD__)
- setvbuf( fp, NULL, _IOFBF, BUFSIZ * 8 );
- #endif
- }
+ setvbuf( fp, NULL, _IOFBF, BUFSIZ * 8 );
+ #endif
+ }
diff --git a/cad/kicad/patches/patch-common_tool_tool_manager.cpp b/cad/kicad/patches/patch-common_tool_tool_manager.cpp
new file mode 100644
index 00000000000..761d35cb6a9
--- /dev/null
+++ b/cad/kicad/patches/patch-common_tool_tool_manager.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-common_tool_tool_manager.cpp,v 1.1 2016/09/08 09:32:28 bouyer Exp $
+Fix for newer boost, from upstream developement branch
+
+--- common/tool/tool_manager.cpp.orig 2016-09-03 22:47:46.000000000 +0200
++++ common/tool/tool_manager.cpp 2016-09-07 19:03:09.000000000 +0200
+@@ -542,11 +542,11 @@
+ if( st->cofunc )
+ st->Push();
+
++ st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
++
+ // as the state changes, the transition table has to be set up again
+ st->transitions.clear();
+
+- st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
+-
+ // got match? Run the handler.
+ st->cofunc->Call( aEvent );
+
diff --git a/cad/kicad/patches/patch-cvpcb_CMakeLists.txt b/cad/kicad/patches/patch-cvpcb_CMakeLists.txt
index 344806f4378..08ed0552c16 100644
--- a/cad/kicad/patches/patch-cvpcb_CMakeLists.txt
+++ b/cad/kicad/patches/patch-cvpcb_CMakeLists.txt
@@ -1,16 +1,16 @@
-$NetBSD: patch-cvpcb_CMakeLists.txt,v 1.1 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-cvpcb_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- cvpcb/CMakeLists.txt.orig 2015-12-16 14:47:20.000000000 +0100
+++ cvpcb/CMakeLists.txt 2015-12-16 14:49:49.000000000 +0100
@@ -173,6 +173,9 @@
- set_target_properties( cvpcb_kiface PROPERTIES
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_cvpcb.kiface.map" )
- endif()
+ set_target_properties( cvpcb_kiface PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_cvpcb.kiface.map" )
+ endif()
+
+set_property(TARGET cvpcb_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # these 2 binaries are a matched set, keep them together:
- if( APPLE )
+
+ # these 2 binaries are a matched set, keep them together:
+ if( APPLE )
diff --git a/cad/kicad/patches/patch-eeschema_CMakeLists.txt b/cad/kicad/patches/patch-eeschema_CMakeLists.txt
index 3d522acd246..6346b197b00 100644
--- a/cad/kicad/patches/patch-eeschema_CMakeLists.txt
+++ b/cad/kicad/patches/patch-eeschema_CMakeLists.txt
@@ -1,4 +1,4 @@
-$NetBSD: patch-eeschema_CMakeLists.txt,v 1.1 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-eeschema_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
@@ -8,21 +8,21 @@ Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- eeschema/CMakeLists.txt.orig 2015-12-09 17:21:54.000000000 +0100
+++ eeschema/CMakeLists.txt 2015-12-16 14:50:58.000000000 +0100
@@ -199,7 +199,7 @@
- COMMAND ${CMAKE_COMMAND}
- -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
- -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-- -P ${CMAKE_MODULE_PATH}/Html2C.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Html2C.cmake
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
- COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
- from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html"
+ COMMAND ${CMAKE_COMMAND}
+ -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
+ -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
+- -P ${CMAKE_MODULE_PATH}/Html2C.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Html2C.cmake
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
+ COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
+ from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html"
@@ -278,6 +278,9 @@
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=eeschema.map"
- )
- endif()
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=eeschema.map"
+ )
+ endif()
+
+set_property(TARGET eeschema_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # these 2 binaries are a matched set, keep them together:
- if( APPLE )
+
+ # these 2 binaries are a matched set, keep them together:
+ if( APPLE )
diff --git a/cad/kicad/patches/patch-eeschema_sch_component.cpp b/cad/kicad/patches/patch-eeschema_sch_component.cpp
index 09807849162..c03b2c4a033 100644
--- a/cad/kicad/patches/patch-eeschema_sch_component.cpp
+++ b/cad/kicad/patches/patch-eeschema_sch_component.cpp
@@ -1,17 +1,17 @@
-$NetBSD: patch-eeschema_sch_component.cpp,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-eeschema_sch_component.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- eeschema/sch_component.cpp.orig 2015-12-11 17:52:09.000000000 +0100
+++ eeschema/sch_component.cpp 2015-12-11 17:52:12.000000000 +0100
@@ -1240,7 +1240,9 @@
-
- if( line[0] == 'U' )
- {
-- sscanf( line + 1, "%d %d %lX", &m_unit, &m_convert, &m_TimeStamp );
+
+ if( line[0] == 'U' )
+ {
+- sscanf( line + 1, "%d %d %lX", &m_unit, &m_convert, &m_TimeStamp );
+ u_long tmstp;
-+ sscanf( line + 1, "%d %d %lX", &m_unit, &m_convert, &tmstp );
++ sscanf( line + 1, "%d %d %lX", &m_unit, &m_convert, &tmstp );
+ tmstp = m_TimeStamp;
- }
- else if( line[0] == 'P' )
- {
+ }
+ else if( line[0] == 'P' )
+ {
diff --git a/cad/kicad/patches/patch-eeschema_sch_sheet.cpp b/cad/kicad/patches/patch-eeschema_sch_sheet.cpp
index e166ae8aa6e..6e00d9746bc 100644
--- a/cad/kicad/patches/patch-eeschema_sch_sheet.cpp
+++ b/cad/kicad/patches/patch-eeschema_sch_sheet.cpp
@@ -1,17 +1,17 @@
-$NetBSD: patch-eeschema_sch_sheet.cpp,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-eeschema_sch_sheet.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- eeschema/sch_sheet.cpp.orig 2015-12-11 17:53:27.000000000 +0100
+++ eeschema/sch_sheet.cpp 2015-12-11 17:54:26.000000000 +0100
@@ -219,7 +219,9 @@
-
- if( ((char*)aLine)[0] == 'U' )
- {
-- sscanf( ((char*)aLine) + 1, "%lX", &m_TimeStamp );
+
+ if( ((char*)aLine)[0] == 'U' )
+ {
+- sscanf( ((char*)aLine) + 1, "%lX", &m_TimeStamp );
+ u_long tmstp;
-+ sscanf( ((char*)aLine) + 1, "%lX", &tmstp );
++ sscanf( ((char*)aLine) + 1, "%lX", &tmstp );
+ m_TimeStamp = tmstp;
- if( m_TimeStamp == 0 ) // zero is not unique!
- SetTimeStamp( GetNewTimeStamp() );
- continue;
+ if( m_TimeStamp == 0 ) // zero is not unique!
+ SetTimeStamp( GetNewTimeStamp() );
+ continue;
diff --git a/cad/kicad/patches/patch-gerbview_CMakeLists.txt b/cad/kicad/patches/patch-gerbview_CMakeLists.txt
index 6a966d2e2b9..22734a6e2a8 100644
--- a/cad/kicad/patches/patch-gerbview_CMakeLists.txt
+++ b/cad/kicad/patches/patch-gerbview_CMakeLists.txt
@@ -1,16 +1,16 @@
-$NetBSD: patch-gerbview_CMakeLists.txt,v 1.1 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-gerbview_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- gerbview/CMakeLists.txt.orig 2015-12-16 14:47:22.000000000 +0100
+++ gerbview/CMakeLists.txt 2015-12-16 14:51:07.000000000 +0100
@@ -143,6 +143,9 @@
- set_target_properties( gerbview_kiface PROPERTIES
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_gerbview.kiface.map" )
- endif()
+ set_target_properties( gerbview_kiface PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_gerbview.kiface.map" )
+ endif()
+
+set_property(TARGET gerbview_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # if building gerbview, then also build gerbview_kiface if out of date.
- add_dependencies( gerbview gerbview_kiface )
+
+ # if building gerbview, then also build gerbview_kiface if out of date.
+ add_dependencies( gerbview gerbview_kiface )
diff --git a/cad/kicad/patches/patch-include-kicad_string.h b/cad/kicad/patches/patch-include-kicad_string.h
index 69314df04ce..66a2d17aedc 100644
--- a/cad/kicad/patches/patch-include-kicad_string.h
+++ b/cad/kicad/patches/patch-include-kicad_string.h
@@ -1,14 +1,14 @@
-$NetBSD: patch-include-kicad_string.h,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-include-kicad_string.h,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Standard string library should be included as well.
--- include/kicad_string.h.orig 2015-12-11 17:57:10.000000000 +0100
+++ include/kicad_string.h 2015-12-11 17:57:22.000000000 +0100
@@ -30,6 +30,7 @@
- #ifndef KICAD_STRING_H_
- #define KICAD_STRING_H_
-
+ #ifndef KICAD_STRING_H_
+ #define KICAD_STRING_H_
+
+#include <string>
- #include <wx/string.h>
- #include <wx/filename.h>
-
+ #include <wx/string.h>
+ #include <wx/filename.h>
+
diff --git a/cad/kicad/patches/patch-include_hashtables.h b/cad/kicad/patches/patch-include_hashtables.h
index 9278a2fbd81..ed8a6bfca8a 100644
--- a/cad/kicad/patches/patch-include_hashtables.h
+++ b/cad/kicad/patches/patch-include_hashtables.h
@@ -1,13 +1,13 @@
-$NetBSD: patch-include_hashtables.h,v 1.2 2016/02/03 19:34:33 bouyer Exp $
+$NetBSD: patch-include_hashtables.h,v 1.3 2016/09/08 09:32:28 bouyer Exp $
--- include/hashtables.h.orig 2015-12-11 17:59:12.000000000 +0100
+++ include/hashtables.h 2015-12-11 17:59:18.000000000 +0100
@@ -48,7 +48,7 @@
- #elif 1 // boost::unordered_map
-
- // fix a compile bug at line 97 of boost/detail/container_fwd.hpp
--#define BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD
-+// #define BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD
-
- #include <boost/unordered_map.hpp>
-
+ #elif 1 // boost::unordered_map
+
+ // fix a compile bug at line 97 of boost/detail/container_fwd.hpp
+-#define BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD
++// #define BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD
+
+ #include <boost/unordered_map.hpp>
+
diff --git a/cad/kicad/patches/patch-include_kiway.h b/cad/kicad/patches/patch-include_kiway.h
index 81ffdbf8635..86015072082 100644
--- a/cad/kicad/patches/patch-include_kiway.h
+++ b/cad/kicad/patches/patch-include_kiway.h
@@ -1,13 +1,13 @@
-$NetBSD: patch-include_kiway.h,v 1.1 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-include_kiway.h,v 1.2 2016/09/08 09:32:28 bouyer Exp $
--- include/kiway.h.orig 2015-12-14 21:13:18.000000000 +0100
+++ include/kiway.h 2015-12-14 21:13:39.000000000 +0100
@@ -114,7 +114,7 @@
- // be mangled.
- #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1"
-
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
- #define LIB_ENV_VAR wxT( "LD_LIBRARY_PATH" )
- #elif defined(__WXMAC__)
- #define LIB_ENV_VAR wxT( "DYLD_LIBRARY_PATH" )
+ // be mangled.
+ #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1"
+
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #define LIB_ENV_VAR wxT( "LD_LIBRARY_PATH" )
+ #elif defined(__WXMAC__)
+ #define LIB_ENV_VAR wxT( "DYLD_LIBRARY_PATH" )
diff --git a/cad/kicad/patches/patch-include_tool_coroutine.h b/cad/kicad/patches/patch-include_tool_coroutine.h
new file mode 100644
index 00000000000..43d97a17ebf
--- /dev/null
+++ b/cad/kicad/patches/patch-include_tool_coroutine.h
@@ -0,0 +1,308 @@
+$NetBSD: patch-include_tool_coroutine.h,v 1.1 2016/09/08 09:32:28 bouyer Exp $
+Fix for newer boost, from upstream developement branch
+
+--- include/tool/coroutine.h.orig 2016-09-07 19:04:03.000000000 +0200
++++ include/tool/coroutine.h 2016-09-07 19:03:54.000000000 +0200
+@@ -3,6 +3,7 @@
+ *
+ * Copyright (C) 2013 CERN
+ * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
++ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -27,10 +28,15 @@
+
+ #include <cstdlib>
+
+-#include <boost/context/fcontext.hpp>
+ #include <boost/version.hpp>
++#include <type_traits>
+
+-#include "delegate.h"
++#if BOOST_VERSION <= 106000
++#include <boost/context/fcontext.hpp>
++#else
++#include <boost/context/execution_context.hpp>
++#include <boost/context/protected_fixedsize_stack.hpp>
++#endif
+
+ /**
+ * Class COROUNTINE.
+@@ -53,13 +59,12 @@
+ * See coroutine_example.cpp for sample code.
+ */
+
+-template <class ReturnType, class ArgType>
++template <typename ReturnType, typename ArgType>
+ class COROUTINE
+ {
+ public:
+ COROUTINE() :
+- m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ),
+- m_running( false )
++ COROUTINE( nullptr )
+ {
+ }
+
+@@ -69,8 +74,7 @@
+ */
+ template <class T>
+ COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) :
+- m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ),
+- m_stackSize( c_defaultStackSize ), m_running( false )
++ COROUTINE( std::bind( ptr, object, std::placeholders::_1 ) )
+ {
+ }
+
+@@ -78,9 +82,15 @@
+ * Constructor
+ * Creates a coroutine from a delegate object
+ */
+- COROUTINE( DELEGATE<ReturnType, ArgType> aEntry ) :
+- m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ),
+- m_stackSize( c_defaultStackSize ), m_running( false )
++ COROUTINE( std::function<ReturnType(ArgType)> aEntry ) :
++ m_func( std::move( aEntry ) ),
++ m_running( false ),
++#if BOOST_VERSION <= 106000
++ m_stack( nullptr ),
++ m_stackSize( c_defaultStackSize ),
++#endif
++ m_caller( nullptr ),
++ m_callee( nullptr )
+ {
+ // Avoid not initialized members, and make static analysers quiet
+ m_args = 0;
+@@ -89,18 +99,26 @@
+
+ ~COROUTINE()
+ {
+- if( m_saved )
+- delete m_saved;
+-
+ #if BOOST_VERSION >= 105600
+- if( m_self )
+- delete m_self;
++ delete m_callee;
+ #endif
+
++#if BOOST_VERSION <= 106000
++ delete m_caller;
++
+ if( m_stack )
+ free( m_stack );
++#endif
+ }
+
++private:
++#if BOOST_VERSION <= 106000
++ using context_type = boost::context::fcontext_t;
++#else
++ using context_type = boost::context::execution_context<COROUTINE*>;
++#endif
++
++public:
+ /**
+ * Function Yield()
+ *
+@@ -110,7 +128,12 @@
+ */
+ void Yield()
+ {
+- jump( m_self, m_saved, 0 );
++#if BOOST_VERSION <= 106000
++ jump( m_callee, m_caller, false );
++#else
++ auto result = (*m_caller)( this );
++ *m_caller = std::move( std::get<0>( result ) );
++#endif
+ }
+
+ /**
+@@ -122,7 +145,11 @@
+ void Yield( ReturnType& aRetVal )
+ {
+ m_retVal = aRetVal;
+- jump( m_self, m_saved, 0 );
++#if BOOST_VERSION <= 106000
++ jump( m_callee, m_caller, false );
++#else
++ m_caller( this );
++#endif
+ }
+
+ /**
+@@ -130,9 +157,9 @@
+ *
+ * Defines the entry point for the coroutine, if not set in the constructor.
+ */
+- void SetEntry( DELEGATE<ReturnType, ArgType> aEntry )
++ void SetEntry( std::function<ReturnType(ArgType)> aEntry )
+ {
+- m_func = aEntry;
++ m_func = std::move( aEntry );
+ }
+
+ /* Function Call()
+@@ -143,6 +170,10 @@
+ */
+ bool Call( ArgType aArgs )
+ {
++ assert( m_callee == NULL );
++ assert( m_caller == NULL );
++
++#if BOOST_VERSION <= 106000
+ // fixme: Clean up stack stuff. Add a guard
+ m_stack = malloc( c_defaultStackSize );
+
+@@ -151,22 +182,32 @@
+
+ // correct the stack size
+ m_stackSize -= ( (size_t) m_stack + m_stackSize - (size_t) sp );
+-
+- assert( m_self == NULL );
+- assert( m_saved == NULL );
++#endif
+
+ m_args = &aArgs;
+-#if BOOST_VERSION >= 105600
+- m_self = new boost::context::fcontext_t();
+- *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
++
++#if BOOST_VERSION < 105600
++ m_callee = boost::context::make_fcontext( sp, m_stackSize, callerStub );
++#elif BOOST_VERSION <= 106000
++ m_callee = new context_type( boost::context::make_fcontext( sp, m_stackSize, callerStub ) );
+ #else
+- m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
++ m_callee = new context_type( std::allocator_arg_t(),
++ boost::context::protected_fixedsize_stack( c_defaultStackSize ), &COROUTINE::callerStub );
++#endif
++
++#if BOOST_VERSION <= 106000
++ m_caller = new context_type();
+ #endif
+- m_saved = new boost::context::fcontext_t();
+
+ m_running = true;
++
+ // off we go!
+- jump( m_saved, m_self, reinterpret_cast<intptr_t>( this ) );
++#if BOOST_VERSION <= 106000
++ jump( m_caller, m_callee, reinterpret_cast<intptr_t>( this ) );
++#else
++ auto result = (*m_callee)( this );
++ *m_callee = std::move( std::get<0>( result ) );
++#endif
+ return m_running;
+ }
+
+@@ -179,7 +220,12 @@
+ */
+ bool Resume()
+ {
+- jump( m_saved, m_self, 0 );
++#if BOOST_VERSION <= 106000
++ jump( m_caller, m_callee, false );
++#else
++ auto result = (*m_callee)( this );
++ *m_callee = std::move( std::get<0>( result ) );
++#endif
+
+ return m_running;
+ }
+@@ -208,61 +254,66 @@
+ static const int c_defaultStackSize = 2000000; // fixme: make configurable
+
+ /* real entry point of the coroutine */
++#if BOOST_VERSION <= 106000
+ static void callerStub( intptr_t aData )
++#else
++ static context_type callerStub( context_type caller, COROUTINE* cor )
++#endif
+ {
+ // get pointer to self
++#if BOOST_VERSION <= 106000
+ COROUTINE<ReturnType, ArgType>* cor = reinterpret_cast<COROUTINE<ReturnType, ArgType>*>( aData );
++#else
++ cor->m_caller = &caller;
++#endif
+
+ // call the coroutine method
+- cor->m_retVal = cor->m_func( *cor->m_args );
++ cor->m_retVal = cor->m_func( *( cor->m_args ) );
+ cor->m_running = false;
+
+ // go back to wherever we came from.
+- jump( cor->m_self, cor->m_saved, 0 ); // reinterpret_cast<intptr_t>( this ));
++#if BOOST_VERSION <= 106000
++ jump( cor->m_callee, cor->m_caller, 0 );
++#else
++ return caller;
++#endif
+ }
+
+ ///> Wrapper for jump_fcontext to assure compatibility between different boost versions
+- static inline intptr_t jump(boost::context::fcontext_t* aOld, boost::context::fcontext_t* aNew,
++#if BOOST_VERSION <= 106000
++ static inline intptr_t jump( context_type* aOld, context_type* aNew,
+ intptr_t aP, bool aPreserveFPU = true )
+ {
+-#if BOOST_VERSION >= 105600
+- return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
+-#else
++#if BOOST_VERSION < 105600
+ return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
++#else
++ return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
+ #endif
+ }
++#endif
+
+- template <typename T>
+- struct strip_ref
+- {
+- typedef T result;
+- };
++ std::function<ReturnType(ArgType)> m_func;
+
+- template <typename T>
+- struct strip_ref<T&>
+- {
+- typedef T result;
+- };
++ bool m_running;
+
+- DELEGATE<ReturnType, ArgType> m_func;
++#if BOOST_VERSION <= 106000
++ ///< coroutine stack
++ void* m_stack;
++
++ size_t m_stackSize;
++#endif
+
+ ///< pointer to coroutine entry arguments. Stripped of references
+ ///< to avoid compiler errors.
+- typename strip_ref<ArgType>::result* m_args;
++ typename std::remove_reference<ArgType>::type* m_args;
++
+ ReturnType m_retVal;
+
+ ///< saved caller context
+- boost::context::fcontext_t* m_saved;
++ context_type* m_caller;
+
+ ///< saved coroutine context
+- boost::context::fcontext_t* m_self;
+-
+- ///< coroutine stack
+- void* m_stack;
+-
+- size_t m_stackSize;
+-
+- bool m_running;
++ context_type* m_callee;
+ };
+
+ #endif
diff --git a/cad/kicad/patches/patch-include_tool_tool_base.h b/cad/kicad/patches/patch-include_tool_tool_base.h
new file mode 100644
index 00000000000..eea8f5a7556
--- /dev/null
+++ b/cad/kicad/patches/patch-include_tool_tool_base.h
@@ -0,0 +1,33 @@
+$NetBSD: patch-include_tool_tool_base.h,v 1.1 2016/09/08 09:32:28 bouyer Exp $
+Fix for newer boost, from upstream developement branch
+
+--- include/tool/tool_base.h.orig 2016-09-03 22:47:50.000000000 +0200
++++ include/tool/tool_base.h 2016-09-07 19:03:09.000000000 +0200
+@@ -3,6 +3,7 @@
+ *
+ * Copyright (C) 2013 CERN
+ * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
++ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -31,7 +32,7 @@
+ #include <tool/tool_event.h>
+ #include <tool/tool_settings.h>
+
+-#include <tool/delegate.h>
++#include <functional>
+
+ class EDA_ITEM;
+ class TOOL_MANAGER;
+@@ -53,7 +54,9 @@
+
+ /// Unique identifier for tools
+ typedef int TOOL_ID;
+-typedef DELEGATE<int, const TOOL_EVENT&> TOOL_STATE_FUNC;
++
++using TOOL_STATE_FUNC = std::function<int(const TOOL_EVENT&)>;
++
+
+ /**
+ * Class TOOL_BASE
diff --git a/cad/kicad/patches/patch-include_tool_tool_interactive.h b/cad/kicad/patches/patch-include_tool_tool_interactive.h
new file mode 100644
index 00000000000..82a7e5ef4da
--- /dev/null
+++ b/cad/kicad/patches/patch-include_tool_tool_interactive.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-include_tool_tool_interactive.h,v 1.1 2016/09/08 09:32:28 bouyer Exp $
+Fix for newer boost, from upstream developement branch
+
+--- include/tool/tool_interactive.h.orig 2016-09-03 22:47:50.000000000 +0200
++++ include/tool/tool_interactive.h 2016-09-07 19:03:09.000000000 +0200
+@@ -3,6 +3,7 @@
+ *
+ * Copyright (C) 2013 CERN
+ * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
++ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -113,7 +114,7 @@
+ void TOOL_INTERACTIVE::Go( int (T::* aStateFunc)( const TOOL_EVENT& ),
+ const TOOL_EVENT_LIST& aConditions )
+ {
+- TOOL_STATE_FUNC sptr( static_cast<T*>( this ), aStateFunc );
++ TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
+
+ goInternal( sptr, aConditions );
+ }
diff --git a/cad/kicad/patches/patch-pagelayout_editor_CMakeLists.txt b/cad/kicad/patches/patch-pagelayout_editor_CMakeLists.txt
index c469ce1692b..0857e80082d 100644
--- a/cad/kicad/patches/patch-pagelayout_editor_CMakeLists.txt
+++ b/cad/kicad/patches/patch-pagelayout_editor_CMakeLists.txt
@@ -1,16 +1,16 @@
-$NetBSD: patch-pagelayout_editor_CMakeLists.txt,v 1.1 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pagelayout_editor_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- pagelayout_editor/CMakeLists.txt.orig 2015-12-16 14:47:22.000000000 +0100
+++ pagelayout_editor/CMakeLists.txt 2015-12-16 14:51:27.000000000 +0100
@@ -117,6 +117,9 @@
- set_target_properties( pl_editor_kiface PROPERTIES
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" )
- endif()
+ set_target_properties( pl_editor_kiface PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" )
+ endif()
+
+set_property(TARGET pl_editor_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # if building pl_editor, then also build pl_editor_kiface if out of date.
- add_dependencies( pl_editor pl_editor_kiface )
+
+ # if building pl_editor, then also build pl_editor_kiface if out of date.
+ add_dependencies( pl_editor pl_editor_kiface )
diff --git a/cad/kicad/patches/patch-pcb_calculator_CMakeLists.txt b/cad/kicad/patches/patch-pcb_calculator_CMakeLists.txt
index e7be655e60a..b387c82f201 100644
--- a/cad/kicad/patches/patch-pcb_calculator_CMakeLists.txt
+++ b/cad/kicad/patches/patch-pcb_calculator_CMakeLists.txt
@@ -1,16 +1,16 @@
-$NetBSD: patch-pcb_calculator_CMakeLists.txt,v 1.1 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcb_calculator_CMakeLists.txt,v 1.2 2016/09/08 09:32:28 bouyer Exp $
Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- pcb_calculator/CMakeLists.txt.orig 2015-12-16 14:47:22.000000000 +0100
+++ pcb_calculator/CMakeLists.txt 2015-12-16 14:51:42.000000000 +0100
@@ -99,6 +99,9 @@
- set_target_properties( pcb_calculator_kiface PROPERTIES
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcb_calculator.kiface.map" )
- endif()
+ set_target_properties( pcb_calculator_kiface PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pcb_calculator.kiface.map" )
+ endif()
+
+set_property(TARGET pcb_calculator_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # if building pcb_calculator, then also build pcb_calculator_kiface if out of date.
- add_dependencies( pcb_calculator pcb_calculator_kiface )
+
+ # if building pcb_calculator, then also build pcb_calculator_kiface if out of date.
+ add_dependencies( pcb_calculator pcb_calculator_kiface )
diff --git a/cad/kicad/patches/patch-pcbnew_CMakeLists.txt b/cad/kicad/patches/patch-pcbnew_CMakeLists.txt
index 0bbbacdcd18..3e1bae1ea4f 100644
--- a/cad/kicad/patches/patch-pcbnew_CMakeLists.txt
+++ b/cad/kicad/patches/patch-pcbnew_CMakeLists.txt
@@ -1,4 +1,4 @@
-$NetBSD: patch-pcbnew_CMakeLists.txt,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_CMakeLists.txt,v 1.3 2016/09/08 09:32:28 bouyer Exp $
Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
and containt multiple directories
@@ -8,21 +8,21 @@ Force proper LDFLAGS for MODULE, as cmake doens't set rpath for theses
--- pcbnew/CMakeLists.txt.orig 2015-12-09 17:21:54.000000000 +0100
+++ pcbnew/CMakeLists.txt 2015-12-16 14:52:03.000000000 +0100
@@ -521,7 +521,7 @@
- COMMAND ${CMAKE_COMMAND}
- -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
- -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
-- -P ${CMAKE_MODULE_PATH}/Html2C.cmake
-+ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Html2C.cmake
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
- COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
- from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html"
+ COMMAND ${CMAKE_COMMAND}
+ -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
+ -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
+- -P ${CMAKE_MODULE_PATH}/Html2C.cmake
++ -P ${PROJECT_SOURCE_DIR}/CMakeModules/Html2C.cmake
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
+ COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
+ from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html"
@@ -613,6 +613,9 @@
- LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map"
- )
- endif()
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pcbnew.map"
+ )
+ endif()
+
+set_property(TARGET pcbnew_kiface APPEND_STRING
+ PROPERTY LINK_FLAGS " $ENV{LDFLAGS}")
-
- # if building pcbnew, then also build pcbnew_kiface if out of date.
- add_dependencies( pcbnew pcbnew_kiface )
+
+ # if building pcbnew, then also build pcbnew_kiface if out of date.
+ add_dependencies( pcbnew pcbnew_kiface )
diff --git a/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp b/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp
index 11f83640348..80cec47cf55 100644
--- a/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp
+++ b/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp
@@ -1,15 +1,15 @@
-$NetBSD: patch-pcbnew_class_edge_mod.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_class_edge_mod.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- pcbnew/class_edge_mod.cpp.orig 2015-12-11 18:00:51.000000000 +0100
+++ pcbnew/class_edge_mod.cpp 2015-12-11 18:01:09.000000000 +0100
@@ -259,7 +259,7 @@
-
- aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), module->GetReference(), DARKCYAN ) );
- aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->GetValue(), BLUE ) );
-- msg.Printf( wxT( "%8.8lX" ), module->GetTimeStamp() );
-+ msg.Printf( wxT( "%8.8lX" ), (u_long)module->GetTimeStamp() );
- aList.push_back( MSG_PANEL_ITEM( _( "TimeStamp" ), msg, BROWN ) );
- aList.push_back( MSG_PANEL_ITEM( _( "Footprint Layer" ),
- module->GetLayerName(), RED ) );
+
+ aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), module->GetReference(), DARKCYAN ) );
+ aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->GetValue(), BLUE ) );
+- msg.Printf( wxT( "%8.8lX" ), module->GetTimeStamp() );
++ msg.Printf( wxT( "%8.8lX" ), (u_long)module->GetTimeStamp() );
+ aList.push_back( MSG_PANEL_ITEM( _( "TimeStamp" ), msg, BROWN ) );
+ aList.push_back( MSG_PANEL_ITEM( _( "Footprint Layer" ),
+ module->GetLayerName(), RED ) );
diff --git a/cad/kicad/patches/patch-pcbnew_class_track.cpp b/cad/kicad/patches/patch-pcbnew_class_track.cpp
index 97cdd8c5fad..1fcc9b79bf1 100644
--- a/cad/kicad/patches/patch-pcbnew_class_track.cpp
+++ b/cad/kicad/patches/patch-pcbnew_class_track.cpp
@@ -1,15 +1,15 @@
-$NetBSD: patch-pcbnew_class_track.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_class_track.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- pcbnew/class_track.cpp.orig 2015-12-11 18:02:48.000000000 +0100
+++ pcbnew/class_track.cpp 2015-12-11 18:03:02.000000000 +0100
@@ -143,7 +143,7 @@
- }
-
- text.Printf( _( "Zone (%08lX) [%s] on %s" ),
-- m_TimeStamp, GetChars( nettxt ), GetChars( GetLayerName() ) );
-+ (u_long)m_TimeStamp, GetChars( nettxt ), GetChars( GetLayerName() ) );
-
- return text;
- }
+ }
+
+ text.Printf( _( "Zone (%08lX) [%s] on %s" ),
+- m_TimeStamp, GetChars( nettxt ), GetChars( GetLayerName() ) );
++ (u_long)m_TimeStamp, GetChars( nettxt ), GetChars( GetLayerName() ) );
+
+ return text;
+ }
diff --git a/cad/kicad/patches/patch-pcbnew_class_zone.cpp b/cad/kicad/patches/patch-pcbnew_class_zone.cpp
deleted file mode 100644
index 8ec3be7df03..00000000000
--- a/cad/kicad/patches/patch-pcbnew_class_zone.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-pcbnew_class_zone.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
-64bit time_t fix
-Reported upstream as bug id 1280901
-
---- pcbnew/class_zone.cpp.orig 2015-12-11 18:03:57.000000000 +0100
-+++ pcbnew/class_zone.cpp 2015-12-11 18:04:13.000000000 +0100
-@@ -818,7 +818,7 @@
- if( GetIsKeepout() )
- text << wxT( " " ) << _( "(Keepout)" );
-
-- text << wxString::Format( wxT( " (%08lX)" ), m_TimeStamp );
-+ text << wxString::Format( wxT( " (%08lX)" ), (u_long)m_TimeStamp );
-
- // Display net name for copper zones
- if( !GetIsKeepout() )
-@@ -852,4 +852,4 @@
- GetChars( GetLayerName() ) );
-
- return msg;
--}
-\ No newline at end of file
-+}
diff --git a/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp b/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp
index 3260b0c586c..4a056b110a7 100644
--- a/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp
+++ b/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp
@@ -1,69 +1,69 @@
-$NetBSD: patch-pcbnew_kicad_plugin.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_kicad_plugin.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- pcbnew/kicad_plugin.cpp.orig 2015-12-11 18:05:12.000000000 +0100
+++ pcbnew/kicad_plugin.cpp 2015-12-11 18:14:06.000000000 +0100
@@ -770,7 +770,7 @@
- formatLayer( aDimension );
-
- if( aDimension->GetTimeStamp() )
-- m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aDimension->GetTimeStamp() );
-
- m_out->Print( 0, "\n" );
-
+ formatLayer( aDimension );
+
+ if( aDimension->GetTimeStamp() )
+- m_out->Print( 0, " (tstamp %lX)", aDimension->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aDimension->GetTimeStamp() );
+
+ m_out->Print( 0, "\n" );
+
@@ -879,7 +879,7 @@
- m_out->Print( 0, " (width %s)", FMT_IU( aSegment->GetWidth() ).c_str() );
-
- if( aSegment->GetTimeStamp() )
-- m_out->Print( 0, " (tstamp %lX)", aSegment->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aSegment->GetTimeStamp() );
-
- if( aSegment->GetStatus() )
- m_out->Print( 0, " (status %X)", aSegment->GetStatus() );
+ m_out->Print( 0, " (width %s)", FMT_IU( aSegment->GetWidth() ).c_str() );
+
+ if( aSegment->GetTimeStamp() )
+- m_out->Print( 0, " (tstamp %lX)", aSegment->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aSegment->GetTimeStamp() );
+
+ if( aSegment->GetStatus() )
+ m_out->Print( 0, " (status %X)", aSegment->GetStatus() );
@@ -966,7 +966,7 @@
- formatLayer( aTarget );
-
- if( aTarget->GetTimeStamp() )
-- m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aTarget->GetTimeStamp() );
-
- m_out->Print( 0, ")\n" );
- }
+ formatLayer( aTarget );
+
+ if( aTarget->GetTimeStamp() )
+- m_out->Print( 0, " (tstamp %lX)", aTarget->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aTarget->GetTimeStamp() );
+
+ m_out->Print( 0, ")\n" );
+ }
@@ -1003,7 +1003,7 @@
-
- if( !( m_ctl & CTL_OMIT_TSTAMPS ) )
- {
-- m_out->Print( 0, " (tstamp %lX)\n", aModule->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)\n", (u_long)aModule->GetTimeStamp() );
- }
- else
- m_out->Print( 0, "\n" );
+
+ if( !( m_ctl & CTL_OMIT_TSTAMPS ) )
+ {
+- m_out->Print( 0, " (tstamp %lX)\n", aModule->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)\n", (u_long)aModule->GetTimeStamp() );
+ }
+ else
+ m_out->Print( 0, "\n" );
@@ -1344,7 +1344,7 @@
- formatLayer( aText );
-
- if( aText->GetTimeStamp() )
-- m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aText->GetTimeStamp() );
-
- m_out->Print( 0, "\n" );
-
+ formatLayer( aText );
+
+ if( aText->GetTimeStamp() )
+- m_out->Print( 0, " (tstamp %lX)", aText->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aText->GetTimeStamp() );
+
+ m_out->Print( 0, "\n" );
+
@@ -1452,7 +1452,7 @@
- m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) );
-
- if( aTrack->GetTimeStamp() != 0 )
-- m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aTrack->GetTimeStamp() );
-
- if( aTrack->GetStatus() != 0 )
- m_out->Print( 0, " (status %X)", aTrack->GetStatus() );
+ m_out->Print( 0, " (net %d)", m_mapping->Translate( aTrack->GetNetCode() ) );
+
+ if( aTrack->GetTimeStamp() != 0 )
+- m_out->Print( 0, " (tstamp %lX)", aTrack->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aTrack->GetTimeStamp() );
+
+ if( aTrack->GetStatus() != 0 )
+ m_out->Print( 0, " (status %X)", aTrack->GetStatus() );
@@ -1473,7 +1473,7 @@
-
- formatLayer( aZone );
-
-- m_out->Print( 0, " (tstamp %lX)", aZone->GetTimeStamp() );
-+ m_out->Print( 0, " (tstamp %lX)", (u_long)aZone->GetTimeStamp() );
-
- // Save the outline aux info
- std::string hatch;
+
+ formatLayer( aZone );
+
+- m_out->Print( 0, " (tstamp %lX)", aZone->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aZone->GetTimeStamp() );
+
+ // Save the outline aux info
+ std::string hatch;
diff --git a/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp b/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp
index 4f5e31eca36..401661bc304 100644
--- a/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp
+++ b/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp
@@ -1,105 +1,105 @@
-$NetBSD: patch-pcbnew_legacy_plugin.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_legacy_plugin.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- pcbnew/legacy_plugin.cpp.orig 2015-12-11 18:15:36.000000000 +0100
+++ pcbnew/legacy_plugin.cpp 2015-12-11 18:17:49.000000000 +0100
@@ -2327,7 +2327,7 @@
- #endif
-
- int makeType;
-- time_t timeStamp;
-+ u_long timeStamp;
- LAYER_NUM layer_num;
- int type, net_code, flags_int;
-
+ #endif
+
+ int makeType;
+- time_t timeStamp;
++ u_long timeStamp;
+ LAYER_NUM layer_num;
+ int type, net_code, flags_int;
+
@@ -2810,7 +2810,7 @@
- else if( TESTLINE( "Ge" ) )
- {
- LAYER_NUM layer_num;
-- time_t timestamp;
-+ u_long timestamp;
- int shape;
- int ilayer;
-
+ else if( TESTLINE( "Ge" ) )
+ {
+ LAYER_NUM layer_num;
+- time_t timestamp;
++ u_long timestamp;
+ int shape;
+ int ilayer;
+
@@ -3808,7 +3808,7 @@
- fmtDEG( orient ).c_str(),
- me->GetLayer(),
- me->GetLastEditTime(),
-- me->GetTimeStamp(),
-+ (u_long)me->GetTimeStamp(),
- statusTxt );
-
- fprintf( m_fp, "Li %s\n", me->GetFPID().GetFootprintName().c_str() );
+ fmtDEG( orient ).c_str(),
+ me->GetLayer(),
+ me->GetLastEditTime(),
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ statusTxt );
+
+ fprintf( m_fp, "Li %s\n", me->GetFPID().GetFootprintName().c_str() );
@@ -3823,7 +3823,7 @@
- fprintf( m_fp, "Kw %s\n", TO_UTF8( me->GetKeywords() ) );
- }
-
-- fprintf( m_fp, "Sc %lX\n", me->GetTimeStamp() );
-+ fprintf( m_fp, "Sc %lX\n", (u_long)me->GetTimeStamp() );
- fprintf( m_fp, "AR %s\n", TO_UTF8( me->GetPath() ) );
- fprintf( m_fp, "Op %X %X 0\n", me->GetPlacementCost90(), me->GetPlacementCost180() );
-
+ fprintf( m_fp, "Kw %s\n", TO_UTF8( me->GetKeywords() ) );
+ }
+
+- fprintf( m_fp, "Sc %lX\n", me->GetTimeStamp() );
++ fprintf( m_fp, "Sc %lX\n", (u_long)me->GetTimeStamp() );
+ fprintf( m_fp, "AR %s\n", TO_UTF8( me->GetPath() ) );
+ fprintf( m_fp, "Op %X %X 0\n", me->GetPlacementCost90(), me->GetPlacementCost180() );
+
@@ -3904,7 +3904,7 @@
- fmtBIUPoint( me->GetPosition() ).c_str(),
- fmtBIU( me->GetSize() ).c_str(),
- fmtBIU( me->GetWidth() ).c_str(),
-- me->GetTimeStamp()
-+ (u_long)me->GetTimeStamp()
- );
-
- fprintf( m_fp, "$EndPCB_TARGET\n" );
+ fmtBIUPoint( me->GetPosition() ).c_str(),
+ fmtBIU( me->GetSize() ).c_str(),
+ fmtBIU( me->GetWidth() ).c_str(),
+- me->GetTimeStamp()
++ (u_long)me->GetTimeStamp()
+ );
+
+ fprintf( m_fp, "$EndPCB_TARGET\n" );
@@ -3930,7 +3930,7 @@
- me->GetLayer(),
- me->GetType(),
- fmtDEG( me->GetAngle() ).c_str(),
-- me->GetTimeStamp(),
-+ (u_long)me->GetTimeStamp(),
- me->GetStatus()
- );
- }
+ me->GetLayer(),
+ me->GetType(),
+ fmtDEG( me->GetAngle() ).c_str(),
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ me->GetStatus()
+ );
+ }
@@ -3940,7 +3940,7 @@
- me->GetLayer(),
- me->GetType(),
- fmtDEG( me->GetAngle() ).c_str(),
-- me->GetTimeStamp(),
-+ (u_long)me->GetTimeStamp(),
- me->GetStatus(),
- fmtBIUPoint( me->GetBezControl1() ).c_str(),
- fmtBIUPoint( me->GetBezControl2() ).c_str()
+ me->GetLayer(),
+ me->GetType(),
+ fmtDEG( me->GetAngle() ).c_str(),
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ me->GetStatus(),
+ fmtBIUPoint( me->GetBezControl1() ).c_str(),
+ fmtBIUPoint( me->GetBezControl2() ).c_str()
@@ -3975,7 +3975,7 @@
-
- fprintf(m_fp, "De %d %d %d %lX %X\n",
- me->GetLayer(), type, m_mapping->Translate( me->GetNetCode() ),
-- me->GetTimeStamp(), me->GetStatus() );
-+ (u_long)me->GetTimeStamp(), me->GetStatus() );
- }
-
-
+
+ fprintf(m_fp, "De %d %d %d %lX %X\n",
+ me->GetLayer(), type, m_mapping->Translate( me->GetNetCode() ),
+- me->GetTimeStamp(), me->GetStatus() );
++ (u_long)me->GetTimeStamp(), me->GetStatus() );
+ }
+
+
@@ -3987,7 +3987,7 @@
- // For keepout zones, net code and net name are irrelevant, so we store a dummy value
- // just for ZONE_CONTAINER compatibility
- fprintf( m_fp, "ZInfo %lX %d %s\n",
-- me->GetTimeStamp(),
-+ (u_long)me->GetTimeStamp(),
- me->GetIsKeepout() ? 0 : m_mapping->Translate( me->GetNetCode() ),
- EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() );
-
+ // For keepout zones, net code and net name are irrelevant, so we store a dummy value
+ // just for ZONE_CONTAINER compatibility
+ fprintf( m_fp, "ZInfo %lX %d %s\n",
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ me->GetIsKeepout() ? 0 : m_mapping->Translate( me->GetNetCode() ),
+ EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetname() ).c_str() );
+
@@ -4105,7 +4105,7 @@
- // this old keyword is used here for compatibility
- fprintf( m_fp, "$COTATION\n" );
-
-- fprintf( m_fp, "Ge %d %d %lX\n", me->GetShape(), me->GetLayer(), me->GetTimeStamp() );
-+ fprintf( m_fp, "Ge %d %d %lX\n", me->GetShape(), me->GetLayer(), (u_long)me->GetTimeStamp() );
-
- fprintf( m_fp, "Va %s\n", fmtBIU( me->GetValue() ).c_str() );
-
+ // this old keyword is used here for compatibility
+ fprintf( m_fp, "$COTATION\n" );
+
+- fprintf( m_fp, "Ge %d %d %lX\n", me->GetShape(), me->GetLayer(), me->GetTimeStamp() );
++ fprintf( m_fp, "Ge %d %d %lX\n", me->GetShape(), me->GetLayer(), (u_long)me->GetTimeStamp() );
+
+ fprintf( m_fp, "Va %s\n", fmtBIU( me->GetValue() ).c_str() );
+
@@ -4193,7 +4193,7 @@
- fprintf( m_fp, "De %d %d %lX %s",
- me->GetLayer(),
- !me->IsMirrored(),
-- me->GetTimeStamp(),
-+ (u_long)me->GetTimeStamp(),
- me->IsItalic() ? "Italic" : "Normal" );
-
- if( me->GetHorizJustify() != GR_TEXT_HJUSTIFY_CENTER ||
+ fprintf( m_fp, "De %d %d %lX %s",
+ me->GetLayer(),
+ !me->IsMirrored(),
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ me->IsItalic() ? "Italic" : "Normal" );
+
+ if( me->GetHorizJustify() != GR_TEXT_HJUSTIFY_CENTER ||
diff --git a/cad/kicad/patches/patch-pcbnew_xchgmod.cpp b/cad/kicad/patches/patch-pcbnew_xchgmod.cpp
index 2677343b383..7826bb2880b 100644
--- a/cad/kicad/patches/patch-pcbnew_xchgmod.cpp
+++ b/cad/kicad/patches/patch-pcbnew_xchgmod.cpp
@@ -1,15 +1,15 @@
-$NetBSD: patch-pcbnew_xchgmod.cpp,v 1.2 2016/02/03 19:34:34 bouyer Exp $
+$NetBSD: patch-pcbnew_xchgmod.cpp,v 1.3 2016/09/08 09:32:28 bouyer Exp $
64bit time_t fix
Reported upstream as bug id 1280901
--- pcbnew/xchgmod.cpp.orig 2015-12-11 18:20:54.000000000 +0100
+++ pcbnew/xchgmod.cpp 2015-12-11 18:21:01.000000000 +0100
@@ -542,7 +542,7 @@
- for( ; module != NULL; module = module->Next() )
- {
- fprintf( cmpFile, "\nBeginCmp\n" );
-- fprintf( cmpFile, "TimeStamp = %8.8lX\n", module->GetTimeStamp() );
-+ fprintf( cmpFile, "TimeStamp = %8.8lX\n", (u_long)module->GetTimeStamp() );
- fprintf( cmpFile, "Path = %s\n", TO_UTF8( module->GetPath() ) );
- fprintf( cmpFile, "Reference = %s;\n",
- !module->GetReference().IsEmpty() ?
+ for( ; module != NULL; module = module->Next() )
+ {
+ fprintf( cmpFile, "\nBeginCmp\n" );
+- fprintf( cmpFile, "TimeStamp = %8.8lX\n", module->GetTimeStamp() );
++ fprintf( cmpFile, "TimeStamp = %8.8lX\n", (u_long)module->GetTimeStamp() );
+ fprintf( cmpFile, "Path = %s\n", TO_UTF8( module->GetPath() ) );
+ fprintf( cmpFile, "Reference = %s;\n",
+ !module->GetReference().IsEmpty() ?