You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ada/gnatcoll/files/gnatcoll-2016-gentoo.patch

298 lines
11 KiB

--- a/Makefile 2017-01-20 19:39:07.131398270 +0100
+++ b/Makefile 2017-01-20 19:42:30.088728844 +0100
@@ -28,7 +28,7 @@
# Build either type of library. The argument (%) is the type of library to build
-GPRBLD_OPTS=-p -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -XGnatcoll_Build=${Gnatcoll_Build}
+GPRBLD_OPTS=-p -m -j${PROCESSORS} -XGPR_BUILD=$(@F) -XLIBRARY_TYPE=$(@F) -XGnatcoll_Build=${Gnatcoll_Build}
build_library_type/%: generate_sources
@${RM} src/gnatcoll-atomic.adb
@@ -34,19 +36,19 @@
@${RM} src/gnatcoll-atomic.adb
@echo "====== Building $(@F) libraries ======"
- ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full
+ ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full -v -cargs ${ADAFLAGS}
@# 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 -v -cargs ${ADAFLAGS}
endif
@# Build the tools (the list is the project\'s Main attribute)
@# 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 -v -cargs ${ADAFLAGS}
#######################################################################
# install
@@ -53,6 +53,7 @@
GPRINST_OPTS=-p -f --prefix=${prefix} --install-name=gnatcoll \
--exec-subdir=${bindir} --project-subdir=lib/gnat \
+ -XGPR_BUILD=$(@F) \
--build-var=LIBRARY_TYPE --build-name=$(@F) -XLIBRARY_TYPE=$(@F)
install-clean:
--- a/gnatcoll_shared.gpr.in 2017-01-20 19:50:03.222808656 +0100
+++ b/gnatcoll_shared.gpr.in 2017-01-20 19:50:28.200399274 +0100
@@ -13,7 +13,7 @@
type Yes_No is ("yes", "no");
Gtk : Yes_No := External ("GTK", "@WITH_GTK@");
- Python : Yes_No := External ("PYTHON", "@WITH_PYTHON@");
+ Python : Yes_No := "@WITH_PYTHON@";
Syslog : Yes_No := External ("SYSLOG", "@WITH_SYSLOG@");
Postgres : Yes_No := External ("POSTGRES", "@WITH_POSTGRES@");
type Sqlite_Inclusion is ("yes", "no", "embedded");
--- a/aclocal.m4 2017-04-06 08:25:14.796699365 +0200
+++ b/aclocal.m4 2017-04-06 08:25:36.622318016 +0200
@@ -45,7 +45,7 @@
cat > conftest.ada <<EOF
[$3]
EOF
- if AC_TRY_COMMAND([gnatchop -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
+ if AC_TRY_COMMAND([${GNATCHOP} -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
then
: Success
$4
@@ -68,7 +68,7 @@
AC_DEFUN(AM_HAS_INTRINSIC_SYNC_COUNTERS,
[
AC_MSG_CHECKING([whether platform supports atomic inc/dec])
- AM_TRY_ADA([gnatmake], [check.adb],
+ AM_TRY_ADA([${GNATMAKE}], [check.adb],
[
with Interfaces; use Interfaces;
procedure Check is
--- a/testsuite/json/__init__.py 2017-04-24 17:52:34.158513249 +0200
+++ b/testsuite/json/__init__.py 2017-04-24 17:52:52.636207017 +0200
@@ -21,7 +21,7 @@
@requires_not_aix # Storage_Error on that machine
@chdir("MB28-001")
def test_MB28_001(self):
- self.runexec(["python", "make_json.py"])
+ self.runexec(["python2.7", "make_json.py"])
self.gprbuild()
self.runexec("json_stack_test", "test.out")
--- a/testsuite/projects/__init__.py 2017-04-24 19:10:30.465246199 +0200
+++ b/testsuite/projects/__init__.py 2017-04-24 19:10:42.768035080 +0200
@@ -105,25 +105,6 @@
self.gprbuild("default.gpr")
self.runexec("main", "")
- @support.requires_not_windows
- @chdir("N918-040")
- def test_bareboard(self):
- self.create_fake_bb_compiler('install', 'arm-eabi', '6.1.0w', '3.4.6')
-
- # Make sure auto.cgpr is not deleted on exit
- try:
- os.unlink('auto.cgpr')
- except:
- pass
- self.gprbuild('main_prj', switches=['--autoconf=auto.cgpr'])
- m = re.search('for Target use "(.*?)"', open('auto.cgpr').read())
- target = m.group(1)
-
- def customFilter(actual):
- return actual.replace(target, "<native>")
-
- self.runexec(['sh', 'test.sh'], 'test.out', customFilter=customFilter)
-
@chdir("NB12-045")
def test_NB12_045(self):
# Test registering attribute in unknown package
--- a/src/tools/gnatcoll_db2ada.adb 2017-04-24 21:36:09.193973179 +0200
+++ b/src/tools/gnatcoll_db2ada.adb 2017-04-24 21:36:16.029858932 +0200
@@ -211,7 +211,7 @@
declare
Output : constant String := Get_Command_Output
- (Command => "python",
+ (Command => "python2.7",
Arguments => Args,
Input => "",
Status => Status'Access,
--- a/src/gnatcoll_python.gpr.in 2018-11-11 11:04:46.275182850 +0100
+++ b/src/gnatcoll_python.gpr.in 2018-11-11 11:10:22.809783463 +0100
@@ -33,14 +33,19 @@
"lib" & Project'Library_Name
& GnatColl_Shared.So_Ext & "." & GnatColl_Shared.Version;
- -- When linking a shared library (see Linker_Options below in addition)
- for Library_Options use GnatColl_Shared.Python_Libs;
-
case GnatColl_Shared.Python is
when "yes" =>
for Languages use ("Ada", "C");
for Source_Dirs use ("python");
- for Library_Options use (@PYTHON_LIBS_GPR@);
+ case Gnatcoll_Shared.Library_Type is
+ when "relocatable" =>
+ -- When linking a shared library (see Linker_Options
+ -- below in addition)
+ for Library_Options use GnatColl_Shared.Python_Libs;
+ when others =>
+ null;
+ end case;
+
when "no" =>
for Languages use ("Ada");
for Source_Dirs use ("nopython");
--- a/src/gnatcoll_iconv.gpr 2018-11-11 11:39:47.736090039 +0100
+++ b/src/gnatcoll_iconv.gpr 2018-11-11 11:40:42.161198640 +0100
@@ -44,7 +44,13 @@
for Source_Dirs use ("iconv", "iconv/no_iconv");
when "yes" =>
for Source_Dirs use ("iconv", "iconv/with_iconv");
- for Library_Options use (GnatColl_Shared.Iconv_Dir) & Gnatcoll_Shared.Iconv_Lib;
+ case Gnatcoll_Shared.Library_Type is
+ when "relocatable" =>
+ for Library_Options use (GnatColl_Shared.Iconv_Dir)
+ & Gnatcoll_Shared.Iconv_Lib;
+ when others =>
+ null;
+ end case;
end case;
package Compiler is
--- a/src/gnatcoll_sqlite.gpr 2018-11-11 11:45:36.672371038 +0100
+++ b/src/gnatcoll_sqlite.gpr 2018-11-11 11:48:24.898610725 +0100
@@ -51,8 +51,15 @@
for Source_Dirs use ("sqlite", "sqlite/no_sqlite");
when "yes" =>
for Source_Dirs use ("sqlite", "sqlite/with_sqlite");
- for Library_Options use (GnatColl_Shared.Sqlite_Dir)
- & "-lsqlite3" & Thread_Lib;
+
+ case Gnatcoll_Shared.Library_Type is
+ when "relocatable" =>
+ for Library_Options use (GnatColl_Shared.Sqlite_Dir)
+ & "-lsqlite3" & Thread_Lib;
+ when others =>
+ null;
+ end case;
+
when "embedded" =>
for Languages use ("Ada", "C");
for Source_Dirs use ("sqlite", "sqlite/with_sqlite", "sqlite/amalgamation");
--- a/src/gnatcoll_readline.gpr.in 2018-11-11 11:51:19.119750140 +0100
+++ b/src/gnatcoll_readline.gpr.in 2018-11-11 11:52:00.531069930 +0100
@@ -6,7 +6,14 @@
when "yes" =>
for Languages use ("Ada");
for Source_Dirs use ("readline", "readline/with_readline");
- for Library_Options use ("-lreadline");
+
+ case Gnatcoll_Shared.Library_Type is
+ when "relocatable" =>
+ for Library_Options use ("-lreadline");
+ when others =>
+ null;
+ end case;
+
when "no" =>
for Source_Dirs use ("readline", "readline/no_readline");
end case;
--- a/src/gnatcoll_gtk.gpr.in 2018-11-11 11:55:32.460587328 +0100
+++ b/src/gnatcoll_gtk.gpr.in 2018-11-11 11:56:15.930872692 +0100
@@ -47,8 +47,15 @@
for Source_Dirs use ();
when "yes" =>
for Source_Dirs use ("gtk");
- for Library_Options use GnatColl_Shared.Gtk_Libs
- & GnatColl_Shared.Python_Libs;
+
+ case Gnatcoll_Shared.Library_Type is
+ when "relocatable" =>
+ for Library_Options use GnatColl_Shared.Gtk_Libs
+ & GnatColl_Shared.Python_Libs;
+ when others =>
+ null;
+ end case;
+
case GnatColl_Shared.Python is
when "yes" =>
for Source_Dirs use Project'Source_Dirs & ("gtk/python");
--- a/src/gnatcoll-projects-normalize.adb 2018-11-13 19:34:01.491003676 +0100
+++ b/src/gnatcoll-projects-normalize.adb 2018-11-13 19:34:16.289760553 +0100
@@ -2202,7 +2202,7 @@
when N_Comment_Zones =>
null;
- when N_Comment =>
+ when others =>
null;
end case;
end if;
--- a/src/gnatcoll-projects.adb 2018-11-14 18:47:27.760365233 +0100
+++ b/src/gnatcoll-projects.adb 2018-11-14 19:10:43.961337201 +0100
@@ -3273,9 +3273,9 @@
Status : out Status_Type;
Result : out GNATCOLL.VFS.File_Array_Access)
is
- Mains_Str_List : String_List_Access;
+ Mains_Str_List : String_Vectors.Vector;
Closure_Status : GPR.Util.Status_Type;
- Closures_List : String_List_Access;
+ Closures_List : String_Vectors.Vector;
begin
Trace (Me, "Get_Closures");
@@ -3287,25 +3287,18 @@
return;
end if;
- Mains_Str_List := new String_List (Mains'First .. Mains'Last);
for I in Mains'Range loop
- Mains_Str_List (I) := new String'(Mains (I).Display_Base_Name);
+ Mains_Str_List.Append (Mains (I).Display_Base_Name);
end loop;
GPR.Util.Get_Closures
(Project.Get_View, Project.Tree_View,
- Mains => Mains_Str_List.all,
+ Mains => Mains_Str_List,
All_Projects => All_Projects,
Include_Externally_Built => Include_Externally_Built,
Status => Closure_Status,
Result => Closures_List);
- -- Freeing temporary list of mains.
- for I in Mains_Str_List'Range loop
- Free (Mains_Str_List (I));
- end loop;
- Free (Mains_Str_List);
-
case Closure_Status is
when Success =>
Status := Success;
@@ -3321,17 +3314,10 @@
end case;
if Closure_Status in Success | Incomplete_Closure then
- for I in Closures_List'Range loop
- Append (Result, Create (+Closures_List (I).all));
+ for Closure of Closures_List loop
+ Append (Result, Create (+Closure));
end loop;
end if;
-
- -- Freeing temporary list of closures.
- for I in Closures_List'Range loop
- Free (Closures_List (I));
- end loop;
- Free (Closures_List);
-
end Get_Closures;
----------------