Update to 3.0.1 prerelease (commit #9fdb514)
This commit is contained in:
parent
9c0d7d954f
commit
73b966d6f1
|
@ -1 +1,2 @@
|
|||
/mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed.tar.gz
|
||||
/mp-9fdb5147068f3b719999210e56b493327f1ca5e7.zip
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff -up mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/test/util.cc.orig mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/test/util.cc
|
||||
--- mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/test/util.cc.orig 2015-01-28 19:00:00.500079394 -0200
|
||||
+++ mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/test/util.cc 2015-01-28 19:00:29.792054998 -0200
|
||||
@@ -155,7 +155,7 @@ mp::NLHeader MakeTestHeader() {
|
||||
|
||||
h.num_linear_net_vars = 103;
|
||||
h.num_funcs = 107;
|
||||
- h.arith_kind = mp::arith::IEEE_LITTLE_ENDIAN;
|
||||
+ h.arith_kind = mp::arith::GetKind();
|
||||
h.flags = 109;
|
||||
|
||||
h.num_linear_binary_vars = 113;
|
|
@ -1,25 +0,0 @@
|
|||
diff -up mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/src/asl/solvers/fpinit.c.orig mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/src/asl/solvers/fpinit.c
|
||||
--- mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/src/asl/solvers/fpinit.c.orig 2015-01-28 09:21:01.817927788 -0200
|
||||
+++ mp-35060ba2a59f2b0f0fd622ed9df678f142f846ed/src/asl/solvers/fpinit.c 2015-01-28 09:24:21.273691331 -0200
|
||||
@@ -125,14 +125,18 @@ fpinit_ASL(Void)
|
||||
_FPU_GETCW(__fpu_control);
|
||||
__fpu_control &= ~_FPU_EXTENDED; /* clear rounding precision bits */
|
||||
__fpu_control |= _FPU_DOUBLE; /* set the ones we want set */
|
||||
+ _FPU_SETCW(__fpu_control);
|
||||
#else
|
||||
-#ifdef _FPU_IEEE
|
||||
+#if defined(_FPU_IEEE) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE)
|
||||
__fpu_control = _FPU_IEEE - _FPU_EXTENDED + _FPU_DOUBLE;
|
||||
-#else
|
||||
+ _FPU_SETCW(__fpu_control);
|
||||
+#elif defined(__i386__) || defined(__x86_64__)
|
||||
__fpu_control = 0x27f;
|
||||
+ _FPU_SETCW(__fpu_control);
|
||||
+#elif defined(FE_ALL_EXCEPT)
|
||||
+ fedisableexcept(FE_ALL_EXCEPT);
|
||||
#endif
|
||||
#endif /* ASL_FPINIT_KEEP_TRAPBITS */
|
||||
- _FPU_SETCW(__fpu_control);
|
||||
#endif
|
||||
}
|
||||
#endif /*} NO_fpu_control */
|
202
mp.spec
202
mp.spec
|
@ -1,39 +1,49 @@
|
|||
%global commit 35060ba2a59f2b0f0fd622ed9df678f142f846ed
|
||||
%global commit 9fdb5147068f3b719999210e56b493327f1ca5e7
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
||||
%global with_gecode 1
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_jacop 1
|
||||
%global with_gecode 1
|
||||
%else
|
||||
%global with_jacop 0
|
||||
%global with_gecode 1
|
||||
%endif
|
||||
|
||||
Name: mp
|
||||
Version: 1.3.0
|
||||
Release: 10%{?dist}
|
||||
License: MIT and BSD
|
||||
Summary: An open-source library for mathematical programming
|
||||
URL: https://github.com/ampl/mp
|
||||
Source0: https://github.com/ampl/mp/archive/%{commit}/mp-%{commit}.tar.gz
|
||||
Source1: mp.module.in
|
||||
Requires: environment(modules)
|
||||
BuildRequires: atlas-devel
|
||||
BuildRequires: cmake
|
||||
%if 0%{?rhel}
|
||||
%global cmake_ver 34
|
||||
%endif
|
||||
|
||||
Name: mp
|
||||
Version: 3.0.1
|
||||
Release: 0.1%{?dist}
|
||||
License: MIT and BSD
|
||||
Summary: An open-source library for mathematical programming
|
||||
URL: https://github.com/ampl/mp
|
||||
Source0: https://github.com/ampl/mp/archive/%{commit}.zip#/%{name}-%{commit}.zip
|
||||
Source1: mp.module.in
|
||||
Requires: environment(modules)
|
||||
BuildRequires: atlas-devel
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: cmake%{cmake_ver}
|
||||
%else
|
||||
BuildRequires: cmake
|
||||
%endif
|
||||
%if %{with_gecode}
|
||||
BuildRequires: gecode-devel
|
||||
BuildRequires: gecode-devel
|
||||
%endif
|
||||
%if %{with_jacop}
|
||||
BuildRequires: jacop
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jacop
|
||||
BuildRequires: java-devel
|
||||
%endif
|
||||
# Need git to satisfy a cmake test if building modules (gsl)
|
||||
BuildRequires: git
|
||||
BuildRequires: gsl-devel
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: python-sphinx
|
||||
BuildRequires: git
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: gsl-devel
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: python-sphinx
|
||||
BuildRequires: python-virtualenv
|
||||
#BuildRequires: python-sphinx-latex
|
||||
BuildRequires: unixODBC-devel
|
||||
# https://github.com/ampl/mp/issues/25
|
||||
Patch0: %{name}-fpinit.patch
|
||||
# https://github.com/ampl/mp/commit/0b53c90a9bc823463ae6b818ba5798c175b69540
|
||||
Patch1: %{name}-endian.patch
|
||||
BuildRequires: unixODBC-devel
|
||||
|
||||
%description
|
||||
An open-source library for mathematical programming.
|
||||
|
@ -63,12 +73,12 @@ Features
|
|||
two-stage stochastic programming (SP) problem written in AMPL
|
||||
to an SP problem in SMPS format.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
%description devel
|
||||
This package contains the header files and development documentation
|
||||
for %{name}.
|
||||
|
||||
|
@ -77,78 +87,142 @@ for %{name}.
|
|||
%if %{with_jacop}
|
||||
ln -s %{_javadir}/jacop/jacop.jar thirdparty/jacop/jacop-`rpm -q --qf "%%{VERSION}" jacop`.jar
|
||||
%endif
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?fedora} > 20 || 0%{?rhel} > 6
|
||||
export LIBS="-lgsl -L%{_libdir}/atlas -lsatlas"
|
||||
%else
|
||||
export LIBS="-lgsl L%{_libdir}/atlas -lcblas -latlas"
|
||||
export LIBS="-lgsl -L%{_libdir}/atlas -lcblas -latlas"
|
||||
%endif
|
||||
|
||||
mkdir build
|
||||
pushd build
|
||||
BUILD=breathe
|
||||
%if %{with_gecode}
|
||||
BUILD="$BUILD,gecode"
|
||||
BUILD="gecode"
|
||||
%endif
|
||||
%if %{with_jacop}
|
||||
BUILD="$BUILD,jacop"
|
||||
%endif
|
||||
BUILD="$BUILD,gsl,smpswriter"
|
||||
%cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_libdir}/%{name} \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,--as-needed" \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD=$BUILD \
|
||||
..
|
||||
make %{?_smp_mflags}
|
||||
make doc
|
||||
%if 0%{?rhel}
|
||||
export CXXFLAGS="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now"
|
||||
export LDFLAGS="%{__global_ldflags} -fPIC -pie -Wl,-z,now"
|
||||
%cmake34 -DCMAKE_INSTALL_PREFIX:PATH=%{_libdir}/%{name} \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-z,now -fPIC -pie -Wl,--as-needed" \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=NO \
|
||||
-DBUILD_SHARED_LIBS=ON -DBUILD=$BUILD ..
|
||||
%else
|
||||
#export CXXFLAGS="$(echo "%%{optflags}" | sed -e 's/-O2//')"
|
||||
%cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_libdir}/%{name} \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,--as-needed" \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=NO \
|
||||
-DBUILD_SHARED_LIBS=ON -DBUILD=$BUILD ..
|
||||
%endif
|
||||
make %{?_smp_mflags}
|
||||
|
||||
## Documentation needs online connection to upstream
|
||||
## and Sphinx 1.1.3
|
||||
#make doc
|
||||
popd
|
||||
|
||||
%install
|
||||
make -C build install DESTDIR=%{buildroot}
|
||||
#m%%ake_install
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles
|
||||
sed 's#@BINDIR@#'%{_libdir}/%{name}'#g;' < %{SOURCE1} > \
|
||||
%{buildroot}%{_datadir}/Modules/modulefiles/%{name}-%{_arch}
|
||||
rm -r %{buildroot}%{_libdir}/%{name}/share
|
||||
mv %{buildroot}%{_libdir}/%{name}/include %{buildroot}%{_prefix}
|
||||
rm %{buildroot}%{_libdir}/%{name}/lib/*.a
|
||||
mv %{buildroot}%{_libdir}/%{name}/lib/*.so* %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp -p README.rst %{buildroot}%{_docdir}/%{name}
|
||||
mv %{buildroot}%{_libdir}/%{name}/doc/* %{buildroot}%{_docdir}/%{name}
|
||||
rmdir %{buildroot}%{_libdir}/%{name}/lib/
|
||||
rm -fr %{buildroot}%{_libdir}/%{name}/doc/
|
||||
|
||||
mkdir -p %{buildroot}%{_libdir}/%{name}/bin
|
||||
mkdir -p %{buildroot}%{_includedir}/asl
|
||||
cp -a include %{buildroot}%{_prefix}
|
||||
install -pm 644 src/asl/*.h %{buildroot}%{_includedir}/asl
|
||||
install -pm 644 src/asl/solvers/*.h build/src/asl/*.h %{buildroot}%{_includedir}/asl
|
||||
install -pm 755 build/bin/libasl.so* %{buildroot}%{_libdir}
|
||||
install -pm 755 build/bin/libmp.so* %{buildroot}%{_libdir}
|
||||
install -pm 755 build/bin/amplgsl.dll %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/ampltabl.dll %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/arithchk %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/cp.dll %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/fullbit.dll %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/gecode %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/gjh %{buildroot}%{_libdir}/%{name}/bin
|
||||
%if %{with_jacop}
|
||||
%ifnarch %{arm} aarch64
|
||||
install -pm 755 build/bin/jacop %{buildroot}%{_libdir}/%{name}/bin
|
||||
%endif
|
||||
%endif
|
||||
install -pm 755 build/bin/smpswriter %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/simpbit.dll %{buildroot}%{_libdir}/%{name}/bin
|
||||
install -pm 755 build/bin/tableproxy%{__isa_bits} %{buildroot}%{_libdir}/%{name}/bin
|
||||
|
||||
## Fix symbolic links
|
||||
ln -srf %{_libdir}/libasl.so.%{version} %{buildroot}%{_libdir}/libasl.so.3
|
||||
ln -srf %{_libdir}/libasl.so.3 %{buildroot}%{_libdir}/libasl.so
|
||||
ln -srf %{_libdir}/libmp.so.%{version} %{buildroot}%{_libdir}/libmp.so.3
|
||||
ln -srf %{_libdir}/libmp.so.3 %{buildroot}%{_libdir}/libmp.so
|
||||
|
||||
chrpath --delete %{buildroot}%{_libdir}/libasl.so.%{version}
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/amplgsl.dll
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/ampltabl.dll
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/arithchk
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/cp.dll
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/fullbit.dll
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/gecode
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/gjh
|
||||
%if %{with_jacop}
|
||||
%ifnarch %{arm} aarch64
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/jacop
|
||||
%endif
|
||||
%endif
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/smpswriter
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/simpbit.dll
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/bin/tableproxy%{__isa_bits}
|
||||
|
||||
%check
|
||||
make -C build test
|
||||
pushd build
|
||||
%if 0%{?rhel}
|
||||
ctest%{cmake_ver} --force-new-ctest-process
|
||||
%else
|
||||
ctest --force-new-ctest-process
|
||||
%endif
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%doc README.rst
|
||||
%license LICENSE.rst
|
||||
%doc %{_docdir}/%{name}/README.rst
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/bin
|
||||
%{_libdir}/%{name}/
|
||||
%{_libdir}/*.so.*
|
||||
%{_datadir}/Modules/modulefiles/%{name}-%{_arch}
|
||||
|
||||
%files devel
|
||||
%doc %{_docdir}/%{name}
|
||||
%exclude %{_docdir}/%{name}/README.rst
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/asl
|
||||
%{_includedir}/mp
|
||||
|
||||
%changelog
|
||||
* Fri Mar 04 2016 Antonio Trande <sagitter@fedoraproject.org.com> - 3.0.1-0.1
|
||||
- Update to 3.0.1 prerelease (commit #9fdb514)
|
||||
|
||||
* Thu Mar 03 2016 Antonio Trande <sagitter@fedoraproject.org.com> - 3.0.0-1
|
||||
- Update to 3.0.0
|
||||
|
||||
* Wed Mar 02 2016 Antonio Trande <sagitter@fedoraproject.org.com> - 2.1.1-0.2
|
||||
- Built with cmake3 on EPEL
|
||||
|
||||
* Tue Mar 01 2016 Antonio Trande <sagitter@fedoraproject.org.com> - 2.1.1-0.1
|
||||
- Update to 2.1.0
|
||||
- Dropped old patches for 1.3.0
|
||||
- Jacop support disabled on EPEL
|
||||
- Patched for GCC6
|
||||
- Patched for GSL-2.1
|
||||
- fpinit patched for ARM
|
||||
|
||||
* Mon Feb 22 2016 Orion Poplawski <orion@cora.nwra.com> - 1.3.0-10
|
||||
- Rebuild for gsl 2.1
|
||||
- Rebuild for gsl 2.1
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
|
Loading…
Reference in New Issue