summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ebc54a28cc12616bef36ecf70fabf43dc4ac431 (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
# Maintainer: Kyle Keen <keenerd@gmail.com>

pkgname='solvespace-git'
pkgver=r1304.bc3e09e
pkgrel=1
pkgdesc="SOLVESPACE is a parametric 3d CAD program."
arch=('i686' 'x86_64')
url='http://solvespace.com/'
license=('GPL3')
depends=('libpng' 'json-c' 'glew' 'gtkmm3' 'libspnav')
# aww, moved away from fltk
makedepends=('git' 'cmake')
provides=('solvespace')
conflicts=('solvespace')
source=('solvespace-git::git+https://github.com/solvespace/solvespace.git')
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  #git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$pkgname"
  git submodule update --init extlib/libdxfrw
  git submodule update --init extlib/q3d
  git submodule update --init extlib/flatbuffers
  # uncomment if test fails
  #sed -i 's|request/ttf_text/test.cpp||' request/ttf_text/test.cpp
}

# -std=c++11 or -std=gnu++11

build() {
  cd "$pkgname"
  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-std=c++11" ../
  sed -i 's/lib64/lib/' src/cmake_install.cmake
  make
}

package() {
  cd "$pkgname/build"
  make DESTDIR="$pkgdir" install
}