代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/coin-or-cbc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global module Cbc
%global blaslib openblas
Name: coin-or-%{module}
Summary: Coin-or branch and cut
Version: 2.10.5
Release: 1
License: EPL-1.0
URL: https://github.com/coin-or/%{module}
Source0: %{url}/archive/releases/%{version}/%{module}-%{version}.tar.gz
BuildRequires: coin-or-Cgl-doc
BuildRequires: coin-or-Clp-doc
BuildRequires: coin-or-DyLP-doc
BuildRequires: coin-or-Vol-doc
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: mp-devel
BuildRequires: MUMPS-devel
BuildRequires: %{blaslib}-devel
BuildRequires: pkgconfig(cgl)
BuildRequires: pkgconfig(clp)
BuildRequires: pkgconfig(coindatamiplib3)
BuildRequires: pkgconfig(coindatanetlib)
BuildRequires: pkgconfig(dylp)
BuildRequires: pkgconfig(nauty)
BuildRequires: pkgconfig(vol)
# Install documentation in standard rpm directory
Patch0: %{name}-docdir.patch
# Avoid empty #define if svnversion is available at configure time
Patch1: %{name}-svnversion.patch
# Do not catch polymorphic exceptions by value
Patch2: %{name}-exception.patch
# Fix a possible buffer overflow
Patch3: %{name}-overflow.patch
# Fix a mixed signed/unsigned operation
Patch4: %{name}-signed.patch
%description
Cbc (Coin-or branch and cut) is an open-source mixed integer programming
solver written in C++. It can be used as a callable library or using a
stand-alone executable. It can be called through AMPL (natively), GAMS
(using the links provided by the "Optimization Services" and "GAMSlinks"
projects), MPL (through the "CoinMP" project), AIMMS (through the "AIMMSlinks"
project), or "PuLP".
Cbc links to a number of other COIN projects for additional functionality,
including:
* Clp (the default solver for LP relaxations)
* Cgl (for cut generation)
* CoinUtils (for reading input files and various utilities)
%package devel
Summary: Development files for %{name}
Requires: coin-or-Cgl-devel
Requires: coin-or-Clp-devel
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation files for %{name}
Requires: coin-or-Cgl-doc
Requires: coin-or-Clp-doc
Requires: coin-or-DyLP-doc
Requires: coin-or-Vol-doc
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
This package contains the documentation for %{name}.
%prep
%autosetup -p1 -n %{module}-releases-%{version}
# The pkgconfig file lists transitive dependencies. Those are necessary when
# using static libraries, but not with shared libraries.
sed -i 's/ @CBCLIB_PCLIBS@/\nLibs.private:&/' Cbc/cbc.pc.in
%build
%configure \
--with-asl-incdir=%{_includedir}/asl \
--with-asl-lib=-lasl \
--with-blas-incdir=%{_includedir}/%{blaslib} \
--with-blas-lib=-l%{blaslib} \
--with-glpk-incdir=%{_includedir} \
--with-glpk-lib=-lglpk \
--with-lapack-incdir=%{_includedir}/%{blaslib} \
--with-lapack-lib=-l%{blaslib} \
--with-mumps-incdir=%{_includedir}/MUMPS \
--with-mumps-lib=-ldmumps \
--with-nauty-incdir=%{_includedir}/nauty \
--with-nauty-lib=-lnauty
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
# -Wl,--as-needed after all the libraries.
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
-e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
-i libtool
%make_build all doxydoc
%install
%make_install
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_docdir}/%{name}/{LICENSE,cbc_addlibs.txt}
cp -a doxydoc/{html,*.tag} %{buildroot}%{_docdir}/%{name}
%check
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
%ldconfig_scriptlets
%files
%license LICENSE
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/AUTHORS
%{_docdir}/%{name}/README
%{_bindir}/cbc
%{_libdir}/libCbc.so.3
%{_libdir}/libCbc.so.3.*
%{_libdir}/libCbcSolver.so.3
%{_libdir}/libCbcSolver.so.3.*
%{_libdir}/libOsiCbc.so.3
%{_libdir}/libOsiCbc.so.3.*
%files devel
%{_includedir}/coin/*
%{_libdir}/libCbc.so
%{_libdir}/libCbcSolver.so
%{_libdir}/libOsiCbc.so
%{_libdir}/pkgconfig/cbc.pc
%{_libdir}/pkgconfig/osi-cbc.pc
%files doc
%{_docdir}/%{name}/html
%{_docdir}/%{name}/cbc_doxy.tag
%changelog
* Sat Jan 29 2022 liweigang <liweiganga@uniontech.com> - 2.10.5-1
- init package
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。