New upstream version. Drop python2 subpackage (bz 1634981).

This commit is contained in:
Jerry James 2018-10-30 21:15:28 -06:00
parent 4c5d018dee
commit 9257eb278f
2 changed files with 15 additions and 36 deletions

View File

@ -1 +1 @@
SHA512 (z3-4.7.1.tar.gz) = 4c8c856691134298c4b5e465d6fadfe446532dfcd8c92aed7c9a6bbfc8557074a45cd7316dbfa5045824e2504db159afeb8ff676d4bfc942496623cf31d11aa0
SHA512 (z3-4.8.1.tar.gz) = f3311d07f6375d3d294d9c495b0ce4022258dd95b1f6bec93bdf5a60d074c75fd13daf1da7b67753acb4084e33395088513dfd85fe5c2cf76913ba0107e5782b

49
z3.spec
View File

@ -1,8 +1,8 @@
%global medtag 3b1b82bef05a
Name: z3
Version: 4.7.1
Release: 6%{?dist}
Version: 4.8.1
Release: 1%{?dist}
Summary: Satisfiability Modulo Theories (SMT) solver
License: MIT
@ -19,8 +19,6 @@ BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-num-devel
BuildRequires: python2-devel
BuildRequires: python2dist(setuptools)
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
@ -77,19 +75,15 @@ Requires: ocaml-%{name}%{?_isa} = %{version}-%{release}
%description -n ocaml-%{name}-devel
Files for building ocaml applications that use z3.
%package -n python2-%{name}
%{?python_provide:%python_provide python2-%{name}}
Summary: Python 2 interface to z3
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
Python 2 interface to z3.
%package -n python3-%{name}
%{?python_provide:%python_provide python3-%{name}}
Summary: Python 3 interface to z3
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# This can be removed once Fedora 29 reaches EOL
Obsoletes: python2-%{name} < 4.8
Provides: python2-%{name} = 4.8
%description -n python3-%{name}
Python 3 interface to z3.
@ -101,7 +95,7 @@ Python 3 interface to z3.
# contents of the archives in the library, link the library with the correct
# flags, don't hide library symbols needed by the executable, use an soname,
# and build the ocaml files with debug info.
sed -e "s|^\(PYTHON_PACKAGE_DIR=\).*|\1'%{python2_sitearch}'|" \
sed -e "s|^\(PYTHON_PACKAGE_DIR=\).*|\1'%{python3_sitearch}'|" \
-e 's/@$(CXX)/$(CXX)/' \
-e '/O3/d' \
-e "s/\(['\"]\)cp\([^[:alnum:]]\)/\1cp -p\2/" \
@ -134,9 +128,8 @@ find -O3 src -type f -perm /0111 \( -name \*.cpp -o -name \*.h \) \
%build
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
export LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed -lgmp"
export LANG="C.UTF-8"
export PYTHON="%{__python2}"
export PYTHON="%{__python3}"
# This is NOT an autoconf-generated configure script.
./configure -p %{_prefix} --githash=%{medtag} --gmp --java --ml --python
@ -149,22 +142,14 @@ pushd build
mv libz3.so libz3.so.0.0.0
ln -s libz3.so.0.0.0 libz3.so.0
ln -s libz3.so.0 libz3.so
g++ $RPM_OPT_FLAGS -fopenmp -o z3 shell/*.o $LDFLAGS -L. -lz3
g++ $RPM_OPT_FLAGS -fopenmp -o z3 shell/*.o $RPM_LD_FLAGS -L. -lz3 -lgmp
popd
# Build the documentation
pushd doc
%{__python2} mk_api_doc.py --ml --no-dotnet
%{__python3} mk_api_doc.py --ml --no-dotnet
popd
# Build for python3
mv build build2
sed -i "s|%{python2_sitearch}|%{python3_sitearch}|" scripts/mk_util.py
export PYTHON="%{__python3}"
./configure -p %{_prefix} --githash=%{medtag} --gmp --python
# FIXME: intermittent build failures with %%{?_smp_mflags}
make -C build
%install
export LANG="C.UTF-8"
@ -173,11 +158,6 @@ make -C build install DESTDIR=%{buildroot}
rm -f %{buildroot}%{python3_sitearch}/%{name}/lib/libz3.so
ln -s %{_libdir}/libz3.so.0 %{buildroot}%{python3_sitearch}/%{name}/lib/libz3.so
# Install the python2 interface
make -C build2 install DESTDIR=%{buildroot}
rm -f %{buildroot}%{python2_sitearch}/%{name}/lib/libz3.so
ln -s %{_libdir}/libz3.so.0 %{buildroot}%{python2_sitearch}/%{name}/lib/libz3.so
# On 64-bit systems, move the library to the right directory
if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
mkdir -p %{buildroot}%{_libdir}
@ -213,8 +193,6 @@ mv %{buildroot}%{_prefix}/lib/lib%{name}java.so %{buildroot}%{_libdir}/%{name}
#./test-z3 /a
#popd
%ldconfig_scriptlets
%files
%doc README.md RELEASE_NOTES
%{_bindir}/%{name}
@ -249,13 +227,14 @@ mv %{buildroot}%{_prefix}/lib/lib%{name}java.so %{buildroot}%{_libdir}/%{name}
%{_libdir}/ocaml/Z3/*.cmxa
%{_libdir}/ocaml/Z3/*.mli
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%changelog
* Tue Oct 30 2018 Jerry James <loganjerry@gmail.com> - 4.8.1-1
- New upstream version
- Drop python2 subpackage (bz 1634981)
* Fri Sep 7 2018 Jerry James <loganjerry@gmail.com> - 4.7.1-5
- Build with SSE2 support on 32-bit x86