public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
Date: Tue, 17 Dec 2019 18:14:19 +0000 (UTC)	[thread overview]
Message-ID: <1576606448.6d7413c3d947d61ebc56979556836f8046774b16.juippis@gentoo> (raw)

commit:     6d7413c3d947d61ebc56979556836f8046774b16
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Sat Nov 16 10:07:45 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec 17 18:14:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d7413c3

sci-electronics/kicad: Bump to 5.1.5 version

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-electronics/kicad/Manifest                     |   1 +
 sci-electronics/kicad/files/kicad-5.1.5-help.patch | 117 ++++++++++++++++++
 .../kicad/files/kicad-5.1.5-ninja-build.patch      |  45 +++++++
 sci-electronics/kicad/files/ldflags.patch          |  17 +++
 sci-electronics/kicad/kicad-5.1.5.ebuild           | 134 +++++++++++++++++++++
 5 files changed, 314 insertions(+)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index 533c9ef6a4b..be715a6e32b 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -4,5 +4,6 @@ DIST kicad-5.0.1.tar.xz 14241544 BLAKE2B 47b6f8f4443e547dc1251e609b53fc998006c6a
 DIST kicad-5.1.0.tar.xz 14191708 BLAKE2B 182b2e2d3ddef3d8cae1552b869427b5d63082aeaa1d3bd15d977c5421084fa6134f8d244a3024b46aa56c98c8412d3f1ba8f72b40c73ab9bfebea7535a8a4ad SHA512 644865932d7e18e446c222cd85e969bb3462bca7fbf6c411e955cd460f5df45ed5221c0948ecd34262a2f5355e586c8fe04c1cb28fa51e4fd09d6f3f78c54761
 DIST kicad-5.1.2.tar.xz 14191500 BLAKE2B f25de921a8f412dd52ad7afe31c95e3db5d497126925cb024ba31519b1bc1acdc573c4465aaee0b4acf73002100361bb95e4ca325b5199717f1827480d7e1f6e SHA512 5280be13d82d675aecab208f6d05ac8ac31a8f4d620c541748a1c519f8587b0250f189d8c5cdc0d7fa19b52780e5c68bb3e1956a3f303bb183bfb4c59062be1b
 DIST kicad-5.1.4.tar.xz 14198672 BLAKE2B 99d317df6f2446611614c8d4294b4f8ff81082d2d74d701b616225c5667f96dd5a5bc47511e1af869351af3707244a6d660ff6a3257fe70e1e15df67c8d9fa3b SHA512 ce0efb740686eafdbbdf8cda68ad800a70c8991302f984be3db4bbdb3bfafe1634871ec6ea26bb6854a417db6336880e5a043dc022ef8126c0e98abc90671337
+DIST kicad-5.1.5.tar.xz 14203632 BLAKE2B cda7bf95c8edbddd36489f299dca9393ee51658e828f7e9f37bfa56955924785186908b0d8c91ae3e895f15cdba50c7579cf7a450e525f4a2ba215a721df26dd SHA512 5ca19e219da07a906f13e236849eb4497c9f827726a5cd13aceffe1d8c7dee480823bf3e949527f59a805eb3b8176fad51576ae663dd07b10e2822f2b37866a5
 DIST kicad-footprints-4.0.7.tar.gz 4758012 BLAKE2B ca7ddcad3d1ca658d0d5b7c0a4a0e9a3906619bdbf14195b3bd14c528c01b6e9c1f185036ad495fc88a33a53040ae4d338230d8b2bbb598a69a1c07ddfec3cce SHA512 9ba08f528d4b3fa6f165a20333ad2e0f6bc4165b51da77bdb080ad2c8cc12c029927ddb2f6aa669b4dac5fac52b8bdbec803d1b7b3fc639e9481bb866b8e3d6f
 DIST kicad-library-4.0.7.tar.gz 475804416 BLAKE2B 0d6df1df7a72258e896552551996ff13e985976e03b6aafbe900dcc04c9b8eb6e5c1abc242ae5020c1bd20b51e9cc1e60f520b478954edcb6368db7f9ee46df0 SHA512 c5365e18e806102aace785895259deca708a61e0ce37262f5ee2482a8a1f86bc9ce1d37e0fb63cb0661bd5c71064ac36ca2260c9c02ed9790744eedd0a5b5360

diff --git a/sci-electronics/kicad/files/kicad-5.1.5-help.patch b/sci-electronics/kicad/files/kicad-5.1.5-help.patch
new file mode 100644
index 00000000000..1b37e3013c1
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.1.5-help.patch
@@ -0,0 +1,117 @@
+diff -Naur kicad-5.1.5-orig/CMakeLists.txt kicad-5.1.5/CMakeLists.txt
+--- kicad-5.1.5-orig/CMakeLists.txt	2019-11-14 09:09:45.000000000 -0800
++++ kicad-5.1.5/CMakeLists.txt	2019-12-15 03:41:57.574995996 -0800
+@@ -442,6 +442,10 @@
+ set( KIFACE_PREFIX  "_" )
+ #message( STATUS "KIFACE_SUFFIX:${KIFACE_SUFFIX}  KIFACE_PREFIX:${KIFACE_PREFIX}" )
+ 
++# KICAD_HELP is the location of the help files accessed from the UI
++# (usually provided via kicad-doc package)
++set ( KICAD_HELP share/doc/kicad
++    CACHE PATH "Alternative location of KiCad help files.")
+ 
+ #================================================
+ # Locations for install targets.
+diff -Naur kicad-5.1.5-orig/CMakeModules/config.h.cmake kicad-5.1.5/CMakeModules/config.h.cmake
+--- kicad-5.1.5-orig/CMakeModules/config.h.cmake	2019-11-14 09:09:45.000000000 -0800
++++ kicad-5.1.5/CMakeModules/config.h.cmake	2019-12-15 03:42:00.368013375 -0800
+@@ -59,6 +59,10 @@
+ /// The install prefix defined during CMake configuration or fall back to CMAKE_INSTALL_PREFIX.
+ #define DEFAULT_INSTALL_PATH            "@DEFAULT_INSTALL_PATH@"
+ 
++/// KiCad help files path can be different on some systems allow adding alternative,
++/// search path for them. Defaults to CMAKE_INSTALL_PREFIX/share/doc/kicad
++#define KICAD_HELP                       "@KICAD_HELP@"
++
+ /// The wxPython version found during configuration.
+ #if defined( KICAD_SCRIPTING_WXPYTHON )
+ #define WXPYTHON_VERSION                "@WXPYTHON_VERSION@"
+diff -Naur kicad-5.1.5-orig/common/searchhelpfilefullpath.cpp kicad-5.1.5/common/searchhelpfilefullpath.cpp
+--- kicad-5.1.5-orig/common/searchhelpfilefullpath.cpp	2019-11-14 09:09:45.000000000 -0800
++++ kicad-5.1.5/common/searchhelpfilefullpath.cpp	2019-12-15 03:42:03.168030796 -0800
+@@ -25,7 +25,7 @@
+ 
+ #include <pgm_base.h>
+ #include <common.h>
+-#include <config.h>     // to define DEFAULT_INSTALL_PATH
++#include <config.h>     // to define DEFAULT_INSTALL_PATH and KICAD_HELP
+ #include <macros.h>
+ #include <trace_helpers.h>
+ 
+@@ -69,6 +69,10 @@
+     wxArrayString   subdirs;
+     wxArrayString   altsubdirs;
+     SEARCH_STACK    ss = aSStack;
++#if ! defined(__WXMAC__) // && defined(__linux__)
++    SEARCH_STACK    altss;
++    wxArrayString   moresubdirs;
++#endif
+ 
+     // It might already be in aSStack, but why depend on other code
+     // far away when it's so easy to add it again (to our copy) as the first place to look.
+@@ -76,6 +80,7 @@
+     // This is CMAKE_INSTALL_PREFIX unless DEFAULT_INSTALL_PATH was defined during
+     // build configuration:
+     ss.AddPaths( wxT( DEFAULT_INSTALL_PATH ), 0 );
++    altss.AddPaths( wxT( KICAD_HELP ), 0 );
+ 
+ #if defined(__WXMAC__)
+     ss.AddPaths( GetOSXKicadMachineDataDir() );
+@@ -104,16 +109,17 @@
+ 
+     // Based on kicad-doc.bzr/CMakeLists.txt, line 20, the help files are
+     // installed into "<CMAKE_INSTALL_PREFIX>/share/doc/kicad/help" for linux.
+-    // This is ${KICAD_HELP} var in that CMakeLists.txt file.
+     // Below we account for an international subdirectory.
+     subdirs.Add( "share" );
+     subdirs.Add( "doc" );
+     subdirs.Add( "kicad" );
+     subdirs.Add( "help" );
+ 
++    // For custom help path installations via ${KICAD_HELP}
++    moresubdirs.Add( "help" );
++
+     // Based on kicad-doc.bzr/CMakeLists.txt, line 35, the help files are
+     // installed into "<CMAKE_INSTALL_PREFIX>/doc/help" for Windows.
+-    // This is ${KICAD_HELP} var in that CMakeLists.txt file.
+     // Below we account for an international subdirectory.
+     altsubdirs.Add( "doc" );
+     altsubdirs.Add( "help" );
+@@ -159,6 +165,9 @@
+     {
+         subdirs.Add( locale_name_dirs[ii] );
+         altsubdirs.Add( locale_name_dirs[ii] );
++#if ! defined(__WXMAC__) // && defined(__linux__)
++        moresubdirs.Add( locale_name_dirs[ii] );
++#endif
+ 
+         fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &altsubdirs );
+ 
+@@ -188,8 +197,27 @@
+         if( !fn.IsEmpty() )
+             break;
+ 
++#if ! defined(__WXMAC__) // && defined(__linux__)
++        fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".html" ), &moresubdirs );
++
++        if( !fn.IsEmpty() )
++        {
++            // Prepend URI protocol since we will open in a browser
++            fn = wxT( "file://" ) + fn;
++            break;
++        }
++
++        fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".pdf" ), &moresubdirs );
++
++        if( !fn.IsEmpty() )
++            break;
++#endif
++
+         subdirs.RemoveAt( subdirs.GetCount() - 1 );
+         altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 );
++#if ! defined(__WXMAC__) // && defined(__linux__)
++        moresubdirs.RemoveAt( altsubdirs.GetCount() - 1 );
++#endif
+     }
+ 
+     return fn;

diff --git a/sci-electronics/kicad/files/kicad-5.1.5-ninja-build.patch b/sci-electronics/kicad/files/kicad-5.1.5-ninja-build.patch
new file mode 100644
index 00000000000..3aac927b5bd
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.1.5-ninja-build.patch
@@ -0,0 +1,45 @@
+diff -Naur kicad-5.1.5-orig/pcbnew/CMakeLists.txt kicad-5.1.5/pcbnew/CMakeLists.txt
+--- kicad-5.1.5-orig/pcbnew/CMakeLists.txt	2019-11-14 09:09:45.000000000 -0800
++++ kicad-5.1.5/pcbnew/CMakeLists.txt	2019-12-15 03:47:03.479894245 -0800
+@@ -808,11 +808,7 @@
+         add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
+         set( PYMOD_EXT "so" )
+     else()  # only linux remains among supported platforms
+-        add_library( pcbnew_python MODULE $<TARGET_OBJECTS:pcbnew_kiface_objects> )
+-        target_link_libraries( pcbnew_python ${PCBNEW_KIFACE_LIBRARIES} )
+-        set_target_properties( pcbnew_python PROPERTIES OUTPUT_NAME pcbnew PREFIX "_" SUFFIX ".so" )
+-        install( TARGETS pcbnew_python DESTINATION ${PYTHON_DEST} COMPONENT binary )
+-
++        install( FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.kiface DESTINATION ${PYTHON_DEST} COMPONENT binary RENAME "_pcbnew.so" )
+         set( PYMOD_EXT "so" )
+     endif()
+ 
+@@ -827,18 +823,16 @@
+             DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
+             )
+     else()
+-
+-
+-    # For phase 1, copy _pcbnew.kiface to the python module.
+-    add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
+-        DEPENDS pcbnew_kiface
+-        COMMAND ${CMAKE_COMMAND} -E copy _pcbnew.kiface _pcbnew.${PYMOD_EXT}
+-        COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
+-        )
+-    add_custom_target(
+-        pcbnew_python_module ALL
+-        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
+-        )
++        # For phase 1, copy _pcbnew.kiface to the python module.
++        add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
++            DEPENDS pcbnew_kiface
++            COMMAND ${CMAKE_COMMAND} -E copy _pcbnew.kiface _pcbnew.${PYMOD_EXT}
++            COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
++            )
++        add_custom_target(
++            pcbnew_python_module ALL
++            DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
++            )
+     endif()
+ 
+ endif()

diff --git a/sci-electronics/kicad/files/ldflags.patch b/sci-electronics/kicad/files/ldflags.patch
new file mode 100644
index 00000000000..1495037b1b7
--- /dev/null
+++ b/sci-electronics/kicad/files/ldflags.patch
@@ -0,0 +1,17 @@
+diff -Naur kicad-5.1.5-orig/CMakeLists.txt kicad-5.1.5/CMakeLists.txt
+--- kicad-5.1.5-orig/CMakeLists.txt	2019-11-14 09:09:45.000000000 -0800
++++ kicad-5.1.5/CMakeLists.txt	2019-11-19 02:08:32.309282631 -0800
+@@ -355,10 +355,10 @@
+ 
+     elseif( NOT APPLE )
+         # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it)
+-        set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+-        set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
++        set( CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS} -Wl,--no-undefined" )
++        set( CMAKE_MODULE_LINKER_FLAGS "$ENV{LDFLAGS} -Wl,--no-undefined" )
+ 
+-        set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
++        set( CMAKE_EXE_LINKER_FLAGS_RELEASE "$ENV{LDFLAGS} -s" )
+ 
+         # Defeat ELF's ability to use the GOT to replace locally implemented functions
+         # with ones from another module.

diff --git a/sci-electronics/kicad/kicad-5.1.5.ebuild b/sci-electronics/kicad/kicad-5.1.5.ebuild
new file mode 100644
index 00000000000..a002d82b7fd
--- /dev/null
+++ b/sci-electronics/kicad/kicad-5.1.5.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit check-reqs cmake-utils eutils python-single-r1 toolchain-funcs wxwidgets xdg-utils
+
+DESCRIPTION="Electronic Schematic and PCB design tools"
+HOMEPAGE="https://www.kicad-pcb.org"
+SRC_URI="https://launchpad.net/${PN}/5.0/${PV}/+download/${P}.tar.xz"
+
+LICENSE="GPL-2+ GPL-3+ Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples github +ngspice occ +oce openmp +python"
+
+REQUIRED_USE="
+	python? ( ${PYTHON_REQUIRED_USE} )
+	?? ( occ oce )
+"
+
+COMMON_DEPEND="
+	>=dev-libs/boost-1.61:=[context,nls,threads,python?,${PYTHON_USEDEP}]
+	media-libs/freeglut
+	media-libs/glew:0=
+	>=media-libs/glm-0.9.9.1
+	media-libs/mesa[X(+)]
+	>=x11-libs/cairo-1.8.8:=
+	>=x11-libs/pixman-0.30
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+	github? ( net-misc/curl:=[ssl] )
+	ngspice? (
+		sci-electronics/ngspice[shared]
+	)
+	occ? ( >=sci-libs/opencascade-6.8.0:= )
+	oce? ( sci-libs/oce )
+	python? (
+		dev-python/wxpython:4.0[${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	doc? ( app-doc/doxygen )
+	python? ( >=dev-lang/swig-3.0:0 )"
+RDEPEND="${COMMON_DEPEND}
+	sci-electronics/electronics-menu
+"
+CHECKREQS_DISK_BUILD="800M"
+
+PATCHES=(
+	"${FILESDIR}"/"${PN}-5.1.5-help.patch"
+	"${FILESDIR}"/"${PN}-5.1.5-ninja-build.patch"
+	"${FILESDIR}"/"ldflags.patch"
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+	use openmp && tc-check-openmp
+	setup-wxwidgets
+	check-reqs_pkg_setup
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local mycmakeargs=(
+		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${P}"
+		-DKICAD_HELP="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
+		-DBUILD_GITHUB_PLUGIN="$(usex github)"
+		-DKICAD_SCRIPTING="$(usex python)"
+		-DKICAD_SCRIPTING_MODULES="$(usex python)"
+		-DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
+		-DKICAD_SCRIPTING_WXPYTHON_PHOENIX="$(usex python)"
+		-DKICAD_SCRIPTING_PYTHON3="$(usex python)"
+		-DKICAD_SCRIPTING_ACTION_MENU="$(usex python)"
+		-DKICAD_SPICE="$(usex ngspice)"
+		-DKICAD_USE_OCC="$(usex occ)"
+		-DKICAD_USE_OCE="$(usex oce)"
+		-DKICAD_INSTALL_DEMOS="$(usex examples)"
+	)
+	use python && mycmakeargs+=(
+		-DPYTHON_DEST="$(python_get_sitedir)"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+	)
+	use occ && mycmakeargs+=(
+		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
+		-DOCC_LIBRARY_DIR="${CASROOT}"/lib
+	)
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use doc; then
+		cmake-utils_src_compile dev-docs doxygen-docs
+	fi
+}
+
+src_install() {
+	cmake-utils_src_install
+	use python && python_optimize
+	if use doc ; then
+		dodoc uncrustify.cfg
+		cd Documentation || die
+		dodoc -r *.txt kicad_doxygen_logo.png notes_about_pcbnew_new_file_format.odt doxygen/. development/doxygen/.
+	fi
+}
+
+pkg_postinst() {
+	optfeature "Component symbols library" sci-electronics/kicad-symbols
+	optfeature "Component footprints library" sci-electronics/kicad-footprints
+	optfeature "3D models of components " sci-electronics/kicad-packages3d
+	optfeature "Project templates" sci-electronics/kicad-templates
+	optfeature "Different languages for GUI" sci-electronics/kicad-i18n
+	optfeature "Extended documentation" app-doc/kicad-doc
+	optfeature "Creating 3D models of components" media-gfx/wings
+
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+	xdg_icon_cache_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+	xdg_icon_cache_update
+}


             reply	other threads:[~2019-12-17 18:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 18:14 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-15 20:15 [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/ Sam James
2024-03-27 11:41 Yixun Lan
2023-07-18 19:15 Sam James
2023-02-18 10:46 Matthew Smith
2023-01-30  4:01 Sam James
2022-06-21 20:44 Sam James
2020-09-25 20:22 Michał Górny
2020-06-06 17:47 Alexey Shvetsov
2020-05-14 10:36 Alexey Shvetsov
2019-08-03  9:28 Alexey Shvetsov
2019-04-07 16:53 Alexey Shvetsov
2019-01-02 16:51 Amy Liffey
2018-09-27 13:37 Virgil Dupras
2018-09-07 12:03 Virgil Dupras
2016-04-13  7:29 Ian Delaney
2015-11-01  4:23 Ian Delaney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1576606448.6d7413c3d947d61ebc56979556836f8046774b16.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox