Name: GtkAda3 Version: 3.4.2 Release: 1%{?dist} Summary: GTKada 3, an Ada binding to GTK+ 3 Summary(sv): GTKada 3, en adabindning till GTK+ 3 # The GTK.Extra widgets don't compile so they are disabled. # Pass "--with gtkextra" to RPMbuild to try to build them. %bcond_with gtkextra # The OpenGL bindings don't compile, so the -gl subpackage is disabled. # Pass "--with opengl" to RPMbuild to try to build it. %bcond_with opengl Group: System Environment/Libraries License: GPLv3+ URL: http://libre.adacore.com/tools/gtkada/ Source: http://mirrors.cdn.adacore.com/art/89e7208140a2a696ad468ade281f46f6c44b8553#/gtkada-gpl-3.4.2-src.tgz # The long hexadecimal number is what identifies the file on the server. # Don't forget to update it! # The latest known address of the download page is: # http://libre.adacore.com/download/configurations # Patch to make project files use fedora-gnat-project-common: Patch1: GtkAda-3.4.2-multilib_gpr.patch # Fedora-specific patch to make gtkada-config use uname: Patch2: GtkAda-3.4.2-multilib_gtkada-config.patch # Hack to make the stupid makefile link to needed libraries: Patch3: GtkAda-3.4.2-libs.patch # GNU-specific patch to avoid link bloat: Patch4: GtkAda-3.4.2-link_as_needed.patch # Fix abuse of g_snprintf, fixed upstream 2013-12-09: # http://lists.adacore.com/pipermail/gtkada/2013-December/004390.html Patch5: GtkAda-2.24.2-stringcopy.patch BuildRequires: gcc-gnat fedora-gnat-project-common # binding.py is written in Python 2. BuildRequires: python2 BuildRequires: gtk3-devel %if %{with opengl} BuildRequires: libGL-devel libGLU-devel %endif BuildRequires: recode # Build only on architectures where gcc-gnat is available: ExclusiveArch: %{GNAT_arches} %global common_description_en \ GTKada is an Ada binding to the graphical toolkit GTK+. It allows you to \ develop graphical user interfaces in Ada using GTK+. %global common_description_sv \ GTKada är en adabindning till den grafiska verktygslådan GTK+. Med GTKada \ kan du utveckla grafiska användargränssnitt i ada baserade på GTK+. %description %{common_description_en} %description -l sv %{common_description_sv} %package devel Summary: Development files for GTKada 3 Summary(sv): Filer för programmering med GTKada 3 Group: Development/Libraries Requires: fedora-gnat-project-common Requires: %{name}%{?_isa} = %{version}-%{release} %if %{with opengl} Requires: %{name}-gl%{?_isa} = %{version}-%{release} %endif Conflicts: GtkAda-devel < 3 # Unlike GTK+, GTKada has no support for installing two versions side by side, # other than dumping the entire directory tree under some nonstandard prefix # and requiring users to mess with various environment variables. Despite the # API incompatibilities, both versions use the filenames "gtkada.gpr" and # "gtkada-config", and directories named "gtkada". # # Hacking the build system to change various filenames from "gtkada" to # "gtkada3" would be more trouble than it's worth, and would make Fedora # incompatible with everything that uses GTKada. Both developers and packagers # would have to do special things to select the right version of the library. # # Therefore GtkAda-devel and GtkAda3-devel are allowed to conflict. %description devel %{common_description_en} The %{name}-devel package contains source code and linking information for developing applications that use GTKada 3.x. The documentation is in %{name}-doc. %description devel -l sv %{common_description_sv} Paketet %{name}-devel innehåller källkod och länkningsinformation som behövs för att utveckla program som använder GTKada 3.x. Dokumentationen finns i %{name}-doc. %package gl Summary: GTKada 3 binding to OpenGL Summary(sv): GTKada 3:s bindning till OpenGL Group: System Environment/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description gl %{common_description_en} The %{name}-gl package contains the GTKada binding to the OpenGL interface. %description gl -l sv %{common_description_sv} Paketet %{name}-gl innehåller GTKadas bindning till OpenGL-gränssnittet. %package doc Summary: Documentation for GTKada 3 Summary(sv): Dokumentation till GTKada 3 Group: Documentation BuildArch: noarch %description doc %{common_description_en} The %{name}-doc package contains the documentation for GTKada 3.x. %description doc -l sv %{common_description_sv} Paketet %{name}-doc innehåller dokumentationen till GTKada 3.x. %prep %setup -q -n gtkada-%{version}-gpl-src %patch1 %patch2 %patch3 %patch4 %patch5 # Transcode the author's name in comments in two source files. recode ISO-8859-1..UTF-8 testgtk/opengl/lw.[hc] %build %{configure} --disable-static %{?with_gtkextra:--enable-gtkextra} %{!?with_opengl:--with-GL=no} # Regenerate the generated Ada packages. Use the included GIR files, because # binding.py chokes on unrecognized names if fed newer GIR files (KeyError from # girname_to_ctype). make generate make GNATMAKE="gnatmake %{Gnatmake_optflags}" %{?with_opengl:GL_SUPPORT=yes} # The documentation is not regenerated because that requires GPS and would # cause a dependency loop. %install %{make_install} libdir=%{_libdir} alidir=%{_libdir}/gtkada PRJDIR=%{_GNAT_project_dir} docdir=%{_pkgdocdir} docdir_base=%{_pkgdocdir} examples=%{_pkgdocdir}/examples/testgtk # Move the binary libraries into place. mv %{buildroot}%{_libdir}/gtkada/relocatable/libgtkada*.so* %{buildroot}%{_libdir} # The PKG-config file is apparently unmaintained, so exclude it. rm %{buildroot}%{_libdir}/pkgconfig/gtkada.pc # Adjust the documentation directory in the GPS plug-in, and change its # filename to avoid a conflict between GtkAda3-doc and GtkAda-doc. sed --in-place --expression=s:share/doc/gtkada:share/doc/GtkAda3:g %{buildroot}%{_datadir}/gps/plug-ins/gtkada.xml mv %{buildroot}%{_datadir}/gps/plug-ins/gtkada.xml %{buildroot}%{_datadir}/gps/plug-ins/gtkada3.xml # Also install the gtkada-config manpage. mkdir --parents %{buildroot}%{_mandir}/man1 install --mode=u=rw,go=r,a-s --preserve-timestamps docs/gtkada-config.1 %{buildroot}%{_mandir}/man1 # Exclude binaries from the documentation. rm %{buildroot}%{_pkgdocdir}/examples/testgtk/test{gtk,cairo} # Include these documentation files. install --mode=u=rw,go=r,a-s --preserve-timestamps AUTHORS COPYING3 README features known-problems %{buildroot}%{_pkgdocdir} %check %{_rpmconfigdir}/check-rpaths %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post gl -p /sbin/ldconfig %postun gl -p /sbin/ldconfig %files %{_libdir}/libgtkada-*.so.* %dir %{_pkgdocdir} %{_pkgdocdir}/AUTHORS %{_pkgdocdir}/COPYING3 %{_pkgdocdir}/README %if %{with opengl} %files gl %{_libdir}/libgtkada_gl-*.so.* %endif %files devel %{_bindir}/* %{_includedir}/gtkada %{_libdir}/gtkada %{_GNAT_project_dir}/* %{_libdir}/lib*.so %{_mandir}/man*/* %files doc # features and known-problems belong with the documentation for developers. # The license, the list of authors and the directory need to be replicated in # the doc subpackage as it doesn't depend on the main package. %dir %{_pkgdocdir} %{_pkgdocdir}/AUTHORS %{_pkgdocdir}/COPYING3 %{_pkgdocdir}/features %{_pkgdocdir}/known-problems %{_pkgdocdir}/gtkada_ug %{_pkgdocdir}/gtkada_rm %{_pkgdocdir}/examples %{_datadir}/gps %changelog * Tue Jan 28 2014 Björn Persson - 3.4.2-1 - New package for GTKada 3.x, partly based on the existing package GtkAda.