summaryrefslogtreecommitdiff
path: root/community/root/PKGBUILD
blob: d85a132a4b199e2d64d3356e31cae74df60cc156 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Sebastian Voecking <voeck@web.de>

pkgname=root
pkgver=5.30.00
pkgrel=5
pkgdesc='C++ data analysis framework and interpreter from CERN.'
arch=('i686' 'x86_64' 'mips64el')
url='http://root.cern.ch'
license=('LGPL2.1')
depends=('avahi' 'desktop-file-utils' 'ftgl' 'giflib' 'glew' 'graphviz' 'gsl' 'libldap' 'libmysqlclient'
         'libxft' 'postgresql-libs' 'python2' 'unixodbc' 'shared-mime-info' 'xmlrpc-c' 'xorg-fonts-75dpi' 'mesa' 'gcc-fortran')
makedepends=('fftw')
install='root.install'
source=("ftp://root.cern.ch/root/root_v${pkgver}.source.tar.gz"
        'root.sh'
        'rootd'
        'root.desktop'
        'root.xml'
        'reorder-lzma-search-r40128.diff')
md5sums=('b4e00f419f63d5ec6b7f1aace33c0c6f'
         '0e883ad44f99da9bc7c23bc102800b62'
         'efd06bfa230cc2194b38e0c8939e72af'
         'ac61b17395d75a2705fefa2ef841a6bf'
         'e2cf69b204192b5889ceb5b4dedc66f7'
         '6b5d5b875913d8468940b9fbb1ceeb60')

build() {
  cd ${pkgname}

  # causes an error because it includes lzma/lzma.h directly
  # http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=13013&p=55971
  patch -Np2 -i ${srcdir}/reorder-lzma-search-r40128.diff

  if [ ${CARCH} == 'i686' ]; then
    TARGET=linux;
  else
    TARGET=linuxx8664gcc;
  fi

  # python2 switch
  find . -type f -exec sed -i -e 's/python -O/python2 -O/g' -e 's/python -c/python2 -c/g' {} \;
  sed \
    -e 's/python 2/python2 2/g' \
    -i configure
  sed \
    -e 's/python $(pkgpyexecdir)/python2 $(pkgpyexecdir)/g' \
    -i cint/reflex/python/genreflex/Makefile.am
  sed \
    -e 's/python /python2 /' \
    -i config/genreflex.in config/genreflex-rootcint.in

  ./configure \
    ${TARGET} \
    --prefix=/usr \
    --disable-builtin-ftgl \
    --disable-builtin-freetype \
    --disable-builtin-glew \
    --disable-builtin-pcre \
    --disable-builtin-zlib \
    --disable-builtin-lzma \
    --enable-gdml \
    --enable-gsl-shared \
    --enable-minuit2 \
    --enable-soversion \
    --enable-roofit \
    --enable-python \
    --with-python-incdir=/usr/include/python2.7 \
    --with-python-libdir=/usr/lib \
    --enable-explicitlink

    # move from aur
    #--disable-builtin-afterimage \

  make
}

package() {
  cd ${pkgname}

  make DESTDIR=${pkgdir} install

  install -D ${srcdir}/root.sh \
    ${pkgdir}/etc/profile.d/root.sh
  install -D ${srcdir}/rootd \
    ${pkgdir}/etc/rc.d/rootd
  install -D -m644 ${srcdir}/root.desktop \
    ${pkgdir}/usr/share/applications/root.desktop
  install -D -m644 ${srcdir}/root.xml \
    ${pkgdir}/usr/share/mime/packages/root.xml

  rm -rf ${pkgdir}/etc/root/daemons
}