summaryrefslogtreecommitdiff
path: root/libre/povray/PKGBUILD
blob: 50dfdb44ae85fbc921d85130107f52a3a0118334 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $Id: PKGBUILD 204856 2017-01-04 10:26:13Z arojas $
# Maintainer (Arch): Alexander F Rødseth <xyproto@archlinux.org>
# Contributor (Arch): Tom Newsom <Jeepster@gmx.co.uk>
# Contributor (Arch): tobias <tobias@archlinux.org>
# Contributor (Arch): red_over_blue
# Contributor (Arch): neri
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
# Don't build povray before 3.7 version (that ones are nonfree software)

_pkgname=povray-libre
pkgname=povray
pkgver=3.7.0.7
_v=${pkgver%.*.*} # 3.7
pkgrel=1.parabola1
epoch=2
pkgdesc='Script based raytracer for creating 3D graphics, without nonfree documentation'
arch=('x86_64' 'i686' 'armv7h')
license=('AGPL3')
url='http://povray.org/'
depends=('libtiff' 'libpng' 'boost-libs' 'openexr')
makedepends=('boost' 'git' 'glu')
conflicts=("$_pkgname")
replaces=("$_pkgname")
backup=("etc/povray/$_v/povray.conf"
        "etc/povray/$_v/povray.ini")
mksource=($pkgname-$pkgver.tar.gz::https://github.com/POV-Ray/povray/archive/v$pkgver.tar.gz)
source=("https://repo.parabola.nu/other/$_pkgname/$_pkgname-$pkgver.tar.xz")
mksha512sums=('ea2b50f648948df9415a7b386aa0bfd2ac5236fa7f480df655a8f7e695cf21d9712d73901f21d1ef87188223f4cb351f195641ab77d88ca66f488566ef78aaed')
sha512sums=('90c859ba91420bc441d59ffde8ea6d8f6a7deb513a9b3dd582ba6e86336f0263ba8c1666e9a9570f9a4e6f744a54139865afa7ffaed07f848231e656b9d22cde')

mksource() {
  cd "$pkgname-$pkgver"

  # remove nonfree documentation
  rm -rv doc
}

prepare() {
  cd "$pkgname-$pkgver/unix"

  sed 's/automake --w/automake --add-missing --w/g' -i prebuild.sh
  sed 's/dist-bzip2/dist-bzip2 subdir-objects/g' -i configure.ac
  ./prebuild.sh

  cd ..
  ./bootstrap
}

build() {
  cd "$pkgname-$pkgver"

  ./configure \
    LIBS="-lboost_system -lboost_thread" \
    COMPILED_BY='Parabola GNU/Linux-libre' \
    --sysconfdir=/etc \
    --prefix=/usr
  make CXXFLAGS+="-std=c++11 -lboost_system -lboost_thread -w"
}

package() {
  cd "$pkgname-$pkgver"

  install -d "$pkgdir/usr/share/$pkgname-$_v"
  cp -r icons include ini scenes scripts "$pkgdir/usr/share/$pkgname-$_v"
  chmod -R u+rwX,g+rX,o+rX "$pkgdir/usr/share/$pkgname-$_v" # fix permissions
  install -Dm755 unix/povray "$pkgdir/usr/bin/povray"
  install -Dm644 povray.conf "$pkgdir/etc/povray/$_v/povray.conf"
  install -Dm644 povray.ini "$pkgdir/etc/povray/$_v/povray.ini"
  install -Dm644 povray.1 "$pkgdir/usr/share/man/man1/povray.1"
}

# vim:set ts=2 sw=2 et: