%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}
"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)
%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} \
--mandir=%{_mandir} \
--datadir=%{_datadir} \
--disable-rpath-link \
+ --disable-echo \
+ --verbose \
+ --enable-warnings \
--with-shared \
--with-ada-sharedlib
%if %{need_filter} == 1
%{_libdir}/lib%{AppProgram}.*
%endif
+%if %{is_suse}
+%{_libdir}/lib%{AppProgram}.*
+%endif
%{_mandir}/man1/adacurses*-config.1*
%{_datadir}/%{AppProgram}/*
%{ada_include}/
%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.