143 lines
4.9 KiB
Bash
143 lines
4.9 KiB
Bash
# Template file for 'kicad'
|
|
pkgname=kicad
|
|
version=8.0.1
|
|
revision=1
|
|
build_style=cmake
|
|
build_helper="cmake-wxWidgets-gtk3"
|
|
build_wrksrc="${pkgname}-${version}"
|
|
configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_USE_EGL=ON
|
|
-DKICAD_BUILD_I18N=ON -DKICAD_I18N_UNIX_STRICT_PATH=ON -DLEMON_EXE=/usr/bin/lemon"
|
|
hostmakedepends="pkg-config swig wxWidgets-gtk3-devel tar gettext
|
|
python3 python3-setuptools ruby-asciidoctor po4a sqlite-lemon"
|
|
makedepends="wxWidgets-gtk3-devel wxPython python3-devel glew-devel
|
|
cairo-devel boost-devel libcurl-devel glm libgomp-devel libfreeglut-devel
|
|
gtk+3-devel unixodbc-devel occt-devel ngspice-devel libgit2-devel
|
|
libsecret-devel"
|
|
depends="wxPython"
|
|
checkdepends="python3-pytest python3-cairosvg"
|
|
short_desc="Electronic schematic and PCB design software"
|
|
maintainer="classabbyamp <void@placeviolette.net>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="http://kicad.org"
|
|
changelog="https://www.kicad.org/blog/categories/Release-Notes/"
|
|
distfiles="https://gitlab.com/kicad/code/kicad/-/archive/${version}/kicad-${version}.tar.gz
|
|
https://gitlab.com/kicad/services/kicad-doc/-/archive/${version}/kicad-doc-${version}.tar.gz
|
|
https://gitlab.com/kicad/libraries/kicad-templates/-/archive/${version}/kicad-templates-${version}.tar.gz
|
|
https://gitlab.com/kicad/libraries/kicad-symbols/-/archive/${version}/kicad-symbols-${version}.tar.gz
|
|
https://gitlab.com/kicad/libraries/kicad-footprints/-/archive/${version}/kicad-footprints-${version}.tar.gz
|
|
https://gitlab.com/kicad/libraries/kicad-packages3D/-/archive/${version}/kicad-packages3D-${version}.tar.gz"
|
|
checksum="bd67568671d0461c7c85fb1d5979df1c863228ea05d4f0db462b1c93a5a948e5
|
|
2fef2a52377e32a6d8a18a6bfd98ab3e3a75b3f23e13a741491eb9c414ee265b
|
|
5aa3b72d89552069155a538a73fd19428f7dd77ec7bf51814591dd460a88c8d7
|
|
98a11b3a33f18ea02981c95b038138e86c31cb388a8bbd30a1edcc4ad297e0f8
|
|
24e6c9d10869605b83d56ed091e5e56a9f4439de38db73c1d1d34d1cbf3d3272
|
|
77c74fa420373a97aa5dca1bed26b0bed065d1c696010bee5238dc76d06a168b"
|
|
python_version=3
|
|
replaces="kicad-i18n>=0"
|
|
patch_args="-Np1 -d ${build_wrksrc}"
|
|
# one test appears to be flaky
|
|
# https://gitlab.com/kicad/code/kicad/-/blob/7.0.0/qa/unittests/eeschema/test_netlist_exporter_spice.h#L195-197
|
|
#make_check=ci-skip
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" wxPython"
|
|
configure_args+=" -DPYTHON_DEST=/${py3_sitelib}"
|
|
fi
|
|
|
|
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
|
|
post_patch() {
|
|
# python struct.calcsize('@P') return pointer size of build systems.
|
|
sed -i 's/CMAKE_SIZEOF_VOID_P AND/FALSE AND &/' \
|
|
thirdparty/pybind11/tools/FindPythonLibsNew.cmake
|
|
}
|
|
|
|
post_configure() {
|
|
for subpkg in doc footprints packages3D symbols templates; do
|
|
msg_normal "${pkgname}-${subpkg}-${version}_${revision}: running do_configure ...\n"
|
|
(
|
|
build_wrksrc="${pkgname}-${subpkg}-${version}"
|
|
configure_args="-DBUILD_FORMATS=html"
|
|
cd "../${build_wrksrc}" && do_configure
|
|
)
|
|
done
|
|
}
|
|
|
|
post_build() {
|
|
for subpkg in doc footprints packages3D symbols templates; do
|
|
msg_normal "${pkgname}-${subpkg}-${version}_${revision}: running do_build ...\n"
|
|
(
|
|
cd "../${pkgname}-${subpkg}-${version}" && do_build
|
|
)
|
|
done
|
|
}
|
|
|
|
# none of these subpackages contain ELFs, but do contain a bunch of files,
|
|
# so skip stripping and elf_in_usrshare lint to speed things up significantly
|
|
kicad-doc_package() {
|
|
short_desc+=" - documentation"
|
|
license="GPL-3.0-or-later, CC-BY-3.0"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
nostrip=yes
|
|
ignore_elf_dirs="/usr/share/kicad"
|
|
pkg_install() {
|
|
cd "../${pkgname}-${version}/build" && \
|
|
DESTDIR="${PKGDESTDIR}" ninja install
|
|
}
|
|
}
|
|
|
|
kicad-footprints_package() {
|
|
short_desc+=" - footprint libraries"
|
|
license="CC-BY-SA-4.0"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
nostrip=yes
|
|
ignore_elf_dirs="/usr/share/kicad"
|
|
pkg_install() {
|
|
cd "../${pkgname}-${version}/build" && \
|
|
DESTDIR="${PKGDESTDIR}" ninja install
|
|
}
|
|
}
|
|
|
|
kicad-packages3D_package() {
|
|
short_desc+=" - 3D model libraries"
|
|
license="CC-BY-SA-4.0"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
nostrip=yes
|
|
ignore_elf_dirs="/usr/share/kicad"
|
|
pkg_install() {
|
|
cd "../${pkgname}-${version}/build" && \
|
|
DESTDIR="${PKGDESTDIR}" ninja install
|
|
}
|
|
}
|
|
|
|
kicad-symbols_package() {
|
|
short_desc+=" - schematic symbol libraries"
|
|
license="CC-BY-SA-4.0"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
nostrip=yes
|
|
ignore_elf_dirs="/usr/share/kicad"
|
|
pkg_install() {
|
|
cd "../${pkgname}-${version}/build" && \
|
|
DESTDIR="${PKGDESTDIR}" ninja install
|
|
}
|
|
}
|
|
|
|
kicad-templates_package() {
|
|
short_desc+=" - project templates"
|
|
license="CC-BY-SA-4.0"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
nostrip=yes
|
|
ignore_elf_dirs="/usr/share/kicad"
|
|
pkg_install() {
|
|
cd "../${pkgname}-${version}/build" && \
|
|
DESTDIR="${PKGDESTDIR}" ninja install
|
|
}
|
|
}
|
|
|
|
kicad-library_package() {
|
|
short_desc+=" - all libraries"
|
|
depends="kicad-footprints>=${version}_${revision} kicad-packages3D>=${version}_${revision}
|
|
kicad-symbols>=${version}_${revision} kicad-templates>=${version}_${revision}"
|
|
build_style="meta"
|
|
}
|