summaryrefslogtreecommitdiff
path: root/community/scite/PKGBUILD
blob: 2ca7ffe45965ccc6e3c0e837dcbf5791bb88c600 (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
# $Id: PKGBUILD 85517 2013-03-02 12:31:53Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Thomas S Hatch <thatch45@gmail.com>
# Contributor: Corrado 'bardo' Primier <corrado.primier@mail.polimi.it>
# Contributor: Jochem Kossen <j.kossen@home.nl>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=scite
pkgver=3.2.5
pkgrel=1
pkgdesc='Editor with facilities for building and running programs'
arch=('x86_64' 'i686')
url='http://www.scintilla.org/SciTE.html'
license=('custom:scite')
depends=('desktop-file-utils' 'gtk2')
makedepends=('setconf')
backup=('usr/share/scite/SciTEGlobal.properties')
install=$pkgname.install
source=("http://downloads.sourceforge.net/sourceforge/scintilla/${pkgname}${pkgver//./}.tgz")
sha256sums=('ac3ca9588bb23ef21da2e22f6ef21416bbd7bf6957130a8e4057b3e5f3c58bef')

build() {
  cd "$srcdir"

  if [ $?CXXBASEFLAGS == 1 ]; then 
    sed '0,/CXXTFLAGS=/s//nop=/' -i scite/gtk/makefile
    setconf scite/gtk/makefile CXXTFLAGS "-DNDEBUG ${CXXFLAGS} $(CXXBASEFLAGS)"
  fi
  sed '0,/CXXFLAGS=/s//nop=/' -i scintilla/gtk/makefile
  setconf scintilla/gtk/makefile CXXFLAGS \
    "-DNDEBUG ${CXXFLAGS} \$(CXXBASEFLAGS) \$(THREADFLAGS)"
  setconf scintilla/gtk/makefile CXXBASEFLAGS \
    "-Wno-missing-braces -Wno-char-subscripts ${CXXFLAGS} -DGTK -DSCI_LEXER \$(INCLUDEDIRS)"
  cd "$srcdir/scintilla/gtk"
  make
  cd "$srcdir/$pkgname/gtk"
  make
}

package() {
  cd "$srcdir/$pkgname/gtk"

  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir/$pkgname/License.txt" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-scite"
  install -Dm644 "$srcdir/scintilla/License.txt" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-scintilla"
  ln -sf SciTE "$pkgdir/usr/bin/scite"
}

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