void-packages/srcpkgs/kicad/template
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

35 lines
1.5 KiB
Bash

# Template file for 'kicad'
pkgname=kicad
version=5.1.10
revision=2
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON -DBUILD_GITHUB_PLUGIN=ON -DKICAD_USE_OCE=OFF
-DKICAD_SCRIPTING_PYTHON3=ON -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
-DwxWidgets_CONFIG_EXECUTABLE=$WX_CONFIG
-DKICAD_USE_OCC=$(vopt_if occt ON OFF) -DKICAD_SPICE=$(vopt_if spice ON OFF)"
hostmakedepends="pkg-config swig wxWidgets-gtk3-devel python3"
makedepends="wxWidgets-gtk3-devel wxPython4 python3-devel glew-devel cairo-devel
openssl-devel boost-devel libcurl-devel glm libgomp-devel
$(vopt_if occt occt-devel) $(vopt_if spice ngspice-devel)"
depends="wxPython4"
short_desc="Electronic schematic and PCB design software"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-3.0-or-later"
homepage="http://kicad-pcb.org"
distfiles="https://gitlab.com/kicad/code/${pkgname}/-/archive/${version}/kicad-${version}.tar.gz"
checksum=296341f30ada2c7f4a1c54720eab425835a93349527d4bf08f73f280d19695ed
python_version=3
build_options="spice occt"
build_options_default="spice occt"
desc_option_spice="Enable support for SPICE simulation"
desc_option_occt="Enable support for 3D STEP models"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" wxPython4"
configure_args+=" -DPYTHON_DEST=/${py3_sitelib}
-DwxWidgets_CONFIG_OPTIONS='--prefix=${XBPS_CROSS_BASE}'"
fi