[florist] Initial import (#675557)

Pavel Zhukov landgraf at fedoraproject.org
Wed Aug 10 12:10:19 UTC 2011


commit 5bca5906ec36debf9b1120aa28e171fac7b24544
Author: Pavel Zhukov <pavel at zhukoff.net>
Date:   Wed Aug 10 16:09:59 2011 +0400

    Initial import (#675557)

 .gitignore           |    1 +
 florist-fedora.patch |   14 +++
 florist-shared.patch |  296 ++++++++++++++++++++++++++++++++++++++++++++++++++
 florist.spec         |  102 +++++++++++++++++
 sources              |    1 +
 5 files changed, 414 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8f829b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/florist-gpl-2011-src.tgz
diff --git a/florist-fedora.patch b/florist-fedora.patch
new file mode 100644
index 0000000..be90293
--- /dev/null
+++ b/florist-fedora.patch
@@ -0,0 +1,14 @@
+--- a/florist.gpr	2011-08-02 17:07:01.315173003 +0400
++++ b/florist.gpr	2011-08-02 17:10:01.552173002 +0400
+@@ -1,7 +1,9 @@
++with "directories";
+ project Florist is
+ 
+-   for Source_Dirs use ("../../floristlib");
+-   for Object_Dir use "../../floristlib";
++   for Source_Dirs use (Directories.Includedir & "/florist/");
++   for Library_Dir use Directories.Libdir & "/florist/";
++   for Object_Dir use Directories.Libdir & "/florist/";
+ 
+    for Externally_Built use "True";
+ 
diff --git a/florist-shared.patch b/florist-shared.patch
new file mode 100644
index 0000000..f5b1f99
--- /dev/null
+++ b/florist-shared.patch
@@ -0,0 +1,296 @@
+--- a/Makefile.in	2011-04-19 13:56:19.000000000 +0400
++++ b/Makefile.in	2011-08-02 22:13:14.196747546 +0400
+@@ -5,10 +5,22 @@
+ #
+ .POSIX:
+ VERSION=Florist-2011 (20110419)
++LIBRARY_TYPE=relocatable
+ FLORIST_VERSION=$(VERSION)
+ GNATPREPFLAGS = -c -r
+-GCCFLAGS = -O2
+-GNATMAKE=gnatmake
++GNATOPTFLAGS ?= -O2
++GCCFLAGS ?= -O2
++VERSION=@PACKAGE_VERSION@
++GNATMAKE=gprbuild -p -f ${GNATFLAGS}
++BUILDS_SHARED=@GNAT_BUILDS_SHARED@
++ifeq (${BUILDS_SHARED},yes)
++all: floristlib_relocatable
++install: install_relocatable
++else
++all: floristlib
++install: install_static
++endif
++
+ 
+ # How to invoke ranlib.
+ RANLIB = ranlib
+@@ -61,7 +73,6 @@
+ # default target, get the gnat version and the system type and then
+ # set up files and call make again (in uname)
+ 
+-all: floristlib
+ 
+ #
+ # ------------------------------------
+@@ -146,7 +157,7 @@
+ # "deps5c.adb" is the same, but with POSIX.5c packages added.
+ #
+ deps deps_no_thread: $(GENERATED)
+-	$(GNATMAKE) -c -Pflorist_build $@
++	$(GNATMAKE)  -Pflorist_build ${GNATOPTFLAGS}
+ #
+ # -----------------------------------
+ # Create a florist library for objects
+@@ -156,9 +167,7 @@
+ 	@echo "Creating libflorist.a in directory floristlib"
+ 	@if [ -d floristlib ]; then rm -rf floristlib; fi
+ 	mkdir floristlib
+-	cp -p *.ads floristlib
+-	cp -p *.adb floristlib
+-	(tar cpf - *.o *.ali) | (cd floristlib; tar xpf -)
++	(cd obj/static ; tar cpf - *.o *.ali) | (cd floristlib; tar xpf -)
+ 	rm -f floristlib/$(DEPS).o floristlib/$(DEPS).ali
+ 	ar -r floristlib/libflorist.a floristlib/*.o
+ 	-$(RANLIB) floristlib/libflorist.a
+@@ -186,9 +195,27 @@
+ 	rm -f $(GENERATED) $(GNATPREP_SOURCES)
+ 
+ # install floristlib
+-install:
+-	mkdir -p $(PREFIX)/lib/gnat
+-	cp -pr floristlib $(PREFIX)/floristlib
+-	cp -p florist.gpr $(PREFIX)/lib/gnat
++install_static: install_src
++	mkdir -p $(DESTDIR)/${ADA_PROJECT_PATH}
++	mkdir -p $(DESTDIR)/${LIBDIR}/florist/
++	cp -pr floristlib/*  $(DESTDIR)/${LIBDIR}/florist/
++	cp -p florist.gpr $(DESTDIR)/${ADA_PROJECT_PATH}
+ 
+ .PHONY: install clean distclean regen
++
++floristlib_relocatable: $(MACRO_OBJECTS) $(DEPS) $(ADDRINFO_OBJECTS)
++
++install_relocatable: install_src
++	mkdir -p $(DESTDIR)/${ADA_PROJECT_PATH}
++	mkdir -p $(DESTDIR)/${LIBDIR}/florist/
++	cp -pr lib/relocatable/* $(DESTDIR)/${LIBDIR}/florist/
++	cp -p florist.gpr $(DESTDIR)/${ADA_PROJECT_PATH}
++	cd $(DESTDIR)/${LIBDIR} && ln -s florist/libflorist.so $(DESTDIR)/${LIBDIR}/libflorist.so
++	cd $(DESTDIR)/${LIBDIR} && ln -s florist/libflorist.so.2011 $(DESTDIR)/${LIBDIR}/libflorist.so.2011
++
++install_src:
++	mkdir -p ${DESTDIR}/usr/include/florist/
++	for file in *.ad[bs] ; do\
++	    cp -p  $$file ${DESTDIR}/usr/include/florist/; \
++	done;
++
+--- a/aclocal.m4	2004-08-11 16:42:23.000000000 +0400
++++ b/aclocal.m4	2011-08-02 21:37:10.041746821 +0400
+@@ -320,3 +320,71 @@
+   AC_MSG_RESULT(no)
+ fi
+ ])
++
++AC_DEFUN(AM_GNAT_BUILDS_SHARED,
++[
++   AC_MSG_CHECKING(whether gnat can build shared libs)
++
++   DEFAULT_LIBRARY_TYPE=static
++
++   AC_ARG_ENABLE(shared,
++     [AC_HELP_STRING(
++        [--disable-shared],
++        [Disable building of shared libraries])
++AC_HELP_STRING(
++        [--enable-shared],
++        [Build shared libraries if supported on the target
++Make them the installation default])],
++     [GNAT_BUILDS_SHARED=$enableval
++      if test $enableval = yes; then
++         DEFAULT_LIBRARY_TYPE=relocatable
++      fi],
++     [GNAT_BUILDS_SHARED=yes])
++
++   if test "$program_prefix" != NONE; then
++      gnatmake=${program_prefix}gnatmake
++   else
++      gnatmake=gnatmake
++   fi
++
++   AC_SUBST(gnatmake)
++
++   if test x$GNAT_BUILDS_SHARED = xyes; then
++      # Create a temporary directory (from "info autoconf")
++      : ${TMPDIR=/tmp}
++      {
++        tmp=`(umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null` \
++           && test -n "$tmp" && test -d "$tmp"
++      } || {
++        tmp=$TMPDIR/foo$$-$RANDOM
++        (umask 077 && mkdir -p "$tmp")
++      } || exit $?
++
++      mkdir $tmp/lib
++      echo "package Foo is end Foo;" > $tmp/foo.ads
++      cat > $tmp/lib.gpr <<EOF
++project Lib is
++   for Source_Dirs use (".");
++   for Library_Dir use "lib";
++   for Library_Name use "lib";
++   for Library_Kind use "relocatable";
++end Lib;
++EOF
++
++      $gnatmake -c -q -P$tmp/lib 2>/dev/null
++      if test $? = 0 ; then
++         GNAT_BUILDS_SHARED=yes
++      else
++         GNAT_BUILDS_SHARED=no
++         DEFAULT_LIBRARY_TYPE=static
++      fi
++      rm -rf $tmp
++      AC_MSG_RESULT($GNAT_BUILDS_SHARED)
++   else
++      AC_MSG_RESULT([no (--disabled-shared)])
++   fi
++
++   AC_SUBST(GNAT_BUILDS_SHARED)
++   AC_SUBST(DEFAULT_LIBRARY_TYPE)
++])
++
+--- a/configure.in	2009-02-17 22:15:53.000000000 +0300
++++ b/configure.in	2011-08-02 21:37:07.345746821 +0400
+@@ -214,7 +214,7 @@
+ 
+ echo using "LIBS=${LIBS}"
+ AC_SUBST(LIBS)
+-
++AM_GNAT_BUILDS_SHARED
+ AC_POSIX_VAR(t_errno)
+ AC_POSIX_VAR(t_nerr)
+ AC_POSIX_COMP(msghdr, msg_control)
+@@ -588,4 +588,4 @@
+  __posix_ttyname_r\
+ )
+ 
+-AC_OUTPUT(Makefile, [test -z "$CONFIG_HEADERS" || date > stamp-h])
++AC_OUTPUT(florist_build.gpr Makefile, [test -z "$CONFIG_HEADERS" || date > stamp-h])
+--- a/florist_build.gpr.in	2011-08-02 21:43:46.007746954 +0400
++++ b/florist_build.gpr.in	2011-08-02 21:45:24.816746986 +0400
+@@ -0,0 +1,28 @@
++project Florist_Build is
++
++    for Languages    use ("Ada", "C");
++    for Source_List_File use "florist_build.lgpr";
++    type Build_Type is ("Debug", "Production");
++    Build : Build_Type := External ("Build", "Production");
++    for Library_Name use "florist";
++    for Library_Kind use "@DEFAULT_LIBRARY_TYPE@";
++    for Library_Version use "lib" & Project'Library_Name & ".so." & "2011";
++    for Object_Dir  use "obj/" & Project'Library_Kind;
++    for Library_Dir use "lib/" & Project'Library_Kind;
++   package Compiler is
++      GNAT_Flags := ("-O2", "-gnatpg");
++
++      for Switches ("posix-signals.adb") use GNAT_Flags;
++      for Switches ("posix-implementation.adb") use GNAT_Flags;
++      for Switches ("posix-supplement_to_ada_io.adb") use GNAT_Flags;
++      for Switches ("posix-unsafe_process_primitives.adb") use GNAT_Flags;
++
++      case Build is
++         when "Debug" =>
++            for Default_Switches ("Ada") use ("-O2", "-gnatwae", "-gnatyg");
++         when "Production" =>
++            for Default_Switches ("Ada") use ("-O2", "-gnatp");
++      end case;
++   end Compiler;
++
++end Florist_Build;
+--- a/florist_build.lgpr	2011-08-02 15:28:51.421173000 +0400
++++ b/florist_build.lgpr	2011-08-02 15:29:14.485173009 +0400
+@@ -0,0 +1,44 @@
++posix-macros.c
++posix-macros-sockets.c
++ada_streams.ads
++ada_task_identification.ads
++posix.adb
++posix-asynchronous_io.adb
++posix-calendar.adb
++posix-condition_variables.adb
++posix-configurable_file_limits.adb
++posix-configurable_system_limits.adb
++posix-file_locking.adb
++posix-file_status.adb
++posix-files.adb
++posix-generic_shared_memory.adb
++posix-group_database.adb
++posix-io.adb
++posix-c.adb
++c-posix.c
++posix_limits.ads
++posix-memory_locking.adb
++posix-memory_mapping.adb
++posix-memory_range_locking.adb
++posix-message_queues.adb
++posix-mutexes.adb
++posix_options.ads
++posix-page_alignment.adb
++posix-permissions.adb
++posix-permissions-implementation.adb
++posix-process_environment.adb
++posix-process_identification.adb
++posix-process_primitives.adb
++posix-process_scheduling.adb
++posix-process_times.adb
++posix-semaphores.adb
++posix-shared_memory_objects.adb
++posix-signals.adb
++posix-supplement_to_ada_io.adb
++posix-terminal_functions.adb
++posix-timers.adb
++posix-unsafe_process_primitives.adb
++posix-user_database.adb
++posix-implementation.adb
++posix-implementation.ads
++posix-implementation-ok_signals.ads
++posix-process_identification.adb
+--- a/florist_build.gpr	2011-04-19 13:56:19.000000000 +0400
++++ b/florist_build.gpr	2011-08-02 22:22:30.798747732 +0400
+@@ -1,8 +1,14 @@
+ project Florist_Build is
+ 
+-   type Build_Type is ("Debug", "Production");
+-   Build : Build_Type := External ("Build", "Production");
+-
++    for Languages    use ("Ada", "C");
++    for Source_List_File use "florist_build.lgpr";
++    type Build_Type is ("Debug", "Production");
++    Build : Build_Type := External ("Build", "Production");
++    for Library_Name use "florist";
++    for Library_Kind use "relocatable";
++    for Library_Version use "lib" & Project'Library_Name & ".so." & "2011";
++    for Object_Dir  use "obj/" & Project'Library_Kind;
++    for Library_Dir use "lib/" & Project'Library_Kind;
+    package Compiler is
+       GNAT_Flags := ("-O2", "-gnatpg");
+ 
+--- a/Makefile.in	2011-08-05 14:57:32.366248000 +0400
++++ b/Makefile.in	2011-08-05 14:59:02.563248009 +0400
+@@ -5,6 +5,7 @@
+ #
+ .POSIX:
+ VERSION=Florist-2011 (20110419)
++LIBVERSION=2011
+ LIBRARY_TYPE=relocatable
+ FLORIST_VERSION=$(VERSION)
+ GNATPREPFLAGS = -c -r
+@@ -211,7 +212,7 @@
+ 	cp -pr lib/relocatable/* $(DESTDIR)/${LIBDIR}/florist/
+ 	cp -p florist.gpr $(DESTDIR)/${ADA_PROJECT_PATH}
+ 	cd $(DESTDIR)/${LIBDIR} && ln -s florist/libflorist.so $(DESTDIR)/${LIBDIR}/libflorist.so
+-	cd $(DESTDIR)/${LIBDIR} && ln -s florist/libflorist.so.2011 $(DESTDIR)/${LIBDIR}/libflorist.so.2011
++	cd $(DESTDIR)/${LIBDIR} && ln -s florist/libflorist.so.${LIBVERSION} $(DESTDIR)/${LIBDIR}/libflorist.so.${LIBVERSION}
+ 
+ install_src:
+ 	mkdir -p ${DESTDIR}/usr/include/florist/
diff --git a/florist.spec b/florist.spec
new file mode 100644
index 0000000..389631a
--- /dev/null
+++ b/florist.spec
@@ -0,0 +1,102 @@
+## rpmbuild cannot create debuginfo
+## for ada packages 
+%define debug_package %{nil}
+%global build_shared 1
+Name:       florist    
+Version:    2011
+Release:    6%{?dist}
+Summary:    Open-source implementation of IEEE Standard 1003.5b-1996
+Group:      Development/Libraries
+License:    GPLv2+
+## Direct download not available
+URL:        http://libre.adacore.com/libre/download2
+Source0:    %{name}-gpl-%{version}-src.tgz
+## Email ID : 20110802184724.GA8621 at work.zhukoff.net
+Patch0:     %{name}-shared.patch
+## Fedora specific 
+Patch3:     %{name}-fedora.patch
+BuildRequires:    fedora-gnat-project-common >= 2
+BuildRequires:  chrpath gprbuild autoconf
+
+# gcc-gnat only available on these:
+ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 alpha
+
+
+%description
+FLORIST is an implementation of the IEEE Standards 1003.5: 1992, 
+IEEE STD 1003.5b: 1996, and parts of IEEE STD 1003.5c: 1998, 
+also known as the POSIX Ada Bindings. Using this library, 
+you can call operating system services from within Ada programs.
+
+%package devel
+Summary:    Devel package for florist
+Group:      Development/Libraries
+License:    GPLv2+
+Requires:   fedora-gnat-project-common >= 2
+Requires:   %{name}%{?_isa} = %{version}-%{release}
+
+%description devel 
+%{summary}
+
+%prep
+%setup -q -n %{name}-gpl-%{version}-src
+%patch0 -p1 
+%patch3 -p1
+
+%build
+autoconf
+%if %{build_shared}
+%configure --enable-shared
+%else
+%configure --disable-shared
+%endif
+export GNATOPTFLAGS="%GNAT_builder_flags"
+make %{?_smp_mflags}
+
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot} ADA_PROJECT_PATH="%_GNAT_project_dir" LIBDIR=%{_libdir}
+%if %{build_shared}
+chrpath --delete %{buildroot}/%{_libdir}/%{name}/libflorist.so.%{version}
+chrpath --delete %{buildroot}/%{_libdir}/%{name}/libflorist.so
+%endif
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc README INSTALL
+%dir %{_libdir}/%{name}
+%if %{build_shared}
+%{_libdir}/%{name}/libflorist.so.2011
+%{_libdir}/libflorist.so.2011
+%else
+%{_libdir}/%{name}/libflorist.a
+%endif
+
+%files devel
+%defattr(-,root,root,-)
+%doc CHANGE_172259
+%{_libdir}/%{name}/*.ali
+%{_includedir}/%{name}
+%{_GNAT_project_dir}/%{name}.gpr
+%if %{build_shared}
+%{_libdir}/%{name}/libflorist.so
+%{_libdir}/libflorist.so
+%endif
+
+%changelog
+* Wed Aug 10 2011  Pavel Zhukov <landgraf at fedoraproject.org> - 2011-6
+- Add ExclusiveArch
+
+* Wed Aug 03 2011  Pavel Zhukov <landgraf at fedoraproject.org> - 2011-5
+- Add posix-implemetation_signals
+- Add posix-permissions_implementation
+
+* Tue Aug 02 2011  Pavel Zhukov <landgraf at fedoraproject.org> - 2011-4
+- Initial build
+- Add C sources to *.so
+- patch autoconf
diff --git a/sources b/sources
index e69de29..54d358a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+64037ea1ad01b311f449f2d253e06bc8  florist-gpl-2011-src.tgz


More information about the scm-commits mailing list