[gprbuild/f15/master] Initial commit (#675478)

Pavel Zhukov landgraf at fedoraproject.org
Fri Mar 18 18:05:24 UTC 2011


commit 4283af5b3796c2e4d06957837f719011f1b5e85c
Author: Pavel Zhukov <pavel at zhukoff.net>
Date:   Fri Mar 18 21:04:40 2011 +0300

    Initial commit (#675478)

 .gitignore                |    1 +
 gprbuild-destdir.patch    |   79 ++++++++++++++++++++++++++++++++++
 gprbuild-gcc.patch        |   19 ++++++++
 gprbuild-gcc46.patch      |   10 ++++
 gprbuild-gccversion.patch |   56 ++++++++++++++++++++++++
 gprbuild-gnatflags.patch  |   11 +++++
 gprbuild-shared.patch     |   11 +++++
 gprbuild.spec             |  104 +++++++++++++++++++++++++++++++++++++++++++++
 sources                   |    1 +
 9 files changed, 292 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..cda0031 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gprbuild-gpl-2010-src.tgz
diff --git a/gprbuild-destdir.patch b/gprbuild-destdir.patch
new file mode 100644
index 0000000..e33b8ba
--- /dev/null
+++ b/gprbuild-destdir.patch
@@ -0,0 +1,79 @@
+--- a/Makefile.in	2011-02-05 01:10:28.682428002 +0300
++++ b/Makefile.in	2011-02-05 01:11:20.654428003 +0300
+@@ -3,7 +3,7 @@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+ INSTALL_DATA=@INSTALL_DATA@
+ HOST=@HOST@
+-
++DESTDIR ?= 
+ # Relative to the gnat/ subdirectory (or absolute path)
+ GNAT_SOURCE_DIR=../gnat_src
+ 
+@@ -89,36 +89,37 @@
+ 	  -XBUILD_TOOL=gprbuild
+ 
+ install: install.data install.bin
+-	-${MKDIR} ${datadir}/gpr
+-	$(RM) -r ${datadir}/examples/gprbuild
+-	-${MKDIR} ${datadir}/examples/gprbuild
+-	${CP} -r examples/* ${datadir}/examples/gprbuild
+-	${RM} -r ${datadir}/doc/gprbuild
+-	-${MKDIR} ${datadir}/doc/gprbuild
++	-${MKDIR} ${DESTDIR}/${datadir}/gpr
++	$(RM) -r ${DESTDIR}/${datadir}/gprbuild/examples
++	-${MKDIR} ${DESTDIR}/${datadir}/gprbuild/examples/
++	${CP} -r examples/* ${DESTDIR}/${datadir}/gprbuild/examples
++	${RM} -r ${DESTDIR}/${datadir}/doc/gprbuild
++	-${MKDIR} ${DESTDIR}/${datadir}/doc/gprbuild
+ 	for format in html txt pdf info; do \
+ 	  if [ -d doc/$$format ] ; then \
+-	     ${MKDIR} ${datadir}/doc/gprbuild/$$format; \
+-	     ${CP} doc/$$format/* ${datadir}/doc/gprbuild/$$format; \
++	     ${MKDIR} ${DESTDIR}/${datadir}/doc/gprbuild/$$format; \
++	     ${CP} doc/$$format/* ${DESTDIR}/${datadir}/doc/gprbuild/$$format; \
+ 	     if [ $$format = html ] ; then \
+-	        ${CP} doc/*.png ${datadir}/doc/gprbuild/html; \
++	        ${CP} doc/*.png ${DESTDIR}/${datadir}/doc/gprbuild/html; \
+ 	        sed -e "s/<doc_path>.*//" doc/gprbuild_gps.xml \
+-	           > ${datadir}/doc/gprbuild/html/gps_index.xml; \
++	           > ${DESTDIR}/${datadir}/doc/gprbuild/html/gps_index.xml; \
+ 	     fi; \
+ 	  fi; \
+ 	done
+ 
+ install.data: force
+-	-${MKDIR} ${datadir}/gprconfig
+-	${CP} share/gprconfig/*.xml ${datadir}/gprconfig
++	-${MKDIR} ${DESTDIR}/${datadir}/gprconfig
++
++	${CP} share/gprconfig/*.xml ${DESTDIR}/${datadir}/gprconfig
+ 
+ install.bin: force
+-	-${MKDIR} ${bindir}
+-	${INSTALL_PROGRAM} gprconfig${EXEXT} ${bindir}
+-	${INSTALL_PROGRAM} gprbuild${EXEXT} ${bindir}
+-	${INSTALL_PROGRAM} gprclean${EXEXT} ${bindir}
+-	-${MKDIR} ${libexecdir}/gprbuild
+-	${INSTALL_PROGRAM} gprbind${EXEXT} ${libexecdir}/gprbuild/
+-	${INSTALL_PROGRAM} gprlib${EXEXT} ${libexecdir}/gprbuild/
++	-${MKDIR} ${DESTDIR}/${bindir}
++	${INSTALL_PROGRAM} gprconfig${EXEXT} ${DESTDIR}/${bindir}
++	${INSTALL_PROGRAM} gprbuild${EXEXT} ${DESTDIR}/${bindir}
++	${INSTALL_PROGRAM} gprclean${EXEXT} ${DESTDIR}/${bindir}
++	-${MKDIR} ${DESTDIR}/${libexecdir}/gprbuild
++	${INSTALL_PROGRAM} gprbind${EXEXT} ${DESTDIR}/${libexecdir}/gprbuild/
++	${INSTALL_PROGRAM} gprlib${EXEXT} ${DESTDIR}/${libexecdir}/gprbuild/
+ 
+ $(objdir)/gprbuild_dummies.o: src/gprbuild_dummies.c
+ 	gcc -c -o $@ $<
+@@ -143,8 +144,8 @@
+ 	make -C doc
+ 
+ install-doc:
+-	-$(MKDIR) ${docdir}/html
+-	${CP} doc/*.html ${docdir}/html
++	-$(MKDIR) ${DESTDIR}/${docdir}/html
++	${CP} doc/*.html ${DESTDIR}/${docdir}/html
+ 
+ tests: force
+ 	cd internal/gprtests_python; ./run-gprconfig-test.py
diff --git a/gprbuild-gcc.patch b/gprbuild-gcc.patch
new file mode 100644
index 0000000..6526ad3
--- /dev/null
+++ b/gprbuild-gcc.patch
@@ -0,0 +1,19 @@
+--- a/gnat/osint.ads	2010-06-08 19:33:24.000000000 +0400
++++ b/gnat/osint.ads	2011-02-05 00:48:30.236428001 +0300
+@@ -94,11 +94,11 @@
+    --  this call converts the given string to canonical all lower case form,
+    --  so that two file names compare equal if they refer to the same file.
+ 
+-   function Get_Env_Vars_Case_Sensitive return Int;
+-   pragma Import (C, Get_Env_Vars_Case_Sensitive,
+-                  "__gnat_get_env_vars_case_sensitive");
+-   Env_Vars_Case_Sensitive : constant Boolean :=
+-                                 Get_Env_Vars_Case_Sensitive /= 0;
++   -- function Get_Env_Vars_Case_Sensitive return Int;
++   --pragma Import (C, Get_Env_Vars_Case_Sensitive,
++   --               "__gnat_get_env_vars_case_sensitive");
++   Env_Vars_Case_Sensitive : constant Boolean := True ;
++   --                              Get_Env_Vars_Case_Sensitive /= 0;
+    --  Set to indicate whether the operating system convention is for
+    --  environment variable names to be case sensitive (e.g., in Unix, set
+    --  True), or non case sensitive (e.g., in Windows, set False).
diff --git a/gprbuild-gcc46.patch b/gprbuild-gcc46.patch
new file mode 100644
index 0000000..824bd48
--- /dev/null
+++ b/gprbuild-gcc46.patch
@@ -0,0 +1,10 @@
+--- a/gnat/types.ads	2011-02-20 18:36:04.908263103 +0300
++++ b/gnat/types.ads	2011-02-20 18:36:31.516261668 +0300
+@@ -200,7 +200,6 @@
+    --  Source_Buffer_Ptr, see Osint.Read_Source_File for details.
+ 
+    type Source_Buffer_Ptr is access all Big_Source_Buffer;
+-   for Source_Buffer_Ptr'Storage_Size use 0;
+    --  Pointer to source buffer. We use virtual origin addressing for source
+    --  buffers, with thin pointers. The pointer points to a virtual instance
+    --  of type Big_Source_Buffer, where the actual type is in fact of type
diff --git a/gprbuild-gccversion.patch b/gprbuild-gccversion.patch
new file mode 100644
index 0000000..f774367
--- /dev/null
+++ b/gprbuild-gccversion.patch
@@ -0,0 +1,56 @@
+--- a/share/gprconfig/compilers.xml	2011-02-06 23:46:33.545428021 +0300
++++ b/share/gprconfig/compilers.xml	2011-02-07 00:10:05.287428001 +0300
+@@ -12,7 +12,7 @@
+     <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|-elinos-linux).*)?gcc</executable>
+     <version>
+       <external>${PREFIX}gcc -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+     </version>
+     <languages>C</languages>
+     <target>
+@@ -123,7 +123,7 @@
+     <executable>gcc</executable>
+     <version>
+       <external>gcc -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+       <must_match>2\.8\.</must_match>
+     </version>
+     <languages>C</languages>
+@@ -151,7 +151,7 @@
+     <executable>g++</executable>
+     <version>
+       <external>g++ -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+     </version>
+     <languages>C++</languages>
+     <target>
+@@ -256,7 +256,7 @@
+     <executable prefix="1">(.*(-wrs-|-elf-|-eabispe-|avr-|elinos-linux).*)?gcc</executable>
+     <version>
+       <external>${PREFIX}gcc -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+     </version>
+     <languages>Asm,Asm_Cpp,Asm2</languages>
+     <target>
+@@ -284,7 +284,7 @@
+     </version>
+     <variable name="gcc_version">
+       <external>${PREFIX}gcc -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+     </variable>
+     <languages>Ada</languages>
+     <runtimes default="default,kernel">
+@@ -318,7 +318,7 @@
+     <executable>gfortran</executable>
+     <version>
+       <external>gfortran -v</external>
+-      <grep regexp="^gcc version (\S+)" group="1"></grep>
++      <grep regexp="^gcc \S+ ([.0-9]+)" group="1"></grep>
+     </version>
+     <languages>Fortran</languages>
+     <target>
diff --git a/gprbuild-gnatflags.patch b/gprbuild-gnatflags.patch
new file mode 100644
index 0000000..aafb461
--- /dev/null
+++ b/gprbuild-gnatflags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in	2011-02-20 18:02:55.526260599 +0300
++++ b/Makefile.in	2011-02-20 18:03:14.019266345 +0300
+@@ -44,7 +44,7 @@
+ 
+ dummy:=$(shell $(MKDIR) $(objdir))
+ 
+-GNATMAKE=gnatmake -p -m
++GNATMAKE=gnatmake -p -m ${GNATFLAGS}
+ ifeq ($(strip $(filter-out %vms%,$(HOST))),)
+ GNATMAKE=${GNATMAKE} -XOS=vms
+ endif
diff --git a/gprbuild-shared.patch b/gprbuild-shared.patch
new file mode 100644
index 0000000..ba275b3
--- /dev/null
+++ b/gprbuild-shared.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in	2010-03-16 19:31:16.000000000 +0300
++++ b/Makefile.in	2011-02-04 22:53:58.717428000 +0300
+@@ -28,7 +28,7 @@
+ docdir=${datadir}/doc/@PACKAGE_TARNAME@
+ 
+ # How do we want to use XML/Ada ?
+-LIBRARY_TYPE=static
++LIBRARY_TYPE=relocatable
+ export LIBRARY_TYPE
+ 
+ objdir=obj
diff --git a/gprbuild.spec b/gprbuild.spec
new file mode 100644
index 0000000..4d76a19
--- /dev/null
+++ b/gprbuild.spec
@@ -0,0 +1,104 @@
+Name:       gprbuild
+Version:    2010
+Release:    7%{?dist}
+Summary:    Ada project builder
+Group:      Development/Languages
+License:    GPLv2+
+URL:        http://libre.adacore.com
+## Auth required
+## Direct download is not available
+Source0:    %{name}-gpl-%{version}-src.tgz
+## Patch for shared libs
+Patch0:     %{name}-shared.patch
+## Patch for gcc-4.5.2
+## __gnat_get_env_vars_case_sensitive check isn't needed for package
+Patch1:     %{name}-gcc.patch
+## RPM specific oatch (add DESTDIR to Makefile)
+Patch2:     %{name}-destdir.patch
+## Fix issue for localisation version of GCC - APPROVED by AdaCore
+Patch3:     %{name}-gccversion.patch
+## Fedora specific 
+Patch4:     %{name}-gnatflags.patch
+## AI-0157  implementaion doesn't realised in gcc-4.6
+Patch5:        %{name}-gcc46.patch
+BuildRequires:  xmlada-devel
+BuildRequires:  gcc-gnat libgnat-static libgnat-devel
+BuildRequires:  fedora-gnat-project-common >= 2
+
+Requires: xmlada
+
+%description
+GPRbuild is an advanced software tool designed to help automate
+the construction of multi-language systems.
+It removes complexity from multi-language development by allowing
+developers to quickly and easily compile and link software written
+in a combination of languages including Ada, Assembler, C, C++, and Fortran.
+Easily extendable by users to cover new toolchains and languages
+it is primarily aimed at projects of all sizes organized into subsystems
+and libraries and is particularly well-suited for compiled languages.
+
+%package devel
+Summary:    Devel package for gprbuild
+License:    GPLv2
+Group:      Development/Languages
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Devel package (examples) for gprbuild
+
+%prep
+%setup -q -n %{name}-%{version}-src
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+%build
+%configure --disable-rpath
+make %{?_smp_mflags}  GNATFLAGS="%{GNAT_optflags}" ADA_PROJECT_PATH=%_GNAT_project_dir
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}%{_docdir}/%{name}
+install -m0644 README %{buildroot}%{_docdir}/%{name}/
+install -m0644 COPYING %{buildroot}%{_docdir}/%{name}/
+install -m0644 CHANGE_160803 %{buildroot}%{_docdir}/%{name}/
+find %{buildroot}%{_datadir}/%{name}/examples -type f -exec chmod -x {} \;
+mv -f %{buildroot}%{_docdir}/%{name} %{buildroot}%{_docdir}/%{name}-%{version}
+
+%files
+%defattr(-,root,root,-)
+%doc %{_docdir}/%{name}-%{version}
+%{_bindir}/gpr*
+%dir %{_libexecdir}/%{name}
+%{_libexecdir}/%{name}/gpr*
+%dir %{_datadir}/gprconfig
+%{_datadir}/gprconfig/*
+
+%files devel
+%defattr(-,root,root,-)
+%{_datadir}/%{name}/examples/*
+
+%changelog
+* Fri Mar 11 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-7
+- Fix %%doc section
+- Hack for builded docs
+
+* Sun Mar 5 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-5
+- Rebuild for new xmlada
+
+* Sun Feb 20 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-4
+- Fix gnat optflags
+- Fix project dirname
+
+* Mon Feb 7 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-3
+- Fix issue with GCC output (change regexp)
+
+* Sun Feb 6 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-2
+- Add devel package
+
+* Fri Feb 4 2011 Pavel Zhukov <landgraf at fedoraproject.com> - 2010-1
+- Initial package
diff --git a/sources b/sources
index e69de29..c9c9856 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ca3dd79405d08d04744b1356cf3c71cc  gprbuild-gpl-2010-src.tgz


More information about the scm-commits mailing list