summaryrefslogtreecommitdiff
path: root/community/kicad/PKGBUILD
blob: 15518c6c79da2a0de6595904512849e7583e08cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id: PKGBUILD 85759 2013-03-06 14:22:48Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Marq Schneider <queueRAM@gmail.com>

pkgname=kicad
pkgver=20130226
_pkgver=${pkgver:0:4}-${pkgver:4:2}-${pkgver:6:2}
_pkgbzr=3974
pkgrel=4
pkgdesc="Electronic schematic and printed circuit board (PCB) design tools"
arch=('i686' 'x86_64')
url="http://iut-tice.ujf-grenoble.fr/kicad/"
license=('GPL')
depends=('glu' 'wxgtk' 'hicolor-icon-theme' 'desktop-file-utils')
makedepends=('cmake' 'zlib' 'mesa')
optdepends=('kicad-docs-bzr: for documentation' 
            'kicad-library-bzr: for footprints')
install=kicad.install
source=(http://iut-tice.ujf-grenoble.fr/cao/${pkgname}_sources_stable_${_pkgver}_BZR${_pkgbzr}.zip
        kicad-boost-polygon-declare-gtlsort-earlier.patch)
md5sums=('9b7748efedc355473c72fdb7c37b0500'
         'a2c39704238946e74a5ed0c38326345f')

build() {
  cd "$srcdir/stable_${_pkgver}_BZR${_pkgbzr}"

  patch -p0 < "$srcdir/kicad-boost-polygon-declare-gtlsort-earlier.patch"

  # harmless build blocking error
  # see https://lists.launchpad.net/kicad-developers/msg07841.html
  # for proper fix
  sed -i 's|^#.*error "You must use|//&|' include/common.h

  # FS#31559
  sed -i 's/-O2/-O1/' CMakeLists.txt

  # build and install kicad
  mkdir -p build/Release
  cd build/Release
  cmake ../.. -DKICAD_STABLE_VERSION=ON    \
              -DCMAKE_BUILD_TYPE=Release   \
              -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd "$srcdir/stable_${_pkgver}_BZR${_pkgbzr}/build/Release"

  make DESTDIR="$pkgdir" install

  # copy updated linux icons
  #cp -r -n "$srcdir/$pkgname-icons/resources/linux/mime/icons" "$pkgdir/usr/share/"
}