summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aadd9e118af33914058f5d6358ddcf8822fcbcc6 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#
# AUR PKGBUILD for "bleeding edge" codelite from github repo
#
# Maintainer: Uffe Jakobsen <uffe _at_ uffe _dot_ org>
# Past Maintainer: Jefferson Gonzalez <jgmdev@gmail.com>
# Contributor: Pyro Devil <p dot devil at gmail dot com>
#
# NOTES:
#
# Using Make as long as Ninja cannot be job-controlled from makepkg.conf (like Make can)
# Systems with many cores but little memory will be (OOM) killed by Ninja creating too many jobs
#

pkgname=codelite-git
_gitname=codelite
pkgver=16.7.0.r74.g768c73af4
pkgrel=1
pkgdesc="Cross platform IDE for C, C++, Rust, Python, PHP and Node.js written in C++"
arch=('i686' 'x86_64' 'aarch64')
url="http://www.codelite.org/"
license=('GPL')

makedepends=('pkgconfig' 'cmake' 'ninja' 'clang' 'git')

depends=(
  'wxgtk3'
  'libedit'
  'libssh'
  'mariadb-libs'
  'ncurses'
  'clang'
  'lldb'
  'hunspell'
  #'xterm'
  #'wget'
  #'curl'
  #'python2'
)

optdepends=(
  'graphviz: callgraph visualization'
  'cscope: CScope Integration for CodeLite'
  'clang: compiler'
  'gcc: compiler'
  'gdb: debugger'
  'valgrind: debugger'
)

conflicts=('codelite' 'codelite-bin')
provides=('codelite')

source=(
  ${_gitname}::git+https://github.com/eranif/codelite.git
  http://repos.codelite.org/wxCrafterLibs/wxgui.zip
)

sha256sums=(
  'SKIP'
  'SKIP'
)

noextract=('wxgui.zip')

#
#
#

BUILD_DIR="_build.out"

#
#
#

pkgver() {
  cd "${srcdir}/${_gitname}"
  git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${srcdir}/${_gitname}"
  git submodule update --init

  # Apply patches here:
  # example: patch -p0 < "${startdir}/codelite-feature.patch"

  #patch -p0 < "${startdir}/codelite-fsw-symlink.patch"
}

build() {
  cd "${srcdir}/${_gitname}"

  mkdir -p "${BUILD_DIR}"

  CXXFLAGS="${CXXFLAGS} -fno-devirtualize"
  export CXXFLAGS

  #WX_CONFIG="/usr/bin/wx-config-gtk3"
  WX_CONFIG="wx-config"

  # generate
  cmake -G "Unix Makefiles" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCL_PREFIX=/usr \
    -DWITH_PCH=0  \
    -DWITH_WX_CONFIG="${WX_CONFIG}" \
    -DWITH_NATIVEBOOK=1 \
    -DENABLE_LLDB=1 \
    -DWITH_MYSQL=0 \
    -B "${BUILD_DIR}" \
    -S .

  # build
  #make -s -C "${BUILD_DIR}"
  cmake --build "${BUILD_DIR}"
}

package() {
  cd "${srcdir}/${_gitname}"

  #make -s -C "${BUILD_DIR}" -j1 DESTDIR="${pkgdir}" install
  DESTDIR="${pkgdir}" cmake --install "${BUILD_DIR}"

  install -m 644 -D "${srcdir}/${_gitname}/LICENSE" "${pkgdir}/usr/share/licenses/codelite/LICENSE"
  install -m 644 -D "${srcdir}/wxgui.zip" "${pkgdir}/usr/share/codelite/wxgui.zip"
}

#
# EOF
#