summaryrefslogtreecommitdiff
path: root/libre/povray/PKGBUILD
blob: 41f07bd22f06ebda0638876099a74c64c086f7b5 (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
74
75
76
# $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: Márcio Silva <coadde@parabola.nu>
# Don't build povray before 3.7 version (that ones are nonfree software)

_pkgname=povray-libre
pkgname=povray
pkgver=3.7
pkgrel=15.parabola1
epoch=1
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' 'openexr')
conflicts=("$_pkgname")
replaces=("$_pkgname")
backup=("etc/povray/$pkgver/povray.conf"
        "etc/povray/$pkgver/povray.ini")
mksource=("$pkgname-$pkgver.zip::https://github.com/POV-Ray/$pkgname/archive/$pkgver-stable.zip")
source=("https://repo.parabola.nu/other/$_pkgname/$_pkgname-$pkgver.tar.xz"
        'povray3.7.0_rc3-user-conf.patch')
mksha256sums=('f30ab643ad694f32b916f183c3783e24cb4cc073bf58f2869dbffc02b603c968')
sha256sums=('13be30ed28d47b3796de55263d0fca74edcbe990b08059c589dcc72540a179a7'
            '95b04ec4973e6e8a80fc83df2e3caff0b4d6699c4154144f3017d42cab7236e0')

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

  # remove nonfree documentation
  rm -rv doc
}

prepare() {
  cd "$pkgname-$pkgver-stable/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
  patch -p1 < "$srcdir/povray3.7.0_rc3-user-conf.patch"
}

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

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

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

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

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