summaryrefslogtreecommitdiff
path: root/lilypond-devel/PKGBUILD
blob: c09dec895113ae90128081bbea2e91fe1cfbedf3 (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
# Contributor: Patrick McCarty <pnorcks at gmail dot com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=lilypond-devel
pkgver=2.21.1
pkgrel=1
pkgdesc="An automated music engraving system (development version)"
arch=('i686' 'pentium4' 'x86_64')
url="http://lilypond.org/"
license=('GPL')
depends=('fontconfig'
         'freetype2'
         'guile1.8'
         'pango'
         'glib2'
         'python2'
)
makedepends=('fontforge'
             'gsfonts'
             't1utils'
             'ghostscript'
             'texlive-core>=2011.23170'
             'tex-gyre-fonts'
             'texlive-langcyrillic'
             'dblatex'
             'xorg-server-xvfb'
)
optdepends=('extractpdfmark: for reducing the size of pdf output significantly'
            'tk: for the gui'
)
provides=("lilypond=$pkgver")
conflicts=('lilypond' 'lilypond-git')
source=("http://lilypond.org/downloads/sources/v${pkgver%.*}/lilypond-${pkgver}.tar.gz"
        'no_fontforge-versioncheck.patch')
sha512sums=('596f6a09d0f9a0c39ca717a9e4e246e03679a6cf40a78491eac9bc3eccf173799c75a0baef491cae8385bf1abda53244fd731695762b6fd841396edb92d0ab75'
            '343317fd0d88cae1ed35bba6038ed5d24a0664bd47acf27895e03f2e95466439d80bb780277236ef74bd929c29a16ae840d09c3d50dd2a994b035d0d63e015aa')

prepare() {
  cd "$srcdir/lilypond-$pkgver"

  # python2 fix
  for file in $(find . -name '*.py' -print); do
    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done
  
  patch -Np1 < $srcdir/no_fontforge-versioncheck.patch
  rm -rf python/out/
}

build() {
  cd "$srcdir/lilypond-$pkgver"

  export GUILE=/usr/bin/guile
  export GUILE_CONFIG=/usr/bin/guile-config
  export PYTHON="python2"
  export PYTHON_CONFIG="python2-config"
  export GUILE=/usr/bin/guile1.8
  export GUILE_CONFIG=/usr/bin/guile-config1.8

  ./autogen.sh --prefix=/usr \
              --disable-documentation 
	        
  # FIXME: the extra LDFLAG should not be needed;
  # this is a regression somewhere
  xvfb-run -a -s "-screen 0 1280x1024x24" make LDFLAGS+=" -pthread" all
}

package() {
  cd "$srcdir/lilypond-$pkgver"
  make DESTDIR="$pkgdir/" \
       vimdir="/usr/share/vim/vimfiles" install

  rm -rf "$pkgdir/usr/share/man"
}