Update to latest upstream release (bz 1461031, 1603677).
Also: - Update project URL. - Change License from EPL to EPL-1.0. - Eliminate unnecessary BRs and Rs. - Build with Cbc, MUMPS, nauty, and suitesparse. - Build in bootstrap mode. - Add -bad-cast, -badcolumn, -param, -catch, -sprintf, -overflow, and -signed patches. - Eliminate rpath from the library. - Force libtool to not defeat -Wl,--as-needed. - Be explicit about library versions as required by latest guidelines. - Filter out unnecessary Libs values from pkgconfig files. - Package doxygen tag file to enable cross-linking.
This commit is contained in:
parent
fb978d4a7a
commit
e443003589
|
@ -1,9 +1 @@
|
|||
/Clp-1.15.3.tgz
|
||||
/Clp-1.15.7.tgz
|
||||
/Clp-1.15.10.tgz
|
||||
/Clp-1.16.1.tgz
|
||||
/Clp-1.16.3.tgz
|
||||
/Clp-1.16.6.tgz
|
||||
/Clp-1.16.8.tgz
|
||||
/Clp-1.16.9.tgz
|
||||
/Clp-1.16.10.tgz
|
||||
/Clp-*.tgz
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff -up Clp-1.17.1/src/ClpSolver.cpp.orig Clp-1.17.1/src/ClpSolver.cpp
|
||||
--- Clp-1.17.1/src/ClpSolver.cpp.orig 2019-02-07 14:43:52.000000000 -0700
|
||||
+++ Clp-1.17.1/src/ClpSolver.cpp 2019-03-27 11:53:43.018224450 -0600
|
||||
@@ -2888,7 +2888,7 @@ clp watson.mps -\nscaling off\nprimalsim
|
||||
case CLP_PARAM_ACTION_GUESS:
|
||||
if (goodModels[iModel]) {
|
||||
delete[] alternativeEnvironment;
|
||||
- ClpSimplexOther *model2 = static_cast< ClpSimplexOther * >(models + iModel);
|
||||
+ ClpSimplexOther *model2 = reinterpret_cast< ClpSimplexOther * >(models + iModel);
|
||||
alternativeEnvironment = model2->guess(0);
|
||||
if (alternativeEnvironment)
|
||||
CbcOrClpEnvironmentIndex = 0;
|
|
@ -0,0 +1,11 @@
|
|||
--- Clp-1.17.1/src/ClpModel.cpp.orig 2019-03-15 09:56:51.000000000 -0600
|
||||
+++ Clp-1.17.1/src/ClpModel.cpp 2019-04-01 16:40:33.283793373 -0600
|
||||
@@ -3701,7 +3701,7 @@ int ClpModel::emptyProblem(int *infeasNu
|
||||
numberDualInfeasibilities++;
|
||||
;
|
||||
sumDualInfeasibilities += fabs(objValue);
|
||||
- returnCode |= 2;
|
||||
+ returnCode |= 1;
|
||||
}
|
||||
status_[i] = 0;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
--- Clp-1.17.3/src/ClpModel.cpp.orig 2019-04-01 16:40:33.283793373 -0600
|
||||
+++ Clp-1.17.3/src/ClpModel.cpp 2019-06-19 09:26:15.694712302 -0600
|
||||
@@ -2873,7 +2873,7 @@ int ClpModel::readMps(const char *fileNa
|
||||
int status = 0;
|
||||
try {
|
||||
status = m.readMps(fileName, "");
|
||||
- } catch (CoinError e) {
|
||||
+ } catch (CoinError& e) {
|
||||
e.print();
|
||||
status = -1;
|
||||
}
|
||||
--- Clp-1.17.3/src/ClpSolver.cpp.orig 2019-06-19 08:55:49.245584625 -0600
|
||||
+++ Clp-1.17.3/src/ClpSolver.cpp 2019-06-19 09:27:25.963449066 -0600
|
||||
@@ -1294,7 +1294,7 @@ int ClpMain1(int argc, const char *argv[
|
||||
}
|
||||
}
|
||||
#endif
|
||||
- } catch (CoinError e) {
|
||||
+ } catch (CoinError& e) {
|
||||
e.print();
|
||||
status = -1;
|
||||
}
|
||||
--- Clp-1.17.3/src/OsiClp/OsiClpSolverInterface.cpp.orig 2019-04-07 21:34:28.000000000 -0600
|
||||
+++ Clp-1.17.3/src/OsiClp/OsiClpSolverInterface.cpp 2019-06-19 09:28:24.993388970 -0600
|
||||
@@ -5792,7 +5792,7 @@ int OsiClpSolverInterface::readLp(const
|
||||
*m.messagesPointer() = modelPtr_->coinMessages();
|
||||
try {
|
||||
m.readLp(filename, epsilon);
|
||||
- } catch (CoinError e) {
|
||||
+ } catch (CoinError& e) {
|
||||
printf("ERROR: %s::%s, %s\n",
|
||||
e.className().c_str(), e.methodName().c_str(), e.message().c_str());
|
||||
return -1;
|
||||
--- Clp-1.17.3/test/OsiClpSolverInterfaceTest.cpp.orig 2017-08-16 08:40:35.000000000 -0600
|
||||
+++ Clp-1.17.3/test/OsiClpSolverInterfaceTest.cpp 2019-06-19 09:29:07.273629672 -0600
|
||||
@@ -143,7 +143,7 @@ OsiClpSolverInterfaceUnitTest(const std:
|
||||
solver.setObjCoeff(0,0.0);
|
||||
OSIUNITTEST_ADD_OUTCOME("clp", "setObjCoeff on empty model", "should throw exception", OsiUnitTest::TestOutcome::ERROR, false);
|
||||
}
|
||||
- catch (CoinError e) {
|
||||
+ catch (CoinError& e) {
|
||||
if (OsiUnitTest::verbosity >= 1)
|
||||
std::cout<<"Correct throw from setObjCoeff on empty model"<<std::endl;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ OsiClpSolverInterfaceUnitTest(const std:
|
||||
solver.setColSetBounds(index,index+2,value);
|
||||
OSIUNITTEST_ADD_OUTCOME("clp", "setColSetBounds on cols not in model", "should throw exception", OsiUnitTest::TestOutcome::ERROR, false);
|
||||
}
|
||||
- catch (CoinError e) {
|
||||
+ catch (CoinError& e) {
|
||||
if (OsiUnitTest::verbosity >= 1)
|
||||
std::cout<<"Correct throw from setObjCoeff on empty model"<<std::endl;
|
||||
}
|
|
@ -1,6 +1,18 @@
|
|||
diff -up Clp-1.16.6/Makefile.in.orig Clp-1.16.6/Makefile.in
|
||||
--- Clp-1.16.6/Makefile.in.orig 2015-04-12 12:58:41.513642557 -0300
|
||||
+++ Clp-1.16.6/Makefile.in 2015-04-12 12:59:06.943643531 -0300
|
||||
diff -up Clp-1.17.3/configure.orig Clp-1.17.3/configure
|
||||
--- Clp-1.17.3/configure.orig 2019-06-14 15:45:20.000000000 -0600
|
||||
+++ Clp-1.17.3/configure 2019-06-21 10:41:48.445343096 -0600
|
||||
@@ -32184,7 +32184,7 @@ echo "${ECHO_T}$doxysrcdir (src)" >&6
|
||||
fi
|
||||
# Not built, fall back to installed tag file
|
||||
if test $doxyfound = no ; then
|
||||
- eval doxydir="${datadir}/coin/doc/${proj}/doxydoc"
|
||||
+ eval doxydir="${datadir}/doc/coin-or-${proj}"
|
||||
# AC_MSG_NOTICE([Considering $doxydir (install)])
|
||||
# AC_MSG_NOTICE([Subdirs: $coin_subdirs)])
|
||||
coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
|
||||
diff -up Clp-1.17.3/Makefile.in.orig Clp-1.17.3/Makefile.in
|
||||
--- Clp-1.17.3/Makefile.in.orig 2016-02-01 21:31:08.000000000 -0700
|
||||
+++ Clp-1.17.3/Makefile.in 2019-06-21 10:40:52.417258808 -0600
|
||||
@@ -420,7 +420,7 @@ EXTRA_DIST = doc/authors.xml doc/basicmo
|
||||
########################################################################
|
||||
pkgconfiglibdir = $(libdir)/pkgconfig
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
--- Clp-1.17.3/src/ClpModel.cpp.orig 2019-06-19 09:26:15.694712302 -0600
|
||||
+++ Clp-1.17.3/src/ClpModel.cpp 2019-06-19 09:49:10.677041278 -0600
|
||||
@@ -1337,7 +1337,7 @@ void ClpModel::resize(int newNumberRows,
|
||||
if (numberRowNames < newNumberRows) {
|
||||
rowNames_.resize(newNumberRows);
|
||||
lengthNames_ = CoinMax(lengthNames_, 8);
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
for (unsigned int iRow = numberRowNames; iRow < newNumberRows; iRow++) {
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
rowNames_[iRow] = name;
|
||||
@@ -1347,7 +1347,7 @@ void ClpModel::resize(int newNumberRows,
|
||||
if (numberColumnNames < newNumberColumns) {
|
||||
columnNames_.resize(newNumberColumns);
|
||||
lengthNames_ = CoinMax(lengthNames_, 8);
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
for (unsigned int iColumn = numberColumnNames;
|
||||
iColumn < newNumberColumns; iColumn++) {
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
@@ -3426,7 +3426,7 @@ ClpModel::getRowName(int iRow) const
|
||||
if (size > iRow) {
|
||||
return rowNames_[iRow];
|
||||
} else {
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
std::string rowName(name);
|
||||
return rowName;
|
||||
@@ -3462,7 +3462,7 @@ ClpModel::getColumnName(int iColumn) con
|
||||
if (size > iColumn) {
|
||||
return columnNames_[iColumn];
|
||||
} else {
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
std::string columnName(name);
|
||||
return columnName;
|
||||
@@ -3544,7 +3544,7 @@ void ClpModel::copyRowNames(const char *
|
||||
maxLength = CoinMax(maxLength, static_cast< unsigned int >(strlen(rowNames[iRow - first])));
|
||||
} else {
|
||||
maxLength = CoinMax(maxLength, static_cast< unsigned int >(8));
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
rowNames_[iRow] = name;
|
||||
}
|
||||
@@ -3571,7 +3571,7 @@ void ClpModel::copyColumnNames(const cha
|
||||
maxLength = CoinMax(maxLength, static_cast< unsigned int >(strlen(columnNames[iColumn - first])));
|
||||
} else {
|
||||
maxLength = CoinMax(maxLength, static_cast< unsigned int >(8));
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
columnNames_[iColumn] = name;
|
||||
}
|
||||
@@ -3817,7 +3817,7 @@ ClpModel::rowNamesAsChar() const
|
||||
if (rowName(iRow) != "") {
|
||||
rowNames[iRow] = CoinStrdup(rowName(iRow).c_str());
|
||||
} else {
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
rowNames[iRow] = CoinStrdup(name);
|
||||
}
|
||||
@@ -3833,7 +3833,7 @@ ClpModel::rowNamesAsChar() const
|
||||
xx[n] = '\0';
|
||||
#endif
|
||||
}
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
for (; iRow < numberRows_; iRow++) {
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
rowNames[iRow] = CoinStrdup(name);
|
||||
@@ -3856,7 +3856,7 @@ ClpModel::columnNamesAsChar() const
|
||||
if (columnName(iColumn) != "") {
|
||||
columnNames[iColumn] = CoinStrdup(columnName(iColumn).c_str());
|
||||
} else {
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
columnNames[iColumn] = CoinStrdup(name);
|
||||
}
|
||||
@@ -3872,7 +3872,7 @@ ClpModel::columnNamesAsChar() const
|
||||
xx[n] = '\0';
|
||||
#endif
|
||||
}
|
||||
- char name[10];
|
||||
+ char name[12];
|
||||
for (; iColumn < numberColumns_; iColumn++) {
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
columnNames[iColumn] = CoinStrdup(name);
|
||||
--- Clp-1.17.3/src/ClpSimplexOther.cpp.orig 2019-06-19 09:35:35.100664914 -0600
|
||||
+++ Clp-1.17.3/src/ClpSimplexOther.cpp 2019-06-19 09:44:47.465748162 -0600
|
||||
@@ -2276,7 +2276,7 @@ int ClpSimplexOther::parametrics(const c
|
||||
{
|
||||
int returnCode = -2;
|
||||
FILE *fp = fopen(dataFile, "r");
|
||||
- char line[200];
|
||||
+ char line[400];
|
||||
if (!fp) {
|
||||
handler_->message(CLP_UNABLE_OPEN, messages_)
|
||||
<< dataFile << CoinMessageEol;
|
|
@ -0,0 +1,14 @@
|
|||
--- Clp-1.17.1/src/ClpSolver.cpp.orig 2019-03-27 11:53:43.018224450 -0600
|
||||
+++ Clp-1.17.1/src/ClpSolver.cpp 2019-04-02 20:37:12.984912142 -0600
|
||||
@@ -293,7 +293,11 @@ int ClpMain1(int argc, const char *argv[
|
||||
parameters[whichParam(CLP_PARAM_DBL_PRIMALWEIGHT, parameters)].setDoubleValue(models->infeasibilityCost());
|
||||
parameters[whichParam(CLP_PARAM_ACTION_RESTORE, parameters)].setStringValue(restoreFile);
|
||||
parameters[whichParam(CLP_PARAM_ACTION_SAVE, parameters)].setStringValue(saveFile);
|
||||
+#ifdef COIN_HAS_CBC
|
||||
+ parameters[whichParam(CBC_PARAM_DBL_TIMELIMIT_BAB, parameters)].setDoubleValue(models->maximumSeconds());
|
||||
+#else
|
||||
parameters[whichParam(CLP_PARAM_DBL_TIMELIMIT, parameters)].setDoubleValue(models->maximumSeconds());
|
||||
+#endif
|
||||
parameters[whichParam(CLP_PARAM_ACTION_SOLUTION, parameters)].setStringValue(solutionFile);
|
||||
parameters[whichParam(CLP_PARAM_ACTION_SAVESOL, parameters)].setStringValue(solutionSaveFile);
|
||||
parameters[whichParam(CLP_PARAM_INT_SPRINT, parameters)].setIntValue(doSprint);
|
|
@ -0,0 +1,70 @@
|
|||
--- Clp-1.17.3/src/ClpModel.cpp.orig 2019-06-19 09:49:10.677041278 -0600
|
||||
+++ Clp-1.17.3/src/ClpModel.cpp 2019-06-19 09:53:14.743676733 -0600
|
||||
@@ -1338,7 +1338,7 @@ void ClpModel::resize(int newNumberRows,
|
||||
rowNames_.resize(newNumberRows);
|
||||
lengthNames_ = CoinMax(lengthNames_, 8);
|
||||
char name[12];
|
||||
- for (unsigned int iRow = numberRowNames; iRow < newNumberRows; iRow++) {
|
||||
+ for (int iRow = numberRowNames; iRow < newNumberRows; iRow++) {
|
||||
sprintf(name, "R%7.7d", iRow);
|
||||
rowNames_[iRow] = name;
|
||||
}
|
||||
@@ -1348,7 +1348,7 @@ void ClpModel::resize(int newNumberRows,
|
||||
columnNames_.resize(newNumberColumns);
|
||||
lengthNames_ = CoinMax(lengthNames_, 8);
|
||||
char name[12];
|
||||
- for (unsigned int iColumn = numberColumnNames;
|
||||
+ for (int iColumn = numberColumnNames;
|
||||
iColumn < newNumberColumns; iColumn++) {
|
||||
sprintf(name, "C%7.7d", iColumn);
|
||||
columnNames_[iColumn] = name;
|
||||
@@ -3537,7 +3537,7 @@ void ClpModel::copyRowNames(const char *
|
||||
int size = static_cast< int >(rowNames_.size());
|
||||
if (size != numberRows_)
|
||||
rowNames_.resize(numberRows_);
|
||||
- unsigned int iRow;
|
||||
+ int iRow;
|
||||
for (iRow = first; iRow < last; iRow++) {
|
||||
if (rowNames && rowNames[iRow - first] && strlen(rowNames[iRow - first])) {
|
||||
rowNames_[iRow] = rowNames[iRow - first];
|
||||
@@ -3564,7 +3564,7 @@ void ClpModel::copyColumnNames(const cha
|
||||
int size = static_cast< int >(columnNames_.size());
|
||||
if (size != numberColumns_)
|
||||
columnNames_.resize(numberColumns_);
|
||||
- unsigned int iColumn;
|
||||
+ int iColumn;
|
||||
for (iColumn = first; iColumn < last; iColumn++) {
|
||||
if (columnNames && columnNames[iColumn - first] && strlen(columnNames[iColumn - first])) {
|
||||
columnNames_[iColumn] = columnNames[iColumn - first];
|
||||
@@ -3812,7 +3812,7 @@ ClpModel::rowNamesAsChar() const
|
||||
rowNames = new char *[numberRows_ + 1];
|
||||
int numberNames = static_cast< int >(rowNames_.size());
|
||||
numberNames = CoinMin(numberRows_, numberNames);
|
||||
- unsigned int iRow;
|
||||
+ int iRow;
|
||||
for (iRow = 0; iRow < numberNames; iRow++) {
|
||||
if (rowName(iRow) != "") {
|
||||
rowNames[iRow] = CoinStrdup(rowName(iRow).c_str());
|
||||
@@ -3851,7 +3851,7 @@ ClpModel::columnNamesAsChar() const
|
||||
columnNames = new char *[numberColumns_];
|
||||
int numberNames = static_cast< int >(columnNames_.size());
|
||||
numberNames = CoinMin(numberColumns_, numberNames);
|
||||
- unsigned int iColumn;
|
||||
+ int iColumn;
|
||||
for (iColumn = 0; iColumn < numberNames; iColumn++) {
|
||||
if (columnName(iColumn) != "") {
|
||||
columnNames[iColumn] = CoinStrdup(columnName(iColumn).c_str());
|
||||
--- Clp-1.17.3/src/ClpSolver.cpp.orig 2019-06-19 09:48:01.364280767 -0600
|
||||
+++ Clp-1.17.3/src/ClpSolver.cpp 2019-06-19 09:55:03.409733509 -0600
|
||||
@@ -3797,9 +3797,9 @@ static void statistics(ClpSimplex *origi
|
||||
numberWritten = fwrite(stats, sizeof(int), 3, fpBlocks);
|
||||
assert(numberWritten == 3);
|
||||
numberWritten = fwrite(blockStart, sizeof(int), numberRows, fpBlocks);
|
||||
- assert(numberWritten == numberRows);
|
||||
+ assert(numberWritten == (size_t)numberRows);
|
||||
numberWritten = fwrite(columnBlock, sizeof(int), numberColumns, fpBlocks);
|
||||
- assert(numberWritten == numberColumns);
|
||||
+ assert(numberWritten == (size_t)numberColumns);
|
||||
fclose(fpBlocks);
|
||||
if (writeMatrices) {
|
||||
int *whichRows = new int[numberRows + numberColumns];
|
|
@ -0,0 +1,14 @@
|
|||
--- Clp-1.17.3/src/ClpSimplexOther.cpp.orig 2019-01-07 12:04:36.000000000 -0700
|
||||
+++ Clp-1.17.3/src/ClpSimplexOther.cpp 2019-06-19 09:35:35.100664914 -0600
|
||||
@@ -2360,9 +2360,9 @@ int ClpSimplexOther::parametrics(const c
|
||||
if (intervalTheta >= endTheta)
|
||||
intervalTheta = 0.0;
|
||||
if (!good) {
|
||||
- sprintf(line, "Odd first line %s on file %s?", line, dataFile);
|
||||
handler_->message(CLP_GENERAL, messages_)
|
||||
- << line << CoinMessageEol;
|
||||
+ << "Odd first line " << line << " on file " << dataFile << "?"
|
||||
+ << CoinMessageEol;
|
||||
fclose(fp);
|
||||
return -2;
|
||||
}
|
150
coin-or-Clp.spec
150
coin-or-Clp.spec
|
@ -1,29 +1,54 @@
|
|||
%global module Clp
|
||||
|
||||
# Avoid circular dependencies on first build
|
||||
%bcond_without bootstrap
|
||||
|
||||
Name: coin-or-%{module}
|
||||
Summary: Coin-or linear programming
|
||||
Version: 1.16.10
|
||||
Release: 8%{?dist}
|
||||
License: EPL
|
||||
URL: http://projects.coin-or.org/%{module}
|
||||
Version: 1.17.3
|
||||
Release: 0%{?dist}
|
||||
License: EPL-1.0
|
||||
URL: https://github.com/coin-or/%{module}
|
||||
Source0: http://www.coin-or.org/download/pkgsource/%{module}/%{module}-%{version}.tgz
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: atlas-devel
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: coin-or-CoinUtils-devel
|
||||
BuildRequires: coin-or-Data-Netlib
|
||||
BuildRequires: coin-or-Osi-devel
|
||||
BuildRequires: coin-or-Osi-doc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: glpk-devel
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: lapack-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: MUMPS-devel
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: coin-or-Cbc-devel
|
||||
BuildRequires: libnauty-devel
|
||||
%endif
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: suitesparse-devel
|
||||
|
||||
# Install documentation in standard rpm directory
|
||||
Patch0: %{name}-docdir.patch
|
||||
|
||||
# Fix a bad static cast
|
||||
Patch1: %{name}-bad-cast.patch
|
||||
|
||||
# Fix for a crash in coin-or-lemon. The code sets returnCode to 2, but does
|
||||
# not set badColumn, resulting in a write to ray[-1]. Set returnCode to 1
|
||||
# instead to avoid the issue.
|
||||
Patch2: %{name}-badcolumn.patch
|
||||
|
||||
# Fix a parameter which is not defined when building with Cbc support.
|
||||
Patch3: %{name}-param.patch
|
||||
|
||||
# Catch polymorphic errors by reference rathern than by value
|
||||
Patch4: %{name}-catch.patch
|
||||
|
||||
# Fix a bad sprintf that overwrites its own output
|
||||
Patch5: %{name}-sprintf.patch
|
||||
|
||||
# Increase buffer sizes to avoid sprintf overflow
|
||||
Patch6: %{name}-overflow.patch
|
||||
|
||||
# Fix mixed signed-unsigned comparisons
|
||||
Patch7: %{name}-signed.patch
|
||||
|
||||
%description
|
||||
Clp (Coin-or linear programming) is an open-source linear programming
|
||||
solver written in C++. It is primarily meant to be used as a callable
|
||||
|
@ -31,15 +56,20 @@ library, but a basic, stand-alone executable version is also available.
|
|||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: coin-or-CoinUtils-devel
|
||||
%if %{without bootstrap}
|
||||
Requires: coin-or-Cbc-devel%{?_isa}
|
||||
%endif
|
||||
Requires: coin-or-Osi-devel%{?_isa}
|
||||
Requires: readline-devel%{?_isa}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
%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-Osi-doc
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
|
@ -49,18 +79,53 @@ This package contains the documentation for %{name}.
|
|||
%prep
|
||||
%setup -q -n %{module}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%if %{without bootstrap}
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
# Kill rpaths
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
make %{?_smp_mflags} all doxydoc
|
||||
%if %{without bootstrap}
|
||||
export CPPFLAGS="-DCOIN_HAS_CBC -DCOIN_HAS_NTY -I$PWD/src/OsiClp"
|
||||
%endif
|
||||
%configure \
|
||||
--with-amd-incdir=%{_includedir}/suitesparse \
|
||||
--with-amd-lib=-lamd \
|
||||
--with-cholmod-incdir=%{_includedir}/suitesparse \
|
||||
--with-cholmod-lib=-lcholmod \
|
||||
--with-glpk_incdir=%{_includedir} \
|
||||
--with-glpk-lib=-lglpk \
|
||||
--with-mumps-incdir=%{_includedir}/MUMPS \
|
||||
--with-mumps-lib="-ldmumps -lmpiseq" \
|
||||
%if %{with bootstrap}
|
||||
LIBS="-lpthread"
|
||||
%else
|
||||
LIBS="-lCbc -lnauty -lpthread"
|
||||
%endif
|
||||
|
||||
# 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 DESTDIR=%{buildroot}
|
||||
%make_install
|
||||
rm -f %{buildroot}%{_libdir}/*.la
|
||||
cp -a doxydoc/html %{buildroot}%{_docdir}/%{name}
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/{LICENSE,clp_addlibs.txt}
|
||||
cp -a doxydoc/{html,*.tag} %{buildroot}%{_docdir}/%{name}
|
||||
|
||||
# The pkgconfig file lists transitive dependencies. Those are necessary when
|
||||
# using static libraries, but not with shared libraries.
|
||||
sed -i 's/ -ldmumps.*//' %{buildroot}%{_libdir}/pkgconfig/clp.pc
|
||||
|
||||
%check
|
||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
|
||||
|
@ -68,23 +133,46 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test
|
|||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%dir %{_docdir}/%{name}
|
||||
%doc %{_docdir}/%{name}/AUTHORS
|
||||
%doc %{_docdir}/%{name}/clp_addlibs.txt
|
||||
%doc %{_docdir}/%{name}/LICENSE
|
||||
%doc %{_docdir}/%{name}/README
|
||||
%{_docdir}/%{name}/AUTHORS
|
||||
%{_docdir}/%{name}/README
|
||||
%{_bindir}/clp
|
||||
%{_libdir}/*.so.*
|
||||
%{_libdir}/libClp.so.1
|
||||
%{_libdir}/libClp.so.1.*
|
||||
%{_libdir}/libClpSolver.so.1
|
||||
%{_libdir}/libClpSolver.so.1.*
|
||||
%{_libdir}/libOsiClp.so.1
|
||||
%{_libdir}/libOsiClp.so.1.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/coin/*
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_libdir}/libClp.so
|
||||
%{_libdir}/libClpSolver.so
|
||||
%{_libdir}/libOsiClp.so
|
||||
%{_libdir}/pkgconfig/clp.pc
|
||||
%{_libdir}/pkgconfig/osi-clp.pc
|
||||
|
||||
%files doc
|
||||
%doc %{_docdir}/%{name}/html
|
||||
%{_docdir}/%{name}/html
|
||||
%{_docdir}/%{name}/clp_doxy.tag
|
||||
|
||||
%changelog
|
||||
* Thu Jun 27 2019 Jerry James <loganjerry@gmail.com> - 1.17.3-0
|
||||
- Update to latest upstream release (bz 1461031, 1603677)
|
||||
- Update project URL
|
||||
- Change License from EPL to EPL-1.0
|
||||
- Eliminate unnecessary BRs and Rs
|
||||
- Build with Cbc, MUMPS, nauty, and suitesparse
|
||||
- Build in bootstrap mode
|
||||
- Add -bad-cast, -badcolumn, -param, -catch, -sprintf, -overflow, and -signed
|
||||
patches
|
||||
- Eliminate rpath from the library
|
||||
- Force libtool to not defeat -Wl,--as-needed
|
||||
- Be explicit about library versions as required by latest guidelines
|
||||
- Filter out unnecessary Libs values from pkgconfig files
|
||||
- Package doxygen tag file to enable cross-linking
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.10-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue