]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/package/AdaCurses.spec
ncurses 6.3 - patch 20221112
[ncurses.git] / Ada95 / package / AdaCurses.spec
index 9b39110eb842dea294fc77950a175a55bdaf7b3a..9c34cad4742b13c285b012f379a1d9e73adb4ba2 100644 (file)
@@ -2,7 +2,7 @@ Summary: Ada95 binding for ncurses
 %define AppProgram AdaCurses
 %define AppVersion MAJOR.MINOR
 %define AppRelease YYYYMMDD
-# $Id: AdaCurses.spec,v 1.25 2019/11/23 21:15:31 tom Exp $
+# $Id: AdaCurses.spec,v 1.29 2022/11/13 00:35:00 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: %{AppRelease}
@@ -20,6 +20,10 @@ In addition to a library, this package installs sample programs in
 "bin/%{AppProgram}" to avoid conflict with other packages.
 %prep
 
+%global is_mandriva %(test -f /etc/mandriva-release && echo 1 || echo 0)
+%global is_redhat   %(test -f /etc/redhat-release && echo 1 || echo 0)
+%global is_suse     %(if grep -E -i '(opensuse)' /etc/issue >/dev/null; then echo 1; else echo 0; fi)
+
 %define debug_package %{nil}
 
 %define need_filter %(if grep -E -i '(mageia|red hat|fedora)' /etc/issue >/dev/null; then echo 1; elif test -f /etc/fedora-release; then echo 1; else echo 0; fi)
@@ -37,6 +41,17 @@ In addition to a library, this package installs sample programs in
 %define ada_libdir %{_prefix}/lib/ada/adalib
 %define ada_include %{_prefix}/share/ada/adainclude
 
+%if %{is_mandriva}
+# Mageia 8 lacks gprbuild, needed for building shared libraries.
+%else
+%if %{is_redhat}
+# Fedora 36 LTO does not work with gprbuild system configuration.
+unset CFLAGS
+unset LDFLAGS
+unset LT_SYS_LIBRARY_PATH
+%endif
+%endif
+
 INSTALL_PROGRAM='${INSTALL}' \
        ./configure \
                --target %{_target_platform} \
@@ -48,6 +63,9 @@ INSTALL_PROGRAM='${INSTALL}' \
                --mandir=%{_mandir} \
                --datadir=%{_datadir} \
                --disable-rpath-link \
+               --disable-echo \
+               --verbose \
+               --enable-warnings \
                --with-shared \
                --with-ada-sharedlib
 
@@ -80,6 +98,9 @@ exit 0
 %if %{need_filter} == 1
 %{_libdir}/lib%{AppProgram}.*
 %endif
+%if %{is_suse}
+%{_libdir}/lib%{AppProgram}.*
+%endif
 %{_mandir}/man1/adacurses*-config.1*
 %{_datadir}/%{AppProgram}/*
 %{ada_include}/
@@ -87,6 +108,10 @@ exit 0
 %changelog
 # each patch should add its ChangeLog entries here
 
+* Sat Nov 12 2022 Thomas Dickey
+- unset environment variables to work around Fedora LTO bugs.
+- build-fix for OpenSUSE with gprbuild.
+
 * Sat Nov 16 2019 Thomas Dickey
 - modify clean-rule to work around Fedora NFS bugs.