From f7e94be7540157809ed892278b6765c368a5a912 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 19 Apr 2023 23:58:47 +0100 Subject: gentoo auto-resync : 19:04:2023 - 23:58:47 --- sci-electronics/kicad/Manifest | 10 +- sci-electronics/kicad/kicad-6.0.11.ebuild | 175 +++++++++++++++++++++++++++ sci-electronics/kicad/kicad-6.0.9-r1.ebuild | 176 ++++++++++++++++++++++++++++ sci-electronics/kicad/kicad-6.0.9.ebuild | 175 --------------------------- sci-electronics/kicad/kicad-7.0.1.ebuild | 171 +++++++++++++++++++++++++++ sci-electronics/kicad/kicad-9999.ebuild | 2 +- 6 files changed, 530 insertions(+), 179 deletions(-) create mode 100644 sci-electronics/kicad/kicad-6.0.11.ebuild create mode 100644 sci-electronics/kicad/kicad-6.0.9-r1.ebuild delete mode 100644 sci-electronics/kicad/kicad-6.0.9.ebuild create mode 100644 sci-electronics/kicad/kicad-7.0.1.ebuild (limited to 'sci-electronics/kicad') diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest index 365843ffaa36..90d0b105dd10 100644 --- a/sci-electronics/kicad/Manifest +++ b/sci-electronics/kicad/Manifest @@ -3,9 +3,13 @@ AUX kicad-6.0.9-gcc-13.patch 1094 BLAKE2B 6b09be7cfcc6895fd6d744c8755959c501ce7d AUX kicad-7.0.0-werror.patch 682 BLAKE2B 268cf848679ffb5b5aa2389a6392986f908c64861fb6908a864ae41d788f8ac10a21d30b7a20b98409cad7f57191958f9d95d448be7c8070806c585c03d7ce8a SHA512 c30b9a080cc74687b44fb5e547d746c4e3298096e9ffa1bf5a7a2b477efb8d05db8adad7255d6b92eb2c00f739e4fcd79b9c198b3122265d26edc1db5cb4ee5e AUX kicad-7.0.0-wxwidgets-version.patch 3627 BLAKE2B 7a0382db010a9ec07069c16d1f87c5763fc8372f2c4be35384d8349cb03e4096d09a9020a2fc2155082ea8a44267f83cdc52d32972cff320e7ec038307ac81d0 SHA512 62a48794fcf609d2a844d23e66715afa4eaae31fe227c965cf368dcad47fbd41557527720218cf3bc25822612ce277a67609b057f5e0dc852cdd5de104bf1b10 AUX kicad-scripts-install-fix.patch 442 BLAKE2B 321ca8c5e846023696576daea00aa827ad88a4c3e82d120bd07392892b61d0e63892732f5469b1fe1472eac9584175acbc7aa611171f6fb9285017826156b30c SHA512 5abb158ec7e8a5ef8049797886e26febc018499dd7f5c8defdf9104b59371efa05cbec8e19e8fe22295e8e54c30095d347cccfa4c43db62b6ac4eb07bb8a080e -DIST kicad-6.0.9.tar.gz 45166663 BLAKE2B e4d45c589a8e76d7c121ac4ab7adefc5fd44d4ccbff7140196caec56c309f6e83d47a3ea9cf79f59de57c3bda43b3d32a2bea82c5850c2a7a58a6e1db27a06a7 SHA512 49e6bd3c9f6e0c9839c4fac18dc12dc7ef16183f6fbe8091992e2223c7fb085b3119d46797c0b0cf86fd2813e3c4def9eb1f2adbff1bf072a363f1a501da9354 +DIST kicad-6.0.11.tar.bz2 34083016 BLAKE2B 85662dd57eb5f28498317b1554e703efdebaa470f749ca239b2caeae4c366005a7c9bb1d1ba6375ed80d277efabf09b56d3e7e1e82bf93462b4ba5405445157e SHA512 9827be9f2c18be1ab3bc5a1a3bd3d6297bc69b561e43b0f9010cb49009c3e87f1d320034411ecc0a2277b5686923a3d4bcc507278590814309d10de14463266d +DIST kicad-6.0.9.tar.bz2 34045371 BLAKE2B 797f1d10a5405751bc51ec9579c5c50c21b56761c8b59ae99e8a52e50a787f1271053eb4d36e5c2483adee277764ea75300dd50c62a2addeb540e748bf8b93fe SHA512 015335de5d9bbd4acdff8dd7da85847ea0b666d3d4dd0d4c9e7b731cc516cb3575ade231e742a089cc5591ef9e4059f2bedc83677fa85220b9e6cb8ef5776305 DIST kicad-7.0.0.tar.bz2 42583715 BLAKE2B 24fefe73bce6254bb47fdf21e8a82b7752e3f58cb3ea61220f0cf008c6570a4378f15bad54b81cc9257ec223bdb6128ccfd33f356e738b112c7b0e9481257255 SHA512 cb6f4cf6eee9a583d3a622bf8e48e5b604b047df0d742081cff1e5e387cf97cc1cd3f03fb58a17b44c47085634b95eea642bd1a6805e80807dbe0473c8d19d96 -EBUILD kicad-6.0.9.ebuild 4413 BLAKE2B 2662255dad5503f8ec38f76b748ed0427a831520873de5fa7add55c3e58a21bf84eddb6a7b8d57ff3fefd11279cb648d05f75545706542e39e27671be0e44c15 SHA512 716655029680428508e69c67b3edf8904c8a915ea595c91afda1054a51f0d8cbfa173d9b71384ab5518060bc54e51e5fa3f5427adf79b51ecfb63d0cb6c8a0df +DIST kicad-7.0.1.tar.bz2 42744121 BLAKE2B cb6005be531027e02c5c3fa03be54dff00720aa9c36d12d1e619e041da05e5b4efd048be4e01021cf225a35cd638a162f4b620b65ec117027092a5bf650cb1ec SHA512 6b3f32073a0667c745be54fccf1660cc81b560ad7613eb2355956b48567d7e82ce6926ab04d374fe88dcaa1220357997f5f4621e6d635effcd3d698e45a37516 +EBUILD kicad-6.0.11.ebuild 4393 BLAKE2B 70b921d6e244f1787ef99c338889aa4bd3d4241f5249b824261d8ec8958b932c53f89b5ae2d227e76a6f6f8f0f23387c3c00637c43a0d926107425c4c175fce9 SHA512 5952c8c7c4c61702aebd4440eaca909a47da8dcbf07ea31a5b2559b48939182a8a0150b80078f34aacb42c354677aa524c1fee0767bba543788a996e77e68b4c +EBUILD kicad-6.0.9-r1.ebuild 4421 BLAKE2B 7eb561511f261cc36ab315eaeabab78a4ea7942f0c726f1efc53205a6ee211c40a5b5c458895e5f484be9afb50117820c9e4fc4edef96b44760913145d181c45 SHA512 0be18ed7cdd690a24f4072653aaecaa1043616f82f94f63a89e3c11228b33384fa96c36c1a04fec9f2ca84af1a3b3579365a79713ac3ed423aac68dfdd626f73 EBUILD kicad-7.0.0-r1.ebuild 4290 BLAKE2B 13650af670f2d65468abb762c629752c0092d53f390de03302d4c1cf2fc3244f06c41b6573d5c1f611d5c7de4c8379fc41b819e6ae78230e34f666aa1809bb5d SHA512 17ed8e4091350cb33fe5152523cf8fddd051fbc9527c3002dd0c3279eb25117051a41950f01240963ed71c8f7348d0ae967ea15290432aa6c6d4f187079f8566 -EBUILD kicad-9999.ebuild 4204 BLAKE2B 600ae5436ebae56bab432c20c75a0865e65f58b7de9e83301058f67afbbc5eab4660e1758d422a08e822240857aa4cf93f43ef1427948fb21285be6202ac27fd SHA512 77469da750859ba7af444f206d42212683d4f9830355f41743d4ee81d84c3f05662cd588862cd30eabda9377f0d7a918aba9feaca47190947e58bd7474109953 +EBUILD kicad-7.0.1.ebuild 4204 BLAKE2B 02bddb5c564879a0d4961224ddb7b6d979859cb3400bb171b21f8ea8f4b3ab9fb3a75409958c87fea09c6e3b059740ffb1321872cacab2a25e57471f5bcc441b SHA512 e2d31146181217e6983ed5867efefd36802e461b7d4f63ee7cefd83b403bcd6aff8379e019a46277bf891b82572bc674d28882ad86b14ae64bbbf8609f9f203a +EBUILD kicad-9999.ebuild 4204 BLAKE2B 02bddb5c564879a0d4961224ddb7b6d979859cb3400bb171b21f8ea8f4b3ab9fb3a75409958c87fea09c6e3b059740ffb1321872cacab2a25e57471f5bcc441b SHA512 e2d31146181217e6983ed5867efefd36802e461b7d4f63ee7cefd83b403bcd6aff8379e019a46277bf891b82572bc674d28882ad86b14ae64bbbf8609f9f203a MISC metadata.xml 922 BLAKE2B bfdb3ce1ee74c7b6f2da1a5fbe7835e2114af83b594edabab7b7674000462ee6963acee3bb1f384bed0b4a36b0529aebdab801fe3a482b23e742d9186e7684b2 SHA512 575659f3c5d0fc74469ff14f8abaf58776f1d0ffdd16b85e9f617d3e956d2d0c1c7f70aeebf02aa5c7afadcea0e0a589e6fb16f160b398482524fa7ce592ba4e diff --git a/sci-electronics/kicad/kicad-6.0.11.ebuild b/sci-electronics/kicad/kicad-6.0.11.ebuild new file mode 100644 index 000000000000..7fbef76e7ab9 --- /dev/null +++ b/sci-electronics/kicad/kicad-6.0.11.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_9 ) +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] + =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/kicad-6.0.9-r1.ebuild b/sci-electronics/kicad/kicad-6.0.9-r1.ebuild new file mode 100644 index 000000000000..ae0b2fe12627 --- /dev/null +++ b/sci-electronics/kicad/kicad-6.0.9-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_9 ) +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=" + !sci-electronics/kicad-i18n + dev-libs/boost:=[context,nls] + =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/kicad-6.0.9.ebuild b/sci-electronics/kicad/kicad-6.0.9.ebuild deleted file mode 100644 index acb95eeca5df..000000000000 --- a/sci-electronics/kicad/kicad-6.0.9.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.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:=[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:=[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/kicad-7.0.1.ebuild b/sci-electronics/kicad/kicad-7.0.1.ebuild new file mode 100644 index 000000000000..b017e4c3fe9d --- /dev/null +++ b/sci-electronics/kicad/kicad-7.0.1.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +WX_GTK_VER="3.2-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 -> ${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" + +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-db/unixODBC + dev-libs/boost:=[context,nls] + media-libs/freeglut + media-libs/glew:0= + >=media-libs/glm-0.9.9.1 + media-libs/mesa[X(+)] + net-misc/curl + >=sci-libs/opencascade-7.3.0:0= + >=x11-libs/cairo-1.8.8:= + >=x11-libs/pixman-0.30 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] + sys-libs/zlib + $(python_gen_cond_dep ' + dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}] + ~dev-python/wxpython-4.2.0:*[${PYTHON_USEDEP}] + ') + ${PYTHON_DEPS} + ngspice? ( + >sci-electronics/ngspice-27[shared] + ) + nls? ( + sys-devel/gettext + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND} + sci-electronics/electronics-menu +" +BDEPEND=">=dev-lang/swig-4.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}-7.0.0-werror.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 + -DKICAD_USE_EGL=ON + + -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_INSTALL_DEMOS="$(usex examples)" + -DCMAKE_SKIP_RPATH="ON" + + -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 + + dodoc doxygen/eagle-plugin-notes.txt + + if use doc ; then + cd doxygen || die + dodoc -r out/html/. + 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 +} diff --git a/sci-electronics/kicad/kicad-9999.ebuild b/sci-electronics/kicad/kicad-9999.ebuild index 0a613e92f79e..b017e4c3fe9d 100644 --- a/sci-electronics/kicad/kicad-9999.ebuild +++ b/sci-electronics/kicad/kicad-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..10} ) +PYTHON_COMPAT=( python3_{9..11} ) WX_GTK_VER="3.2-gtk3" inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils -- cgit v1.2.3