Update to recent git snapshot. Build with cryptominisat5 support.

This commit is contained in:
Jerry James 2017-11-25 14:46:18 -07:00
parent fd15cbd0c4
commit fd826ecc72
4 changed files with 19 additions and 35 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/stp-stp-5405af4.tar.gz
/stp-stp-3785148.tar.gz
/stp-stp-b67aa83.tar.gz

View File

@ -1 +1 @@
cbbfa73c2d4218b70a1b7b36934e62ec stp-stp-3785148.tar.gz
SHA512 (stp-stp-b67aa83.tar.gz) = 6d819da7d0605d3a5b858a3f23831a2ca7b5cb6d4a123ca8968926447fe55a6327623c345b06631a778d367a74793eb525c2dcfd5ccedcecc6094fb17d8f624c

View File

@ -1,6 +1,6 @@
--- tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2015-11-22 12:32:02.000000000 -0700
+++ tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2016-02-20 20:08:02.920074762 -0700
@@ -1228,7 +1228,7 @@
--- tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2017-11-16 15:35:07.000000000 -0700
+++ tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2017-11-25 08:42:45.331112638 -0700
@@ -1223,7 +1223,7 @@ void rule_to_string(const ASTNode& n, AS
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
@ -9,7 +9,7 @@
string s(t);
rule_to_string(n[i], names, s, sofar);
}
@@ -1247,7 +1247,7 @@
@@ -1242,7 +1242,7 @@ string containsNode(const ASTNode& n, co
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
@ -18,12 +18,3 @@
string s(t);
string r = containsNode(n[i], hunting, s);
if (r != "")
@@ -1477,7 +1477,7 @@
for (size_t i = 0; i < n.Degree(); i++)
{
char t[1000];
- sprintf(t, "%s[%d]", current.c_str(), i);
+ sprintf(t, "%s[%zu]", current.c_str(), i);
string s(t);
visit_all(n[i], visited, s);
}

View File

@ -1,13 +1,13 @@
# Upstream occasionally releases a git snapshot, but no "regular" releases
# since the 0.1 release.
%global gitdate 20151122
%global gittag 3785148da15919de445e476a6f20b06c881cf50c
%global gitdate 20171116
%global gittag b67aa8396762a5831f0d228b4db26e77392774ae
%global shorttag %(cut -b -7 <<< %{gittag})
%global user stp
Name: stp
Version: 2.1.2
Release: 9.%{gitdate}git.%{shorttag}%{?dist}
Release: 10.%{gitdate}git.%{shorttag}%{?dist}
Summary: Constraint solver/decision procedure
License: MIT
@ -21,8 +21,6 @@ BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: cryptominisat
BuildRequires: cryptominisat-devel
BuildRequires: cryptominisat4
BuildRequires: cryptominisat4-devel
BuildRequires: gcc-c++
BuildRequires: minisat2-devel
BuildRequires: flex
@ -60,6 +58,7 @@ or automated prover). Provides a static library.
Summary: Python 2 interface to STP
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
@ -72,34 +71,23 @@ Python 2 interface to STP.
# We do not want to know about the order of member initializers
sed -i "s/-Wno-deprecated/-Wno-reorder/" CMakeLists.txt
# Prevent a clash between minisat and cryptominisat4 definitions
# Prevent a clash between minisat and cryptominisat5 definitions
sed '/SATSolver.h/a#undef var_Undef\n#undef l_True\n#undef l_False\n#undef l_Undef' \
-i.orig include/stp/Sat/CryptoMinisat4.h
touch -r include/stp/Sat/CryptoMinisat4.h.orig include/stp/Sat/CryptoMinisat4.h
rm -f include/stp/Sat/CryptoMinisat4.h.orig
-i.orig include/stp/Sat/CryptoMinisat5.h
touch -r include/stp/Sat/CryptoMinisat5.h.orig include/stp/Sat/CryptoMinisat5.h
rm -f include/stp/Sat/CryptoMinisat5.h.orig
%build
export CFLAGS="%{optflags} -I %{_includedir}/minisat"
export CXXFLAGS="%{optflags} -I %{_includedir}/minisat"
export LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
%cmake -DALSO_BUILD_STATIC_LIB=0
%cmake
# FIXME: %%{?_smp_mflags} doesn't work due to running genkinds.pl too late
make
%install
make install DESTDIR=%{buildroot}
# Fix up the libdir install on 64-bit targets
if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
mkdir %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/cmake %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/libstp.so* %{buildroot}%{_libdir}
sed -i 's,/usr/lib/,%{_libdir}/,' \
%{buildroot}%{_libdir}/cmake/STP/STPTargets.cmake
sed -i 's,\(\${_IMPORT_PREFIX}/lib\)/,\164/,' \
%{buildroot}%{_libdir}/cmake/STP/STPTargets-relwithdebinfo.cmake
fi
%files
%{_bindir}/*
%{_libdir}/libstp.so.*
@ -115,6 +103,10 @@ fi
%{python2_sitelib}/%{name}/
%changelog
* Sat Nov 25 2017 Jerry James <loganjerry@gmail.com> - 2.1.2-10.20171116git.b67aa83
- Update to recent git snapshot
- Build with cryptominisat5 support
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.1.2-9.20151122git.3785148
- Python 2 binary package renamed to python2-stp
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3