# Maintainer: Miguel Revilla <yo@miguelrevilla.com>
# Contributor: nem <nem@ikitten.co.uk>
# Contributor: agvares <agvares13@gmail.com>
# Contributor: p2k <Patrick.Schneider@uni-ulm.de>
pkgname=codelite
pkgver=5.1
pkgrel=3
pkgdesc="Open-source, cross platform IDE for the C/C++ programming languages"
arch=('i686' 'x86_64')
url="http://www.codelite.org/"
license=('GPL')
depends=('wxgtk2.9>=2.9.4' 'curl')
makedepends=('pkgconfig' 'cmake')
optdepends=('graphviz: callgraph visualization')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}-gtk.src.tar.gz
codelite.patch)
md5sums=('84c5c96702d2dafae39a4a346103554d'
'd0d3831d383cdfe793daf04497c689c6')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 -i ../codelite.patch
mkdir build
cd build
sed -i 's/wx-config/wx-config-2.9/g' ../CMakeLists.txt
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_CLANG=1 -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-2.9 -DwxWidgets_wxrc_EXECUTABLE=/usr/bin/wxrc-2.9 ..
make -j2
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}/build
make -j1 DESTDIR=${pkgdir} install
install -m 644 -D ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}