Detect strtod and install extra headers
This commit is contained in:
parent
73b966d6f1
commit
302a83e567
22
mp-strtod.patch
Normal file
22
mp-strtod.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up mp-9fdb5147068f3b719999210e56b493327f1ca5e7/src/asl/solvers/asl.h.orig mp-9fdb5147068f3b719999210e56b493327f1ca5e7/src/asl/solvers/asl.h
|
||||
--- mp-9fdb5147068f3b719999210e56b493327f1ca5e7/src/asl/solvers/asl.h.orig 2016-03-16 18:16:10.961987586 -0300
|
||||
+++ mp-9fdb5147068f3b719999210e56b493327f1ca5e7/src/asl/solvers/asl.h 2016-03-16 18:17:21.067990271 -0300
|
||||
@@ -1104,17 +1104,7 @@ QPinfo {
|
||||
extern void xunkno_(VOID);
|
||||
extern void zero_div_ASL(ASL*, real, const char*);
|
||||
|
||||
-#ifndef No_dtoa
|
||||
- extern double strtod_ASL(Const char*, char**);
|
||||
-#ifndef strtod /* if not set by previous funcadd.h */
|
||||
-#define strtod strtod_ASL
|
||||
-#endif
|
||||
-extern void ACQUIRE_DTOA_LOCK(unsigned int);
|
||||
-extern void FREE_DTOA_LOCK(unsigned int);
|
||||
-extern int dtoa_get_threadno(void);
|
||||
-extern void init_dtoa_locks(void);
|
||||
-extern void set_max_dtoa_threads(unsigned int);
|
||||
-#endif
|
||||
+#undef strtod
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
12
mp.spec
12
mp.spec
@ -15,12 +15,13 @@
|
||||
|
||||
Name: mp
|
||||
Version: 3.0.1
|
||||
Release: 0.1%{?dist}
|
||||
Release: 0.2%{?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
|
||||
Patch0: mp-strtod.patch
|
||||
Requires: environment(modules)
|
||||
BuildRequires: atlas-devel
|
||||
%if 0%{?rhel}
|
||||
@ -84,6 +85,7 @@ for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{commit}
|
||||
%patch0 -p1
|
||||
%if %{with_jacop}
|
||||
ln -s %{_javadir}/jacop/jacop.jar thirdparty/jacop/jacop-`rpm -q --qf "%%{VERSION}" jacop`.jar
|
||||
%endif
|
||||
@ -139,6 +141,10 @@ 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
|
||||
|
||||
# Required by coin-or-Couenne
|
||||
install -pm 644 src/asl/solvers/{opcode,r_opn}.hd %{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
|
||||
@ -204,6 +210,10 @@ ctest --force-new-ctest-process
|
||||
%{_includedir}/mp
|
||||
|
||||
%changelog
|
||||
* Wed Mar 16 2016 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.0.1-0.2
|
||||
- Avoid incorrect system detection and use of strtod_ASL wrapper
|
||||
- Install extra headers required by coin-or-Couenne
|
||||
|
||||
* Fri Mar 04 2016 Antonio Trande <sagitter@fedoraproject.org.com> - 3.0.1-0.1
|
||||
- Update to 3.0.1 prerelease (commit #9fdb514)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user