diff options
author | Rod Kay | 2017-06-05 16:00:03 +1000 |
---|---|---|
committer | Rod Kay | 2017-06-05 16:00:03 +1000 |
commit | 463d5061830f4d5dd0902ca0d9d787bdb55e0ff8 (patch) | |
tree | ce55dae992635e86d0529a3bcdc6822a88835a0b | |
download | aur-463d5061830f4d5dd0902ca0d9d787bdb55e0ff8.tar.gz |
Add initial files
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 77 | ||||
-rw-r--r-- | use_fpic_for_libadalang.patch | 30 |
3 files changed, 140 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..93589fa6cce3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +# Generated by mksrcinfo v8 +# Mon Jun 5 05:59:38 UTC 2017 +pkgbase = libadalang + pkgdesc = A high performance semantic engine for the Ada programming language. + pkgver = 1 + pkgrel = 1 + url = https://github.com/AdaCore/libadalang + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + depends = gcc-ada + depends = ada-gnatcoll-git + depends = quex + depends = python2-mako + depends = python-yaml + depends = python-sphinx + depends = python-coverage + depends = python2-enum34 + depends = python-psutil + depends = python-funcy + depends = python2-docutils + depends = autopep8 + depends = yapf + source = git+https://github.com/AdaCore/libadalang.git#branch=stable-gps + source = git+https://github.com/AdaCore/langkit.git#branch=stable-gps + source = use_fpic_for_libadalang.patch + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = libadalang + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..593f4a164c3b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,77 @@ +# Contributor: Rod Kay <charlie5 on #ada at freenode.net> + +pkgname=libadalang +pkgver=1 +pkgrel=1 +pkgdesc="A high performance semantic engine for the Ada programming language." + +arch=('i686' 'x86_64') +url="https://github.com/AdaCore/libadalang" +license=('GPL') + +depends=("gcc-ada" "ada-gnatcoll-git" + "quex" "python2-mako" "python-yaml" "python-sphinx" "python-coverage" "python2-enum34" + "python-psutil" "python-funcy" "python2-docutils" "autopep8" "yapf") + +makedepends=("git") + + +source=(git+https://github.com/AdaCore/libadalang.git#branch=stable-gps + git+https://github.com/AdaCore/langkit.git#branch=stable-gps + use_fpic_for_libadalang.patch) + +md5sums=('SKIP' + 'SKIP' + 'SKIP') + + +prepare() +{ + # Ensure that QUEX_PATH is set. + # + source /etc/profile.d/quex.sh + + cd $srcdir/$pkgname + + # Install langkit + # + rm -fr langkit + mv ../langkit . + + ## Force use of pyhon2 + # + rm -fr temp_bin + mkdir temp_bin + ln -s /usr/bin/python2 temp_bin/python + ln -s /usr/bin/python2-config temp_bin/python-config +} + + +build() +{ + cd $srcdir/$pkgname + + export PATH=$srcdir/$pkgname/temp_bin:$PATH + python ada/manage.py generate + + # Add -fPIC where needed. + # + patch -Np0 -i "$srcdir"/use_fpic_for_libadalang.patch + + python ada/manage.py build +} + + +package() +{ + cd $srcdir/$pkgname + + python ada/manage.py install $pkgdir/usr + + mkdir -p $pkgdir/usr/lib/python2.7/site-packages + + mv $pkgdir/usr/python/libadalang.py \ + $pkgdir/usr/lib/python2.7/site-packages + + rmdir $pkgdir/usr/python +} diff --git a/use_fpic_for_libadalang.patch b/use_fpic_for_libadalang.patch new file mode 100644 index 000000000000..073144918193 --- /dev/null +++ b/use_fpic_for_libadalang.patch @@ -0,0 +1,30 @@ +--- build/lib/gnat/libadalang.gpr 2017-06-05 11:38:11.357910001 +1000 ++++ build/lib/gnat/libadalang.gpr-new 2017-06-05 11:37:33.665740000 +1000 +@@ -90,9 +90,9 @@ + Common_Ada_Cargs & ("-g", "-O0", "-gnatwe", "-gnata"); + + for Default_Switches ("C") use +- Common_C_Cargs & ("-g3", "-O0", "-DDEBUG=1"); ++ Common_C_Cargs & ("-g3", "-O0", "-DDEBUG=1", "-fPIC"); + +- for Switches ("quex_lexer.c") use Common_C_Cargs & ("-g0", "-O0"); ++ for Switches ("quex_lexer.c") use Common_C_Cargs & ("-g0", "-O0", "-fPIC"); + -- This file is *huge* and the debugging information for it harms + -- Valgrind runs. We almost never have to debug this file so + -- this is acceptable. +@@ -103,13 +103,13 @@ + for Default_Switches ("Ada") use + Common_Ada_Cargs & ("-g", "-Ofast", "-gnatp", "-gnatn2"); + +- for Default_Switches ("C") use Common_C_Cargs & ("-Ofast"); ++ for Default_Switches ("C") use Common_C_Cargs & ("-Ofast", "-fPIC"); + + case Target is + when "x86-linux" | "x86-windows" => + for Switches ("quex_lexer.c") use Common_C_Cargs + & ("-Ofast", "-fno-ree", "-fdisable-rtl-cprop_hardreg", +- "-fdisable-rtl-sched2", "-mno-stv"); ++ "-fdisable-rtl-sched2", "-mno-stv", "-fPIC"); + -- Deactivate because of memory usage, see P726-024. This + -- limits the memory usage peaks of GCC 6 based compilers + -- and should prevent OOM on 32-bit platforms. |