summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f6c7d655218ec1f095b513827e4e02a42fe6c24d (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
131
132
133
134
135
136
137
138
139
140
141
#
# 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=17.7.0.r26.g473b156f7
pkgrel=1
pkgdesc="Cross platform IDE for C, C++, Rust, Python, PHP and Node.js written in C++"
arch=('i686' 'x86_64' 'aarch64')
url="https://codelite.org/"
license=('GPL')

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

depends=(
    'wxwidgets-gtk3'
    'libedit'
    'libssh'
    'mariadb-libs'
    'ncurses'
    'uchardet'
    'hunspell'
    #'ctags'
    #'xterm'
    #'wget'
    #'curl'
    #'python'
    #'python2'
)

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

provides=('codelite')

conflicts=('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}"
  #git clone -b master --single-branch --depth 1 --recursive --shallow-submodules https://github.com/eranif/codelite.git ${_gitname};

  cd "${srcdir}/${_gitname}"

  git submodule update --init
  git submodule foreach git submodule update --init

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

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

  #patch -p0 < "${startdir}/codelite-DebugAdapterClient-CMakeLists-cxx17.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
  #  -DWITH_NATIVEBOOK=1 \
  cmake -G "Unix Makefiles" \
    -S . \
    -B "${BUILD_DIR}" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCL_PREFIX=/usr \
    -DWITH_PCH=0  \
    -DWITH_WX_CONFIG="${WX_CONFIG}" \
    -DENABLE_LLDB=1 \
    -DWITH_MYSQL=0 \


  # build
  cmake --build "${BUILD_DIR}"
}

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

  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
#