git » kicad.git » main » tree

[main] / PKGBUILD

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Maintainer: Filipe Laíns <lains@archlinux.org>
# Contributor: Marq Schneider <queueRAM@gmail.com>
# Contributor: Nick Østergaard
# Contributor: Rachel Mant <aur@dragonmux.network>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Alexander Lutsai <s.lyra@ya.ru>

pkgname=kicad
pkgver=8.0.8
pkgrel=1
pkgdesc='Electronic schematic and printed circuit board (PCB) design tools'
arch=('x86_64' 'armv7h')
url='http://kicad.org/'
license=('GPL-3.0-or-later')
depends=(
  'curl'
  'glew'
  'glm'
  'ngspice'
  'opencascade'
  'python'
  'python-wxpython'
  'wxwidgets-gtk3'
  'unixodbc'
  'libgit2'
)
makedepends=(
  'git'
  'cmake'
  'ninja'
  'mesa'
  'boost'
  'swig'
)
optdepends=(
  'kicad-library: for footprints, symbols and templates'
  'kicad-library-3d: for 3D models of components'
)
_commit='ef34436d7d4bb488a9559d7fae32dc956d37c669'
source=(
  "$pkgname::git+https://gitlab.com/kicad/code/kicad.git#tag=$pkgver"
  'fix-archive-permissions.patch'
  'fix-version-string.patch'
)

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

prepare() {
  cd "$pkgname"

  patch -p1 -i "$srcdir/fix-archive-permissions.patch"
  patch -p1 -i "$srcdir/fix-version-string.patch"
#  git cherry-pick -n 1cbf6a1872c71d3bb8c00e02783cbf84b74714b3 # fix build with libgit2 1.8
}

build() {
  cmake \
    -B build \
    -S "$pkgname" \
    -G Ninja \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D KICAD_USE_EGL=ON \
    -D KICAD_USE_BUNDLED_GLEW=OFF \
    -D KICAD_BUILD_I18N=ON \
    -D KICAD_I18N_UNIX_STRICT_PATH=ON \
    -D KICAD_BUILD_QA_TESTS=OFF \
    -W no-dev

  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  strip "$STRIP_SHARED" "${pkgdir}"/usr/lib/python*/site-packages/_pcbnew.so
}

# vim:set ts=2 sw=2 et:
sha256sums=('9549c1600b5f2eb7ca764eeacc37b21077b3f679e4f7cda518f3c614a673134d'
            '62c299dd975d9ea684fb7a993cb572d17277d9f718a18b552667b461c2a219e8'
            'e512fac78720eb31d5a89f9ce4447f33a0a733388e9a8f55db81ca38fb030e07')