summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRod Kay2017-06-05 16:06:27 +1000
committerRod Kay2017-06-05 16:06:27 +1000
commitb385258825a42792c5530cff20382231567c6b95 (patch)
tree1b650e27db694fde826b58ec6a7dfa9b8009ef06
parentbc3ec435c7191a59378686fce5fbe3972a1dcf51 (diff)
downloadaur-b385258825a42792c5530cff20382231567c6b95.tar.gz
Update to latest git version
-rw-r--r--.SRCINFO49
-rw-r--r--PKGBUILD111
-rw-r--r--expose-cargs-and-largs-makefile.patch57
-rw-r--r--patch-Makefile19
-rw-r--r--patch-gnatcoll-projects-normalize.adb12
-rw-r--r--patch-gnatcoll-scripts.adb44
-rw-r--r--patch-gnatcoll-scripts.ads38
-rw-r--r--patch-gnatcoll_full.gpr31
-rw-r--r--patch-python_support_gtk.c11
-rw-r--r--use_fpic_for_gtk.patch13
-rw-r--r--use_fpic_for_python.patch13
-rw-r--r--use_fpic_for_shared.patch19
12 files changed, 164 insertions, 253 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 82477684ee59..70f01628ae7f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,36 +1,33 @@
# Generated by mksrcinfo v8
-# Tue Jul 5 01:52:09 UTC 2016
+# Mon Jun 5 06:05:29 UTC 2017
pkgbase = gnatcoll
- pkgdesc = Provides components to complement the Ada & GNAT libraries (string/text, memory management, file handling, etc).
- pkgver = gpl2016
+ pkgdesc = gnat components collection
+ pkgver = 17.1.r64.g09ee8996
pkgrel = 1
- url = http://libre.adacore.com/tools/gnat-component-collection
+ url = http://libre.adacore.com/tools/gnat-component-collection/
arch = i686
arch = x86_64
license = GPL
- makedepends = nawk
+ makedepends = git
+ makedepends = gprbuild
+ makedepends = postgresql
+ makedepends = sqlite3
depends = gcc-ada
- depends = xmlada
- depends = gtkada
- depends = gprbuild
- depends = gnat_util
- depends = libgpr
- depends = python2
- depends = python2-pycodestyle
- depends = python2-jedi
- depends = python2-gobject
- source = http://mirrors.cdn.adacore.com/art/5739942ac7a447658d00e1e7
- source = patch-gnatcoll_full.gpr
- source = patch-Makefile
- source = patch-gnatcoll-scripts.ads
- source = patch-gnatcoll-scripts.adb
- source = patch-gnatcoll-projects-normalize.adb
- sha1sums = 921c17e7dcb2cc00e4fe0f58d34896ed1d11fc5e
- sha1sums = d9b99596d69800aa5ad0d107a456195e1fdd7bc2
- sha1sums = 80d6204a1ac0040f867184dfea75cc2988ba05da
- sha1sums = bcb378d479bf88343e2c6ec8beb599287c0f7139
- sha1sums = 3f58009f5d7188addc50e65ae5fb18b07f03f52c
- sha1sums = 5eb0af7dd112d949653b10a2345cb27e0ebc0f0a
+ depends = readline
+ optdepends = postgresql
+ optdepends = sqlite3
+ provides = gnatcoll
+ conflicts = gnatcoll
+ source = git+https://github.com/AdaCore/gnatcoll
+ source = use_fpic_for_shared.patch
+ source = use_fpic_for_gtk.patch
+ source = use_fpic_for_python.patch
+ source = expose-cargs-and-largs-makefile.patch
+ sha1sums = SKIP
+ sha1sums = d926f5153773937dea4b03e4ba46b2fe61a6bbc5
+ sha1sums = 55cf395f2ea53d22459bcc926dd7ad65d81cd315
+ sha1sums = 7dec45682d4a1c44e9517ecb9c4e2f5afccd08c2
+ sha1sums = 04799236d75963c9abe2d41c9f2a6c3d3e61780d
pkgname = gnatcoll
diff --git a/PKGBUILD b/PKGBUILD
index e45cc5e6267f..a4af9ba7fade 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,88 +1,55 @@
-# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
-
pkgname=gnatcoll
-pkgver=gpl2016
+pkgver=17.1.r64.g09ee8996
pkgrel=1
-pkgdesc="Provides components to complement the Ada & GNAT libraries (string/text, memory management, file handling, etc)."
+pkgdesc='gnat components collection'
+url='http://libre.adacore.com/tools/gnat-component-collection/'
arch=('i686' 'x86_64')
-url="http://libre.adacore.com/tools/gnat-component-collection"
license=('GPL')
-depends=("gcc-ada" "xmlada" "gtkada" "gprbuild" "gnat_util" "libgpr" "python2" "python2-pycodestyle" "python2-jedi" "python2-gobject")
-makedepends=("nawk")
-
-source=(http://mirrors.cdn.adacore.com/art/5739942ac7a447658d00e1e7
- patch-gnatcoll_full.gpr
- patch-Makefile
- patch-gnatcoll-scripts.ads
- patch-gnatcoll-scripts.adb
- patch-gnatcoll-projects-normalize.adb);
+depends=('gcc-ada' 'readline')
+makedepends=('git' 'gprbuild' 'postgresql' 'sqlite3')
+optdepends=('postgresql' 'sqlite3')
-sha1sums=('921c17e7dcb2cc00e4fe0f58d34896ed1d11fc5e'
- 'd9b99596d69800aa5ad0d107a456195e1fdd7bc2'
- '80d6204a1ac0040f867184dfea75cc2988ba05da'
- 'bcb378d479bf88343e2c6ec8beb599287c0f7139'
- '3f58009f5d7188addc50e65ae5fb18b07f03f52c'
- '5eb0af7dd112d949653b10a2345cb27e0ebc0f0a')
+provides=('gnatcoll')
+conflicts=('gnatcoll')
+source=('git+https://github.com/AdaCore/gnatcoll'
+ 'use_fpic_for_shared.patch'
+ 'use_fpic_for_gtk.patch'
+ 'use_fpic_for_python.patch'
+ 'expose-cargs-and-largs-makefile.patch')
-prepare()
-{
- cd $srcdir/gnatcoll-gpl-2016-src
+sha1sums=('SKIP'
+ 'd926f5153773937dea4b03e4ba46b2fe61a6bbc5'
+ '55cf395f2ea53d22459bcc926dd7ad65d81cd315'
+ '7dec45682d4a1c44e9517ecb9c4e2f5afccd08c2'
+ '04799236d75963c9abe2d41c9f2a6c3d3e61780d')
- patch -p0 -i ../patch-gnatcoll_full.gpr
- patch -p0 -i ../patch-Makefile
- patch -p0 -i ../patch-gnatcoll-scripts.ads
- patch -p0 -i ../patch-gnatcoll-scripts.adb
- patch -p0 -i ../patch-gnatcoll-projects-normalize.adb
+pkgver() {
+ cd gnatcoll
+ git describe --long --tags | sed 's/^gnatcoll-//; s/-/.r/; s/-/./'
}
-
-
-build()
-{
- export OS=unix
- export Build=Production
-
- cd $srcdir/gnatcoll-gpl-2016-src
-
- ## Force use of python2.
- #
- rm -fr $srcdir/temp_bin
- mkdir $srcdir/temp_bin
- ln -s /usr/bin/python2 $srcdir/temp_bin/python
- ln -s /usr/bin/python2-config $srcdir/temp_bin/python-config
- export PATH=$srcdir/temp_bin:$PATH
-
- AWK=/usr/bin/nawk ./configure --prefix=/usr --disable-shared
-
- ADA_PROJECT_PATH=/usr/lib/gnat make PROCESSORS=3
-
- ls obj -alh
- cp src/obj/gnatcoll_db2ada .
- cp src/obj/gnatinspect .
+prepare() {
+ cd gnatcoll
+ patch -Np1 -i "$srcdir"/use_fpic_for_shared.patch
+ patch -Np1 -i "$srcdir"/use_fpic_for_gtk.patch
+ patch -Np1 -i "$srcdir"/use_fpic_for_python.patch
+ patch -Np1 -i "$srcdir"/expose-cargs-and-largs-makefile.patch
}
+build() {
+ cd gnatcoll
+ export OS=unix
+ ./configure --prefix=/usr \
+ --libexecdir=/lib \
+ --enable-shared \
+ --enable-gpl
+ make PROCESSORS="$(nproc)" GPRBUILD_OPTIONS=-R
+}
-
-package()
-{
- cd $srcdir/gnatcoll-gpl-2016-src
-
- ## Force use of python2.
- #
- rm -fr $srcdir/temp_bin
- mkdir $srcdir/temp_bin
- ln -s /usr/bin/python2 $srcdir/temp_bin/python
- ln -s /usr/bin/python2-config $srcdir/temp_bin/python-config
- export PATH=$srcdir/temp_bin:$PATH
-
- make DESTDIR="$pkgdir/" prefix=$pkgdir/usr install
-
- cp src/dborm.py $pkgdir/usr/share/gnatcoll
-
- mkdir -p $pkgdir/usr/bin
- cp gnatcoll_db2ada $pkgdir/usr/bin
- cp gnatinspect $pkgdir/usr/bin
+package() {
+ cd gnatcoll
+ make prefix="$pkgdir"/usr install
}
diff --git a/expose-cargs-and-largs-makefile.patch b/expose-cargs-and-largs-makefile.patch
new file mode 100644
index 000000000000..6de37b027ba9
--- /dev/null
+++ b/expose-cargs-and-largs-makefile.patch
@@ -0,0 +1,57 @@
+diff --git a/Makefile b/Makefile
+index ef378102..40f7bcd1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -49,12 +49,12 @@ build_library_type/%: generate_sources
+ @${RM} src/gnatcoll-atomic.adb
+
+ @echo "====== Building $(@F) libraries ======"
+- ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full
++ ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full $(CARGS) $(LARGS)
+
+ @# Need to build libgnatcoll_gtk separately, because its project files
+ @# requires gtkada.gpr, which might not exist on the machine.
+ ifeq (${WITH_GTK},yes)
+- ${GPRBUILD} ${GPRBLD_OPTS} -Psrc/gnatcoll_gtk
++ ${GPRBUILD} ${GPRBLD_OPTS} -Psrc/gnatcoll_gtk $(CARGS) $(LARGS)
+ endif
+
+ build_tools/%: build_library_type/%
+@@ -63,7 +63,7 @@ build_tools/%: build_library_type/%
+ @# They are not build as part of the above because only the Main from
+ @# gnatcoll_full.gpr are build. We could use aggregate projects to
+ @# speed things up.
+- ${GPRBUILD} ${GPRBLD_OPTS} -q -Psrc/gnatcoll_tools
++ ${GPRBUILD} ${GPRBLD_OPTS} -q -Psrc/gnatcoll_tools $(CARGS) $(LARGS)
+
+ #######################################################################
+ # install
+@@ -126,10 +126,10 @@ SQLITE_DIR=src/sqlite/amalgamation
+ sqlite3_shell: $(SQLITE_DIR)/sqlite3_for_gps
+ $(SQLITE_DIR)/sqlite3_for_gps: $(SQLITE_DIR)/shell.c $(SQLITE_DIR)/sqlite3.c
+ ifeq ($(OS),Windows_NT)
+- -cd $(SQLITE_DIR); gcc -O2 -DSQLITE_OMIT_LOAD_EXTENSION -D__EXTENSIONS__ -o sqlite3_for_gps shell.c sqlite3.c
++ -cd $(SQLITE_DIR); gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DSQLITE_OMIT_LOAD_EXTENSION -D__EXTENSIONS__ -o sqlite3_for_gps shell.c sqlite3.c
+ else
+ # If we fail to compile, never mind. Some tests will simply be disabled
+- -cd $(SQLITE_DIR); gcc -O2 -DSQLITE_OMIT_LOAD_EXTENSION -D__EXTENSIONS__ -o sqlite3_for_gps shell.c sqlite3.c -lpthread -ldl
++ -cd $(SQLITE_DIR); gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DSQLITE_OMIT_LOAD_EXTENSION -D__EXTENSIONS__ -o sqlite3_for_gps shell.c sqlite3.c -lpthread -ldl
+ endif
+
+ ## Only works after installation, so we should install to a local directory
+diff --git a/Makefile.conf.in b/Makefile.conf.in
+index 32975d66..f55ec0f1 100644
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -91,3 +91,11 @@ DIRSEP=;
+ else
+ DIRSEP=:
+ endif
++
++ifneq ($(strip $(CFLAGS)),)
++CARGS := -cargs $(CFLAGS)
++endif
++
++ifneq ($(strip $(LDFLAGS)),)
++LARGS := -largs $(LDFLAGS)
++endif
diff --git a/patch-Makefile b/patch-Makefile
deleted file mode 100644
index c3c9f4ecb91e..000000000000
--- a/patch-Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Makefile 2016-06-04 10:59:52.438996452 +1000
---- Makefile-new 2016-06-04 11:00:02.238996854 +1000
-***************
-*** 68,74 ****
- ifeq (${WITH_GTK},yes)
- ${GPRINSTALL} ${GPRINST_OPTS} -Psrc/gnatcoll_gtk
- endif
-! ${GPRINSTALL} --mode=usage ${GPRINST_OPTS} -Psrc/gnatcoll_tools
-
- install_gps_plugin: force
- mkdir -p $(prefix)/share/gps/plug-ins
---- 68,74 ----
- ifeq (${WITH_GTK},yes)
- ${GPRINSTALL} ${GPRINST_OPTS} -Psrc/gnatcoll_gtk
- endif
-! # ${GPRINSTALL} --mode=usage ${GPRINST_OPTS} -Psrc/gnatcoll_tools
-
- install_gps_plugin: force
- mkdir -p $(prefix)/share/gps/plug-ins
diff --git a/patch-gnatcoll-projects-normalize.adb b/patch-gnatcoll-projects-normalize.adb
deleted file mode 100644
index fd17a665e43c..000000000000
--- a/patch-gnatcoll-projects-normalize.adb
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/gnatcoll-projects-normalize.adb 2016-05-16 19:34:28.000000000 +1000
-+++ src/gnatcoll-projects-normalize.adb-new 2016-07-03 08:01:32.926640074 +1000
-@@ -2204,6 +2204,9 @@
-
- when N_Comment =>
- null;
-+
-+ when N_Split =>
-+ null;
- end case;
- end if;
-
diff --git a/patch-gnatcoll-scripts.adb b/patch-gnatcoll-scripts.adb
deleted file mode 100644
index f8609522d555..000000000000
--- a/patch-gnatcoll-scripts.adb
+++ /dev/null
@@ -1,44 +0,0 @@
---- src/gnatcoll-scripts.adb
-+++ src/gnatcoll-scripts.adb
-@@ -209,6 +209,40 @@
- Unchecked_Free (List.List);
- end Free;
-
-+
-+ -------------------
-+ -- Get_Instances --
-+ -------------------
-+
-+ function Get_Instances (List : Instance_List) return Instance_Array is
-+ Null_List : Instance_Array (1 .. 0);
-+ begin
-+ if List.List = null then
-+ return Null_List;
-+ else
-+ return List.List.all;
-+ end if;
-+ end Get_Instances;
-+
-+ ------------
-+ -- Length --
-+ ------------
-+
-+ function Length (List : Instance_List_Access) return Natural is
-+-- use GNATCOLL.RefCount;
-+ Count : Natural := 0;
-+ begin
-+ if List /= null and then List.List /= null then
-+ for L in List.List'Range loop
-+-- if List.List (L).Initialized then
-+ if List.List (L).Ref /= Null_Ref then
-+ Count := Count + 1;
-+ end if;
-+ end loop;
-+ end if;
-+ return Count;
-+ end Length;
-+
- ---------
- -- Get --
- ---------
-
diff --git a/patch-gnatcoll-scripts.ads b/patch-gnatcoll-scripts.ads
deleted file mode 100644
index 309c4d8a6ffb..000000000000
--- a/patch-gnatcoll-scripts.ads
+++ /dev/null
@@ -1,38 +0,0 @@
---- src/gnatcoll-scripts.ads
-+++ src/gnatcoll-scripts.ads
-@@ -766,6 +766,12 @@
- -- Stores the instance created for some GPS internal data, so that the same
- -- script instance is reused every time we reference the same Ada object.
-
-+ type Instance_List_Access is access all Instance_list;
-+
-+ type Instance_Array is array (Natural range <>) of Class_Instance;
-+ type Instance_Array_Access is access Instance_Array;
-+
-+
- type Inst_Cursor is private;
- function First (Self : Instance_List) return Inst_Cursor;
- procedure Next (Self : Instance_List; Pos : in out Inst_Cursor);
-@@ -777,6 +783,12 @@
-
- procedure Free (List : in out Instance_List);
- -- Free the instances stored in the list
-+
-+ function Get_Instances (List : Instance_List) return Instance_Array;
-+ -- Return the instance array contained in the given list
-+
-+ function Length (List : Instance_List_Access) return Natural;
-+ -- Return the number of instances that are stored in the list
-
- function Get
- (List : Instance_List;
-@@ -1575,8 +1587,6 @@
- Console : Virtual_Console;
- end record;
-
-- type Instance_Array is array (Natural range <>) of Class_Instance;
-- type Instance_Array_Access is access Instance_Array;
- type Instance_List is record
- List : Instance_Array_Access;
- -- instances are stored in no particular order. As soon as a
-
diff --git a/patch-gnatcoll_full.gpr b/patch-gnatcoll_full.gpr
deleted file mode 100644
index 020370e6db20..000000000000
--- a/patch-gnatcoll_full.gpr
+++ /dev/null
@@ -1,31 +0,0 @@
-*** gnatcoll_full.gpr 2016-06-04 09:32:41.495448462 +1000
---- gnatcoll_full.gpr-new 2016-06-04 09:32:58.362115820 +1000
-***************
-*** 61,73 ****
- package Builder renames GNATCOLL_Shared.Builder;
-
- package Install is
-! for Artifacts ("share/examples/gnatcoll") use ("examples/*");
-! for Artifacts ("share/doc/gnatcoll/html") use ("docs/_build/html");
-! for Artifacts ("share/doc/gnatcoll")
-! use ("docs/_build/latex/GNATColl.pdf");
-! for Artifacts ("share/gps/support/core/gnatcoll")
-! use ("distrib/gnatcoll/*py");
-! for Artifacts ("share/gnatcoll") use ("src/dborm.py");
- end Install;
-
- end Gnatcoll_Full;
---- 61,73 ----
- package Builder renames GNATCOLL_Shared.Builder;
-
- package Install is
-! -- for Artifacts ("share/examples/gnatcoll") use ("examples/*");
-! -- for Artifacts ("share/doc/gnatcoll/html") use ("docs/_build/html");
-! -- for Artifacts ("share/doc/gnatcoll")
-! -- use ("docs/_build/latex/GNATColl.pdf");
-! -- for Artifacts ("share/gps/support/core/gnatcoll")
-! -- use ("distrib/gnatcoll/*py");
-! -- for Artifacts ("share/gnatcoll") use ("src/dborm.py");
- end Install;
-
- end Gnatcoll_Full;
diff --git a/patch-python_support_gtk.c b/patch-python_support_gtk.c
deleted file mode 100644
index e3f3324fd538..000000000000
--- a/patch-python_support_gtk.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gtk/python/python_support_gtk.c 2015-10-18 02:36:31.203280218 +1100
-+++ src/gtk/python/python_support_gtk.c-new 2015-10-18 02:36:41.083280623 +1100
-@@ -60,7 +60,7 @@
- #ifdef PYGTK
- return "import pygtk; pygtk.require('2.0'); import gtk";
- #else
-- return "import gi, sys; from gi.repository import Gtk,GObject; sys.modules['gtk']=Gtk; sys.modules['gobject']=GObject";
-+ return "import gi, sys; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk,GObject; sys.modules['gtk']=Gtk; sys.modules['gobject']=GObject";
- #endif
- }
-
diff --git a/use_fpic_for_gtk.patch b/use_fpic_for_gtk.patch
new file mode 100644
index 000000000000..1c8b6951897e
--- /dev/null
+++ b/use_fpic_for_gtk.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gnatcoll_gtk.gpr b/src/gnatcoll_gtk.gpr
+index f37017df..6654804d 100644
+--- a/src/gnatcoll_gtk.gpr
++++ b/src/gnatcoll_gtk.gpr
+@@ -71,7 +71,7 @@ project GnatColl_Gtk is
+ for Switches ("Ada") use GnatColl_Shared.Compiler'Switches ("Ada");
+
+ for Switches ("C") use
+- ("-g", "-O2")
++ ("-g", "-O2", "-fPIC")
+ & GnatColl_Shared.Python_Cflags
+ & GnatColl_Shared.Pygtk_Include
+ & GnatColl_Shared.PyGobject_Include
diff --git a/use_fpic_for_python.patch b/use_fpic_for_python.patch
new file mode 100644
index 000000000000..eebd55fe42aa
--- /dev/null
+++ b/use_fpic_for_python.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gnatcoll_python.gpr b/src/gnatcoll_python.gpr
+index 7dbab9d4..b9c90907 100644
+--- a/src/gnatcoll_python.gpr
++++ b/src/gnatcoll_python.gpr
+@@ -59,7 +59,7 @@ project GnatColl_Python is
+ GnatColl_Shared.Compiler'Switches ("Ada");
+
+ for Switches ("C") use
+- ("-g", "-O2") & GnatColl_Shared.Python_Cflags;
++ ("-g", "-O2", "-fPIC") & GnatColl_Shared.Python_Cflags;
+ end Compiler;
+
+ package Linker is
diff --git a/use_fpic_for_shared.patch b/use_fpic_for_shared.patch
new file mode 100644
index 000000000000..a661d82c65ef
--- /dev/null
+++ b/use_fpic_for_shared.patch
@@ -0,0 +1,19 @@
+diff --git a/gnatcoll_shared.gpr.in b/gnatcoll_shared.gpr.in
+index f189c9db..64ff0741 100644
+--- a/gnatcoll_shared.gpr.in
++++ b/gnatcoll_shared.gpr.in
+@@ -76,12 +76,12 @@ abstract project GnatColl_Shared is
+ for Switches ("Ada") use
+ ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
+ "-gnatwaCJe");
+- for Switches ("C") use ("-g", "-Wunreachable-code");
++ for Switches ("C") use ("-g", "-Wunreachable-code", "-fPIC");
+
+ when "Production" =>
+ -- Do not use -gnatwe for production mode
+ for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
+- for Switches ("C") use ("-O2", "-Wunreachable-code");
++ for Switches ("C") use ("-O2", "-Wunreachable-code", "-fPIC");
+ end case;
+
+ case Syslog is