385b8f3
%global		module		OS
385b8f3
385b8f3
%global		with_asl	1
385b8f3
%global		with_mpi	0
385b8f3
385b8f3
Name:		coin-or-%{module}
385b8f3
Summary:	Optimization Services
139962c
Version:	2.10.2
b487a61
Release:	2%{?dist}
139962c
License:	EPL-1.0
385b8f3
URL:		http://projects.coin-or.org/%{module}
385b8f3
Source0:	http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
4520888
BuildRequires:	bison
385b8f3
BuildRequires:	coin-or-Bcp-devel
b487a61
BuildRequires:	coin-or-Bcp-doc
385b8f3
BuildRequires:	coin-or-Couenne-devel
b487a61
BuildRequires:	coin-or-Couenne-doc
b487a61
BuildRequires:	coin-or-Csdp-devel
385b8f3
BuildRequires:	coin-or-SYMPHONY-devel
b487a61
BuildRequires:	cppad-devel
385b8f3
BuildRequires:	doxygen
4520888
BuildRequires:	flex
b487a61
BuildRequires:	gcc-c++
385b8f3
%if %{with_asl}
385b8f3
BuildRequires:	mp-devel
385b8f3
%endif
385b8f3
%if %{with_mpi}
385b8f3
BuildRequires:	openmpi-devel
385b8f3
BuildRequires:	scalapack-openmpi-devel
385b8f3
BuildRequires:	openssh-clients
385b8f3
%endif
385b8f3
385b8f3
# Install documentation in standard rpm directory
385b8f3
Patch0:		%{name}-docdir.patch
385b8f3
385b8f3
# Bad #define generated if svnversion is available
385b8f3
Patch1:		%{name}-svnversion.patch
385b8f3
385b8f3
# Correct build when regenerating parsers
385b8f3
Patch2:		%{name}-flex-bison.patch
385b8f3
b487a61
# Prevent double inclusion of an unguarded csdp header file
b487a61
Patch3:		%{name}-csdp.patch
b487a61
b487a61
# Fix bad code in the parser
b487a61
Patch4:		%{name}-parser.patch
b487a61
b487a61
# Delete a bad vector initializer; explicit initialization is not needed
b487a61
# Fix comparison of OSMatrix objects
b487a61
Patch5:		%{name}-OSMatrix.patch
b487a61
b487a61
# Fix use of incorrect variables in a unit test
b487a61
Patch6:		%{name}-test.patch
b487a61
b487a61
# Do not catch polymorphic exceptions by value
b487a61
Patch7:		%{name}-except.patch
b487a61
b487a61
# Prevent access to uninitialized values
b487a61
Patch8:		%{name}-uninitialized.patch
b487a61
b487a61
# Fix some mixed signed/unsigned operations
b487a61
Patch9:		%{name}-signed.patch
b487a61
385b8f3
%description
385b8f3
The objective of Optimization Services (OS) is to provide a set of standards
385b8f3
for representing optimization instances, results, solver options, and
385b8f3
communication between clients and solvers in a distributed environment using
385b8f3
Web Services. This COIN-OR project provides source code for libraries and
385b8f3
executable programs that implement OS standards. See the Home Site
385b8f3
http://www.optimizationservices.org/ for more information.
385b8f3
385b8f3
%package	devel
385b8f3
Summary:	Development files for %{name}
b487a61
Requires:	coin-or-Couenne-devel%{?_isa}
b487a61
Requires:	cppad-devel%{?_isa}
385b8f3
Requires:	%{name}%{?_isa} = %{version}-%{release}
385b8f3
385b8f3
%description    devel
385b8f3
The %{name}-devel package contains libraries and header files for
385b8f3
developing applications that use %{name}.
385b8f3
385b8f3
%package	doc
385b8f3
Summary:	Documentation files for %{name}
b487a61
Requires:	coin-or-Bcp-doc
b487a61
Requires:	coin-or-Couenne-doc
385b8f3
Requires:	%{name} = %{version}-%{release}
385b8f3
BuildArch:	noarch
385b8f3
385b8f3
%description	doc
385b8f3
This package contains the documentation for %{name}.
385b8f3
385b8f3
%prep
3c35e13
%autosetup -p1 -n %{module}-%{version}
385b8f3
b487a61
# Fix a small typo
b487a61
sed -i 's/CyLP/DyLP/' configure
b487a61
385b8f3
%build
b487a61
# GCC normally assumes that, in a method, this != NULL.  However, the code
b487a61
# requires that, in some situations, this == NULL.  Tell GCC not to optimize
b487a61
# those checks away.  The code should really be fixed to not need this.
b487a61
export CFLAGS="%{optflags} -fno-delete-null-pointer-checks"
b487a61
export CXXFLAGS="$CFLAGS"
b487a61
385b8f3
# --with-flex-bison is to force parses regeneration; and ensure the
385b8f3
# package is fully rebuildable from sources.
385b8f3
%configure --enable-openmp --with-flex-bison	\
385b8f3
%if %{with_asl}
385b8f3
	--with-asl-lib="-lasl -lmp -lipoptamplinterface -lbonminampl" \
b487a61
	--with-asl-incdir="%{_includedir}/asl" \
385b8f3
%endif
b487a61
	--with-csdp-lib="-lsdp" \
b487a61
	--with-csdp-incdir="%{_includedir}/csdp"
b487a61
b487a61
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
b487a61
# -Wl,--as-needed after all the libraries.
b487a61
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
b487a61
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
b487a61
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
b487a61
    -i libtool
385b8f3
acceae4
make -j1 all doxydoc
385b8f3
385b8f3
%install
3f1ac45
%make_install
385b8f3
rm -f %{buildroot}%{_libdir}/*.la
b487a61
rm -f %{buildroot}%{_docdir}/%{name}/{LICENSE,os_addlibs.txt}
b487a61
cp -a doxydoc/{html,*.tag} %{buildroot}%{_docdir}/%{name}
b487a61
b487a61
# The pkgconfig file lists transitive dependencies.  Those are necessary when
b487a61
# using static libraries, but not with shared libraries.
b487a61
sed -i 's/ -lsdp.*//' %{buildroot}%{_libdir}/pkgconfig/os.pc
b487a61
b487a61
# The pkgconfig file lists cppad as a dependency multiple times
b487a61
sed -i 's/\([[:alpha:]]\) cppad/\1/g' %{buildroot}%{_libdir}/pkgconfig/os.pc
385b8f3
acceae4
%check
acceae4
%if %{with_mpi}
acceae4
%_openmpi_load
acceae4
%endif
acceae4
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
385b8f3
385b8f3
%files
385b8f3
%license LICENSE
b487a61
%dir %{_docdir}/%{name}
b487a61
%{_docdir}/%{name}/AUTHORS
b487a61
%{_docdir}/%{name}/README
385b8f3
%{_bindir}/OSAmplClient
385b8f3
%{_bindir}/OSSolverService
b487a61
%{_libdir}/libOS.so.6
b487a61
%{_libdir}/libOS.so.6.*
385b8f3
139962c
%files devel
385b8f3
%{_includedir}/coin/*
b487a61
%{_libdir}/libOS.so
b487a61
%{_libdir}/pkgconfig/os.pc
385b8f3
139962c
%files doc
b487a61
%{_docdir}/%{name}/html
b487a61
%{_docdir}/%{name}/os_doxy.tag
385b8f3
385b8f3
%changelog
b487a61
* Thu Jun 27 2019 Jerry James <loganjerry@gmail.com> - 2.10.2-2
b487a61
- Eliminate unnecessary BRs and Rs
b487a61
- Add -csdp, -parser, -OSMatrix, and -test patches
b487a61
- Add -fno-delete-null-pointer-checks to build flags to prevent crashes due to
b487a61
  invalid optimizations
b487a61
- Build with csdp support
b487a61
- Force libtool to not defeat -Wl,--as-needed
b487a61
- Be explicit about library versions as required by latest guidelines
b487a61
- Filter out unnecessary Libs values from pkgconfig files
b487a61
- Package doxygen tag file to enable cross-linking
b487a61
139962c
* Tue Apr 09 2019 Antonio Trande <sagitter@fedoraproject.org> - 2.10.2-1
139962c
- Release 2.10.2
139962c
09cb3c1
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-19
09cb3c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
09cb3c1
3c35e13
* Thu Nov 01 2018 Antonio Trande <sagitter@fedoraproject.org> - 2.10.1-18
3c35e13
- Remove Group tags
3c35e13
95d61d3
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-17
95d61d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
95d61d3
d94b8c0
* Sun Jun 03 2018 Antonio Trande <sagitter@fedoraproject.org> - 2.10.1-16
d94b8c0
- Rebuild for Ipopt-3.12.10
d94b8c0
a214137
* Fri Feb 23 2018 Antonio Trande <sagitter@fedoraproject.org> - 2.10.1-15
a214137
- Rebuild for Ipopt-3.12.9
0901bc8
- Rebuild against openblas
a214137
e2ed884
* Thu Feb 22 2018 Antonio Trande <sagitter@fedoraproject.org> - 2.10.1-14
e2ed884
- Add gcc gcc-c++ BR
e2ed884
3f1ac45
* Fri Feb 16 2018 Antonio Trande <sagitter@fedoraproject.org> - 2.10.1-13
3f1ac45
- Use %%ldconfig_scriptlets
3f1ac45
54a3a10
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-12
54a3a10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
54a3a10
2b25895
* Thu Nov 02 2017 Antonio Trande <sagitterATfedoraproject.org> - 2.10.1-11
2b25895
- Rebuild for MUMPS-5.1.2
2b25895
4cd4a85
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-10
4cd4a85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4cd4a85
29da60f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-9
29da60f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
29da60f
acceae4
* Thu Jun 29 2017 Antonio Trande <sagitterATfedoraproject.org> - 2.10.1-8
acceae4
- Define %%check on fedora < 26
acceae4
- Downgrade make job to 1
acceae4
4b6f7f4
* Thu Jun 29 2017 Antonio Trande <sagitterATfedoraproject.org> - 2.10.1-7
4b6f7f4
- Rebuild for MUMPS-5.1.1 (after a bug-fix)
b5f405c
- Exclude test on armv7hl
4b6f7f4
abc17d3
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.1-6
abc17d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
abc17d3
c657d7f
* Wed Apr  5 2017 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-5
c657d7f
- Rebuild for newer mumps
c657d7f
c4bd0c4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-4
c4bd0c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c4bd0c4
7c1ce3b
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.10.1-3
7c1ce3b
- Rebuild (Power64)
7c1ce3b
dbb53a1
* Tue Aug 02 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-2
dbb53a1
- Rebuild for newer mumps
dbb53a1
9d8d28d
* Thu Mar 17 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.10.1-1
9d8d28d
- Update to latest upstream release
9d8d28d
- Correct FTBFS in rawhide (#1307390)
9d8d28d
a8edea5
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-6
a8edea5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a8edea5
5495789
* Fri Jul 03 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-5
5495789
- Correct docs listed in main package (#1239155).
5495789
989e46a
* Sun Jun 21 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-4
989e46a
- Full rebuild of coin-or stack.
989e46a
- Correct file listing when asl is disabled.
989e46a
385b8f3
* Fri Jun 19 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-3
385b8f3
- Remove non functional attempt to prevent overlink.
385b8f3
385b8f3
* Mon Jun 15 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-2
385b8f3
- Build documentation (#894609#c11)
385b8f3
- Do not overlink generated library (#894609#c11)
385b8f3
- Update file list when asl is disabled
385b8f3
385b8f3
* Sun Jun 14 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.3-1
385b8f3
- Update to latest upstream release
385b8f3
- Regenerate parsers (#894609#c7)
385b8f3
385b8f3
* Mon Apr 13 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.2-2
385b8f3
- Add missing bzip2, mp and zlib devel build requires
385b8f3
- Remove non needed doxygen build requires
385b8f3
385b8f3
* Sat Apr 11 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.9.2-1
385b8f3
- Update to latest upstream release
385b8f3
385b8f3
* Mon Jan 14 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-4
385b8f3
- Update to run make check (#894610#c4).
385b8f3
385b8f3
* Sat Jan 12 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-3
385b8f3
- Rename repackaged tarball.
385b8f3
385b8f3
* Sun Nov 18 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-2
385b8f3
- Rename package to coin-or-OS.
385b8f3
- Do not package Thirdy party data or data without clean license.
385b8f3
385b8f3
* Sat Sep 29 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.6.0-1
385b8f3
- Initial coinor-OS spec.