blob: 5d69d2c679d1380116afac2cd2f3b5aadbb95cf2 (
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
|
# Maintainer: Jiachen YANG <farseerfc@gmail.com>
_srcname=srcML
_antlr_ver=2.7.7
pkgname=srcml
pkgver=1.0.0
pkgrel=1
pkgdesc="commandline and library for srcML, an XML representation for source code"
arch=(x86_64)
url="https://www.srcml.org/"
license=('GPL')
depends=(libxml2 libxslt libarchive boost-libs curl openssl)
makedepends=(cmake boost man2html docbook2x 'java-environment' 'sh' 'antlr2')
optdepends=()
source=("$pkgname-$pkgver.tar.gz::http://131.123.42.38/lmcrs/v${pkgver}/${_srcname}-${pkgver}.tar.gz"
"arch-build.patch"
"https://www.antlr2.org/download/antlr-${_antlr_ver}.tar.gz"
"gcc4.4.patch")
md5sums=('f910de40b1b7fa9a6928e7cd3d75cd2b'
'8aaad26040808d2a0ac0793999521e9e'
'01cc9a2a454dd33dcd8c856ec89af090'
'8574c93f40e6477e83c29f9b07de49da')
prepare() {
# copied from antlr2 package, rebuild with -fPIC
cd "${srcdir}/antlr-${_antlr_ver}"
patch -Np0 -i "${srcdir}"/gcc4.4.patch
cd "${srcdir}/${_srcname}-${pkgver}"
patch -Np1 -i ../arch-build.patch
}
build() {
# copied from antlr2 package, rebuild with -fPIC
cd "${srcdir}/antlr-${_antlr_ver}"
./configure --prefix=/usr \
--disable-examples \
--disable-csharp
export LDFLAGS="$LDFLAGS -fPIC"
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
make
cd "${srcdir}/${_srcname}-${pkgver}"
mkdir build
cd build
export _antlr_ver
export ANTLR_LIBRARY="${srcdir}/antlr-${_antlr_ver}/lib/cpp/src/libantlr.a"
cmake .. \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DBUILD_LIBSRCML_STATIC=OFF \
-DLINK_LIBSRCML_STATIC=OFF \
-DANTLR_LIBRARY="${srcdir}/antlr-${_antlr_ver}/lib/cpp/src/libantlr.a"
make
}
package() {
cd "$_srcname-${pkgver}"
cd build
make DESTDIR="$pkgdir/" install
}
|