# Description: Editor based on the Scintilla editing component
# URL:         http://www.scintilla.org/
# Maintainer:  Jürgen Daubert, juergen dot daubert at t-online dot de
# Depends on:  gtk

name=scite
version=168
release=1
source=(http://dl.sourceforge.net/sourceforge/scintilla/$name$version.zip)

build () {
    cd scintilla/gtk
    sed -i "/^CXXFLAGS/s/-Os/$CXXFLAGS/" makefile
    make GTK2=1
    
    cd $SRC/$name/gtk
    sed -i "/^CXXTFLAGS/s/-Os/$CXXFLAGS/" makefile
    make GTK2=1 prefix=/usr
    mkdir -p $PKG/usr/{bin,share/pixmaps}
    make prefix=$PKG/usr install
    
    sed -i '/^#buffers/s/#//
            /^#save.recent/s/#//
            /^#tabbar.hide.one/s/#//' \
           $PKG/usr/share/scite/SciTEGlobal.properties

    chmod -x $PKG/usr/share/scite/*
    rm -r $PKG/usr/share/{applications,scite/*.html}
    install -D -m 644 ../doc/scite.1 $PKG/usr/man/man1/scite.1
    ln -s SciTE $PKG/usr/bin/scite
}
