summaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2014-02-17 20:38:59 +0000
committerbouyer <bouyer@pkgsrc.org>2014-02-17 20:38:59 +0000
commitc38ac24b3c5b6648a1c96265d2b46bf546a71b02 (patch)
tree11646ca141a0227c79e6f6451ef6bbf3350f8bb1 /cad
parentd26529241941e9922691c04dc251fc56859f94f0 (diff)
downloadpkgsrc-c38ac24b3c5b6648a1c96265d2b46bf546a71b02.tar.gz
Import kicad from the stable branch as of 20140214.
Sources are available only from bzr (no release) so I made a snapshot of the source tree and put it on a http server. This package is based on the package in wip by jonathan.gabris@gmail.com Kicad is an open source (GPL) software for the creation of electronic schematic diagrams and printed circuit board artwork. Designed and written by Jean-Pierre Charras, a researcher at LIS (Laboratoire des Images et des Signaux) and a teacher in IUT de Saint Martin d'Heres (France), in the field of electrical engineering and image processing. Kicad is a set of four softwares and a project manager: * Eeschema: Schematic entry. * Pcbnew: Board editor. * Gerbview: GERBER viewer (photoplotter documents). * Cvpcb: footprint selector for components used in the circuit design. * Kicad: project manager.
Diffstat (limited to 'cad')
-rw-r--r--cad/kicad/DESCR16
-rw-r--r--cad/kicad/Makefile47
-rw-r--r--cad/kicad/PLIST165
-rw-r--r--cad/kicad/distinfo26
-rw-r--r--cad/kicad/patches/patch-CMakeLists.txt36
-rw-r--r--cad/kicad/patches/patch-CMakeModules_Functions.cmake19
-rw-r--r--cad/kicad/patches/patch-CMakeModules_config.h.cmake15
-rw-r--r--cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt31
-rw-r--r--cad/kicad/patches/patch-common-edaappl.cpp17
-rw-r--r--cad/kicad/patches/patch-common_richio.cpp16
-rw-r--r--cad/kicad/patches/patch-eeschema_netform.cpp24
-rw-r--r--cad/kicad/patches/patch-eeschema_sch_component.cpp46
-rw-r--r--cad/kicad/patches/patch-eeschema_sch_sheet.cpp46
-rw-r--r--cad/kicad/patches/patch-eeschema_sch_sheet_path.cpp15
-rw-r--r--cad/kicad/patches/patch-eeschema_sheet.cpp15
-rw-r--r--cad/kicad/patches/patch-include-kicad_string.h14
-rw-r--r--cad/kicad/patches/patch-include_common.h20
-rw-r--r--cad/kicad/patches/patch-pcbnew_CMakeLists.txt16
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp15
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_module.cpp15
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_track.cpp15
-rw-r--r--cad/kicad/patches/patch-pcbnew_class_zone.cpp15
-rw-r--r--cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp78
-rw-r--r--cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp116
-rw-r--r--cad/kicad/patches/patch-pcbnew_xchgmod.cpp15
25 files changed, 853 insertions, 0 deletions
diff --git a/cad/kicad/DESCR b/cad/kicad/DESCR
new file mode 100644
index 00000000000..61daef29bdf
--- /dev/null
+++ b/cad/kicad/DESCR
@@ -0,0 +1,16 @@
+Kicad is an open source (GPL) software for the creation of electronic schematic
+diagrams and printed circuit board artwork.
+
+Designed and written by Jean-Pierre Charras, a researcher at LIS (Laboratoire
+des Images et des Signaux) and a teacher in IUT de Saint Martin d'Heres
+(France), in the field of electrical engineering and image processing.
+
+Kicad is a set of four softwares and a project manager:
+
+ * Eeschema: Schematic entry.
+ * Pcbnew: Board editor.
+ * Gerbview: GERBER viewer (photoplotter documents).
+ * Cvpcb: footprint selector for components used in the circuit design.
+ * Kicad: project manager.
+
+This is from the stable branch.
diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile
new file mode 100644
index 00000000000..8088ccc7de5
--- /dev/null
+++ b/cad/kicad/Makefile
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+#
+
+V= 20140214
+DISTNAME= kicad-stable-${V}
+PKGNAME= kicad-${V}
+CATEGORIES= cad
+MASTER_SITES= http://ftp.fr.NetBSD.org/~bouyer/kicad/
+
+MAINTAINER= bouyer@NetBSD.org
+HOMEPAGE= http://www.kicad-pcb.org/
+COMMENT= Schematic and PCB CAD software (stable branch)
+LICENSE= gnu-gpl-v2
+
+USE_PKGLOCALEDIR= yes
+USE_LANGUAGES= c c++
+USE_CMAKE= yes
+
+CMAKE_ARGS+= -DKICAD_STABLE_VERSION=ON
+CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+
+CMAKE_MODULE_PATH_OVERRIDE = \
+ bitmaps_png/CMakeLists.txt \
+ new/CMakeLists.txt \
+ tools/CMakeLists.txt
+
+SUBST_CLASSES+= macosx
+SUBST_STAGE.macosx= pre-configure
+SUBST_MESSAGE.macosx= Eliminating Mac OS X build specific for ${PKGNAME}
+SUBST_FILES.macosx= bitmap2component/CMakeLists.txt \
+ eeschema/CMakeLists.txt \
+ cvpcb/CMakeLists.txt \
+ gerbview/CMakeLists.txt \
+ kicad/CMakeLists.txt \
+ pcb_calculator/CMakeLists.txt \
+ pcbnew/CMakeLists.txt
+SUBST_SED.macosx= -e 's/[[:<:]]MACOSX_BUNDLE[[:>:]]//'
+
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/cmake/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/Mesa/buildlink3.mk"
+.include "../../x11/wxGTK28/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cad/kicad/PLIST b/cad/kicad/PLIST
new file mode 100644
index 00000000000..6b9839d73c4
--- /dev/null
+++ b/cad/kicad/PLIST
@@ -0,0 +1,165 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+bin/bitmap2component
+bin/cvpcb
+bin/eeschema
+bin/freeroute.jnlp
+bin/gerbview
+bin/kicad
+bin/pcb_calculator
+bin/pcbnew
+lib/kicad/plugins/netlist_form_pads-pcb.xsl
+share/applications/eeschema.desktop
+share/applications/kicad.desktop
+share/doc/kicad/INSTALL.txt
+share/doc/kicad/scripts/bom-in-python/ky/bom_example1.py
+share/doc/kicad/scripts/bom-in-python/ky/bom_example2.py
+share/doc/kicad/scripts/bom-in-python/ky/bom_example3.py
+share/doc/kicad/scripts/bom-in-python/ky/bom_example4.py
+share/doc/kicad/scripts/bom-in-python/ky/bom_example5.py
+share/doc/kicad/scripts/bom-in-python/ky/ky.py
+share/doc/kicad/scripts/bom-in-python/ky/round_robin.py
+share/doc/kicad/scripts/bom-in-python/ky/round_value_robin.py
+share/doc/kicad/scripts/kicad-get-rss
+share/icons/hicolor/16x16/mimetypes/application-x-kicad-project.png
+share/icons/hicolor/22x22/mimetypes/application-x-kicad-project.png
+share/icons/hicolor/24x24/mimetypes/application-x-kicad-project.png
+share/icons/hicolor/32x32/mimetypes/application-x-kicad-project.png
+share/icons/hicolor/48x48/apps/kicad.png
+share/icons/hicolor/48x48/mimetypes/application-x-kicad-project.png
+share/icons/hicolor/scalable/apps/kicad.svg
+share/icons/hicolor/scalable/mimetypes/application-x-kicad-project.svg
+share/kicad/demos/complex_hierarchy/ampli_ht.sch
+share/kicad/demos/complex_hierarchy/complex_hierarchy-cache.lib
+share/kicad/demos/complex_hierarchy/complex_hierarchy.cmp
+share/kicad/demos/complex_hierarchy/complex_hierarchy.kicad_pcb
+share/kicad/demos/complex_hierarchy/complex_hierarchy.net
+share/kicad/demos/complex_hierarchy/complex_hierarchy.pro
+share/kicad/demos/complex_hierarchy/complex_hierarchy.sch
+share/kicad/demos/ecc83/ecc83-pp-cache.lib
+share/kicad/demos/ecc83/ecc83-pp.cmp
+share/kicad/demos/ecc83/ecc83-pp.kicad_pcb
+share/kicad/demos/ecc83/ecc83-pp.net
+share/kicad/demos/ecc83/ecc83-pp.pro
+share/kicad/demos/ecc83/ecc83-pp.sch
+share/kicad/demos/ecc83/ecc83-pp_v2-cache.lib
+share/kicad/demos/ecc83/ecc83-pp_v2.kicad_pcb
+share/kicad/demos/ecc83/ecc83-pp_v2.pro
+share/kicad/demos/ecc83/ecc83-pp_v2.sch
+share/kicad/demos/electric/electric-cache.lib
+share/kicad/demos/electric/electric.pro
+share/kicad/demos/electric/electric.sch
+share/kicad/demos/flat_hierarchy/flat_hierarchy-cache.lib
+share/kicad/demos/flat_hierarchy/flat_hierarchy.cmp
+share/kicad/demos/flat_hierarchy/flat_hierarchy.kicad_pcb
+share/kicad/demos/flat_hierarchy/flat_hierarchy.net
+share/kicad/demos/flat_hierarchy/flat_hierarchy.pro
+share/kicad/demos/flat_hierarchy/flat_hierarchy.sch
+share/kicad/demos/flat_hierarchy/pic_programmer.sch
+share/kicad/demos/flat_hierarchy/pic_sockets.sch
+share/kicad/demos/interf_u/image.lib
+share/kicad/demos/interf_u/image.mod
+share/kicad/demos/interf_u/interf_u-cache.lib
+share/kicad/demos/interf_u/interf_u.cmp
+share/kicad/demos/interf_u/interf_u.kicad_pcb
+share/kicad/demos/interf_u/interf_u.net
+share/kicad/demos/interf_u/interf_u.pro
+share/kicad/demos/interf_u/interf_u.sch
+share/kicad/demos/interf_u/tux.bmp
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/in_out_conn.sch
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.dcm
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213-cache.lib
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.cmp
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.kicad_pcb
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.net
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.pro
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/kit-dev-coldfire-xilinx_5213.sch
+share/kicad/demos/kit-dev-coldfire-xilinx_5213/xilinx.sch
+share/kicad/demos/microwave/microwave.kicad_pcb
+share/kicad/demos/microwave/microwave.pro
+share/kicad/demos/microwave/shape1.txt
+share/kicad/demos/pic_programmer/pic_programmer-cache.lib
+share/kicad/demos/pic_programmer/pic_programmer.cmp
+share/kicad/demos/pic_programmer/pic_programmer.kicad_pcb
+share/kicad/demos/pic_programmer/pic_programmer.net
+share/kicad/demos/pic_programmer/pic_programmer.pro
+share/kicad/demos/pic_programmer/pic_programmer.sch
+share/kicad/demos/pic_programmer/pic_sockets.sch
+share/kicad/demos/pspice/pspice-cache.lib
+share/kicad/demos/pspice/pspice.cir
+share/kicad/demos/pspice/pspice.pro
+share/kicad/demos/pspice/pspice.sch
+share/kicad/demos/sonde xilinx/sonde xilinx-cache.lib
+share/kicad/demos/sonde xilinx/sonde xilinx.cmp
+share/kicad/demos/sonde xilinx/sonde xilinx.kicad_pcb
+share/kicad/demos/sonde xilinx/sonde xilinx.net
+share/kicad/demos/sonde xilinx/sonde xilinx.pro
+share/kicad/demos/sonde xilinx/sonde xilinx.sch
+share/kicad/demos/test_xil_95108/carte_test-cache.lib
+share/kicad/demos/test_xil_95108/carte_test.cmp
+share/kicad/demos/test_xil_95108/carte_test.kicad_pcb
+share/kicad/demos/test_xil_95108/carte_test.net
+share/kicad/demos/test_xil_95108/carte_test.pro
+share/kicad/demos/test_xil_95108/carte_test.sch
+share/kicad/demos/video/bus_pci.sch
+share/kicad/demos/video/esvideo.sch
+share/kicad/demos/video/graphic.sch
+share/kicad/demos/video/modul.sch
+share/kicad/demos/video/muxdata.sch
+share/kicad/demos/video/pal-ntsc.sch
+share/kicad/demos/video/rams.sch
+share/kicad/demos/video/video-cache.lib
+share/kicad/demos/video/video.cmp
+share/kicad/demos/video/video.kicad_pcb
+share/kicad/demos/video/video.net
+share/kicad/demos/video/video.pro
+share/kicad/demos/video/video.sch
+share/kicad/template/kicad.pro
+share/kicad/template/raspberrypi-gpio/meta/brd.png
+share/kicad/template/raspberrypi-gpio/meta/icon.png
+share/kicad/template/raspberrypi-gpio/meta/info.html
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio-cache.lib
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.cmp
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.kicad_pcb
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.net
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.pro
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.sch
+share/kicad/template/raspberrypi-gpio/raspberrypi-gpio.stf
+share/kicad/template/stm32f100-discovery-shield/meta/board_stm32vl_discovery.png
+share/kicad/template/stm32f100-discovery-shield/meta/icon.png
+share/kicad/template/stm32f100-discovery-shield/meta/info.html
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield-cache.lib
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.cmp
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.dcm
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.kicad_pcb
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.lib
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.mod
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.net
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.pro
+share/kicad/template/stm32f100-discovery-shield/stm32f100-discovery-shield.sch
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack.dcm
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack.lib
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40-cache.lib
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40.cmp
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40.mod
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40.net
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40.pro
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40.sch
+share/kicad/template/ti-stellaris-boosterpack40/boosterpack40_min.kicad_pcb
+share/kicad/template/ti-stellaris-boosterpack40/meta/icon.png
+share/kicad/template/ti-stellaris-boosterpack40/meta/info.html
+share/kicad/template/ti-stellaris-boosterpack40/meta/launchpad_standard40.png
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack.dcm
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack.lib
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min-cache.lib
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.cmp
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.kicad_pcb
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.mod
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.net
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.pro
+share/kicad/template/ti-stellaris-boosterpack40_min/boosterpack40_min.sch
+share/kicad/template/ti-stellaris-boosterpack40_min/meta/icon.png
+share/kicad/template/ti-stellaris-boosterpack40_min/meta/info.html
+share/kicad/template/ti-stellaris-boosterpack40_min/meta/launchpad_standard40.png
+share/mime/packages/kicad.xml
+share/mimelnk/application/x-kicad-project.desktop
+share/mimelnk/application/x-kicad-schematic.desktop
diff --git a/cad/kicad/distinfo b/cad/kicad/distinfo
new file mode 100644
index 00000000000..1dfd2bb9f0c
--- /dev/null
+++ b/cad/kicad/distinfo
@@ -0,0 +1,26 @@
+$NetBSD: distinfo,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+SHA1 (kicad-stable-20140214.tar.gz) = d424af27803d26f08657e10cd37d7a5c37d01149
+RMD160 (kicad-stable-20140214.tar.gz) = daf0bc83219c7ba15e18d4211bf77b6a48f47b76
+Size (kicad-stable-20140214.tar.gz) = 13856340 bytes
+SHA1 (patch-CMakeLists.txt) = a3a91c4629a64815adf7c10724902163947482bb
+SHA1 (patch-CMakeModules_Functions.cmake) = 40581fd56de4d2cc3d3b6b0384d72373b7175dd3
+SHA1 (patch-CMakeModules_config.h.cmake) = e4e2e96f9923a73d60e0141a1f1de3a7c4dffed7
+SHA1 (patch-bitmaps_png_CMakeLists.txt) = 842fb628ab9eab3e67c6b73ee230b8d2a285d179
+SHA1 (patch-common-edaappl.cpp) = e9f0344f4d67566e9224402570b4666f44f3e925
+SHA1 (patch-common_richio.cpp) = 0fec7d5e6871a39d37882620c1853e94bae704dc
+SHA1 (patch-eeschema_netform.cpp) = 2ed91f042404973a4689b0885e4459872b8e8153
+SHA1 (patch-eeschema_sch_component.cpp) = d5f43448399625587394dfb474d5f3583eed1ce1
+SHA1 (patch-eeschema_sch_sheet.cpp) = ae7612dad83915de52dba578776bd8329e67a18d
+SHA1 (patch-eeschema_sch_sheet_path.cpp) = 2a214a215c8f0c334170d700b3a75a958adcad93
+SHA1 (patch-eeschema_sheet.cpp) = 45534b24d6f024605482c0327b89cee3c8d3a4a5
+SHA1 (patch-include-kicad_string.h) = 8165630c230a361567472fbce911e383512c944f
+SHA1 (patch-include_common.h) = e8013295bfa0f058752a3fcc654e95e510710104
+SHA1 (patch-pcbnew_CMakeLists.txt) = b7d3d89ab14cab065982ad51a4db006a0626aa4a
+SHA1 (patch-pcbnew_class_edge_mod.cpp) = 6847ab1057c94e3a04e4407dffab1cb08178c7df
+SHA1 (patch-pcbnew_class_module.cpp) = 36c75238f631e1ce4244395c32b44cfd4b0f819f
+SHA1 (patch-pcbnew_class_track.cpp) = 8602e76cdacd65231e730ab3c36eb85d56c3aad1
+SHA1 (patch-pcbnew_class_zone.cpp) = 7660bd6092bfaf5fda78e2b7650de9d0a2fb4473
+SHA1 (patch-pcbnew_kicad_plugin.cpp) = 44a0a354463a607b81eaa02ea953d45568cf2837
+SHA1 (patch-pcbnew_legacy_plugin.cpp) = af3722a66712593d91164a110e28fe31abbf2165
+SHA1 (patch-pcbnew_xchgmod.cpp) = 6718cc7d6f3f858ca5ca90342619dbaf591517c3
diff --git a/cad/kicad/patches/patch-CMakeLists.txt b/cad/kicad/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..8552fd5abfc
--- /dev/null
+++ b/cad/kicad/patches/patch-CMakeLists.txt
@@ -0,0 +1,36 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Trust wxWidgets when locating its components.
+
+--- CMakeLists.txt.orig 2011-07-04 10:40:16.000000000 +0000
++++ CMakeLists.txt
+@@ -176,11 +176,17 @@ check_find_package_result(OPENGL_FOUND "
+ # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
+
+ # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base
+-if(APPLE)
++EXECUTE_PROCESS(
++ COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --release
++ OUTPUT_VARIABLE _wx_release
++ RESULT_VARIABLE _wx_result
++ ERROR_QUIET
++)
++IF(_wx_result EQUAL 0 AND _wx_release EQUAL "2.9" AND APPLE)
+ find_package(wxWidgets COMPONENTS gl adv html core net base xml QUIET)
+-else(APPLE)
++else(_wx_result EQUAL 0 AND _wx_release EQUAL "2.9" AND APPLE)
+ find_package(wxWidgets COMPONENTS gl aui adv html core net base xml QUIET)
+-endif(APPLE)
++endif(_wx_result EQUAL 0 AND _wx_release EQUAL "2.9" AND APPLE)
+ check_find_package_result(wxWidgets_FOUND "wxWidgets")
+
+
+@@ -264,7 +270,7 @@ endif()
+ # 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
new file mode 100644
index 00000000000..98a81902dca
--- /dev/null
+++ b/cad/kicad/patches/patch-CMakeModules_Functions.cmake
@@ -0,0 +1,19 @@
+$NetBSD: patch-CMakeModules_Functions.cmake,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
+and containt multiple directories
+
+--- CMakeModules/Functions.cmake.orig 2014-02-14 20:02:52.000000000 +0100
++++ CMakeModules/Functions.cmake 2014-02-14 20:03:21.000000000 +0100
+@@ -33,9 +33,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
diff --git a/cad/kicad/patches/patch-CMakeModules_config.h.cmake b/cad/kicad/patches/patch-CMakeModules_config.h.cmake
new file mode 100644
index 00000000000..61a8b83fe7a
--- /dev/null
+++ b/cad/kicad/patches/patch-CMakeModules_config.h.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-CMakeModules_config.h.cmake,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Fix compile problem due to ciso646.
+
+--- CMakeModules/config.h.cmake.orig 2011-11-27 11:43:14.000000000 +0000
++++ CMakeModules/config.h.cmake
+@@ -32,7 +32,7 @@
+ #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
new file mode 100644
index 00000000000..75ab5fa3f01
--- /dev/null
+++ b/cad/kicad/patches/patch-bitmaps_png_CMakeLists.txt
@@ -0,0 +1,31 @@
+$NetBSD: patch-bitmaps_png_CMakeLists.txt,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
+and containt multiple directories
+
+--- bitmaps_png/CMakeLists.txt.orig 2014-02-14 21:55:49.000000000 +0100
++++ bitmaps_png/CMakeLists.txt 2014-02-14 22:37:57.000000000 +0100
+@@ -602,9 +602,9 @@
+
+ COMMAND rm -f ${outFile}.tmp
+ 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
+
+ POST_BUILD
+ COMMAND ${eol2unix_EXECUTABLE} ${outFile}
+@@ -619,9 +619,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()
diff --git a/cad/kicad/patches/patch-common-edaappl.cpp b/cad/kicad/patches/patch-common-edaappl.cpp
new file mode 100644
index 00000000000..23ff1405de6
--- /dev/null
+++ b/cad/kicad/patches/patch-common-edaappl.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-common-edaappl.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Building on Mac OS X requires CoreFoundation headers.
+
+--- common/edaappl.cpp.orig 2014-02-14 21:55:49.000000000 +0100
++++ common/edaappl.cpp 2014-02-14 22:39:14.000000000 +0100
+@@ -41,6 +41,10 @@
+ #include <wx/snglinst.h>
+ #include <wx/tokenzr.h>
+
++#ifdef __DARWIN__
++#include <CoreFoundation/CFBundle.h>
++#endif
++
+ #include <appl_wxstruct.h>
+ #include <wxstruct.h>
+ #include <macros.h>
diff --git a/cad/kicad/patches/patch-common_richio.cpp b/cad/kicad/patches/patch-common_richio.cpp
new file mode 100644
index 00000000000..794d3ebc8ed
--- /dev/null
+++ b/cad/kicad/patches/patch-common_richio.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-common_richio.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Fix non-portable use of setvbuf()
+Reported upstream as bug id 1280897
+
+--- common/richio.cpp.orig 2014-02-15 20:22:32.000000000 +0100
++++ common/richio.cpp 2014-02-15 20:23:12.000000000 +0100
+@@ -157,7 +157,7 @@
+ {
+ if( doOwn && ftell( aFile ) == 0L )
+ {
+-#ifndef __WXMAC__
++#if !defined(__WXMAC__) && !defined(__NetBSD__)
+ setvbuf( fp, NULL, _IOFBF, BUFSIZ * 8 );
+ #endif
+ }
diff --git a/cad/kicad/patches/patch-eeschema_netform.cpp b/cad/kicad/patches/patch-eeschema_netform.cpp
new file mode 100644
index 00000000000..139a13140a9
--- /dev/null
+++ b/cad/kicad/patches/patch-eeschema_netform.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-eeschema_netform.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- eeschema/netform.cpp.orig 2014-02-15 15:35:29.000000000 +0100
++++ eeschema/netform.cpp 2014-02-15 15:48:58.000000000 +0100
+@@ -1046,7 +1046,7 @@
+ xsheetpath->AddAttribute( sNames, path->PathHumanReadable() );
+ xsheetpath->AddAttribute( sTStamps, path->Path() );
+
+- timeStamp.Printf( sTSFmt, comp->GetTimeStamp() );
++ timeStamp.Printf( sTSFmt, (u_long)comp->GetTimeStamp() );
+ xcomp->AddChild( node( sTStamp, timeStamp ) );
+ }
+ }
+@@ -1134,7 +1134,7 @@
+ }
+
+ ret |= fprintf( out, "\n$BeginComponent\n" );
+- ret |= fprintf( out, "TimeStamp=%8.8lX\n", comp->m_TimeStamp );
++ ret |= fprintf( out, "TimeStamp=%8.8lX\n", (u_long)comp->m_TimeStamp );
+ ret |= fprintf( out, "Footprint=%s\n", TO_UTF8( footprint ) );
+
+ field = wxT( "Reference=" ) + comp->GetRef( path ) + wxT( "\n" );
diff --git a/cad/kicad/patches/patch-eeschema_sch_component.cpp b/cad/kicad/patches/patch-eeschema_sch_component.cpp
new file mode 100644
index 00000000000..aefb5809377
--- /dev/null
+++ b/cad/kicad/patches/patch-eeschema_sch_component.cpp
@@ -0,0 +1,46 @@
+$NetBSD: patch-eeschema_sch_component.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- eeschema/sch_component.cpp.orig 2014-02-15 15:23:19.000000000 +0100
++++ eeschema/sch_component.cpp 2014-02-15 15:38:12.000000000 +0100
+@@ -392,7 +392,7 @@
+
+ wxString str;
+
+- str.Printf( wxT( "%8.8lX" ), m_TimeStamp );
++ str.Printf( wxT( "%8.8lX" ), (u_long)m_TimeStamp );
+ return sheet->Path() + str;
+ }
+
+@@ -527,8 +527,8 @@
+ {
+ wxString string_timestamp, string_oldtimestamp;
+
+- string_timestamp.Printf( wxT( "%08lX" ), aNewTimeStamp );
+- string_oldtimestamp.Printf( wxT( "%08lX" ), m_TimeStamp );
++ string_timestamp.Printf( wxT( "%08lX" ), (u_long)aNewTimeStamp );
++ string_oldtimestamp.Printf( wxT( "%08lX" ), (u_long)m_TimeStamp );
+ EDA_ITEM::SetTimeStamp( aNewTimeStamp );
+
+ for( unsigned ii = 0; ii < m_PathsAndReferences.GetCount(); ii++ )
+@@ -1004,7 +1004,7 @@
+ return false;
+
+ /* Generate unit number, convert and time stamp*/
+- if( fprintf( f, "U %d %d %8.8lX\n", m_unit, m_convert, m_TimeStamp ) == EOF )
++ if( fprintf( f, "U %d %d %8.8lX\n", m_unit, m_convert, (u_long)m_TimeStamp ) == EOF )
+ return false;
+
+ /* Save the position */
+@@ -1200,7 +1200,9 @@
+
+ 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 );
++ m_TimeStamp = tmstp;
+ }
+ 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
new file mode 100644
index 00000000000..53e81dca15d
--- /dev/null
+++ b/cad/kicad/patches/patch-eeschema_sch_sheet.cpp
@@ -0,0 +1,46 @@
+$NetBSD: patch-eeschema_sch_sheet.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- eeschema/sch_sheet.cpp.orig 2014-02-15 15:39:08.000000000 +0100
++++ eeschema/sch_sheet.cpp 2014-02-15 15:40:13.000000000 +0100
+@@ -53,8 +53,8 @@
+ SetTimeStamp( GetNewTimeStamp() );
+ m_sheetNameSize = m_fileNameSize = DEFAULT_TEXT_SIZE;
+ m_screen = NULL;
+- m_name.Printf( wxT( "Sheet%8.8lX" ), m_TimeStamp );
+- m_fileName.Printf( wxT( "file%8.8lX.sch" ), m_TimeStamp );
++ m_name.Printf( wxT( "Sheet%8.8lX" ), (u_long)m_TimeStamp );
++ m_fileName.Printf( wxT( "file%8.8lX.sch" ), (u_long)m_TimeStamp );
+ }
+
+
+@@ -142,7 +142,7 @@
+ return false;
+
+ //save the unique timestamp, like other schematic parts.
+- if( fprintf( aFile, "U %8.8lX\n", m_TimeStamp ) == EOF )
++ if( fprintf( aFile, "U %8.8lX\n", (u_long)m_TimeStamp ) == EOF )
+ return false;
+
+ /* Save schematic sheetname and filename. */
+@@ -219,7 +219,9 @@
+
+ if( ((char*)aLine)[0] == 'U' )
+ {
+- sscanf( ((char*)aLine) + 1, "%lX", &m_TimeStamp );
++ u_long tmstp;
++ sscanf( ((char*)aLine) + 1, "%lX", &tmstp );
++ m_TimeStamp = tmstp;
+ if( m_TimeStamp == 0 ) // zero is not unique!
+ SetTimeStamp( GetNewTimeStamp() );
+ continue;
+@@ -828,7 +830,7 @@
+
+ #if 0 // Set to 1 to display the sheet time stamp (mainly for test)
+ wxString msg;
+- msg.Printf( wxT( "%.8X" ), m_TimeStamp );
++ msg.Printf( wxT( "%.8X" ), (u_long)m_TimeStamp );
+ aList.push_back( MSG_PANEL_ITEM( _( "Time Stamp" ), msg, BLUE ) );
+ #endif
+ }
diff --git a/cad/kicad/patches/patch-eeschema_sch_sheet_path.cpp b/cad/kicad/patches/patch-eeschema_sch_sheet_path.cpp
new file mode 100644
index 00000000000..e50fc4c3ad3
--- /dev/null
+++ b/cad/kicad/patches/patch-eeschema_sch_sheet_path.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-eeschema_sch_sheet_path.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- eeschema/sch_sheet_path.cpp.orig 2014-02-15 15:50:43.000000000 +0100
++++ eeschema/sch_sheet_path.cpp 2014-02-15 15:50:45.000000000 +0100
+@@ -200,7 +200,7 @@
+ // it's timestamp changes anyway.
+ for( unsigned i = 1; i < m_numSheets; i++ )
+ {
+- t.Printf( _( "%8.8lX/" ), m_sheets[i]->GetTimeStamp() );
++ t.Printf( _( "%8.8lX/" ), (u_long)m_sheets[i]->GetTimeStamp() );
+ s = s + t;
+ }
+
diff --git a/cad/kicad/patches/patch-eeschema_sheet.cpp b/cad/kicad/patches/patch-eeschema_sheet.cpp
new file mode 100644
index 00000000000..6d91a94cb04
--- /dev/null
+++ b/cad/kicad/patches/patch-eeschema_sheet.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-eeschema_sheet.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- eeschema/sheet.cpp.orig 2014-02-15 15:49:44.000000000 +0100
++++ eeschema/sheet.cpp 2014-02-15 15:49:51.000000000 +0100
+@@ -205,7 +205,7 @@
+ aSheet->SetSheetNameSize( ReturnValueFromString( g_UserUnit, dlg.GetSheetNameTextSize() ) );
+
+ if( aSheet->GetName().IsEmpty() )
+- aSheet->SetName( wxString::Format( wxT( "Sheet%8.8lX" ), aSheet->GetTimeStamp() ) );
++ aSheet->SetName( wxString::Format( wxT( "Sheet%8.8lX" ), (u_long)aSheet->GetTimeStamp() ) );
+
+ m_canvas->MoveCursorToCrossHair();
+ m_canvas->SetIgnoreMouseEvents( false );
diff --git a/cad/kicad/patches/patch-include-kicad_string.h b/cad/kicad/patches/patch-include-kicad_string.h
new file mode 100644
index 00000000000..4b145e0dfa9
--- /dev/null
+++ b/cad/kicad/patches/patch-include-kicad_string.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-include-kicad_string.h,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Standard string library should be included as well.
+
+--- include/kicad_string.h.orig 2011-11-27 11:43:14.000000000 +0000
++++ include/kicad_string.h
+@@ -9,6 +9,7 @@
+ #ifndef KICAD_STRING_H_
+ #define KICAD_STRING_H_
+
++#include <string>
+ #include <wx/string.h>
+
+
diff --git a/cad/kicad/patches/patch-include_common.h b/cad/kicad/patches/patch-include_common.h
new file mode 100644
index 00000000000..350e5e1c279
--- /dev/null
+++ b/cad/kicad/patches/patch-include_common.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-include_common.h,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Remove bogus error
+
+--- include/common.h.orig 2014-02-14 23:04:25.000000000 +0100
++++ include/common.h 2014-02-14 23:04:40.000000000 +0100
+@@ -46,13 +46,6 @@
+ # error "You must use '--enable-printarch' in your wx library configuration."
+ #endif
+
+-#if defined( __WXGTK__ )
+-# if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG
+-# error "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration."
+-# endif
+-#endif
+-
+-
+ class wxAboutDialogInfo;
+
+ // Flag for special keys
diff --git a/cad/kicad/patches/patch-pcbnew_CMakeLists.txt b/cad/kicad/patches/patch-pcbnew_CMakeLists.txt
new file mode 100644
index 00000000000..a751db0c626
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_CMakeLists.txt
@@ -0,0 +1,16 @@
+$NetBSD: patch-pcbnew_CMakeLists.txt,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+
+Don't use ${CMAKE_MODULE_PATH} directly as it will be changed
+and containt multiple directories
+
+--- pcbnew/CMakeLists.txt.orig 2014-02-14 20:06:34.000000000 +0100
++++ pcbnew/CMakeLists.txt 2014-02-14 20:06:38.000000000 +0100
+@@ -229,7 +229,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"
diff --git a/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp b/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp
new file mode 100644
index 00000000000..43c971a2c88
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_class_edge_mod.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-pcbnew_class_edge_mod.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/class_edge_mod.cpp.orig 2014-02-15 15:51:50.000000000 +0100
++++ pcbnew/class_edge_mod.cpp 2014-02-15 15:52:10.000000000 +0100
+@@ -248,7 +248,7 @@
+ aList.push_back( MSG_PANEL_ITEM( _( "Graphic Item" ), wxEmptyString, DARKCYAN ) );
+ aList.push_back( MSG_PANEL_ITEM( _( "Module" ), module->m_Reference->m_Text, DARKCYAN ) );
+ aList.push_back( MSG_PANEL_ITEM( _( "Value" ), module->m_Value->m_Text, 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( _( "Mod Layer" ), board->GetLayerName( module->GetLayer() ),
+ RED ) );
diff --git a/cad/kicad/patches/patch-pcbnew_class_module.cpp b/cad/kicad/patches/patch-pcbnew_class_module.cpp
new file mode 100644
index 00000000000..590af7088e5
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_class_module.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-pcbnew_class_module.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/class_module.cpp.orig 2014-02-15 15:41:28.000000000 +0100
++++ pcbnew/class_module.cpp 2014-02-15 15:41:37.000000000 +0100
+@@ -458,7 +458,7 @@
+ aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) );
+
+ // display time stamp in schematic
+- msg.Printf( wxT( "%8.8lX" ), m_TimeStamp );
++ msg.Printf( wxT( "%8.8lX" ), (u_long)m_TimeStamp );
+ aList.push_back( MSG_PANEL_ITEM( _( "Netlist path" ), m_Path, BROWN ) );
+ aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), board->GetLayerName( m_Layer ), RED ) );
+
diff --git a/cad/kicad/patches/patch-pcbnew_class_track.cpp b/cad/kicad/patches/patch-pcbnew_class_track.cpp
new file mode 100644
index 00000000000..288ac2ef84a
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_class_track.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-pcbnew_class_track.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/class_track.cpp.orig 2014-02-15 15:42:13.000000000 +0100
++++ pcbnew/class_track.cpp 2014-02-15 15:42:23.000000000 +0100
+@@ -161,7 +161,7 @@
+ NETINFO_ITEM* net;
+ BOARD* board = GetBoard();
+
+- text << _( "Zone" ) << wxT( " " ) << wxString::Format( wxT( "(%08lX)" ), m_TimeStamp );
++ text << _( "Zone" ) << wxT( " " ) << wxString::Format( wxT( "(%08lX)" ), (u_long)m_TimeStamp );
+
+ if( board )
+ {
diff --git a/cad/kicad/patches/patch-pcbnew_class_zone.cpp b/cad/kicad/patches/patch-pcbnew_class_zone.cpp
new file mode 100644
index 00000000000..93a9a1a253c
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_class_zone.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-pcbnew_class_zone.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/class_zone.cpp.orig 2014-02-15 15:42:53.000000000 +0100
++++ pcbnew/class_zone.cpp 2014-02-15 15:43:00.000000000 +0100
+@@ -946,7 +946,7 @@
+ text << wxT( " " ) << _( "(Keepout)" );
+
+ text << wxT( " " );
+- text << wxString::Format( wxT( "(%08lX)" ), m_TimeStamp );
++ text << wxString::Format( wxT( "(%08lX)" ), (u_long)m_TimeStamp );
+
+ // Display net name for copper zones
+ if( !GetIsKeepout() )
diff --git a/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp b/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp
new file mode 100644
index 00000000000..2ddebea6c69
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_kicad_plugin.cpp
@@ -0,0 +1,78 @@
+$NetBSD: patch-pcbnew_kicad_plugin.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/kicad_plugin.cpp.orig 2014-02-15 15:55:03.000000000 +0100
++++ pcbnew/kicad_plugin.cpp 2014-02-15 15:56:10.000000000 +0100
+@@ -673,7 +673,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" );
+
+@@ -782,7 +782,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() );
+@@ -855,7 +855,7 @@
+ /* 11-Nov-2021 remove if no one whines after a couple of months. Simple graphic items
+ perhaps do not need these.
+ if( aModuleDrawing->GetTimeStamp() )
+- m_out->Print( 0, " (tstamp %lX)", aModuleDrawing->GetTimeStamp() );
++ m_out->Print( 0, " (tstamp %lX)", (u_long)aModuleDrawing->GetTimeStamp() );
+
+ if( aModuleDrawing->GetStatus() )
+ m_out->Print( 0, " (status %X)", aModuleDrawing->GetStatus() );
+@@ -879,7 +879,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" );
+ }
+@@ -901,7 +901,7 @@
+ if( !( m_ctl & CTL_OMIT_TSTAMPS ) )
+ {
+ m_out->Print( 0, " (tedit %lX) (tstamp %lX)\n",
+- aModule->GetLastEditTime(), aModule->GetTimeStamp() );
++ (u_long)aModule->GetLastEditTime(), (u_long)aModule->GetTimeStamp() );
+ }
+ else
+ m_out->Print( 0, "\n" );
+@@ -1216,7 +1216,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" );
+
+@@ -1324,7 +1324,7 @@
+ m_out->Print( 0, " (net %d)", aTrack->GetNet() );
+
+ 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() );
+@@ -1345,7 +1345,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;
diff --git a/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp b/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp
new file mode 100644
index 00000000000..226867e5697
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_legacy_plugin.cpp
@@ -0,0 +1,116 @@
+$NetBSD: patch-pcbnew_legacy_plugin.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/legacy_plugin.cpp.orig 2014-02-14 21:55:49.000000000 +0100
++++ pcbnew/legacy_plugin.cpp 2014-02-15 16:53:33.000000000 +0100
+@@ -1988,7 +1988,7 @@
+ #endif
+
+ int makeType;
+- time_t timeStamp;
++ u_long timeStamp;
+ int layer, type, flags, net_code;
+
+ // parse the 2nd line to determine the type of object
+@@ -2435,7 +2435,7 @@
+ else if( TESTLINE( "Ge" ) )
+ {
+ int layer;
+- time_t timestamp;
++ u_long timestamp;
+ int shape;
+
+ sscanf( line + SZ( "Ge" ), " %d %d %lX", &shape, &layer, &timestamp );
+@@ -2447,7 +2447,7 @@
+ layer = LAST_NO_COPPER_LAYER;
+
+ dim->SetLayer( layer );
+- dim->SetTimeStamp( timestamp );
++ dim->SetTimeStamp( (time_t)timestamp );
+ dim->SetShape( shape );
+ }
+
+@@ -3398,8 +3398,8 @@
+ fmtBIUPoint( me->GetPosition() ).c_str(), // m_Pos.x, m_Pos.y,
+ fmtDEG( orient ).c_str(),
+ me->GetLayer(),
+- me->GetLastEditTime(),
+- me->GetTimeStamp(),
++ (u_long)me->GetLastEditTime(),
++ (u_long)me->GetTimeStamp(),
+ statusTxt );
+
+ fprintf( m_fp, "Li %s\n", TO_UTF8( me->GetLibRef() ) );
+@@ -3414,7 +3414,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->m_CntRot90, me->m_CntRot180 );
+
+@@ -3543,7 +3543,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" );
+@@ -3569,7 +3569,7 @@
+ me->GetLayer(),
+ me->GetType(),
+ fmtDEG( me->GetAngle() ).c_str(),
+- me->GetTimeStamp(),
++ (u_long)me->GetTimeStamp(),
+ me->GetStatus()
+ );
+ }
+@@ -3579,7 +3579,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()
+@@ -3607,7 +3607,7 @@
+
+ fprintf(m_fp, "De %d %d %d %lX %X\n",
+ me->GetLayer(), type, me->GetNet(),
+- me->GetTimeStamp(), me->GetStatus() );
++ (u_long)me->GetTimeStamp(), me->GetStatus() );
+ }
+
+
+@@ -3619,7 +3619,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 : me->GetNet(),
+ EscapedUTF8( me->GetIsKeepout() ? wxT("") : me->GetNetName() ).c_str() );
+
+@@ -3737,7 +3737,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->m_Value ).c_str() );
+
+@@ -3825,7 +3825,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 ||
diff --git a/cad/kicad/patches/patch-pcbnew_xchgmod.cpp b/cad/kicad/patches/patch-pcbnew_xchgmod.cpp
new file mode 100644
index 00000000000..bddb0c62ec4
--- /dev/null
+++ b/cad/kicad/patches/patch-pcbnew_xchgmod.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-pcbnew_xchgmod.cpp,v 1.1.1.1 2014/02/17 20:38:59 bouyer Exp $
+64bit time_t fix
+Reported upstream as bug id 1280901
+
+--- pcbnew/xchgmod.cpp.orig 2014-02-15 15:52:55.000000000 +0100
++++ pcbnew/xchgmod.cpp 2014-02-15 15:53:05.000000000 +0100
+@@ -649,7 +649,7 @@
+ for( ; Module != NULL; Module = Module->Next() )
+ {
+ fprintf( FichCmp, "\nBeginCmp\n" );
+- fprintf( FichCmp, "TimeStamp = %8.8lX\n", Module->GetTimeStamp() );
++ fprintf( FichCmp, "TimeStamp = %8.8lX\n", (u_long)Module->GetTimeStamp() );
+ fprintf( FichCmp, "Path = %s\n", TO_UTF8( Module->m_Path ) );
+ fprintf( FichCmp, "Reference = %s;\n",
+ !Module->m_Reference->m_Text.IsEmpty() ?