public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2015-11-01  4:23 Ian Delaney
  0 siblings, 0 replies; 17+ messages in thread
From: Ian Delaney @ 2015-11-01  4:23 UTC (permalink / raw
  To: gentoo-commits

commit:     7061259150fb5832c68a3ffc0b83242049e2ee63
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Tue Oct 27 02:41:27 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun Nov  1 03:51:35 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70612591

sci-electronics/kicad: bump to KiCad-4.0.0-rc1

New use flags: examples, github, i18n, minimal, python, webkit.
More languages for i18n. Package source now downloads from project
website. Update dependencies and address wxwidgets upgrade issue.
USE flag 'debug' made functional in the bumped ebuild. Remove
outdated kicad-20130518.ebuild

Gentoo-Bug: #560768
Gentoo-Bug: #499040
Gentoo-Bug: #560766

Pull request https://github.com/gentoo/gentoo/pull/313

 sci-electronics/kicad/Manifest                     |   5 +-
 .../kicad/files/kicad-desktop-file.patch           |  35 ----
 .../kicad/files/kicad-missing-doc.patch            |  25 ---
 .../kicad/files/kicad-native-boost.patch           |  27 ---
 sci-electronics/kicad/files/kicad-scripts.patch    |  25 ---
 sci-electronics/kicad/kicad-20130518.ebuild        | 129 ---------------
 sci-electronics/kicad/kicad-4.0.0_rc1.ebuild       | 183 +++++++++++++++++++++
 sci-electronics/kicad/metadata.xml                 |  11 +-
 8 files changed, 196 insertions(+), 244 deletions(-)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index 8d9fa05..37addfd 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,2 +1,3 @@
-DIST kicad-2013-05-18-BZR4017-stable-UBUNTU_12.04_full_with_components_doc.tgz 280828915 SHA256 48c91acb9d4f45c7eebbcf4d602841896f11f22bb00721c62d351dd7241efd0b SHA512 8c4b81077c7e23bae6ad6a167fca7e34c006fc6a2a28457ddc276bef94ab43f6bf29f460a9ed5d9e564ef144a106ee82362b3cead3ca64b1361466d8d390619d WHIRLPOOL ed51fdc7ee287d65f4002250e79652d791d2aebe2fc872e1b853cfeccd287bf548346824ffc9afb599ff21721e972db7a5b3c134c662e883cd7d1e5c5b6c5abe
-DIST kicad-sources-stable_2013-05-18_BZR4017.zip 15025159 SHA256 cb9ca0d19e5ea8ca45c731eeddbd8a242eb696e619ee98af91f2c7a0095b393d SHA512 747e4719a426646cf38b9951d28aea32085d672371426b44d9f9a575b55e051925ae3fd6c98aea6fa2c21c2c6a6a2f6cc2da461c882b854d033f5d1ce58384ba WHIRLPOOL 69dbeed6da6d1400207c048a49008d6b0876df184d64c520b82e7e82e3826a04ada5563551f1498244ee4d67ec7731f81285a604e671ee73f6518f211ecb8ef0
+DIST kicad-4.0.0-rc1.tar.xz 10951000 SHA256 62c2e95a2d6b8a3cf30bb91146c3d2b1c0df0cbfc070b6e54bcfdf0da2df6973 SHA512 f158906b85e3c4032086c4a75563d47f75f183bc354e1f2fa55e157083005b51829c141e14171dea9092b9b24b6b5ff1c71e3ae485dd1d2d44fe7e63179c1ffa WHIRLPOOL 755fde28cf45196bb60ffb6af7bc0acb92148310ad74807ef71404c418557bc2c6243f41e9040c0217dc970061df09a4092e2a5e52e016888660e4998153c95a
+DIST kicad-4.0.0_rc1-i18n.tar.gz 1959024 SHA256 5fbd037e4a76a83ed6be7554ab1add98f7d93dce0db5fea6a0bcd58ef61486bd SHA512 85c2db5d193cd4d1521eb9f454a13892680cb5340c3b86b264bceb36ce0c996f818b64c3edd9dae3ff51046c97ba33702649a1083a36f27a80d316f64465f630 WHIRLPOOL 8141fb59822fdda2bf46a9b8af7fe75d6557a1c3f384e5e2b03e58c5e4c9eca4f167a262f2ed9fd3479c64a8730ff1ba3f46f6cb72c680df9c6d6173ca611ada
+DIST kicad-4.0.0_rc1-library.tar.gz 87967616 SHA256 09a9e184e19b6072efdc00fabb65e3c0d498858c17f5fa5ce8d255b21eab3db4 SHA512 f611015a8760d3c9cf26fd99a043d69fa75d398fb287af7e6fe7cfbd70d3ff1aa67abcedeffa00fef60434e3944ac6b59fa4ac9ea50097d910fbabcb6f288165 WHIRLPOOL 83585bbc772da122139dfa643c4045bfef207ea8dbc4a83a5458be6227ff976fe9c48cea2388f9ec0b20e7c697579701b75231b852161b33a9c51ddef480c6f4

diff --git a/sci-electronics/kicad/files/kicad-desktop-file.patch b/sci-electronics/kicad/files/kicad-desktop-file.patch
deleted file mode 100644
index 7f982f7..0000000
--- a/sci-electronics/kicad/files/kicad-desktop-file.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From cacd01f36db6277111a35fe60ad4762ee3b002e1 Mon Sep 17 00:00:00 2001
-From: Denis Dupeyron <calchan@gentoo.org>
-Date: Thu, 18 Apr 2013 15:17:36 -0600
-Subject: [PATCH] Fix desktop category and semicolon
-
----
- resources/linux/mime/applications/eeschema.desktop | 2 +-
- resources/linux/mime/applications/kicad.desktop    | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/resources/linux/mime/applications/eeschema.desktop b/resources/linux/mime/applications/eeschema.desktop
-index 3042eae..0ed616c 100644
---- a/resources/linux/mime/applications/eeschema.desktop
-+++ b/resources/linux/mime/applications/eeschema.desktop
-@@ -1,5 +1,5 @@
- [Desktop Entry]
--Categories=Development;Electronics
-+Categories=Electronics;
- Comment=Design an electronic schematic
- Comment[fr]=Dessiner des schémas électroniques
- Exec=eeschema
-diff --git a/resources/linux/mime/applications/kicad.desktop b/resources/linux/mime/applications/kicad.desktop
-index 1d7645b..3a23e34 100644
---- a/resources/linux/mime/applications/kicad.desktop
-+++ b/resources/linux/mime/applications/kicad.desktop
-@@ -1,5 +1,5 @@
- [Desktop Entry]
--Categories=Development;Electronics
-+Categories=Electronics;
- Comment=Design a printed circuit board
- Comment[fr]=Concevoir un circuit imprimé
- Exec=kicad
--- 
-1.8.2.1
-

diff --git a/sci-electronics/kicad/files/kicad-missing-doc.patch b/sci-electronics/kicad/files/kicad-missing-doc.patch
deleted file mode 100644
index 3b9f966..0000000
--- a/sci-electronics/kicad/files/kicad-missing-doc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 096b02e38c5e86902d5403fcb14313be8dd70fb3 Mon Sep 17 00:00:00 2001
-From: Denis Dupeyron <calchan@gentoo.org>
-Date: Thu, 18 Apr 2013 08:11:28 -0600
-Subject: [PATCH] Add missing documentation
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9e6e29a..1069a5f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -415,7 +415,7 @@ add_custom_target(uninstall
- #================================================
- # Installation parameters
- #================================================
--install(FILES INSTALL.txt
-+install(FILES AUTHORS.txt CHANGELOG.txt README.txt
-     DESTINATION ${KICAD_DOCS}
-     COMPONENT resources)
- 
--- 
-1.8.2.1
-

diff --git a/sci-electronics/kicad/files/kicad-native-boost.patch b/sci-electronics/kicad/files/kicad-native-boost.patch
deleted file mode 100644
index 595d5f3..0000000
--- a/sci-electronics/kicad/files/kicad-native-boost.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 50a62d296e803b75ae46c964173e8b2be0661618 Mon Sep 17 00:00:00 2001
-From: Denis Dupeyron <calchan@gentoo.org>
-Date: Thu, 18 Apr 2013 08:01:43 -0600
-Subject: [PATCH] Use native Boost
-
----
- CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e3c6ae2..9e6e29a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -260,8 +260,8 @@ check_find_package_result(OPENGL_FOUND "OpenGL")
- # kicad now includes needed boost files.
- # the two next lines can be uncommented to use the native boost lib.
- # but this is not a good idea
--#find_package(Boost 1.36 QUIET)
--#check_find_package_result(Boost_FOUND "Boost")
-+find_package(Boost 1.36 QUIET)
-+check_find_package_result(Boost_FOUND "Boost")
- 
- ##########################
- # Find wxWidgets library #
--- 
-1.8.2.1
-

diff --git a/sci-electronics/kicad/files/kicad-scripts.patch b/sci-electronics/kicad/files/kicad-scripts.patch
deleted file mode 100644
index 9f46157..0000000
--- a/sci-electronics/kicad/files/kicad-scripts.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 065491b83fb7f82606150aa89e70ac99738992e0 Mon Sep 17 00:00:00 2001
-From: Denis Dupeyron <calchan@gentoo.org>
-Date: Wed, 5 Jun 2013 14:03:07 -0600
-Subject: [PATCH] Fix install location of scripts directory
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 59fe7c3..3f3bb14 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -428,7 +428,7 @@ install(FILES resources/freeroute.jnlp
- ###
- if(UNIX)
-     install(DIRECTORY scripts
--            DESTINATION ${KICAD_DOCS}
-+            DESTINATION ${KICAD_DATA}
-             COMPONENT resources
-             PATTERN ".svn" EXCLUDE)
- endif()
--- 
-1.8.2.1
-

diff --git a/sci-electronics/kicad/kicad-20130518.ebuild b/sci-electronics/kicad/kicad-20130518.ebuild
deleted file mode 100644
index 4b7a080..0000000
--- a/sci-electronics/kicad/kicad-20130518.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-#TODO:
-# - python and wxpython scripting
-
-EAPI="5"
-
-WX_GTK_VER="2.8"
-
-inherit eutils unpacker cmake-utils wxwidgets fdo-mime gnome2-utils
-
-DESCRIPTION="Electronic Schematic and PCB design tools"
-HOMEPAGE="http://www.kicad-pcb.org"
-
-RELEASE_DATE="2013-05-18"
-BZR_REV="4017"
-UBUNTU_VER="12.04"
-BASE_SRC_URI="http://iut-tice.ujf-grenoble.fr/cao"
-SRC_URI="${BASE_SRC_URI}/${PN}-sources-stable_${RELEASE_DATE}_BZR${BZR_REV}.zip
-	${BASE_SRC_URI}/${PN}-${RELEASE_DATE}-BZR${BZR_REV}-stable-UBUNTU_${UBUNTU_VER}_full_with_components_doc.tgz"
-
-LICENSE="GPL-2 kicad-doc"
-SLOT="0"
-
-KEYWORDS="~amd64 ~x86"
-
-IUSE="debug"
-LANGS="de en es fr hu it ja pl pt ru zh_CN"
-for lang in ${LANGS} ; do
-	IUSE="${IUSE} linguas_${lang}"
-done
-
-CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[gnome,opengl,X]
-	dev-python/wxpython:${WX_GTK_VER}[opengl]"
-DEPEND="${CDEPEND}
-	>=dev-util/cmake-2.6.4
-	>=dev-libs/boost-1.49[python]
-	app-doc/doxygen"
-RDEPEND="${CDEPEND}
-	sys-libs/zlib
-	sci-electronics/electronics-menu"
-
-S="${WORKDIR}/stable_${RELEASE_DATE}_BZR${BZR_REV}"
-
-src_prepare() {
-	epatch "${FILESDIR}/${PN}-native-boost.patch"
-	epatch "${FILESDIR}/${PN}-desktop-file.patch"
-	epatch "${FILESDIR}/${PN}-scripts.patch"
-	epatch "${FILESDIR}/${PN}-missing-doc.patch"
-	rm -f resources/linux/mime/applications/eeschema.desktop
-}
-
-src_configure() {
-	need-wxwidgets unicode
-
-	mycmakeargs="${mycmakeargs}
-		-DKICAD_STABLE_VERSION=ON
-		-DKICAD_wxUSE_UNICODE=ON
-		-DKICAD_DOCS=/usr/share/doc/${PN}
-		-DKICAD_HELP=/usr/share/doc/${PN}"
-
-#		-DKICAD_SCRIPTING=ON
-#		-DKICAD_SCRIPTING_MODULES=ON
-#		-DKICAD_SCRIPTING_WXPYTHON=ON
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile all doxygen-docs
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	insinto /usr/share/${PN}
-	doins -r "${WORKDIR}/${PN}/share/library"
-	doins -r "${WORKDIR}/${PN}/share/modules"
-
-	insinto /usr/share/doc/${PN}
-	doins -r "${WORKDIR}/${PN}/doc/contrib"
-
-	insinto /usr/share/doc/${PN}/help
-	for lang in $LANGS ; do
-		if [[ -d "${WORKDIR}/${PN}/doc/help/${lang}" ]] ; then
-			use linguas_$lang && doins -r "${WORKDIR}/${PN}/doc/help/${lang}"
-		fi
-	done
-
-	insinto /usr/share/doc/${PN}/tutorials
-	for lang in $LANGS ; do
-		if [[ -d "${WORKDIR}/${PN}/doc/tutorials/${lang}" ]] ; then
-			use linguas_$lang && doins -r "${WORKDIR}/${PN}/doc/tutorials/${lang}"
-		fi
-	done
-
-	local dev_doc="/usr/share/doc/${PN}/development"
-	insinto ${dev_doc}
-	doins HOW_TO_CONTRIBUTE.txt notes_about_pcbnew_new_file_format.odt TODO.txt uncrustify.cfg
-	doins "${WORKDIR}/${PN}/doc/help/file_formats/file_formats.pdf"
-	cd Documentation
-	doins -r *
-
-	docompress -x \
-		${dev_doc}/GUI_Translation_HOWTO.odt \
-		${dev_doc}/notes_about_pcbnew_new_file_format.odt \
-		${dev_doc}/uncrustify.cfg
-		${dev_doc}/file_formats.pdf
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-	gnome2_icon_cache_update
-
-	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
-}
-
-pkg_postrm() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-	gnome2_icon_cache_update
-}

diff --git a/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild b/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild
new file mode 100644
index 0000000..257c293
--- /dev/null
+++ b/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+WX_GTK_VER="3.0"
+
+inherit cmake-utils fdo-mime flag-o-matic gnome2-utils python-single-r1 python-utils-r1 vcs-snapshot wxwidgets versionator
+
+DESCRIPTION="Electronic Schematic and PCB design tools."
+HOMEPAGE="http://www.kicad-pcb.org"
+
+SERIES=$(get_version_component_range 1-2)
+MY_PV=$(replace_version_separator 3 '-')
+
+LIB_REVISION="bd0ec6a20c7cc0556093f60eac723e4505947784"
+DOC_REVISION="0d0ed7b9de3afbba5d51fb6d7a25834000ed1099"
+I18N_REVISION="bf793d30d64f4e75ea7a109ea434c1a27926b158"
+
+SRC_URI="https://launchpad.net/${PN}/${SERIES}/${MY_PV}/+download/${PN}-${MY_PV}.tar.xz
+	!minimal? ( https://github.com/KiCad/${PN}-library/tarball/${LIB_REVISION} -> ${P}-library.tar.gz )
+	i18n? ( https://github.com/KiCad/${PN}-i18n/tarball/${I18N_REVISION} -> ${P}-i18n.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples github i18n minimal python webkit"
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
+for lang in ${LANGS} ; do
+	IUSE="${IUSE} linguas_${lang}"
+done
+unset lang
+
+REQUIRED_USE="
+	github? ( webkit )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit?]
+	python? (
+		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+	>=dev-libs/boost-1.56[context,threads,python?]
+	github? ( dev-libs/openssl:0 )
+	media-libs/glew
+	media-libs/freeglut
+	media-libs/mesa
+	sys-libs/zlib
+	x11-libs/cairo"
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	doc? ( app-doc/doxygen )
+	i18n? ( >=sys-devel/gettext-0.18 )
+	python? ( dev-lang/swig:0 )"
+RDEPEND="${CDEPEND}
+	sci-electronics/electronics-menu"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	if use python; then
+		# dev-python/wxpython doesn't support python3
+		sed '/set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)/d' -i CMakeModules/FindPythonLibs.cmake || die "sed failed"
+	fi
+
+	# Handle optional minimal install.
+	if use minimal; then
+		# remove tempaltes as they are not needed to run binaries
+		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die "sed failed"
+	else
+		# create a link to the parts library in the main project folder
+		ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed"
+		# add the libraries directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed"
+		# add the libraries directory subproject also to uninstallation procedures
+		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add internationalization for the GUI
+	if use i18n; then
+		# create a link to the translations library in the main project folder
+		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die "ln failed"
+		# Remove unused languages. Project generates only languages specified in the
+		# file in LINGUAS in the subproject folder. By default all languages are added
+		# so we sed out the unused ones based on the user linguas_* settings.
+		local lang=""
+		for lang in ${LANGS}; do
+			if ! use linguas_${lang}; then
+				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed"
+			fi
+		done
+		# cmakelists does not respect our build dir variables, so make it point to the right location
+		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# we also make from the master project so the source dir is understood incorretly, replace that too 
+		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# add the translations directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed"
+		# add the translations directory subproject also to uninstallation procedures
+		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Install examples in the right place if requested
+	if use examples; then
+		sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed"
+	else
+		sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add important missing doc files
+	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+	need-wxwidgets unicode
+
+	local mycmakeargs=(
+		-DKICAD_DOCS="/usr/share/doc/${PF}"
+		-DKICAD_HELP="/usr/share/doc/${PF}/help"
+		-DwxUSE_UNICODE=ON
+		-DKICAD_SKIP_BOOST=ON
+		$(cmake-utils_use github BUILD_GITHUB_PLUGIN)
+		$(cmake-utils_use python KICAD_SCRIPTING)
+		$(cmake-utils_use python KICAD_SCRIPTING_MODULES)
+		$(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
+		$(cmake-utils_use webkit KICAD_USE_WEBKIT)
+		$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
+	)
+	if use debug; then
+		append-flags "-DDEBUG"
+	fi
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use doc; then
+		doxygen Doxyfile || die "doxygen failed"
+	fi
+}
+
+src_install() {
+	cmake-utils_src_install
+	use python && python_optimize "${D}/usr/$(get_libdir)/${EPYTHON}/site-packages/pcbnew.py"
+	if use doc ; then
+		insinto /usr/share/doc/${PF}
+		doins uncrustify.cfg
+		cd Documentation || die "cd failed"
+		doins -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/*
+	fi
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	fdo-mime_desktop_database_update
+	fdo-mime_mime_database_update
+	gnome2_icon_cache_update
+
+	if use minimal ; then
+		ewarn "If the schematic and/or board editors complain about missing libraries when you"
+		ewarn "open old projects, you will have to take one or more of the following actions :"
+		ewarn "- Install the missing libraries manually."
+		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
+		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
+		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
+		ewarn ""
+	fi
+	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+	fdo-mime_mime_database_update
+	gnome2_icon_cache_update
+}

diff --git a/sci-electronics/kicad/metadata.xml b/sci-electronics/kicad/metadata.xml
index 62924d2..43e97e3 100644
--- a/sci-electronics/kicad/metadata.xml
+++ b/sci-electronics/kicad/metadata.xml
@@ -1,9 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+	<herd>proxy-maintainers</herd>
 	<maintainer>
-		<email>maintainer-needed@gentoo.org</email>
+		<email>zoltan@sinustrom.info</email>
+		<name>Zoltan Puskas</name>
+		<description>Proxied maintainer. Assign bugs to him.</description>
 	</maintainer>
+	<use>
+		<flag name="github">Add github support into PCB editor</flag>
+		<flag name="i18n">Allow GUI internationalization through linguas_* use flags</flag>
+		<flag name="minimal">Build only binaries without parts library and examples</flag>
+		<flag name="python">Enable python scripting support</flag>
+	</use>
 	<longdescription>
 		Kicad is an open source (GPL) software for the creation of electronic
 		schematic diagrams and printed circuit board artwork.


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2016-04-13  7:29 Ian Delaney
  0 siblings, 0 replies; 17+ messages in thread
From: Ian Delaney @ 2016-04-13  7:29 UTC (permalink / raw
  To: gentoo-commits

commit:     c1e00fdcabd18dff609313e7a5db6beff210c63e
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Tue Apr 12 08:28:34 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:29:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1e00fdc

sci-electronics/kicad: Fix missing footprint library issue

Update ebuild to donwload and install previously missing footprint
libraries. Update ebuild in preparation to EAPI=6 migration.
Affected versions: 4.0.0, 4.0.1, 4.0.2

Gentoo Bug: 576820

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1241

Signed-off-by: Ian Delaney <idella4 <AT> gentoo.org>

 sci-electronics/kicad/Manifest                     |   3 +
 .../kicad/files/kicad-footprints-cmakelists.txt    |  16 ++
 sci-electronics/kicad/kicad-4.0.0-r1.ebuild        | 191 +++++++++++++++++++++
 sci-electronics/kicad/kicad-4.0.1-r1.ebuild        | 191 +++++++++++++++++++++
 sci-electronics/kicad/kicad-4.0.2-r1.ebuild        | 191 +++++++++++++++++++++
 5 files changed, 592 insertions(+)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index df08c95..86054cb 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -13,3 +13,6 @@ DIST kicad-4.0.1.tar.xz 10837804 SHA256 73a9f8713ba93ce34e5f9c26e9667f33a22f4e33
 DIST kicad-4.0.2-i18n.tar.gz 2290139 SHA256 05a9a5b1c9a2aa0e0712171c5e71cc3b74c43254a7d5fdd3d3c76e32ff927bea SHA512 2021706d0e96f6a82b57b8f187b703f37c32ee6efb99323ec191de141c2bfc89b590949cdbf2eea6cc618afc84bbac9fae758fdbb088aed3ab06649279bcab21 WHIRLPOOL 0797d587ed4009bc9be6aac0b19f2cd0581e497f074e6cfd33adff6a44b68c215c06c084d8221a57a0f39e228d70e9760bf368770d2bc7bd361be1688a65ab9b
 DIST kicad-4.0.2-library.tar.gz 105106185 SHA256 0499da0fa617248a4196e50ff65c0bf78cb456bf1ca4bd6c72d956044b310bef SHA512 14f7136ded81f54fcccbb4555f77b0079d637a08b15b2fd60b729226dbc5adfb5fe7489060ba1d3b949ca1d94d95623df28cceac93ee600165598d9fd78711e7 WHIRLPOOL c5080ad602684ccdb60493745714398027af2ba09b4a2187740b89fcac923941adda80c744a12338d8c6eda07763fdae12428a8c9d06379a637e3e0ee881bef1
 DIST kicad-4.0.2.tar.xz 10841200 SHA256 2eae6986843a29862ab399a30b50454582d22f58ed3f53eb50d0c85e5d488eb9 SHA512 b0817cca7b8d0216507d78c602d332deaf2a68528b129309067b01e254c6600af5513dea7f44570beb4a339bc044ef7966890a91aeda6fd5a95515657cd1628a WHIRLPOOL 7ae9b072addeea8cc3d6daa69b8f19d077604f0ec5d1e5dfed53efe6b0a32f6b12c1156c2f52092a859d9f716cab83d16b17b0e3abbc0c72a2bafacb3be27719
+DIST kicad-footprints-4.0.0.tar.gz 1056498 SHA256 684c1197dab01c2aa31de94fbe8530470a81d7729db73c39183792c45b0b54f0 SHA512 f19d1a662e39df46d3c11089f9a4baff83e56a0931259cd9ee9fcec1f3108f4c778e89f77168a544910b723ce1b6a99842dc34b323eed509973c8655620b0447 WHIRLPOOL 10a66194d03cfd52b5897fbd2e24fd1166b321e933b849729ea8fa3ee44aad0774057479dd8461bd50a779bb0df755dc5ac0141d43369e0ec7656522143c4b0c
+DIST kicad-footprints-4.0.1.tar.gz 801985 SHA256 e3b195706c8f30928c34478a87607e996def94a19982f8987a783b8e4ffe112f SHA512 4fef1792eee8be951c77a8684942ecfa9047b602796f90e746010d63f72f5981cb2c90efe28ba7bd7d22894256d23f71b47eb170056e7b4423f72120f5413725 WHIRLPOOL b41eb7149b14af4c3dd37bc19f7bba9afcc896c1b5d523e7bead0c6695dad7255527f952042589181876dc598d7a85963ab4f86b6c3179e0e82e6f187712c298
+DIST kicad-footprints-4.0.2.tar.gz 802003 SHA256 eff257abc2d5e4b1b87b2251c74b5c751271505c0605f31f8f4390dedff43f6f SHA512 2b54bbbcaac8ae17f9b27f2ba2542be10a84fda46266dfa249699d731ceb3de1c8129bcd1e88f045b2fb20af9a58658ef65390ea702e7c583923a50b10cd5a29 WHIRLPOOL bf9f9475092eb6a9167d5297731942c9f0ad48a49ba05d04db400cff64c46a413ffec68d524f39edbfee05fb55216da5b69dd2c1f409e955cb0758da1383b140

diff --git a/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt b/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
new file mode 100644
index 0000000..d024485
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
@@ -0,0 +1,16 @@
+project( kicad-footprints )
+
+cmake_minimum_required( VERSION 2.6.1 FATAL_ERROR )
+
+file(GLOB footprint_dirs "*.pretty")
+
+# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
+set( KICAD_DATA share/kicad
+    CACHE PATH "Location of KiCad data files." )
+set( KICAD_MODULES ${KICAD_DATA}/modules )
+
+mark_as_advanced( KICAD_DATA KICAD_MODULES )
+
+install(DIRECTORY ${footprint_dirs}
+    DESTINATION ${KICAD_MODULES}
+    COMPONENT resources)

diff --git a/sci-electronics/kicad/kicad-4.0.0-r1.ebuild b/sci-electronics/kicad/kicad-4.0.0-r1.ebuild
new file mode 100644
index 0000000..e55ea9e
--- /dev/null
+++ b/sci-electronics/kicad/kicad-4.0.0-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+WX_GTK_VER="3.0"
+
+inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 vcs-snapshot wxwidgets versionator xdg
+
+DESCRIPTION="Electronic Schematic and PCB design tools."
+HOMEPAGE="http://www.kicad-pcb.org"
+
+SERIES=$(get_version_component_range 1-2)
+
+SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
+	http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
+	!minimal? ( https://github.com/KiCad/${PN}-library/archive/${PV}.tar.gz -> ${P}-library.tar.gz )
+	i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples github i18n minimal +python webkit"
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
+for lang in ${LANGS} ; do
+	IUSE="${IUSE} linguas_${lang}"
+done
+unset lang
+unset LANGS
+
+REQUIRED_USE="
+	github? ( webkit )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit?]
+	python? (
+		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+	>=dev-libs/boost-1.56[context,nls,threads,python?]
+	github? ( dev-libs/openssl:0 )
+	media-libs/glew
+	media-libs/freeglut
+	media-libs/mesa
+	sys-libs/zlib
+	x11-libs/cairo"
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	doc? ( app-doc/doxygen )
+	i18n? ( >=sys-devel/gettext-0.18 )
+	python? ( dev-lang/swig:0 )
+	app-text/dos2unix"
+RDEPEND="${CDEPEND}
+	sci-electronics/electronics-menu"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	xdg_src_prepare
+
+	# remove all the non unix file endings
+	find "${S}" -type f -name "*.desktop" | xargs -n1 dos2unix
+	assert "dos2unix failed"
+
+	# Handle optional minimal install.
+	if use minimal; then
+		# remove templates as they are not needed to run binaries
+		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die "sed failed"
+	else
+		# create a link to the parts library in the main project folder
+		ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed"
+		# create a link to the footprints library and add cmake build rule for it
+		ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die "ln failed"
+		cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die "cp failed"
+		# add the libraries directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed"
+		# add the footprints directory to cmake as a subproject to build
+		sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the library module
+		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add internationalization for the GUI
+	if use i18n; then
+		# create a link to the translations library in the main project folder
+		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die "ln failed"
+		# Remove unused languages. Project generates only languages specified in the
+		# file in LINGUAS in the subproject folder. By default all languages are added
+		# so we sed out the unused ones based on the user linguas_* settings.
+		local lang
+		for lang in ${LANGS}; do
+			if ! use linguas_${lang}; then
+				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed"
+			fi
+		done
+		# cmakelists does not respect our build dir variables, so make it point to the right location
+		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# we also make from the master project so the source dir is understood incorretly, replace that too 
+		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# add the translations directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the translation module
+		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Install examples in the right place if requested
+	if use examples; then
+		# install demos into the examples folder too
+		sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed"
+	else
+		# remove additional demos/examples as its not strictly required to run the binaries 
+		sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add important missing doc files
+	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DPYTHON_DEST="$(python_get_sitedir)"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DKICAD_DOCS="/usr/share/doc/${PF}"
+		-DKICAD_HELP="/usr/share/doc/${PF}/help"
+		-DKICAD_REPO_NAME="stable"
+		-DKICAD_BUILD_VERSION="${PV}"
+		-DwxUSE_UNICODE=ON
+		-DKICAD_SKIP_BOOST=ON
+		$(cmake-utils_use github BUILD_GITHUB_PLUGIN)
+		$(cmake-utils_use python KICAD_SCRIPTING)
+		$(cmake-utils_use python KICAD_SCRIPTING_MODULES)
+		$(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
+		$(cmake-utils_use webkit KICAD_USE_WEBKIT)
+		$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
+	)
+	if use debug; then
+		append-cxxflags "-DDEBUG"
+		append-cflags "-DDEBUG"
+	fi
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use doc; then
+		doxygen Doxyfile || die "doxygen failed"
+	fi
+}
+
+src_install() {
+	cmake-utils_src_install
+	use python && python_optimize
+	if use doc ; then
+		dodoc uncrustify.cfg
+		cd Documentation || die "cd failed"
+		dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
+	fi
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	gnome2_icon_cache_update
+
+	if use minimal ; then
+		ewarn "If the schematic and/or board editors complain about missing libraries when you"
+		ewarn "open old projects, you will have to take one or more of the following actions :"
+		ewarn "- Install the missing libraries manually."
+		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
+		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
+		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
+	fi
+	elog ""
+	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
+	elog "For help and extended documentation emerge app-doc/kicad-doc."
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+	gnome2_icon_cache_update
+}

diff --git a/sci-electronics/kicad/kicad-4.0.1-r1.ebuild b/sci-electronics/kicad/kicad-4.0.1-r1.ebuild
new file mode 100644
index 0000000..e55ea9e
--- /dev/null
+++ b/sci-electronics/kicad/kicad-4.0.1-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+WX_GTK_VER="3.0"
+
+inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 vcs-snapshot wxwidgets versionator xdg
+
+DESCRIPTION="Electronic Schematic and PCB design tools."
+HOMEPAGE="http://www.kicad-pcb.org"
+
+SERIES=$(get_version_component_range 1-2)
+
+SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
+	http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
+	!minimal? ( https://github.com/KiCad/${PN}-library/archive/${PV}.tar.gz -> ${P}-library.tar.gz )
+	i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples github i18n minimal +python webkit"
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
+for lang in ${LANGS} ; do
+	IUSE="${IUSE} linguas_${lang}"
+done
+unset lang
+unset LANGS
+
+REQUIRED_USE="
+	github? ( webkit )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit?]
+	python? (
+		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+	>=dev-libs/boost-1.56[context,nls,threads,python?]
+	github? ( dev-libs/openssl:0 )
+	media-libs/glew
+	media-libs/freeglut
+	media-libs/mesa
+	sys-libs/zlib
+	x11-libs/cairo"
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	doc? ( app-doc/doxygen )
+	i18n? ( >=sys-devel/gettext-0.18 )
+	python? ( dev-lang/swig:0 )
+	app-text/dos2unix"
+RDEPEND="${CDEPEND}
+	sci-electronics/electronics-menu"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	xdg_src_prepare
+
+	# remove all the non unix file endings
+	find "${S}" -type f -name "*.desktop" | xargs -n1 dos2unix
+	assert "dos2unix failed"
+
+	# Handle optional minimal install.
+	if use minimal; then
+		# remove templates as they are not needed to run binaries
+		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die "sed failed"
+	else
+		# create a link to the parts library in the main project folder
+		ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed"
+		# create a link to the footprints library and add cmake build rule for it
+		ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die "ln failed"
+		cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die "cp failed"
+		# add the libraries directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed"
+		# add the footprints directory to cmake as a subproject to build
+		sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the library module
+		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add internationalization for the GUI
+	if use i18n; then
+		# create a link to the translations library in the main project folder
+		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die "ln failed"
+		# Remove unused languages. Project generates only languages specified in the
+		# file in LINGUAS in the subproject folder. By default all languages are added
+		# so we sed out the unused ones based on the user linguas_* settings.
+		local lang
+		for lang in ${LANGS}; do
+			if ! use linguas_${lang}; then
+				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed"
+			fi
+		done
+		# cmakelists does not respect our build dir variables, so make it point to the right location
+		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# we also make from the master project so the source dir is understood incorretly, replace that too 
+		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# add the translations directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the translation module
+		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Install examples in the right place if requested
+	if use examples; then
+		# install demos into the examples folder too
+		sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed"
+	else
+		# remove additional demos/examples as its not strictly required to run the binaries 
+		sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add important missing doc files
+	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DPYTHON_DEST="$(python_get_sitedir)"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DKICAD_DOCS="/usr/share/doc/${PF}"
+		-DKICAD_HELP="/usr/share/doc/${PF}/help"
+		-DKICAD_REPO_NAME="stable"
+		-DKICAD_BUILD_VERSION="${PV}"
+		-DwxUSE_UNICODE=ON
+		-DKICAD_SKIP_BOOST=ON
+		$(cmake-utils_use github BUILD_GITHUB_PLUGIN)
+		$(cmake-utils_use python KICAD_SCRIPTING)
+		$(cmake-utils_use python KICAD_SCRIPTING_MODULES)
+		$(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
+		$(cmake-utils_use webkit KICAD_USE_WEBKIT)
+		$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
+	)
+	if use debug; then
+		append-cxxflags "-DDEBUG"
+		append-cflags "-DDEBUG"
+	fi
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use doc; then
+		doxygen Doxyfile || die "doxygen failed"
+	fi
+}
+
+src_install() {
+	cmake-utils_src_install
+	use python && python_optimize
+	if use doc ; then
+		dodoc uncrustify.cfg
+		cd Documentation || die "cd failed"
+		dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
+	fi
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	gnome2_icon_cache_update
+
+	if use minimal ; then
+		ewarn "If the schematic and/or board editors complain about missing libraries when you"
+		ewarn "open old projects, you will have to take one or more of the following actions :"
+		ewarn "- Install the missing libraries manually."
+		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
+		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
+		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
+	fi
+	elog ""
+	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
+	elog "For help and extended documentation emerge app-doc/kicad-doc."
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+	gnome2_icon_cache_update
+}

diff --git a/sci-electronics/kicad/kicad-4.0.2-r1.ebuild b/sci-electronics/kicad/kicad-4.0.2-r1.ebuild
new file mode 100644
index 0000000..e55ea9e
--- /dev/null
+++ b/sci-electronics/kicad/kicad-4.0.2-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+WX_GTK_VER="3.0"
+
+inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 vcs-snapshot wxwidgets versionator xdg
+
+DESCRIPTION="Electronic Schematic and PCB design tools."
+HOMEPAGE="http://www.kicad-pcb.org"
+
+SERIES=$(get_version_component_range 1-2)
+
+SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
+	http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
+	!minimal? ( https://github.com/KiCad/${PN}-library/archive/${PV}.tar.gz -> ${P}-library.tar.gz )
+	i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples github i18n minimal +python webkit"
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
+for lang in ${LANGS} ; do
+	IUSE="${IUSE} linguas_${lang}"
+done
+unset lang
+unset LANGS
+
+REQUIRED_USE="
+	github? ( webkit )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit?]
+	python? (
+		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+	>=dev-libs/boost-1.56[context,nls,threads,python?]
+	github? ( dev-libs/openssl:0 )
+	media-libs/glew
+	media-libs/freeglut
+	media-libs/mesa
+	sys-libs/zlib
+	x11-libs/cairo"
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	doc? ( app-doc/doxygen )
+	i18n? ( >=sys-devel/gettext-0.18 )
+	python? ( dev-lang/swig:0 )
+	app-text/dos2unix"
+RDEPEND="${CDEPEND}
+	sci-electronics/electronics-menu"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	xdg_src_prepare
+
+	# remove all the non unix file endings
+	find "${S}" -type f -name "*.desktop" | xargs -n1 dos2unix
+	assert "dos2unix failed"
+
+	# Handle optional minimal install.
+	if use minimal; then
+		# remove templates as they are not needed to run binaries
+		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die "sed failed"
+	else
+		# create a link to the parts library in the main project folder
+		ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed"
+		# create a link to the footprints library and add cmake build rule for it
+		ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die "ln failed"
+		cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die "cp failed"
+		# add the libraries directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed"
+		# add the footprints directory to cmake as a subproject to build
+		sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the library module
+		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add internationalization for the GUI
+	if use i18n; then
+		# create a link to the translations library in the main project folder
+		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die "ln failed"
+		# Remove unused languages. Project generates only languages specified in the
+		# file in LINGUAS in the subproject folder. By default all languages are added
+		# so we sed out the unused ones based on the user linguas_* settings.
+		local lang
+		for lang in ${LANGS}; do
+			if ! use linguas_${lang}; then
+				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed"
+			fi
+		done
+		# cmakelists does not respect our build dir variables, so make it point to the right location
+		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# we also make from the master project so the source dir is understood incorretly, replace that too 
+		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+		# add the translations directory to cmake as a subproject to build
+		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed"
+		# remove duplicate uninstall directions for the translation module
+		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed"
+	fi
+
+	# Install examples in the right place if requested
+	if use examples; then
+		# install demos into the examples folder too
+		sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed"
+	else
+		# remove additional demos/examples as its not strictly required to run the binaries 
+		sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed"
+	fi
+
+	# Add important missing doc files
+	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DPYTHON_DEST="$(python_get_sitedir)"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DKICAD_DOCS="/usr/share/doc/${PF}"
+		-DKICAD_HELP="/usr/share/doc/${PF}/help"
+		-DKICAD_REPO_NAME="stable"
+		-DKICAD_BUILD_VERSION="${PV}"
+		-DwxUSE_UNICODE=ON
+		-DKICAD_SKIP_BOOST=ON
+		$(cmake-utils_use github BUILD_GITHUB_PLUGIN)
+		$(cmake-utils_use python KICAD_SCRIPTING)
+		$(cmake-utils_use python KICAD_SCRIPTING_MODULES)
+		$(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
+		$(cmake-utils_use webkit KICAD_USE_WEBKIT)
+		$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
+	)
+	if use debug; then
+		append-cxxflags "-DDEBUG"
+		append-cflags "-DDEBUG"
+	fi
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use doc; then
+		doxygen Doxyfile || die "doxygen failed"
+	fi
+}
+
+src_install() {
+	cmake-utils_src_install
+	use python && python_optimize
+	if use doc ; then
+		dodoc uncrustify.cfg
+		cd Documentation || die "cd failed"
+		dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
+	fi
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	gnome2_icon_cache_update
+
+	if use minimal ; then
+		ewarn "If the schematic and/or board editors complain about missing libraries when you"
+		ewarn "open old projects, you will have to take one or more of the following actions :"
+		ewarn "- Install the missing libraries manually."
+		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
+		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
+		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
+	fi
+	elog ""
+	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
+	elog "For help and extended documentation emerge app-doc/kicad-doc."
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+	gnome2_icon_cache_update
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2018-09-07 12:03 Virgil Dupras
  0 siblings, 0 replies; 17+ messages in thread
From: Virgil Dupras @ 2018-09-07 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     22fe2623355fa8f7045537cd84b76bb3aef436fc
Author:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  7 12:01:37 2018 +0000
Commit:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Fri Sep  7 12:01:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22fe2623

sci-electronics/kicad: remove old

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 sci-electronics/kicad/Manifest                     |   5 -
 .../kicad/files/kicad-4.0.4-boost-context.patch    | 107 -----------
 sci-electronics/kicad/kicad-4.0.4.ebuild           | 204 ---------------------
 3 files changed, 316 deletions(-)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index 8ef3f97151a..80f7881b37e 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,10 +1,5 @@
-DIST kicad-4.0.4-i18n.tar.gz 2409039 BLAKE2B 95e0e8c8b001957df1f244ba5fef5b36658c75b3c903b495faab8c8ccb524d02dbb79b0197fa0485fc5f93a5a0088861bada57cd85d7982191437bdf8f7b1f3c SHA512 5fcbf54aeff92c142652908dda9e727e8b076aec4531f2bb4d27aa9fd946e92621141a9709a9469c133010cca019e4e6bc9731366e8c1adbe38078f5a6fcaedf
-DIST kicad-4.0.4.tar.xz 10672424 BLAKE2B 16bef2545e697757be270eeff6820e75b1a79a37528f264e127587131c519cbdf67a774a4a9a8ff32c90b236279746ffd2164cb4d8885dc68d2664ef3dd178de SHA512 230eb10d42e004c51d790db0d21dc08653944ca6cc4b728ad34b506f1a2b009c23369ddae417c8fafd420cb8045900dd4145cd1071867c759ab406dd12be3242
 DIST kicad-4.0.7-i18n.tar.gz 2578242 BLAKE2B 610f580d9584cf9ef96686c3d7b7081d4c3a0d2c670482eaa2ef32720a7e71630670845a6050bae8e51df7ac41e30f73d3d11be65ea477ad9efd9fbb5176e2df SHA512 4880705fd7e95c939b7f5e2b7730fd37c426be10596f4cfa80d7df102d9e67232621900395d45f4e735986054f74fb215ae2002a2818faae32b1c75e3cb7e10a
 DIST kicad-4.0.7.tar.xz 10678656 BLAKE2B 54be9a3f5ae6378ac05cb327c28b1a358d895e736a116e1bf5151f021973b9510eab4671a67f222c3be2ef67929954b9576c5c28ef2b6a14708f8c019729969b SHA512 7b2acd9efadf5d48565f71bd0df2474ecc8fc04145953c13ac27363d48dbe6b0de091e311713635f603aed89ce0759a1d623abb37a139e2c87184ca4e717145b
 DIST kicad-5.0.0.tar.xz 14284708 BLAKE2B 9f4414c4476aca8f2da1d7171b53f56d5ea216f11fc025695a228f93ec05e2f271cbab8429ed39445602a3a0707a31d44cce83eae0ad651167c471f52f3867cd SHA512 79d4d34e8eaa5b6e4c7baac39a76f86af89adbaf3f9181b8cd846ed3a8db1b4c6dd7a36efefda3394d33ef828917909ad3bd8bb22435af9c6f671efbff125b42
-DIST kicad-footprints-4.0.4.tar.gz 1400434 BLAKE2B eaf81e977a3d65305034f60eff18f6955cf6b805c2a28a2019c4bb2bd8de9868906a0f9e5ac17810c4779940c6b78e06472661966775cfb196b8cd8fc1ae4083 SHA512 7d42eea2c7c84961e05e0e61d6380e3d294d696e1321bb4406391125379fd6a3dc2b38e7ff8be51b684786bed892738452218f4c5a95c547319f1eaafc0cea6e
 DIST kicad-footprints-4.0.7.tar.gz 4758012 BLAKE2B ca7ddcad3d1ca658d0d5b7c0a4a0e9a3906619bdbf14195b3bd14c528c01b6e9c1f185036ad495fc88a33a53040ae4d338230d8b2bbb598a69a1c07ddfec3cce SHA512 9ba08f528d4b3fa6f165a20333ad2e0f6bc4165b51da77bdb080ad2c8cc12c029927ddb2f6aa669b4dac5fac52b8bdbec803d1b7b3fc639e9481bb866b8e3d6f
-DIST kicad-libcontext.tar.gz 25599 BLAKE2B b8871ab552745dfe29504b97c3c3e23f9e63100ef108c5a116512029f4973791e3d2bca240877319ee177f0a28da4a7946ae5cfaf18eaca0f5b0b1660335a520 SHA512 3b469dcf0e0f4e23f304d0068468a99516e89588d8f36a821af10e751f919cb8a9077d52109fdd43c1c2a443e026b38d0d3aa4774823d05755c9db35742d32d9
-DIST kicad-library-4.0.4.tar.gz 87947075 BLAKE2B b9176ad7ba05f32a5ed42012818a7636fd0f8993630627480557c3d8ab99884b31090f66f438a86dbc842677629cca629333be1d7b05f06a3c12373e57622954 SHA512 57f905277cf581cfda6ca574d87bbdd3a870cd240a151b2c8faedc7ecbfa2cc122b67937cbdbf028be77727cdf4fac9cdc3512ce5bfe80d0f6cbb4f444ccfd6c
 DIST kicad-library-4.0.7.tar.gz 475804416 BLAKE2B 0d6df1df7a72258e896552551996ff13e985976e03b6aafbe900dcc04c9b8eb6e5c1abc242ae5020c1bd20b51e9cc1e60f520b478954edcb6368db7f9ee46df0 SHA512 c5365e18e806102aace785895259deca708a61e0ce37262f5ee2482a8a1f86bc9ce1d37e0fb63cb0661bd5c71064ac36ca2260c9c02ed9790744eedd0a5b5360

diff --git a/sci-electronics/kicad/files/kicad-4.0.4-boost-context.patch b/sci-electronics/kicad/files/kicad-4.0.4-boost-context.patch
deleted file mode 100644
index 529a82c018f..00000000000
--- a/sci-electronics/kicad/files/kicad-4.0.4-boost-context.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-diff -Naur kicad-4.0.2-orig/common/system/libcontext.cpp kicad-4.0.2/common/system/libcontext.cpp
---- kicad-4.0.2-orig/common/system/libcontext.cpp       2016-06-16 22:30:58.000000000 -0700
-+++ kicad-4.0.2/common/system/libcontext.cpp    2016-06-16 22:35:46.654719468 -0700
-@@ -13,7 +13,7 @@
-             http://www.boost.org/LICENSE_1_0.txt)
-
- */
--#include "libcontext.h"
-+#include <system/libcontext.h>
- #if defined(LIBCONTEXT_PLATFORM_windows_i386) && defined(LIBCONTEXT_COMPILER_gcc)
- __asm (
- ".text\n"
-diff -Naur kicad-4.0.2-orig/CMakeLists.txt kicad-4.0.2/CMakeLists.txt
---- kicad-4.0.2-orig/CMakeLists.txt	2016-02-13 13:14:42.000000000 -0800
-+++ kicad-4.0.2/CMakeLists.txt	2016-06-11 01:11:25.623484908 -0700
-@@ -561,7 +561,7 @@
- # Download boost and possibly build parts of it
- #################################################
- if( KICAD_SKIP_BOOST )
--    find_package( Boost 1.54.0 REQUIRED COMPONENTS context date_time filesystem iostreams locale
-+    find_package( Boost 1.54.0 REQUIRED COMPONENTS date_time filesystem iostreams locale
-                                                    program_options regex system thread )
- 
-     if( NOT Boost_FOUND )
-diff -Naur kicad-4.0.2-orig/common/CMakeLists.txt kicad-4.0.2/common/CMakeLists.txt
---- kicad-4.0.2-orig/common/CMakeLists.txt	2016-02-13 13:14:42.000000000 -0800
-+++ kicad-4.0.2/common/CMakeLists.txt	2016-06-11 01:10:04.886830434 -0700
-@@ -256,6 +256,8 @@
-     view/view_item.cpp
-     view/view_group.cpp
- 
-+    system/libcontext.cpp
-+
-     math/math_util.cpp
- 
-     tool/tool_action.cpp
-diff -Naur kicad-4.0.2-orig/include/tool/coroutine.h kicad-4.0.2/include/tool/coroutine.h
---- kicad-4.0.2-orig/include/tool/coroutine.h	2016-02-13 13:14:42.000000000 -0800
-+++ kicad-4.0.2/include/tool/coroutine.h	2016-06-11 01:07:06.035378422 -0700
-@@ -27,8 +27,7 @@
- 
- #include <cstdlib>
- 
--#include <boost/context/fcontext.hpp>
--#include <boost/version.hpp>
-+#include <system/libcontext.h>
- 
- #include "delegate.h"
- 
-@@ -92,10 +91,8 @@
-         if( m_saved )
-             delete m_saved;
- 
--#if BOOST_VERSION >= 105600
-         if( m_self )
-             delete m_self;
--#endif
- 
-         if( m_stack )
-             free( m_stack );
-@@ -156,13 +153,9 @@
-         assert( m_saved == NULL );
- 
-         m_args = &aArgs;
--#if BOOST_VERSION >= 105600
--        m_self = new boost::context::fcontext_t();
--        *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
--#else
--        m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
--#endif
--        m_saved = new boost::context::fcontext_t();
-+        m_self = new fcontext_t();
-+        *m_self = make_fcontext( sp, m_stackSize, callerStub );
-+        m_saved = new fcontext_t();
- 
-         m_running = true;
-         // off we go!
-@@ -222,14 +215,10 @@
-     }
- 
-     ///> 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,
-+    static inline intptr_t jump(fcontext_t* aOld, fcontext_t* aNew,
-                                 intptr_t aP, bool aPreserveFPU = true )
-     {
--#if BOOST_VERSION >= 105600
--        return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
--#else
--        return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
--#endif
-+        return jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
-     }
- 
-     template <typename T>
-@@ -252,10 +241,10 @@
-     ReturnType m_retVal;
- 
-     ///< saved caller context
--    boost::context::fcontext_t* m_saved;
-+    fcontext_t* m_saved;
- 
-     ///< saved coroutine context
--    boost::context::fcontext_t* m_self;
-+    fcontext_t* m_self;
- 
-     ///< coroutine stack
-     void* m_stack;

diff --git a/sci-electronics/kicad/kicad-4.0.4.ebuild b/sci-electronics/kicad/kicad-4.0.4.ebuild
deleted file mode 100644
index 6c75dc7aba9..00000000000
--- a/sci-electronics/kicad/kicad-4.0.4.ebuild
+++ /dev/null
@@ -1,204 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-WX_GTK_VER="3.0"
-
-inherit cmake-utils eutils flag-o-matic gnome2-utils python-single-r1 wxwidgets vcs-snapshot versionator xdg
-
-DESCRIPTION="Electronic Schematic and PCB design tools."
-HOMEPAGE="http://www.kicad-pcb.org"
-LIBCONTEXT_COMMIT="3d92a1a50f4749b5a92131a957c9615473be85b4"
-
-SERIES=$(get_version_component_range 1-2)
-
-SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
-	!minimal? (
-		http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
-		http://downloads.kicad-pcb.org/libraries/kicad-library-${PV}.tar.gz
-	)
-	i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )
-	https://github.com/twlostow/libcontext/archive/${LIBCONTEXT_COMMIT}.tar.gz -> ${PN}-libcontext.tar.gz"
-
-LICENSE="GPL-2+ GPL-3+ Boost-1.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="debug doc examples github i18n libressl minimal +python"
-LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh-CN"
-for lang in ${LANGS} ; do
-	IUSE="${IUSE} l10n_${lang}"
-done
-unset lang
-
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-COMMON_DEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
-	python? (
-		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
-		${PYTHON_DEPS}
-	)
-	>=dev-libs/boost-1.56[nls,threads,python?]
-	github? (
-		libressl? ( dev-libs/libressl:0 )
-		!libressl? ( dev-libs/openssl:0 )
-	)
-	media-libs/glew:0=
-	media-libs/freeglut
-	media-libs/mesa
-	sys-libs/zlib
-	x11-libs/cairo"
-DEPEND="${COMMON_DEPEND}
-	doc? ( app-doc/doxygen )
-	i18n? ( virtual/libintl )
-	python? ( dev-lang/swig:0 )"
-RDEPEND="${COMMON_DEPEND}
-	sci-electronics/electronics-menu"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	xdg_src_prepare
-
-	# Add separated out libcontext files and patch source to use them
-	mkdir -p "${S}/common/system/" || die
-	mkdir -p "${S}/include/system/" || die
-	cp "${WORKDIR}/${PN}-libcontext/libcontext.cpp" "${S}/common/system/libcontext.cpp" || die
-	cp "${WORKDIR}/${PN}-libcontext/libcontext.h" "${S}/include/system/libcontext.h" || die
-	# Path source to use new "built in" libcontext. Also patch libcontext.cpp to have correct include file.
-	# Path must be applied after new libcontext files have been copied to the kicad source directory.
-	epatch "${FILESDIR}/${P}-boost-context.patch"
-
-	# remove all the non unix file endings
-	edos2unix $(find "${S}" -type f -name "*.desktop")
-
-	# Remove cvpcb desktop file while it does nothing
-	rm "${WORKDIR}/${P}/resources/linux/mime/applications/cvpcb.desktop" || die
-
-	# Handle optional minimal install.
-	if use minimal; then
-		# remove templates as they are not needed to run binaries
-		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die
-	else
-		# create a link to the parts library in the main project folder
-		ln -s "${WORKDIR}/kicad-library-${PV}" "${S}/${PN}-library" || die
-		# create a link to the footprints library and add cmake build rule for it
-		ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die
-		cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die
-		# add the libraries directory to cmake as a subproject to build
-		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die
-		# add the footprints directory to cmake as a subproject to build
-		sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die
-		# remove duplicate uninstall directions for the library module
-		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die
-	fi
-
-	# Add internationalization for the GUI
-	if use i18n; then
-		# create a link to the translations library in the main project folder
-		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die
-		# Remove unused languages. Project generates only languages specified in the
-		# file in LINGUAS in the subproject folder. By default all languages are added
-		# so we sed out the unused ones based on the user l10n_* settings.
-		local lang
-		for lang in ${LANGS}; do
-			if ! use l10n_${lang}; then
-				lang="${lang//-/_}"
-				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die
-			fi
-		done
-		# cmakelists does not respect our build dir variables, so make it point to the right location
-		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die
-		# we also make from the master project so the source dir is understood incorretly, replace that too
-		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die
-		# add the translations directory to cmake as a subproject to build
-		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die
-		# remove duplicate uninstall directions for the translation module
-		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die
-	fi
-
-	# Install examples in the right place if requested
-	if use examples; then
-		# install demos into the examples folder too
-		sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die
-	else
-		# remove additional demos/examples as its not strictly required to run the binaries
-		sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die
-	fi
-
-	# Add important missing doc files
-	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DPYTHON_DEST="$(python_get_sitedir)"
-		-DPYTHON_EXECUTABLE="${PYTHON}"
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DKICAD_DOCS="/usr/share/doc/${PF}"
-		-DKICAD_HELP="/usr/share/doc/${PF}/help"
-		-DKICAD_REPO_NAME="stable"
-		-DKICAD_BUILD_VERSION="${PV}"
-		-DwxUSE_UNICODE=ON
-		-DKICAD_SKIP_BOOST=ON
-		$(cmake-utils_use github BUILD_GITHUB_PLUGIN)
-		$(cmake-utils_use python KICAD_SCRIPTING)
-		$(cmake-utils_use python KICAD_SCRIPTING_MODULES)
-		$(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
-		$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
-	)
-	if use debug; then
-		append-cxxflags "-DDEBUG"
-		append-cflags "-DDEBUG"
-	fi
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-	if use doc; then
-		doxygen Doxyfile || die
-	fi
-}
-
-src_install() {
-	cmake-utils_src_install
-	use python && python_optimize
-	if use doc ; then
-		dodoc uncrustify.cfg
-		cd Documentation || die
-		dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
-	fi
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	gnome2_icon_cache_update
-
-	if use minimal ; then
-		ewarn "If the schematic and/or board editors complain about missing libraries when you"
-		ewarn "open old projects, you will have to take one or more of the following actions :"
-		ewarn "- Install the missing libraries manually."
-		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
-		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
-		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
-	fi
-	elog ""
-	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
-	elog "For help and extended documentation emerge app-doc/kicad-doc."
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_icon_cache_update
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2018-09-27 13:37 Virgil Dupras
  0 siblings, 0 replies; 17+ messages in thread
From: Virgil Dupras @ 2018-09-27 13:37 UTC (permalink / raw
  To: gentoo-commits

commit:     2e9d688fa4b08833f3c130a41d3e1369cfaf4edc
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Sun Sep 23 12:59:45 2018 +0000
Commit:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Thu Sep 27 13:37:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e9d688f

sci-electronics/kicad: Add USE=occ,openmp, fix curl dependency

Thanks to Fabio Rossi for the authorship of the patch.

Closes: https://bugs.gentoo.org/665500
Package-Manager: Portage-2.3.48, Repoman-2.3.10
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Closes: https://github.com/gentoo/gentoo/pull/9955
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>

 sci-electronics/kicad/files/kicad-5.0.0-curl.patch | 23 +++++++++++++
 .../{kicad-5.0.0.ebuild => kicad-5.0.0-r1.ebuild}  | 38 ++++++++++++++--------
 sci-electronics/kicad/metadata.xml                 |  1 +
 3 files changed, 49 insertions(+), 13 deletions(-)

diff --git a/sci-electronics/kicad/files/kicad-5.0.0-curl.patch b/sci-electronics/kicad/files/kicad-5.0.0-curl.patch
new file mode 100644
index 00000000000..c99071c0a54
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.0.0-curl.patch
@@ -0,0 +1,23 @@
+--- a/common/CMakeLists.txt.old    2018-09-13 16:21:29.642915273 +0200
++++ a/common/CMakeLists.txt    2018-09-13 16:23:25.146914833 +0200
+@@ -337,14 +337,17 @@
+     list( APPEND COMMON_SRCS strtok_r.c )
+ endif()
+ 
++if( BUILD_GITHUB_PLUGIN )
++    list( APPEND COMMON_SRCS
++        kicad_curl/kicad_curl.cpp
++        kicad_curl/kicad_curl_easy.cpp
++    )
++endif()
+ 
+ set( COMMON_SRCS
+     ${COMMON_SRCS}
+     system/libcontext.cpp
+ 
+-    kicad_curl/kicad_curl.cpp
+-    kicad_curl/kicad_curl_easy.cpp
+-
+     view/view.cpp
+     view/view_item.cpp
+     view/view_group.cpp

diff --git a/sci-electronics/kicad/kicad-5.0.0.ebuild b/sci-electronics/kicad/kicad-5.0.0-r1.ebuild
similarity index 74%
rename from sci-electronics/kicad/kicad-5.0.0.ebuild
rename to sci-electronics/kicad/kicad-5.0.0-r1.ebuild
index db6476d4b96..18cae5de253 100644
--- a/sci-electronics/kicad/kicad-5.0.0.ebuild
+++ b/sci-electronics/kicad/kicad-5.0.0-r1.ebuild
@@ -6,7 +6,7 @@ PYTHON_COMPAT=( python2_7 )
 
 WX_GTK_VER="3.0"
 
-inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 wxwidgets xdg
+inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 toolchain-funcs wxwidgets xdg
 
 DESCRIPTION="Electronic Schematic and PCB design tools"
 HOMEPAGE="http://www.kicad-pcb.org"
@@ -15,10 +15,11 @@ SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.xz"
 LICENSE="GPL-2+ GPL-3+ Boost-1.0"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="doc examples github +ngspice +oce +python"
+IUSE="doc examples github +ngspice occ +oce openmp +python"
 
 REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
+	?? ( occ oce )
 "
 
 COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
@@ -27,9 +28,6 @@ COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
 		${PYTHON_DEPS}
 	)
 	>=dev-libs/boost-1.61[context,nls,threads,python?,${PYTHON_USEDEP}]
-	github? (
-		net-misc/curl[ssl]
-	)
 	media-libs/glew:0=
 	media-libs/glm
 	media-libs/freeglut
@@ -37,13 +35,14 @@ COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
 	ngspice? (
 		sci-electronics/ngspice[shared]
 	)
-	oce? (
-		sci-libs/oce
-	)
-	x11-libs/cairo"
+	occ? ( >=sci-libs/opencascade-6.8.0 )
+	oce? ( sci-libs/oce )
+	>=x11-libs/cairo-1.8.8
+	>=x11-libs/pixman-0.30"
 DEPEND="${COMMON_DEPEND}
 	doc? ( app-doc/doxygen )
-	python? ( dev-lang/swig:0 )"
+	github? ( net-misc/curl[ssl] )
+	python? ( >=dev-lang/swig-3.0:0 )"
 RDEPEND="${COMMON_DEPEND}
 	sci-electronics/electronics-menu
 "
@@ -51,6 +50,7 @@ CHECKREQS_DISK_BUILD="800M"
 
 pkg_setup() {
 	use python && python-single-r1_pkg_setup
+	use openmp && tc-check-openmp
 	setup-wxwidgets
 	check-reqs_pkg_setup
 }
@@ -58,6 +58,14 @@ pkg_setup() {
 src_prepare() {
 	xdg_src_prepare
 	cmake-utils_src_prepare
+
+	epatch "${FILESDIR}"/${P}-curl.patch
+
+	# fix application categories in desktop files
+	while IFS="" read -d $'\0' -r f; do
+		sed -i.bkp '/Categories/s/Development;//' "${f}"
+	done < <(find "${S}" -type f -name "*.desktop" -print0)
+
 }
 
 src_configure() {
@@ -67,8 +75,9 @@ src_configure() {
 		-DKICAD_SCRIPTING="$(usex python)"
 		-DKICAD_SCRIPTING_MODULES="$(usex python)"
 		-DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
+		-DKICAD_SCRIPTING_ACTION_MENU="$(usex python)"
 		-DKICAD_SPICE="$(usex ngspice)"
-		-DKICAD_USE_OCC=OFF
+		-DKICAD_USE_OCC="$(usex occ)"
 		-DKICAD_USE_OCE="$(usex oce)"
 		-DKICAD_INSTALL_DEMOS="$(usex examples)"
 	)
@@ -78,13 +87,16 @@ src_configure() {
 		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
 		-DPYTHON_LIBRARY="$(python_get_library_path)"
 	)
+	use occ && mycmakeargs+=( -DOCC_LIBRARY_DIR="${CASROOT}"/lib )
+
 	cmake-utils_src_configure
 }
 
 src_compile() {
 	cmake-utils_src_compile
 	if use doc; then
-		doxygen Doxyfile || die
+		cmake-utils_src_compile doxygen-docs
+		cmake-utils_src_compile dev-docs
 	fi
 }
 
@@ -94,7 +106,7 @@ src_install() {
 	if use doc ; then
 		dodoc uncrustify.cfg
 		cd Documentation || die
-		dodoc -r doxygen/.
+		dodoc -r *.txt kicad_doxygen_logo.png notes_about_pcbnew_new_file_format.odt doxygen/. development/doxygen/.
 	fi
 }
 

diff --git a/sci-electronics/kicad/metadata.xml b/sci-electronics/kicad/metadata.xml
index 41cd516dac1..6eff0d23caf 100644
--- a/sci-electronics/kicad/metadata.xml
+++ b/sci-electronics/kicad/metadata.xml
@@ -14,6 +14,7 @@
 		<flag name="i18n">Allow GUI internationalization through l10n_* use flags</flag>
 		<flag name="minimal">Build only binaries without parts library and examples</flag>
 		<flag name="ngspice">Enable circuit simulation</flag>
+		<flag name="occ">Enable viewing 3D rendering of designs via opencascade</flag>
 		<flag name="oce">Enable viewing 3D rendering of designs via OCE</flag>
 		<flag name="python">Enable python scripting support</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2019-01-02 16:51 Amy Liffey
  0 siblings, 0 replies; 17+ messages in thread
From: Amy Liffey @ 2019-01-02 16:51 UTC (permalink / raw
  To: gentoo-commits

commit:     194e0780737c7ff4f147a9c4d9f44971cc2306f5
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Sat Nov  3 05:44:01 2018 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Wed Jan  2 16:49:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=194e0780

sci-electronics/kicad: Bump to 5.0.1 version

Bug: https://bugs.gentoo.org/669366
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Amy Liffey <amynka <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sci-electronics/kicad/Manifest                    |   1 +
 sci-electronics/kicad/files/kicad-help-path.patch | 117 ++++++++++++++++++++
 sci-electronics/kicad/kicad-5.0.1.ebuild          | 128 ++++++++++++++++++++++
 3 files changed, 246 insertions(+)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index 80f7881b37e..f6f2ec87504 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,5 +1,6 @@
 DIST kicad-4.0.7-i18n.tar.gz 2578242 BLAKE2B 610f580d9584cf9ef96686c3d7b7081d4c3a0d2c670482eaa2ef32720a7e71630670845a6050bae8e51df7ac41e30f73d3d11be65ea477ad9efd9fbb5176e2df SHA512 4880705fd7e95c939b7f5e2b7730fd37c426be10596f4cfa80d7df102d9e67232621900395d45f4e735986054f74fb215ae2002a2818faae32b1c75e3cb7e10a
 DIST kicad-4.0.7.tar.xz 10678656 BLAKE2B 54be9a3f5ae6378ac05cb327c28b1a358d895e736a116e1bf5151f021973b9510eab4671a67f222c3be2ef67929954b9576c5c28ef2b6a14708f8c019729969b SHA512 7b2acd9efadf5d48565f71bd0df2474ecc8fc04145953c13ac27363d48dbe6b0de091e311713635f603aed89ce0759a1d623abb37a139e2c87184ca4e717145b
 DIST kicad-5.0.0.tar.xz 14284708 BLAKE2B 9f4414c4476aca8f2da1d7171b53f56d5ea216f11fc025695a228f93ec05e2f271cbab8429ed39445602a3a0707a31d44cce83eae0ad651167c471f52f3867cd SHA512 79d4d34e8eaa5b6e4c7baac39a76f86af89adbaf3f9181b8cd846ed3a8db1b4c6dd7a36efefda3394d33ef828917909ad3bd8bb22435af9c6f671efbff125b42
+DIST kicad-5.0.1.tar.xz 14241544 BLAKE2B 47b6f8f4443e547dc1251e609b53fc998006c6a9302442a232767c6db79bcd94340afba694d99b6dfad5cf457a524d3dbce7a5971a9dcd13424ccb2b6f8f1de7 SHA512 36f591fe82c2c2da21581ec9425cf3c179839b20ea9db9e2d406220406e9daef6052d29202b4f0fe4fdab73434009626f66ce803e81e7a7dae4df9ea93ed896d
 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-help-path.patch b/sci-electronics/kicad/files/kicad-help-path.patch
new file mode 100644
index 00000000000..0fb43c3550c
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-help-path.patch
@@ -0,0 +1,117 @@
+diff -Naur kicad-5.0.1-orig/CMakeLists.txt kicad-5.0.1/CMakeLists.txt
+--- kicad-5.0.1-orig/CMakeLists.txt	2018-10-08 14:14:38.000000000 -0700
++++ kicad-5.0.1/CMakeLists.txt	2018-12-25 00:04:50.423849671 -0800
+@@ -418,6 +418,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.0.1-orig/CMakeModules/config.h.cmake kicad-5.0.1/CMakeModules/config.h.cmake
+--- kicad-5.0.1-orig/CMakeModules/config.h.cmake	2018-10-08 14:14:38.000000000 -0700
++++ kicad-5.0.1/CMakeModules/config.h.cmake	2018-12-25 00:04:39.215828924 -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.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common/searchhelpfilefullpath.cpp
+--- kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp	2018-10-08 14:14:38.000000000 -0700
++++ kicad-5.0.1/common/searchhelpfilefullpath.cpp	2018-12-25 00:04:05.576771741 -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>
+ 
+ 
+@@ -68,6 +68,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.
+@@ -75,6 +79,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() );
+@@ -103,16 +108,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( wxT( "share" ) );
+     subdirs.Add( wxT( "doc" ) );
+     subdirs.Add( wxT( "kicad" ) );
+     subdirs.Add( wxT( "help" ) );
+ 
++    // For custom help path installations via ${KICAD_HELP}
++    moresubdirs.Add( wxT( "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( wxT( "doc" ) );
+     altsubdirs.Add( wxT( "help" ) );
+@@ -158,6 +164,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 );
+ 
+@@ -187,8 +196,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/kicad-5.0.1.ebuild b/sci-electronics/kicad/kicad-5.0.1.ebuild
new file mode 100644
index 00000000000..598f92dad72
--- /dev/null
+++ b/sci-electronics/kicad/kicad-5.0.1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+WX_GTK_VER="3.0"
+
+inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 toolchain-funcs wxwidgets xdg-utils
+
+DESCRIPTION="Electronic Schematic and PCB design tools"
+HOMEPAGE="http://www.kicad-pcb.org"
+SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.xz"
+
+LICENSE="GPL-2+ GPL-3+ Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="doc examples github +ngspice occ +oce openmp +python"
+
+REQUIRED_USE="
+	python? ( ${PYTHON_REQUIRED_USE} )
+	?? ( occ oce )
+"
+
+COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
+	python? (
+		dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
+		${PYTHON_DEPS}
+	)
+	>=dev-libs/boost-1.61[context,nls,threads,python?,${PYTHON_USEDEP}]
+	github? ( net-misc/curl:=[ssl] )
+	media-libs/glew:0=
+	<=media-libs/glm-0.9.9.2
+	media-libs/freeglut
+	media-libs/mesa
+	ngspice? (
+		sci-electronics/ngspice[shared]
+	)
+	occ? ( >=sci-libs/opencascade-6.8.0:= )
+	oce? ( sci-libs/oce )
+	>=x11-libs/cairo-1.8.8:=
+	>=x11-libs/pixman-0.30"
+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.0.0-curl.patch"
+	"${FILESDIR}"/"${PN}-help-path.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="/usr/share/doc/${P}"
+		-DKICAD_HELP="/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_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
+	gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+	gnome2_icon_cache_update
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2019-04-07 16:53 Alexey Shvetsov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Shvetsov @ 2019-04-07 16:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ce2e77001196f94d29efe79628a62bf7e69d5f20
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Mon Mar 25 00:47:10 2019 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Apr  7 16:52:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce2e7700

sci-electronics/kicad: Bump to version 5.1.0

Bug: https://bugs.gentoo.org/680642
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.12

 sci-electronics/kicad/Manifest                     |  1 +
 ...icad-help-path.patch => kicad-5.0.0-help.patch} |  0
 ...icad-help-path.patch => kicad-5.1.0-help.patch} | 46 +++++++++++-----------
 sci-electronics/kicad/kicad-5.0.1.ebuild           |  4 +-
 .../{kicad-5.0.1.ebuild => kicad-5.1.0.ebuild}     | 12 +++---
 5 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index f8f01cb2ef6..13afaa4c6a4 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,5 +1,6 @@
 DIST kicad-4.0.7-i18n.tar.gz 2578242 BLAKE2B 610f580d9584cf9ef96686c3d7b7081d4c3a0d2c670482eaa2ef32720a7e71630670845a6050bae8e51df7ac41e30f73d3d11be65ea477ad9efd9fbb5176e2df SHA512 4880705fd7e95c939b7f5e2b7730fd37c426be10596f4cfa80d7df102d9e67232621900395d45f4e735986054f74fb215ae2002a2818faae32b1c75e3cb7e10a
 DIST kicad-4.0.7.tar.xz 10678656 BLAKE2B 54be9a3f5ae6378ac05cb327c28b1a358d895e736a116e1bf5151f021973b9510eab4671a67f222c3be2ef67929954b9576c5c28ef2b6a14708f8c019729969b SHA512 7b2acd9efadf5d48565f71bd0df2474ecc8fc04145953c13ac27363d48dbe6b0de091e311713635f603aed89ce0759a1d623abb37a139e2c87184ca4e717145b
 DIST kicad-5.0.1.tar.xz 14241544 BLAKE2B 47b6f8f4443e547dc1251e609b53fc998006c6a9302442a232767c6db79bcd94340afba694d99b6dfad5cf457a524d3dbce7a5971a9dcd13424ccb2b6f8f1de7 SHA512 36f591fe82c2c2da21581ec9425cf3c179839b20ea9db9e2d406220406e9daef6052d29202b4f0fe4fdab73434009626f66ce803e81e7a7dae4df9ea93ed896d
+DIST kicad-5.1.0.tar.xz 14191708 BLAKE2B 182b2e2d3ddef3d8cae1552b869427b5d63082aeaa1d3bd15d977c5421084fa6134f8d244a3024b46aa56c98c8412d3f1ba8f72b40c73ab9bfebea7535a8a4ad SHA512 644865932d7e18e446c222cd85e969bb3462bca7fbf6c411e955cd460f5df45ed5221c0948ecd34262a2f5355e586c8fe04c1cb28fa51e4fd09d6f3f78c54761
 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-help-path.patch b/sci-electronics/kicad/files/kicad-5.0.0-help.patch
similarity index 100%
copy from sci-electronics/kicad/files/kicad-help-path.patch
copy to sci-electronics/kicad/files/kicad-5.0.0-help.patch

diff --git a/sci-electronics/kicad/files/kicad-help-path.patch b/sci-electronics/kicad/files/kicad-5.1.0-help.patch
similarity index 75%
rename from sci-electronics/kicad/files/kicad-help-path.patch
rename to sci-electronics/kicad/files/kicad-5.1.0-help.patch
index 0fb43c3550c..e89b7e45c24 100644
--- a/sci-electronics/kicad/files/kicad-help-path.patch
+++ b/sci-electronics/kicad/files/kicad-5.1.0-help.patch
@@ -1,7 +1,7 @@
-diff -Naur kicad-5.0.1-orig/CMakeLists.txt kicad-5.0.1/CMakeLists.txt
---- kicad-5.0.1-orig/CMakeLists.txt	2018-10-08 14:14:38.000000000 -0700
-+++ kicad-5.0.1/CMakeLists.txt	2018-12-25 00:04:50.423849671 -0800
-@@ -418,6 +418,10 @@
+diff -Naur /tmp/kicad-5.1.0-orig/CMakeLists.txt kicad-5.1.0/CMakeLists.txt
+--- /tmp/kicad-5.1.0-orig/CMakeLists.txt	2019-03-08 04:31:50.000000000 -0800
++++ kicad-5.1.0/CMakeLists.txt	2019-03-24 16:16:58.287376258 -0700
+@@ -427,6 +427,10 @@
  set( KIFACE_PREFIX  "_" )
  #message( STATUS "KIFACE_SUFFIX:${KIFACE_SUFFIX}  KIFACE_PREFIX:${KIFACE_PREFIX}" )
  
@@ -12,9 +12,9 @@ diff -Naur kicad-5.0.1-orig/CMakeLists.txt kicad-5.0.1/CMakeLists.txt
  
  #================================================
  # Locations for install targets.
-diff -Naur kicad-5.0.1-orig/CMakeModules/config.h.cmake kicad-5.0.1/CMakeModules/config.h.cmake
---- kicad-5.0.1-orig/CMakeModules/config.h.cmake	2018-10-08 14:14:38.000000000 -0700
-+++ kicad-5.0.1/CMakeModules/config.h.cmake	2018-12-25 00:04:39.215828924 -0800
+diff -Naur /tmp/kicad-5.1.0-orig/CMakeModules/config.h.cmake kicad-5.1.0/CMakeModules/config.h.cmake
+--- /tmp/kicad-5.1.0-orig/CMakeModules/config.h.cmake	2019-03-08 04:31:50.000000000 -0800
++++ kicad-5.1.0/CMakeModules/config.h.cmake	2019-03-24 16:16:58.287376258 -0700
 @@ -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@"
@@ -26,9 +26,9 @@ diff -Naur kicad-5.0.1-orig/CMakeModules/config.h.cmake kicad-5.0.1/CMakeModules
  /// The wxPython version found during configuration.
  #if defined( KICAD_SCRIPTING_WXPYTHON )
  #define WXPYTHON_VERSION                "@WXPYTHON_VERSION@"
-diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common/searchhelpfilefullpath.cpp
---- kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp	2018-10-08 14:14:38.000000000 -0700
-+++ kicad-5.0.1/common/searchhelpfilefullpath.cpp	2018-12-25 00:04:05.576771741 -0800
+diff -Naur /tmp/kicad-5.1.0-orig/common/searchhelpfilefullpath.cpp kicad-5.1.0/common/searchhelpfilefullpath.cpp
+--- /tmp/kicad-5.1.0-orig/common/searchhelpfilefullpath.cpp	2019-03-08 04:31:50.000000000 -0800
++++ kicad-5.1.0/common/searchhelpfilefullpath.cpp	2019-03-24 16:17:31.527588523 -0700
 @@ -25,7 +25,7 @@
  
  #include <pgm_base.h>
@@ -36,9 +36,9 @@ diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common
 -#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>
  
- 
-@@ -68,6 +68,10 @@
+@@ -69,6 +69,10 @@
      wxArrayString   subdirs;
      wxArrayString   altsubdirs;
      SEARCH_STACK    ss = aSStack;
@@ -49,7 +49,7 @@ diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common
  
      // 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.
-@@ -75,6 +79,7 @@
+@@ -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 );
@@ -57,27 +57,27 @@ diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common
  
  #if defined(__WXMAC__)
      ss.AddPaths( GetOSXKicadMachineDataDir() );
-@@ -103,16 +108,17 @@
+@@ -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( wxT( "share" ) );
-     subdirs.Add( wxT( "doc" ) );
-     subdirs.Add( wxT( "kicad" ) );
-     subdirs.Add( wxT( "help" ) );
+     subdirs.Add( "share" );
+     subdirs.Add( "doc" );
+     subdirs.Add( "kicad" );
+     subdirs.Add( "help" );
  
 +    // For custom help path installations via ${KICAD_HELP}
-+    moresubdirs.Add( wxT( "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( wxT( "doc" ) );
-     altsubdirs.Add( wxT( "help" ) );
-@@ -158,6 +164,9 @@
+     altsubdirs.Add( "doc" );
+     altsubdirs.Add( "help" );
+@@ -159,6 +165,9 @@
      {
          subdirs.Add( locale_name_dirs[ii] );
          altsubdirs.Add( locale_name_dirs[ii] );
@@ -87,7 +87,7 @@ diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common
  
          fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &altsubdirs );
  
-@@ -187,8 +196,27 @@
+@@ -188,8 +197,27 @@
          if( !fn.IsEmpty() )
              break;
  

diff --git a/sci-electronics/kicad/kicad-5.0.1.ebuild b/sci-electronics/kicad/kicad-5.0.1.ebuild
index 598f92dad72..699ca42f0b7 100644
--- a/sci-electronics/kicad/kicad-5.0.1.ebuild
+++ b/sci-electronics/kicad/kicad-5.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -50,7 +50,7 @@ CHECKREQS_DISK_BUILD="800M"
 
 PATCHES=(
 	"${FILESDIR}"/"${PN}-5.0.0-curl.patch"
-	"${FILESDIR}"/"${PN}-help-path.patch"
+	"${FILESDIR}"/"${PN}-5.0.0-help.patch"
 )
 
 pkg_setup() {

diff --git a/sci-electronics/kicad/kicad-5.0.1.ebuild b/sci-electronics/kicad/kicad-5.1.0.ebuild
similarity index 91%
copy from sci-electronics/kicad/kicad-5.0.1.ebuild
copy to sci-electronics/kicad/kicad-5.1.0.ebuild
index 598f92dad72..962d8c8392a 100644
--- a/sci-electronics/kicad/kicad-5.0.1.ebuild
+++ b/sci-electronics/kicad/kicad-5.1.0.ebuild
@@ -1,6 +1,7 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Can switch to EAPI=7 when wxwidgets eclass also supports it
 EAPI=6
 PYTHON_COMPAT=( python2_7 )
 
@@ -10,7 +11,7 @@ inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 to
 
 DESCRIPTION="Electronic Schematic and PCB design tools"
 HOMEPAGE="http://www.kicad-pcb.org"
-SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.xz"
+SRC_URI="https://launchpad.net/${PN}/5.0/${PV}/+download/${P}.tar.xz"
 
 LICENSE="GPL-2+ GPL-3+ Boost-1.0"
 SLOT="0"
@@ -49,8 +50,7 @@ RDEPEND="${COMMON_DEPEND}
 CHECKREQS_DISK_BUILD="800M"
 
 PATCHES=(
-	"${FILESDIR}"/"${PN}-5.0.0-curl.patch"
-	"${FILESDIR}"/"${PN}-help-path.patch"
+	"${FILESDIR}"/"${PN}-5.1.0-help.patch"
 )
 
 pkg_setup() {
@@ -64,8 +64,8 @@ src_configure() {
 	xdg_environment_reset
 
 	local mycmakeargs=(
-		-DKICAD_DOCS="/usr/share/doc/${P}"
-		-DKICAD_HELP="/usr/share/doc/${PN}-doc-${PV}"
+		-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)"


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2019-08-03  9:28 Alexey Shvetsov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Shvetsov @ 2019-08-03  9:28 UTC (permalink / raw
  To: gentoo-commits

commit:     8b9a5153b00803bc29cd6809f3d7725d0589f3c0
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Mon Jul 29 06:58:00 2019 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sat Aug  3 09:28:07 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b9a5153

sci-electronics/kicad: Fix 5.1.x build issues with swig-4.0.0

Closes: https://bugs.gentoo.org/690146
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Closes: https://github.com/gentoo/gentoo/pull/12568
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 sci-electronics/kicad/files/kicad-5.1.0-swig-4.0.0.patch     | 12 ++++++++++++
 .../kicad/{kicad-5.1.0.ebuild => kicad-5.1.0-r1.ebuild}      |  1 +
 .../kicad/{kicad-5.1.2.ebuild => kicad-5.1.2-r1.ebuild}      |  1 +
 3 files changed, 14 insertions(+)

diff --git a/sci-electronics/kicad/files/kicad-5.1.0-swig-4.0.0.patch b/sci-electronics/kicad/files/kicad-5.1.0-swig-4.0.0.patch
new file mode 100644
index 00000000000..3ab6677e5e1
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.1.0-swig-4.0.0.patch
@@ -0,0 +1,12 @@
+--- a/scripting/build_tools/fix_swig_imports.py	2019-04-22 23:14:54.000000000 +0200
++++ b/scripting/build_tools/fix_swig_imports.py	2019-07-18 15:44:24.255754237 +0200
+@@ -40,6 +40,9 @@
+ txt = b""
+ 
+ for l in lines:
++    if l.startswith(b"if _swig_python_version_info < (2, 7, 0):"):     # ok with swig version >= 4.0.0
++        l = l.replace(b"_swig_python_version_info < (2, 7, 0)", b"False")
++        doneOk = True
+     if l.startswith(b"if _swig_python_version_info >= (2, 7, 0):"):     # ok with swig version >= 3.0.10
+         l = l.replace(b"_swig_python_version_info >= (2, 7, 0)", b"False")
+         doneOk = True

diff --git a/sci-electronics/kicad/kicad-5.1.0.ebuild b/sci-electronics/kicad/kicad-5.1.0-r1.ebuild
similarity index 98%
rename from sci-electronics/kicad/kicad-5.1.0.ebuild
rename to sci-electronics/kicad/kicad-5.1.0-r1.ebuild
index 8fca5ececb9..c7eca78142e 100644
--- a/sci-electronics/kicad/kicad-5.1.0.ebuild
+++ b/sci-electronics/kicad/kicad-5.1.0-r1.ebuild
@@ -51,6 +51,7 @@ CHECKREQS_DISK_BUILD="800M"
 
 PATCHES=(
 	"${FILESDIR}"/"${PN}-5.1.0-help.patch"
+	"${FILESDIR}"/"${PN}-5.1.0-swig-4.0.0.patch"
 )
 
 pkg_setup() {

diff --git a/sci-electronics/kicad/kicad-5.1.2.ebuild b/sci-electronics/kicad/kicad-5.1.2-r1.ebuild
similarity index 98%
rename from sci-electronics/kicad/kicad-5.1.2.ebuild
rename to sci-electronics/kicad/kicad-5.1.2-r1.ebuild
index c739de95232..0505a9fa436 100644
--- a/sci-electronics/kicad/kicad-5.1.2.ebuild
+++ b/sci-electronics/kicad/kicad-5.1.2-r1.ebuild
@@ -51,6 +51,7 @@ CHECKREQS_DISK_BUILD="800M"
 
 PATCHES=(
 	"${FILESDIR}"/"${PN}-5.1.0-help.patch"
+	"${FILESDIR}"/"${PN}-5.1.0-swig-4.0.0.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2019-12-17 18:14 Joonas Niilola
  0 siblings, 0 replies; 17+ messages in thread
From: Joonas Niilola @ 2019-12-17 18:14 UTC (permalink / raw
  To: gentoo-commits

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
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2020-05-14 10:36 Alexey Shvetsov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Shvetsov @ 2020-05-14 10:36 UTC (permalink / raw
  To: gentoo-commits

commit:     0eea69141f8a758b5205b69a1495332aff9e78e9
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Thu Dec 19 10:26:24 2019 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu May 14 10:34:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0eea6914

sci-electronics/kicad: Fix build failure and QA

Fix recent build failure in KiCAD. Also apply backported
patches from upstream to address QA issues that remained
since introducing this version of the ebuild.

Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Closes: https://bugs.gentoo.org/682480
Closes: https://bugs.gentoo.org/722288
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 .../kicad/files/kicad-5.1.5-ninja-build.patch      |  6 +++---
 .../kicad/files/kicad-5.1.5-strict-aliasing.patch  | 25 ++++++++++++++++++++++
 .../kicad/files/kicad-algorithm-header.patch       | 11 ++++++++++
 sci-electronics/kicad/files/kicad-metainfo.patch   | 12 +++++++++++
 ...kicad-5.1.5-r1.ebuild => kicad-5.1.5-r2.ebuild} | 17 ++++++++++++++-
 5 files changed, 67 insertions(+), 4 deletions(-)

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
index 3aac927b5bd..3b4b6a4d2fe 100644
--- a/sci-electronics/kicad/files/kicad-5.1.5-ninja-build.patch
+++ b/sci-electronics/kicad/files/kicad-5.1.5-ninja-build.patch
@@ -13,8 +13,8 @@ diff -Naur kicad-5.1.5-orig/pcbnew/CMakeLists.txt kicad-5.1.5/pcbnew/CMakeLists.
 +        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 @@
+
+@@ -792,18 +788,16 @@ if( KICAD_SCRIPTING_MODULES )
              DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
              )
      else()
@@ -41,5 +41,5 @@ diff -Naur kicad-5.1.5-orig/pcbnew/CMakeLists.txt kicad-5.1.5/pcbnew/CMakeLists.
 +            DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
 +            )
      endif()
- 
+
  endif()

diff --git a/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch b/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch
new file mode 100644
index 00000000000..b01a6b7d79f
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch
@@ -0,0 +1,25 @@
+diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp
+index b265e2363..eb1187d86 100644
+--- a/eeschema/dialogs/dialog_spice_model.cpp
++++ b/eeschema/dialogs/dialog_spice_model.cpp
+@@ -34,6 +34,7 @@
+ #include <wx/wupdlock.h>
+
+ #include <cctype>
++#include <cstring>
+
+ // Helper function to shorten conditions
+ static bool empty( const wxTextCtrl* aCtrl )
+@@ -804,9 +804,11 @@ bool DIALOG_SPICE_MODEL::addPwlValue( const wxString& aTime, const wxString& aVa
+     float timeF;
+     m_pwlTime->GetValue().ToDouble( &timeD );
+     timeF = timeD;
++    long data;
++    std::memcpy( &data, &timeF, sizeof( timeF ) );
+
+     // Store the time value, so the entries can be sorted
+-    m_pwlValList->SetItemData( idx, *reinterpret_cast<long*>( &timeF ) );
++    m_pwlValList->SetItemData( idx, data );
+
+     // Sort items by timestamp
+     m_pwlValList->SortItems( comparePwlValues, -1 );

diff --git a/sci-electronics/kicad/files/kicad-algorithm-header.patch b/sci-electronics/kicad/files/kicad-algorithm-header.patch
new file mode 100644
index 00000000000..aa118ea6f86
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-algorithm-header.patch
@@ -0,0 +1,11 @@
+diff -Naur kicad-5.1.5-orig/common/lib_tree_model.cpp kicad-5.1.5/common/lib_tree_model.cpp
+--- kicad-5.1.5-orig/common/lib_tree_model.cpp  2020-05-11 00:36:36.568301297 +0200
++++ kicad-5.1.5/common/lib_tree_model.cpp       2020-05-11 00:37:50.472359703 +0200
+@@ -21,6 +21,7 @@
+
+ #include <lib_tree_model.h>
+
++#include <algorithm>
+ #include <eda_pattern_match.h>
+ #include <lib_tree_item.h>
+ #include <make_unique.h>

diff --git a/sci-electronics/kicad/files/kicad-metainfo.patch b/sci-electronics/kicad/files/kicad-metainfo.patch
new file mode 100644
index 00000000000..48a5ef5be50
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-metainfo.patch
@@ -0,0 +1,12 @@
+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	2020-05-11 23:51:52.122093410 -0700
+@@ -919,7 +919,7 @@
+     set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
+     set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons )
+     set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
+-    set( UNIX_APPDATA_FILES resources/linux/appdata )
++    set( UNIX_APPDATA_FILES resources/linux/metainfo )
+ 
+     # Install Mime directory
+     install( DIRECTORY ${UNIX_ICON_FILES}

diff --git a/sci-electronics/kicad/kicad-5.1.5-r1.ebuild b/sci-electronics/kicad/kicad-5.1.5-r2.ebuild
similarity index 83%
rename from sci-electronics/kicad/kicad-5.1.5-r1.ebuild
rename to sci-electronics/kicad/kicad-5.1.5-r2.ebuild
index aaf6a6bf350..8dbca2a8ae4 100644
--- a/sci-electronics/kicad/kicad-5.1.5-r1.ebuild
+++ b/sci-electronics/kicad/kicad-5.1.5-r2.ebuild
@@ -57,6 +57,9 @@ CHECKREQS_DISK_BUILD="800M"
 PATCHES=(
 	"${FILESDIR}"/"${PN}-5.1.5-help.patch"
 	"${FILESDIR}"/"${PN}-5.1.5-ninja-build.patch"
+	"${FILESDIR}"/"${PN}-5.1.5-strict-aliasing.patch"
+	"${FILESDIR}"/"${PN}-algorithm-header.patch"
+	"${FILESDIR}"/"${PN}-metainfo.patch"
 	"${FILESDIR}"/"ldflags.patch"
 )
 
@@ -67,11 +70,22 @@ pkg_setup() {
 	check-reqs_pkg_setup
 }
 
+src_unpack() {
+	default_src_unpack
+	# For the metainfo patch to work the kicad.appdata.xml has to be moved to
+	# avoid QA issue.  This is needed because /usr/share/appdata location is
+	# deprecated, it should not be used anymore by new software.
+	# Appdata/Metainfo files should be installed into /usr/share/metainfo
+	# directory. as per
+	# https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
+	mv "${S}/resources/linux/appdata" "${S}/resources/linux/metainfo" || die "Appdata move failed"
+}
+
 src_configure() {
 	xdg_environment_reset
 
 	local mycmakeargs=(
-		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${P}"
+		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PF}"
 		-DKICAD_HELP="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
 		-DBUILD_GITHUB_PLUGIN="$(usex github)"
 		-DKICAD_SCRIPTING="$(usex python)"
@@ -84,6 +98,7 @@ src_configure() {
 		-DKICAD_USE_OCC="$(usex occ)"
 		-DKICAD_USE_OCE="$(usex oce)"
 		-DKICAD_INSTALL_DEMOS="$(usex examples)"
+		-DCMAKE_SKIP_RPATH="ON"
 	)
 	use python && mycmakeargs+=(
 		-DPYTHON_DEST="$(python_get_sitedir)"


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2020-06-06 17:47 Alexey Shvetsov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Shvetsov @ 2020-06-06 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     2f0ebe29c68c8b8fa957126aff9f58131711d599
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Tue May 26 03:42:39 2020 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sat Jun  6 17:46:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f0ebe29

sci-electronics/kicad: Fix up 5.1.5 ebuild

Rename patches to be versioned, since it's not guaranteed they will
cleanly apply to future versions. Also clean up some syntax in patching
logic.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 ...rithm-header.patch => kicad-5.1.5-algorithm-header.patch} |  0
 .../kicad/files/{ldflags.patch => kicad-5.1.5-ldflags.patch} |  0
 .../{kicad-metainfo.patch => kicad-5.1.5-metainfo.patch}     |  0
 sci-electronics/kicad/kicad-5.1.5-r2.ebuild                  | 12 ++++++------
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sci-electronics/kicad/files/kicad-algorithm-header.patch b/sci-electronics/kicad/files/kicad-5.1.5-algorithm-header.patch
similarity index 100%
rename from sci-electronics/kicad/files/kicad-algorithm-header.patch
rename to sci-electronics/kicad/files/kicad-5.1.5-algorithm-header.patch

diff --git a/sci-electronics/kicad/files/ldflags.patch b/sci-electronics/kicad/files/kicad-5.1.5-ldflags.patch
similarity index 100%
rename from sci-electronics/kicad/files/ldflags.patch
rename to sci-electronics/kicad/files/kicad-5.1.5-ldflags.patch

diff --git a/sci-electronics/kicad/files/kicad-metainfo.patch b/sci-electronics/kicad/files/kicad-5.1.5-metainfo.patch
similarity index 100%
rename from sci-electronics/kicad/files/kicad-metainfo.patch
rename to sci-electronics/kicad/files/kicad-5.1.5-metainfo.patch

diff --git a/sci-electronics/kicad/kicad-5.1.5-r2.ebuild b/sci-electronics/kicad/kicad-5.1.5-r2.ebuild
index 26d76cf5887..dde42e44bd4 100644
--- a/sci-electronics/kicad/kicad-5.1.5-r2.ebuild
+++ b/sci-electronics/kicad/kicad-5.1.5-r2.ebuild
@@ -55,12 +55,12 @@ BDEPEND="doc? ( app-doc/doxygen )"
 CHECKREQS_DISK_BUILD="800M"
 
 PATCHES=(
-	"${FILESDIR}"/"${PN}-5.1.5-help.patch"
-	"${FILESDIR}"/"${PN}-5.1.5-ninja-build.patch"
-	"${FILESDIR}"/"${PN}-5.1.5-strict-aliasing.patch"
-	"${FILESDIR}"/"${PN}-algorithm-header.patch"
-	"${FILESDIR}"/"${PN}-metainfo.patch"
-	"${FILESDIR}"/"ldflags.patch"
+	"${FILESDIR}/${P}-help.patch"
+	"${FILESDIR}/${P}-ninja-build.patch"
+	"${FILESDIR}/${P}-strict-aliasing.patch"
+	"${FILESDIR}/${P}-algorithm-header.patch"
+	"${FILESDIR}/${P}-metainfo.patch"
+	"${FILESDIR}/${P}-ldflags.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2020-09-25 20:22 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2020-09-25 20:22 UTC (permalink / raw
  To: gentoo-commits

commit:     011a513569497182d632fcbb967275e4169c3afd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 20:16:02 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 20:20:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=011a5135

sci-electronics/kicad: Remove old (py2.7, drop to ~arch)

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-electronics/kicad/Manifest                     |   4 -
 sci-electronics/kicad/files/kicad-boost-1.61.patch | 347 ---------------------
 .../files/kicad-cmake-checkcxxsymbolexists.patch   |  46 ---
 .../kicad/files/kicad-footprints-cmakelists.txt    |  16 -
 sci-electronics/kicad/kicad-4.0.7-r1.ebuild        | 198 ------------
 sci-electronics/kicad/metadata.xml                 |   2 -
 6 files changed, 613 deletions(-)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index be5b223eb6f..137d591a548 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,6 +1,2 @@
-DIST kicad-4.0.7-i18n.tar.gz 2578242 BLAKE2B 610f580d9584cf9ef96686c3d7b7081d4c3a0d2c670482eaa2ef32720a7e71630670845a6050bae8e51df7ac41e30f73d3d11be65ea477ad9efd9fbb5176e2df SHA512 4880705fd7e95c939b7f5e2b7730fd37c426be10596f4cfa80d7df102d9e67232621900395d45f4e735986054f74fb215ae2002a2818faae32b1c75e3cb7e10a
-DIST kicad-4.0.7.tar.xz 10678656 BLAKE2B 54be9a3f5ae6378ac05cb327c28b1a358d895e736a116e1bf5151f021973b9510eab4671a67f222c3be2ef67929954b9576c5c28ef2b6a14708f8c019729969b SHA512 7b2acd9efadf5d48565f71bd0df2474ecc8fc04145953c13ac27363d48dbe6b0de091e311713635f603aed89ce0759a1d623abb37a139e2c87184ca4e717145b
 DIST kicad-5.1.5.tar.xz 14203632 BLAKE2B cda7bf95c8edbddd36489f299dca9393ee51658e828f7e9f37bfa56955924785186908b0d8c91ae3e895f15cdba50c7579cf7a450e525f4a2ba215a721df26dd SHA512 5ca19e219da07a906f13e236849eb4497c9f827726a5cd13aceffe1d8c7dee480823bf3e949527f59a805eb3b8176fad51576ae663dd07b10e2822f2b37866a5
 DIST kicad-5.1.6.tar.bz2 18299367 BLAKE2B b5bfda025bb0be249f2ff334e8b82c49e4e4265fe4cf5daad8a01bfd6149f4c2d1c55d689f3033136ab904f45e8deb9ea12ccde43ea083b14d92e677adf39c0f SHA512 4fd3d0ac1524cc113210be8dc1b76ab4e02bf271f598943ecab73af98a9dc99009b2d3818c97b358498d2f98ee863f13b21e958fd2143356c2a1368601f0d48a
-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-boost-1.61.patch b/sci-electronics/kicad/files/kicad-boost-1.61.patch
deleted file mode 100644
index 3ca8711b9f0..00000000000
--- a/sci-electronics/kicad/files/kicad-boost-1.61.patch
+++ /dev/null
@@ -1,347 +0,0 @@
---- a/common/tool/tool_manager.cpp
-+++ b/common/tool/tool_manager.cpp
-@@ -532,11 +532,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 );
- 
---- a/include/tool/coroutine.h
-+++ b/include/tool/coroutine.h
-@@ -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
---- a/include/tool/tool_base.h
-+++ b/include/tool/tool_base.h
-@@ -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
---- a/include/tool/tool_interactive.h
-+++ b/include/tool/tool_interactive.h
-@@ -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/sci-electronics/kicad/files/kicad-cmake-checkcxxsymbolexists.patch b/sci-electronics/kicad/files/kicad-cmake-checkcxxsymbolexists.patch
deleted file mode 100644
index b2a1eeb2cc4..00000000000
--- a/sci-electronics/kicad/files/kicad-cmake-checkcxxsymbolexists.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Naur kicad-4.0.7.orig/CMakeModules/CheckCXXSymbolExists.cmake kicad-4.0.7/CMakeModules/CheckCXXSymbolExists.cmake
---- kicad-4.0.7.orig/CMakeModules/CheckCXXSymbolExists.cmake	2017-08-28 07:31:31.000000000 -0700
-+++ kicad-4.0.7/CMakeModules/CheckCXXSymbolExists.cmake	1969-12-31 16:00:00.000000000 -0800
-@@ -1,42 +0,0 @@
--# - Check if a symbol exists as a function, variable, or macro in C++
--# CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>)
--#
--# Check that the <symbol> is available after including given header
--# <files> and store the result in a <variable>.  Specify the list
--# of files in one argument as a semicolon-separated list.
--# CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed
--# to CHECK_SYMBOL_EXISTS(), which works only for C.
--#
--# If the header files define the symbol as a macro it is considered
--# available and assumed to work.  If the header files declare the
--# symbol as a function or variable then the symbol must also be
--# available for linking.  If the symbol is a type or enum value
--# it will not be recognized (consider using CheckTypeSize or
--# CheckCSourceCompiles).
--#
--# The following variables may be set before calling this macro to
--# modify the way the check is run:
--#
--#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
--#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
--#  CMAKE_REQUIRED_INCLUDES = list of include directories
--#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
--
--#=============================================================================
--# Copyright 2003-2011 Kitware, Inc.
--#
--# Distributed under the OSI-approved BSD License (the "License");
--# see accompanying file Copyright.txt for details.
--#
--# This software is distributed WITHOUT ANY WARRANTY; without even the
--# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--# See the License for more information.
--#=============================================================================
--# (To distribute this file outside of CMake, substitute the full
--#  License text for the above reference.)
--
--include(CheckSymbolExists)
--
--macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
--  _CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
--endmacro()

diff --git a/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt b/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
deleted file mode 100644
index d024485befd..00000000000
--- a/sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-project( kicad-footprints )
-
-cmake_minimum_required( VERSION 2.6.1 FATAL_ERROR )
-
-file(GLOB footprint_dirs "*.pretty")
-
-# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
-set( KICAD_DATA share/kicad
-    CACHE PATH "Location of KiCad data files." )
-set( KICAD_MODULES ${KICAD_DATA}/modules )
-
-mark_as_advanced( KICAD_DATA KICAD_MODULES )
-
-install(DIRECTORY ${footprint_dirs}
-    DESTINATION ${KICAD_MODULES}
-    COMPONENT resources)

diff --git a/sci-electronics/kicad/kicad-4.0.7-r1.ebuild b/sci-electronics/kicad/kicad-4.0.7-r1.ebuild
deleted file mode 100644
index a85b949bc42..00000000000
--- a/sci-electronics/kicad/kicad-4.0.7-r1.ebuild
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-
-WX_GTK_VER="3.0"
-
-inherit check-reqs cmake-utils flag-o-matic gnome2-utils python-single-r1 wxwidgets vcs-snapshot versionator xdg
-
-SERIES=$(get_version_component_range 1-2)
-
-DESCRIPTION="Electronic Schematic and PCB design tools."
-HOMEPAGE="http://www.kicad-pcb.org"
-SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
-	!minimal? (
-		http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
-		http://downloads.kicad-pcb.org/libraries/kicad-library-${PV}.tar.gz
-	)
-	i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )"
-
-LICENSE="GPL-2+ GPL-3+ Boost-1.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 x86"
-IUSE="debug doc examples github i18n libressl minimal +python"
-LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh-CN"
-for lang in ${LANGS} ; do
-	IUSE="${IUSE} l10n_${lang}"
-done
-unset lang
-
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
-	$(python_gen_cond_dep "
-		python? (
-			dev-python/wxpython:${WX_GTK_VER}[opengl,\${PYTHON_MULTI_USEDEP}]
-			${PYTHON_DEPS}
-		)
-		>=dev-libs/boost-1.61:=[context,nls,threads,python?,\${PYTHON_MULTI_USEDEP}]
-	")
-	github? (
-		libressl? ( dev-libs/libressl:0= )
-		!libressl? ( dev-libs/openssl:0= )
-	)
-	media-libs/glew:0=
-	media-libs/freeglut
-	media-libs/mesa[X(+)]
-	sys-libs/zlib
-	x11-libs/cairo"
-DEPEND="${COMMON_DEPEND}
-	doc? ( app-doc/doxygen )
-	i18n? ( virtual/libintl )
-	python? ( dev-lang/swig:0 )"
-RDEPEND="${COMMON_DEPEND}
-	sci-electronics/electronics-menu"
-
-pkg_pretend() {
-	CHECKREQS_DISK_BUILD="8G"
-	check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	setup-wxwidgets
-	CHECKREQS_DISK_BUILD="8G"
-	check-reqs_pkg_setup
-}
-
-src_prepare() {
-	xdg_src_prepare
-	cmake-utils_src_prepare
-
-	# Patch to work with >=boost 1.61
-	eapply "${FILESDIR}/${PN}-boost-1.61.patch"
-	# Patch to work with >=cmake 3.11
-	eapply "${FILESDIR}/${PN}-cmake-checkcxxsymbolexists.patch"
-
-	# Remove cvpcb desktop file as it does nothing
-	rm "resources/linux/mime/applications/cvpcb.desktop" || die
-
-	# Handle optional minimal install.
-	if use minimal; then
-		# remove templates as they are not needed to run binaries
-		sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die
-	else
-		# create a link to the parts library in the main project folder
-		ln -s "${WORKDIR}/kicad-library-${PV}" "${S}/${PN}-library" || die
-		# create a link to the footprints library and add cmake build rule for it
-		ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die
-		cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die
-		# add the libraries directory to cmake as a subproject to build
-		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die
-		# add the footprints directory to cmake as a subproject to build
-		sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die
-		# remove duplicate uninstall directions for the library module
-		sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die
-	fi
-
-	# Add internationalization for the GUI
-	if use i18n; then
-		# create a link to the translations library in the main project folder
-		ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die
-		# Remove unused languages. Project generates only languages specified in the
-		# file in LINGUAS in the subproject folder. By default all languages are added
-		# so we sed out the unused ones based on the user l10n_* settings.
-		local lang
-		for lang in ${LANGS}; do
-			if ! use l10n_${lang}; then
-				lang="${lang//-/_}"  # Needed to turn zh-CN to zh_CN as KiCad does not follow l10n standard here
-				sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die
-			fi
-		done
-		# cmakelists does not respect our build dir variables, so make it point to the right location
-		sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die
-		# we also make from the master project so the source dir is understood incorretly, replace that too
-		sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die
-		# add the translations directory to cmake as a subproject to build
-		sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die
-		# remove duplicate uninstall directions for the translation module
-		sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die
-	fi
-
-	# Install examples if requested
-	use examples || sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die
-
-	# Add important missing doc files
-	sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DKICAD_DOCS="/usr/share/doc/${PF}"
-		-DKICAD_SKIP_BOOST=ON
-		-DBUILD_GITHUB_PLUGIN="$(usex github)"
-		-DKICAD_SCRIPTING="$(usex python)"
-		-DKICAD_SCRIPTING_MODULES="$(usex python)"
-		-DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
-		-DKICAD_I18N_UNIX_STRICT_PATH="$(usex i18n)"
-		-DCMAKE_CXX_FLAGS="-std=c++11"
-	)
-	use python && mycmakeargs+=(
-		-DwxUSE_UNICODE=ON
-		-DPYTHON_DEST="$(python_get_sitedir)"
-		-DPYTHON_EXECUTABLE="${PYTHON}"
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-	)
-	if use debug; then
-		append-cxxflags "-DDEBUG"
-		append-cflags "-DDEBUG"
-	fi
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-	if use doc; then
-		doxygen Doxyfile || die
-	fi
-}
-
-src_install() {
-	cmake-utils_src_install
-	use python && python_optimize
-	if use doc ; then
-		dodoc uncrustify.cfg
-		cd Documentation || die
-		dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
-	fi
-}
-
-pkg_preinst() {
-	xdg_pkg_preinst
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	gnome2_icon_cache_update
-
-	if use minimal ; then
-		ewarn "If the schematic and/or board editors complain about missing libraries when you"
-		ewarn "open old projects, you will have to take one or more of the following actions :"
-		ewarn "- Install the missing libraries manually."
-		ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
-		ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
-		ewarn "- Emerge ${PN} without the 'minimal' USE flag."
-	fi
-	elog ""
-	elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
-	elog "For help and extended documentation emerge app-doc/kicad-doc."
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-	gnome2_icon_cache_update
-}

diff --git a/sci-electronics/kicad/metadata.xml b/sci-electronics/kicad/metadata.xml
index 6eff0d23caf..0892cbd7d4b 100644
--- a/sci-electronics/kicad/metadata.xml
+++ b/sci-electronics/kicad/metadata.xml
@@ -11,8 +11,6 @@
 	</maintainer>
 	<use>
 		<flag name="github">Add github support into PCB editor</flag>
-		<flag name="i18n">Allow GUI internationalization through l10n_* use flags</flag>
-		<flag name="minimal">Build only binaries without parts library and examples</flag>
 		<flag name="ngspice">Enable circuit simulation</flag>
 		<flag name="occ">Enable viewing 3D rendering of designs via opencascade</flag>
 		<flag name="oce">Enable viewing 3D rendering of designs via OCE</flag>


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2022-06-21 20:44 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2022-06-21 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     bd8b6af601461b9665e4cfc88ec1ed72aa0a72f0
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Mon Jun 20 07:35:05 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 20:44:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd8b6af6

sci-electronics/kicad: add 6.0.6

Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-electronics/kicad/Manifest                     |   1 +
 .../kicad-6.0.6-unitialized-variable-fix.patch     |  12 ++
 sci-electronics/kicad/kicad-6.0.6.ebuild           | 175 +++++++++++++++++++++
 3 files changed, 188 insertions(+)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index d81bd5988637..1d5f7831f430 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,2 +1,3 @@
 DIST kicad-5.1.12.tar.bz2 18581842 BLAKE2B f04369fecded6fb07376efa209ddf5fcc693e73018ed728003529cdd0e6ef4a059c28106db1acf18834d938c3fbe4b9df5b5c8e0874989d35f74cf67414e6c76 SHA512 c0e5ad5b360ef788b427755aa71eeaec1a19b7520a00bb94fafba47e291f6ba067c598004efd515287800cd41f7da399d0389121e53e9669026c62f21b0a65ea
 DIST kicad-6.0.5.tar.gz 45086778 BLAKE2B 9cd10a2a59068a436cf7d940a52725018a98f27ffa785f62d86498d0dd436a54c2603806ec4c26366d72886f487965427bb77cded7afc62746a236b29aaed426 SHA512 aa0cc555b201aacfbc4321a8713f98810ffb24338281e30b1aabaf6e2e649fe78b9c7f40773bb9aa796c7f1d91064436219a6493f28fc9b710634cc9574f2545
+DIST kicad-6.0.6.tar.gz 45086249 BLAKE2B fbf1f11cbf4838186e1ecb42127f7b182d3cd13b4af147211c85244d361cbf83387f5d102efdc80a63cfff36e343e6c4e07fef7f95dac4c6666844c5bc9d0ec2 SHA512 c472a6b81e3065e0499cad8467527d3531dc4d5861f50079ecb2ae6fccaf2c4d24fbeae8e9fe0cdde5ef548458fcef9615d6539426abe391a629dd539406065a

diff --git a/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch b/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch
new file mode 100644
index 000000000000..cce508c1e888
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch
@@ -0,0 +1,12 @@
+diff -Naur kicad-6.0.6/common/tool/tool_manager.cpp kicad-6.0.6-new/common/tool/tool_manager.cpp
+--- kicad-6.0.6/common/tool/tool_manager.cpp	2022-06-17 18:11:16.000000000 -0700
++++ kicad-6.0.6-new/common/tool/tool_manager.cpp	2022-06-20 00:17:13.548239632 -0700
+@@ -902,7 +902,7 @@
+         m_menuOwner = -1;
+ 
+         // Restore cursor settings
+-        for( auto cursorSetting : m_cursorSettings )
++        for( auto const& cursorSetting : m_cursorSettings )
+         {
+             auto it = m_toolIdIndex.find( cursorSetting.first );
+             wxASSERT( it != m_toolIdIndex.end() );

diff --git a/sci-electronics/kicad/kicad-6.0.6.ebuild b/sci-electronics/kicad/kicad-6.0.6.ebuild
new file mode 100644
index 000000000000..c152b8099cd1
--- /dev/null
+++ b/sci-electronics/kicad/kicad-6.0.6.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+WX_GTK_VER="3.0-gtk3"
+
+inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils
+
+DESCRIPTION="Electronic Schematic and PCB design tools"
+HOMEPAGE="https://www.kicad.org"
+
+if [[ ${PV} == 9999 ]]; then
+	EGIT_REPO_URI="https://gitlab.com/kicad/code/kicad.git"
+	inherit git-r3
+else
+	MY_PV="${PV/_rc/-rc}"
+	MY_P="${PN}-${MY_PV}"
+	SRC_URI="https://gitlab.com/kicad/code/${PN}/-/archive/${MY_PV}/${MY_P}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/${PN}-${MY_PV}"
+
+	if [[ ${PV} != *_rc* ]] ; then
+		KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+	fi
+fi
+
+# BSD for bundled pybind
+LICENSE="GPL-2+ GPL-3+ Boost-1.0 BSD"
+SLOT="0"
+IUSE="doc examples +ngspice nls openmp +occ +pcm"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Contains bundled pybind but it's patched for wx
+# See https://gitlab.com/kicad/code/kicad/-/commit/74e4370a9b146b21883d6a2d1df46c7a10bd0424
+# Depend on opencascade:0 to get unslotted variant (so we know path to it), bug #833301
+COMMON_DEPEND="
+	!sci-electronics/kicad-i18n
+	>=dev-libs/boost-1.61:=[context,nls]
+	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]
+	$(python_gen_cond_dep '
+		>=dev-libs/boost-1.61:=[context,nls,python,${PYTHON_USEDEP}]
+		dev-python/wxpython:4.0[${PYTHON_USEDEP}]
+	')
+	${PYTHON_DEPS}
+	ngspice? (
+		>sci-electronics/ngspice-27[shared]
+	)
+	nls? (
+		sys-devel/gettext
+	)
+	occ? (
+		>=sci-libs/opencascade-7.3.0:0=
+	)
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+	sci-electronics/electronics-menu
+"
+BDEPEND=">=dev-lang/swig-3.0
+	doc? ( app-doc/doxygen )"
+
+if [[ ${PV} == 9999 ]] ; then
+	# x11-misc-util/macros only required on live ebuilds
+	BDEPEND+=" >=x11-misc/util-macros-1.18"
+fi
+
+CHECKREQS_DISK_BUILD="900M"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-scripts-install-fix.patch"
+	"${FILESDIR}/${P}-unitialized-variable-fix.patch"
+)
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	python-single-r1_pkg_setup
+	setup-wxwidgets
+	check-reqs_pkg_setup
+}
+
+src_unpack() {
+	if [[ ${PV} == 9999 ]]; then
+		git-r3_src_unpack
+	else
+		default_src_unpack
+	fi
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local mycmakeargs=(
+		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
+
+		-DKICAD_SCRIPTING_WXPYTHON=ON
+
+		# Merged from separate -i18n package, bug #830274
+		-DKICAD_BUILD_I18N="$(usex nls)"
+		-DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)"
+
+		-DPYTHON_DEST="$(python_get_sitedir)"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+
+		-DKICAD_SPICE="$(usex ngspice)"
+		-DKICAD_PCM="$(usex pcm)"
+
+		-DKICAD_USE_OCC="$(usex occ)"
+		-DKICAD_INSTALL_DEMOS="$(usex examples)"
+		-DCMAKE_SKIP_RPATH="ON"
+	)
+
+	use occ && mycmakeargs+=(
+		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
+		-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/opencascade
+	)
+
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+	if use doc; then
+		cmake_src_compile doxygen-docs
+	fi
+}
+
+src_test() {
+	# Test cannot find library in Portage's sandbox. Let's create a link so test can run.
+	ln -s "${BUILD_DIR}/eeschema/_eeschema.kiface" "${BUILD_DIR}/qa/eeschema/_eeschema.kiface" || die
+
+	# LD_LIBRARY_PATH is there to help it pick up the just-built libraries
+	LD_LIBRARY_PATH="${BUILD_DIR}/3d-viewer/3d_cache/sg:${LD_LIBRARY_PATH}" cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+	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/.
+	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
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2023-01-30  4:01 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2023-01-30  4:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9392d038b7d2ae6ff15b75694e30920d65e4bf48
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 30 03:34:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 30 03:34:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9392d038

sci-electronics/kicad: fix build w/ gcc 13

Closes: https://bugs.gentoo.org/892499
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../kicad/files/kicad-6.0.9-gcc-13.patch           | 30 ++++++++++++++++++++++
 sci-electronics/kicad/kicad-6.0.9.ebuild           |  1 +
 2 files changed, 31 insertions(+)

diff --git a/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch b/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch
new file mode 100644
index 000000000000..f1047cb9dee5
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/892499
+https://gitlab.com/kicad/code/kicad/-/commit/8c324f1fc8f7fcdb5e8f494da3d45997001fab4a
+
+From 8c324f1fc8f7fcdb5e8f494da3d45997001fab4a Mon Sep 17 00:00:00 2001
+From: jean-pierre charras <jp.charras@wanadoo.fr>
+Date: Tue, 20 Dec 2022 12:46:19 +0100
+Subject: [PATCH] Fix a missing include. Fixes #13216
+ https://gitlab.com/kicad/code/kicad/issues/13216
+
+--- a/pcb_calculator/eserie.h
++++ b/pcb_calculator/eserie.h
+@@ -2,7 +2,7 @@
+  * This program source code file is part of KiCad, a free EDA CAD application.
+  *
+  * Copyright (C) 2020 <janvi@veith.net>
+- * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
++ * Copyright (C) 2020-2022 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 as published by the
+@@ -21,6 +21,7 @@
+ #include <array>
+ #include <vector>
+ #include <string>
++#include <cstdint>
+ 
+ /**
+  * E-Values derived from a geometric sequence formula by Charles Renard were already
+-- 
+GitLab

diff --git a/sci-electronics/kicad/kicad-6.0.9.ebuild b/sci-electronics/kicad/kicad-6.0.9.ebuild
index 482f0ade6d2d..66c09b766366 100644
--- a/sci-electronics/kicad/kicad-6.0.9.ebuild
+++ b/sci-electronics/kicad/kicad-6.0.9.ebuild
@@ -77,6 +77,7 @@ CHECKREQS_DISK_BUILD="900M"
 PATCHES=(
 	"${FILESDIR}/${PN}-scripts-install-fix.patch"
 	"${FILESDIR}/${PN}-6.0.6-unitialized-variable-fix.patch"
+	"${FILESDIR}/${PN}-6.0.9-gcc-13.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2023-02-18 10:46 Matthew Smith
  0 siblings, 0 replies; 17+ messages in thread
From: Matthew Smith @ 2023-02-18 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e2727746cd7823177e43b15f01314e60d68397a6
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 10:41:05 2023 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 10:43:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2727746

sci-electronics/kicad: Use wxGTK-3.2

wxGTK is slotted and wxpython is not. The versions must match, so use
the latest version for now.

Closes: https://bugs.gentoo.org/895188
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 .../files/kicad-7.0.0-wxwidgets-version.patch      | 95 ++++++++++++++++++++++
 .../{kicad-7.0.0.ebuild => kicad-7.0.0-r1.ebuild}  | 10 ++-
 2 files changed, 103 insertions(+), 2 deletions(-)

diff --git a/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch b/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch
new file mode 100644
index 000000000000..9ef12e97b573
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch
@@ -0,0 +1,95 @@
+From b536580119c59fde78e38d8d6388f2540ecb6cf9 Mon Sep 17 00:00:00 2001
+From: Ian McInerney <ian.s.mcinerney@ieee.org>
+Date: Mon, 13 Feb 2023 21:24:26 +0000
+Subject: [PATCH] Support subrelease field in wxWidgets cmake detection
+
+Sometimes wxWidgets increments the subrelease to a non-zero value, and
+since wxPython will report a subrelease, we must ensure we can get the
+subrelease from the wx library properly, otherwise configure will fail
+thinking the library isn't the same version as that used by wxPython.
+
+Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13887
+--- a/cmake/FindwxWidgets.cmake
++++ b/cmake/FindwxWidgets.cmake
+@@ -926,8 +926,17 @@ if(wxWidgets_FOUND)
+     "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
+   string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
+     "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
+-  set(wxWidgets_VERSION_STRING
+-    "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
++  string(REGEX REPLACE "^(.*\n)?#define +wxSUBRELEASE_NUMBER +([0-9]+).*"
++    "\\2" wxWidgets_VERSION_SUBRELEASE "${_wx_version_h}" )
++
++  if( ${wxWidgets_VERSION_SUBRELEASE} GREATER 0 )
++    set(wxWidgets_VERSION_STRING
++      "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}.${wxWidgets_VERSION_SUBRELEASE}" )
++  else()
++    set(wxWidgets_VERSION_STRING
++      "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
++  endif()
++
+   DBG_MSG("wxWidgets_VERSION_STRING:    ${wxWidgets_VERSION_STRING}")
+ endif()
+ 
+-- 
+From 1e8cc6855d6a8fc1f9dfc933224c3a10fb759f9c Mon Sep 17 00:00:00 2001
+From: Ian McInerney <ian.s.mcinerney@ieee.org>
+Date: Tue, 14 Feb 2023 00:18:56 +0000
+Subject: [PATCH] Relax wxPython version mismatch check to major.minor
+
+The previous version check failed when the version was even slightly
+different, including on the revision field. Theoretically the ABI of the
+wx minor versions in use should be the same, so this might work. On the
+other hand, with wxPython it could break as well. YOLO.
+--- a/scripting/python_scripting.cpp
++++ b/scripting/python_scripting.cpp
+@@ -50,6 +50,7 @@
+ #include <kiplatform/environment.h>
+ 
+ #include <wx/app.h>
++#include <wx/regex.h>
+ #include <wx/utils.h>
+ 
+ #include <config.h>
+@@ -128,7 +129,39 @@ except:
+                                            wxVI.GetMajor(), wxVI.GetMinor(), wxVI.GetMicro() );
+         version = version.Mid( idx + 10 );
+ 
+-        if( wxVersion.Cmp( version ) != 0 )
++        int wxPy_major = 0;
++        int wxPy_minor = 0;
++        int wxPy_micro = 0;
++        int wxPy_rev   = 0;
++
++        // Compile a regex to extract the wxPython version
++        wxRegEx re( "([0-9]+)\\.([0-9]+)\\.?([0-9]+)?\\.?([0-9]+)?" );
++        wxASSERT( re.IsValid() );
++
++        if( re.Matches( version ) )
++        {
++            wxString v = re.GetMatch( version, 1 );
++
++            if( !v.IsEmpty() )
++                v.ToInt( &wxPy_major );
++
++            v = re.GetMatch( version, 2 );
++
++            if( !v.IsEmpty() )
++                v.ToInt( &wxPy_minor );
++
++            v = re.GetMatch( version, 3 );
++
++            if( !v.IsEmpty() )
++                v.ToInt( &wxPy_micro );
++
++            v = re.GetMatch( version, 4 );
++
++            if( !v.IsEmpty() )
++                v.ToInt( &wxPy_rev );
++        }
++
++        if( ( wxVI.GetMajor() != wxPy_major ) || ( wxVI.GetMinor() != wxPy_minor ) )
+         {
+             wxString msg = wxT( "The wxPython library was compiled against wxWidgets %s but KiCad is "
+                                 "using %s.  Python plugins will not be available." );
+-- 

diff --git a/sci-electronics/kicad/kicad-7.0.0.ebuild b/sci-electronics/kicad/kicad-7.0.0-r1.ebuild
similarity index 95%
rename from sci-electronics/kicad/kicad-7.0.0.ebuild
rename to sci-electronics/kicad/kicad-7.0.0-r1.ebuild
index 96825330a19f..5371ccfee521 100644
--- a/sci-electronics/kicad/kicad-7.0.0.ebuild
+++ b/sci-electronics/kicad/kicad-7.0.0-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{9..10} )
-WX_GTK_VER="3.0-gtk3"
+WX_GTK_VER="3.2-gtk3"
 
 inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils
 
@@ -50,7 +50,7 @@ COMMON_DEPEND="
 	sys-libs/zlib
 	$(python_gen_cond_dep '
 		dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}]
-		dev-python/wxpython:4.0[${PYTHON_USEDEP}]
+		~dev-python/wxpython-4.2.0:*[${PYTHON_USEDEP}]
 	')
 	${PYTHON_DEPS}
 	ngspice? (
@@ -74,6 +74,11 @@ fi
 
 CHECKREQS_DISK_BUILD="900M"
 
+PATCHES=(
+	# https://bugs.gentoo.org/895188
+	"${FILESDIR}"/${PN}-7.0.0-wxwidgets-version.patch
+)
+
 pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 
@@ -97,6 +102,7 @@ src_configure() {
 		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
 
 		-DKICAD_SCRIPTING_WXPYTHON=ON
+		-DKICAD_USE_EGL=ON
 
 		-DKICAD_BUILD_I18N="$(usex nls)"
 		-DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)"


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2023-07-18 19:15 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2023-07-18 19:15 UTC (permalink / raw
  To: gentoo-commits

commit:     886a3319f85d6e36f4536bca1bc915e2cd541f4e
Author:     Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
AuthorDate: Thu Jul  6 10:27:46 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 19:13:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=886a3319

sci-electronics/kicad: drop 6.0.11

Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-electronics/kicad/Manifest                     |   1 -
 .../kicad-6.0.6-unitialized-variable-fix.patch     |  12 --
 .../kicad/files/kicad-6.0.9-gcc-13.patch           |  30 ----
 .../kicad/files/kicad-scripts-install-fix.patch    |  12 --
 sci-electronics/kicad/kicad-6.0.11.ebuild          | 175 ---------------------
 sci-electronics/kicad/metadata.xml                 |   2 -
 6 files changed, 232 deletions(-)

diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
index b66d5d8111fa..7fde7c4c5fd8 100644
--- a/sci-electronics/kicad/Manifest
+++ b/sci-electronics/kicad/Manifest
@@ -1,4 +1,3 @@
-DIST kicad-6.0.11.tar.bz2 34083016 BLAKE2B 85662dd57eb5f28498317b1554e703efdebaa470f749ca239b2caeae4c366005a7c9bb1d1ba6375ed80d277efabf09b56d3e7e1e82bf93462b4ba5405445157e SHA512 9827be9f2c18be1ab3bc5a1a3bd3d6297bc69b561e43b0f9010cb49009c3e87f1d320034411ecc0a2277b5686923a3d4bcc507278590814309d10de14463266d
 DIST kicad-7.0.1.tar.bz2 42744121 BLAKE2B cb6005be531027e02c5c3fa03be54dff00720aa9c36d12d1e619e041da05e5b4efd048be4e01021cf225a35cd638a162f4b620b65ec117027092a5bf650cb1ec SHA512 6b3f32073a0667c745be54fccf1660cc81b560ad7613eb2355956b48567d7e82ce6926ab04d374fe88dcaa1220357997f5f4621e6d635effcd3d698e45a37516
 DIST kicad-7.0.2.tar.bz2 42844186 BLAKE2B 136d68b3174cde74db96b1197c62da1fb4e54f628f73a6e0ea092c713b529863d9e443b6631a0ecbb55e2d299a7b78b8218d05e605f8ae8f5972915147ec140f SHA512 04d7e39815f9e87b8646f25fb7e1b82bcf2bc63e26e078f3175c37a2c2e0a2bb7771e70e4698dbfc496f112a733668bdc746eefd1a9c4c76d0b36696738026a4
 DIST kicad-7.0.6.tar.bz2 43548452 BLAKE2B 90fa15d67f5629266755c469208baa486f41003a9b6ff32c7b7a0707967d54dbc3410d332f0ab1fde91c6045c345b34d1e27585feb265386e58447aea464a93f SHA512 492e6f4997eefda03eb371ec92c1a971cc37e16cb18f4ead08db22370048f6e2fce332c58d5eac64554808bf15738ebd18cf8f3664eacd6d3066a35268f3ec6a

diff --git a/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch b/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch
deleted file mode 100644
index cce508c1e888..000000000000
--- a/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur kicad-6.0.6/common/tool/tool_manager.cpp kicad-6.0.6-new/common/tool/tool_manager.cpp
---- kicad-6.0.6/common/tool/tool_manager.cpp	2022-06-17 18:11:16.000000000 -0700
-+++ kicad-6.0.6-new/common/tool/tool_manager.cpp	2022-06-20 00:17:13.548239632 -0700
-@@ -902,7 +902,7 @@
-         m_menuOwner = -1;
- 
-         // Restore cursor settings
--        for( auto cursorSetting : m_cursorSettings )
-+        for( auto const& cursorSetting : m_cursorSettings )
-         {
-             auto it = m_toolIdIndex.find( cursorSetting.first );
-             wxASSERT( it != m_toolIdIndex.end() );

diff --git a/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch b/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch
deleted file mode 100644
index f1047cb9dee5..000000000000
--- a/sci-electronics/kicad/files/kicad-6.0.9-gcc-13.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://bugs.gentoo.org/892499
-https://gitlab.com/kicad/code/kicad/-/commit/8c324f1fc8f7fcdb5e8f494da3d45997001fab4a
-
-From 8c324f1fc8f7fcdb5e8f494da3d45997001fab4a Mon Sep 17 00:00:00 2001
-From: jean-pierre charras <jp.charras@wanadoo.fr>
-Date: Tue, 20 Dec 2022 12:46:19 +0100
-Subject: [PATCH] Fix a missing include. Fixes #13216
- https://gitlab.com/kicad/code/kicad/issues/13216
-
---- a/pcb_calculator/eserie.h
-+++ b/pcb_calculator/eserie.h
-@@ -2,7 +2,7 @@
-  * This program source code file is part of KiCad, a free EDA CAD application.
-  *
-  * Copyright (C) 2020 <janvi@veith.net>
-- * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
-+ * Copyright (C) 2020-2022 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 as published by the
-@@ -21,6 +21,7 @@
- #include <array>
- #include <vector>
- #include <string>
-+#include <cstdint>
- 
- /**
-  * E-Values derived from a geometric sequence formula by Charles Renard were already
--- 
-GitLab

diff --git a/sci-electronics/kicad/files/kicad-scripts-install-fix.patch b/sci-electronics/kicad/files/kicad-scripts-install-fix.patch
deleted file mode 100644
index d52a05d3bcf5..000000000000
--- a/sci-electronics/kicad/files/kicad-scripts-install-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur kicad-6.0.2-orig/CMakeLists.txt kicad-6.0.2/CMakeLists.txt
---- kicad-6.0.2-orig/CMakeLists.txt	2022-02-10 16:29:07.000000000 -0800
-+++ kicad-6.0.2/CMakeLists.txt	2022-02-13 20:09:37.244713966 -0800
-@@ -950,7 +950,7 @@
- ###
- if( UNIX AND NOT APPLE )
-     install( DIRECTORY scripts
--        DESTINATION ${KICAD_DOCS}
-+        DESTINATION ${KICAD_BIN}/scripts
-         COMPONENT resources
-         PATTERN "*.bat" EXCLUDE
-         )

diff --git a/sci-electronics/kicad/kicad-6.0.11.ebuild b/sci-electronics/kicad/kicad-6.0.11.ebuild
deleted file mode 100644
index 7e4168d52685..000000000000
--- a/sci-electronics/kicad/kicad-6.0.11.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..10} )
-WX_GTK_VER="3.0-gtk3"
-
-inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils
-
-DESCRIPTION="Electronic Schematic and PCB design tools"
-HOMEPAGE="https://www.kicad.org"
-
-if [[ ${PV} == 9999 ]]; then
-	EGIT_REPO_URI="https://gitlab.com/kicad/code/kicad.git"
-	inherit git-r3
-else
-	MY_PV="${PV/_rc/-rc}"
-	MY_P="${PN}-${MY_PV}"
-	SRC_URI="https://gitlab.com/kicad/code/${PN}/-/archive/${MY_PV}/${MY_P}.tar.bz2"
-	S="${WORKDIR}/${PN}-${MY_PV}"
-
-	if [[ ${PV} != *_rc* ]] ; then
-		KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
-	fi
-fi
-
-# BSD for bundled pybind
-LICENSE="GPL-2+ GPL-3+ Boost-1.0 BSD"
-SLOT="0"
-IUSE="doc examples ngspice nls openmp +occ +pcm"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# Contains bundled pybind but it's patched for wx
-# See https://gitlab.com/kicad/code/kicad/-/commit/74e4370a9b146b21883d6a2d1df46c7a10bd0424
-# Depend on opencascade:0 to get unslotted variant (so we know path to it), bug #833301
-COMMON_DEPEND="
-	dev-libs/boost:=[context,nls]
-	<dev-python/wxpython-4.2.0
-	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]
-	$(python_gen_cond_dep '
-		dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}]
-		dev-python/wxpython:4.0[${PYTHON_USEDEP}]
-	')
-	${PYTHON_DEPS}
-	ngspice? (
-		>sci-electronics/ngspice-27[shared]
-	)
-	nls? (
-		sys-devel/gettext
-	)
-	occ? (
-		>=sci-libs/opencascade-7.3.0:0=
-	)
-"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
-	sci-electronics/electronics-menu
-"
-BDEPEND=">=dev-lang/swig-3.0
-	doc? ( app-doc/doxygen )"
-
-if [[ ${PV} == 9999 ]] ; then
-	# x11-misc-util/macros only required on live ebuilds
-	BDEPEND+=" >=x11-misc/util-macros-1.18"
-fi
-
-CHECKREQS_DISK_BUILD="900M"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-scripts-install-fix.patch"
-	"${FILESDIR}/${PN}-6.0.6-unitialized-variable-fix.patch"
-	"${FILESDIR}/${PN}-6.0.9-gcc-13.patch"
-)
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	python-single-r1_pkg_setup
-	setup-wxwidgets
-	check-reqs_pkg_setup
-}
-
-src_unpack() {
-	if [[ ${PV} == 9999 ]]; then
-		git-r3_src_unpack
-	else
-		default_src_unpack
-	fi
-}
-
-src_configure() {
-	xdg_environment_reset
-
-	local mycmakeargs=(
-		-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
-
-		-DKICAD_SCRIPTING_WXPYTHON=ON
-
-		# Merged from separate -i18n package, bug #830274
-		-DKICAD_BUILD_I18N="$(usex nls)"
-		-DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)"
-
-		-DPYTHON_DEST="$(python_get_sitedir)"
-		-DPYTHON_EXECUTABLE="${PYTHON}"
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-
-		-DKICAD_SPICE="$(usex ngspice)"
-		-DKICAD_PCM="$(usex pcm)"
-
-		-DKICAD_USE_OCC="$(usex occ)"
-		-DKICAD_INSTALL_DEMOS="$(usex examples)"
-		-DCMAKE_SKIP_RPATH="ON"
-	)
-
-	use occ && mycmakeargs+=(
-		-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
-		-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/opencascade
-	)
-
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-	if use doc; then
-		cmake_src_compile doxygen-docs
-	fi
-}
-
-src_test() {
-	# Test cannot find library in Portage's sandbox. Let's create a link so test can run.
-	ln -s "${BUILD_DIR}/eeschema/_eeschema.kiface" "${BUILD_DIR}/qa/eeschema/_eeschema.kiface" || die
-
-	# LD_LIBRARY_PATH is there to help it pick up the just-built libraries
-	LD_LIBRARY_PATH="${BUILD_DIR}/3d-viewer/3d_cache/sg:${LD_LIBRARY_PATH}" cmake_src_test
-}
-
-src_install() {
-	cmake_src_install
-	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/.
-	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 "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
-}

diff --git a/sci-electronics/kicad/metadata.xml b/sci-electronics/kicad/metadata.xml
index 36c0a94d2d79..693935b54ebc 100644
--- a/sci-electronics/kicad/metadata.xml
+++ b/sci-electronics/kicad/metadata.xml
@@ -11,8 +11,6 @@
 	</maintainer>
 	<use>
 		<flag name="ngspice">Enable circuit simulation</flag>
-		<flag name="occ">Enable viewing 3D rendering of designs via <pkg>sci-libs/opencascade</pkg></flag>
-		<flag name="pcm">Enable plugin content manager</flag>
 	</use>
 	<longdescription>
 		Kicad is an open source (GPL) software for the creation of electronic


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2024-03-27 11:41 Yixun Lan
  0 siblings, 0 replies; 17+ messages in thread
From: Yixun Lan @ 2024-03-27 11:41 UTC (permalink / raw
  To: gentoo-commits

commit:     ded5389f065b99454f2478b9559bf3a6dc43247f
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Fri Mar 22 11:22:21 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 11:41:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded5389f

sci-electronics/kicad: fix build error with libgit2-1.8.0

See also: https://gitlab.com/kicad/code/kicad/-/issues/17536

Closes: https://bugs.gentoo.org/927503
Closes: https://github.com/gentoo/gentoo/pull/35865
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../kicad/files/kicad-8.0.1-libgit2.patch          | 36 ++++++++++++++++++++++
 sci-electronics/kicad/kicad-8.0.0.ebuild           |  4 +++
 sci-electronics/kicad/kicad-8.0.1.ebuild           |  4 +++
 3 files changed, 44 insertions(+)

diff --git a/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch
new file mode 100644
index 000000000000..d2523993e6fe
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch
@@ -0,0 +1,36 @@
+From: Huang Rui <vowstar@gmail.com>
+Date: Fri, 22 Mar 2024 18:18:40 +0800
+Subject: [PATCH] libgit2-1.8.0 compatibility: adjusted parent pointer type
+
+- Adjusted parent pointer type in git_commit_create call for compatibility
+  with libgit2 1.8.0 and above.
+- Included preprocessor checks to maintain support for versions older than
+  1.8.0.
+- Ensures consistent function behavior across different libgit2 versions.
+
+Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536
+Signed-off-by: Huang Rui <vowstar@gmail.com>
+---
+ kicad/project_tree_pane.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/kicad/project_tree_pane.cpp
++++ b/kicad/project_tree_pane.cpp
+@@ -2233,7 +2233,14 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent )
+         }
+ 
+         git_oid           oid;
++    // Check if the libgit2 library version is 1.8.0 or higher
++#if ( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 )
++        // For libgit2 version 1.8.0 and above
++        git_commit* const parents[1] = { parent };
++#else
++        // For libgit2 versions older than 1.8.0
+         const git_commit* parents[1] = { parent };
++#endif
+ 
+         if( git_commit_create( &oid, repo, "HEAD", author, author, nullptr, commit_msg.mb_str(), tree,
+                            1, parents ) != 0 )
+-- 
+2.44.0
+

diff --git a/sci-electronics/kicad/kicad-8.0.0.ebuild b/sci-electronics/kicad/kicad-8.0.0.ebuild
index 8c9a6b4dc5eb..96b4a708d332 100644
--- a/sci-electronics/kicad/kicad-8.0.0.ebuild
+++ b/sci-electronics/kicad/kicad-8.0.0.ebuild
@@ -81,6 +81,10 @@ fi
 
 CHECKREQS_DISK_BUILD="1500M"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.0.1-libgit2.patch
+)
+
 pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 

diff --git a/sci-electronics/kicad/kicad-8.0.1.ebuild b/sci-electronics/kicad/kicad-8.0.1.ebuild
index 8c9a6b4dc5eb..96b4a708d332 100644
--- a/sci-electronics/kicad/kicad-8.0.1.ebuild
+++ b/sci-electronics/kicad/kicad-8.0.1.ebuild
@@ -81,6 +81,10 @@ fi
 
 CHECKREQS_DISK_BUILD="1500M"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.0.1-libgit2.patch
+)
+
 pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
@ 2024-08-15 20:15 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2024-08-15 20:15 UTC (permalink / raw
  To: gentoo-commits

commit:     e944a08d87d20f6459a69e4658f43f30bf1ce899
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 20:14:32 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 20:14:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e944a08d

sci-electronics/kicad: fix build w/ gcc-15

Closes: https://bugs.gentoo.org/937872
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../kicad/files/kicad-8.0.3-gcc15-cstdint.patch    | 25 ++++++++++++++++++++++
 sci-electronics/kicad/kicad-8.0.3.ebuild           |  6 +++++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/sci-electronics/kicad/files/kicad-8.0.3-gcc15-cstdint.patch b/sci-electronics/kicad/files/kicad-8.0.3-gcc15-cstdint.patch
new file mode 100644
index 000000000000..26fb3dd20c25
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-8.0.3-gcc15-cstdint.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/937872
+https://gitlab.com/kicad/code/kicad/-/issues/18539
+https://gitlab.com/kicad/code/kicad/-/commit/0bf2d2ca32495dd40826a107e1be428a8e566a70
+
+From 0bf2d2ca32495dd40826a107e1be428a8e566a70 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?=
+ <kacper.slominski72@gmail.com>
+Date: Tue, 13 Aug 2024 13:41:35 -0400
+Subject: [PATCH] Fix build issue with experimental GCC version 15.
+
+Fixes https://gitlab.com/kicad/code/kicad/-/issues/18539
+
+(cherry picked from commit e6bcc6d0a6a231f15326df0f0a2971c7aff8a384)
+--- a/include/kicad_curl/kicad_curl_easy.h
++++ b/include/kicad_curl/kicad_curl_easy.h
+@@ -38,6 +38,7 @@
+ #include <memory>
+ #include <ostream>
+ #include <string>
++#include <cstdint>
+ 
+ typedef void CURL;
+ struct curl_slist;
+-- 
+GitLab

diff --git a/sci-electronics/kicad/kicad-8.0.3.ebuild b/sci-electronics/kicad/kicad-8.0.3.ebuild
index 71443e470a09..3f805f18b507 100644
--- a/sci-electronics/kicad/kicad-8.0.3.ebuild
+++ b/sci-electronics/kicad/kicad-8.0.3.ebuild
@@ -80,11 +80,15 @@ fi
 
 CHECKREQS_DISK_BUILD="1500M"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.0.3-gcc15-cstdint.patch
+)
+
 pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 
 	python-single-r1_pkg_setup
-	setup-wxwidgets
+	#setup-wxwidgets
 	check-reqs_pkg_setup
 }
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-08-15 20:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-02 16:51 [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/ Amy Liffey
  -- strict thread matches above, loose matches on Subject: below --
2024-08-15 20:15 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-12-17 18:14 Joonas Niilola
2019-08-03  9:28 Alexey Shvetsov
2019-04-07 16:53 Alexey Shvetsov
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox