Compare commits

...
Sign in to create a new pull request.

29 commits

Author SHA1 Message Date
Jerry James
9e823927c1 Version 5.1.0 2026-08-22 08:06:31 -06:00
Jerry James
f5dee7eebd Version 5.0.0
- Drop s390x doc workaround
2026-07-24 13:50:31 -06:00
Fedora Release Engineering
5bbbab5541 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:37:28 +00:00
Jerry James
81f8e8f923 OCaml 5.5.0 rebuild
- Use the cmake declarative buildsystem
2026-07-09 12:05:02 -06:00
Python Maint
7279f1bd1f Rebuilt for Python 3.15 2026-06-03 21:19:42 +02:00
Jerry James
d409226999 Version 4.16.0 2026-03-03 06:49:05 -07:00
Richard W.M. Jones
190ba8bd4a OCaml 5.4.1 rebuild 2026-02-20 17:46:07 +00:00
Jerry James
d923002a80 Version 4.15.8 2026-02-12 17:59:26 -07:00
Jerry James
4857863f07 Version 4.15.7
- Make the doc subpackage noarch again
2026-02-09 21:17:37 -07:00
Fedora Release Engineering
ed67b528b5 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:04:57 +00:00
Jerry James
0e1cc63874 Reflow the description text
- Be more precise about globbing in %files
2026-01-14 08:53:40 -07:00
Jerry James
514a1e5e56 Version 4.15.4 2025-10-30 09:56:46 -06:00
Richard W.M. Jones
73af82e419 OCaml 5.4.0 rebuild 2025-10-13 21:32:24 +01:00
Python Maint
437edefdb9 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 15:04:28 +02:00
Jerry James
b4193b0bfb Version 4.15.3 2025-08-16 15:19:33 -06:00
Python Maint
ae57f90143 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:23:57 +02:00
Jerry James
466f109dbd Stop building on 32-bit x86
- Provide the PyPI name for the python subpackage
2025-08-06 19:58:21 -06:00
Fedora Release Engineering
22a3a8a326 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:15:02 +00:00
Jerry James
043ebfe270 Rebuild to fix OCaml dependencies 2025-07-11 16:48:34 -06:00
Jerry James
507d8c8993 Version 4.15.2 2025-06-25 14:15:56 -06:00
Jerry James
0e4394de82 Version 4.15.1 2025-06-11 06:46:55 -06:00
Python Maint
5720dba19b Rebuilt for Python 3.14 2025-06-02 22:56:18 +02:00
Jerry James
71f8a222c8 Version 4.15.0 2025-05-21 13:43:17 -06:00
Yaakov Selkowitz
9c591d7697 Specify Python bindings installation directory
This is needed for flatpak builds which install into the /app prefix while
python is part of the runtime in /usr (but is configured to find modules in
/app as well for flatpaks).
2025-05-05 08:16:30 -04:00
Jerry James
d134122827 Version 4.14.1 2025-03-11 10:14:39 -06:00
Jerry James
b0d1169569 Version 4.14.0 2025-03-04 13:24:44 -07:00
Fedora Release Engineering
0e33bcfe81 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:39:17 +00:00
Jerry James
4379c0be96 Move configuration steps to %conf 2025-01-15 15:13:42 -07:00
Jerry James
d7781ac96b Version 4.13.4 2024-12-27 11:42:08 -07:00
2 changed files with 53 additions and 77 deletions

View file

@ -1 +1 @@
SHA512 (z3-4.13.3.tar.gz) = c899f57d8cb5450801463b07cd651869d766a920e41a4beedc96c4978e940bfadff9af2fbbb5ba10f94f6742bb33f7abaca0a351f3e1803d778e84d735d6829e
SHA512 (z3-5.1.0.tar.gz) = 03a854f720a56484ab99b8a5517150f1c9106400f54ad758cfa58e3ee2f95e349396a64d4f527a5bb9ee37f10ad9ecfa1916d1f5c921f04089deda409374491b

128
z3.spec
View file

@ -7,17 +7,21 @@
# unless somebody is really, really persuasive and available to help fix it
# if it breaks.
# A Go interface is now available, but Fedora no longer builds Go library
# packages (https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/).
# Tests are off by default because some of the tests require more memory than
# the koji builders have available.
%bcond test 0
%global giturl https://github.com/Z3Prover/z3
Name: z3
Version: 4.13.3
Version: 5.1.0
Release: %autorelease
Summary: Satisfiability Modulo Theories (SMT) solver
%global giturl https://github.com/Z3Prover/z3
%global majver %{gsub %version ^(%d*%.%d*)%..*$ %1}
License: MIT
URL: https://github.com/Z3Prover/z3/wiki
VCS : git:%{giturl}.git
@ -25,7 +29,21 @@ Source: %{giturl}/archive/%{name}-%{version}.tar.gz
# Do not try to build or install native OCaml artifacts on bytecode-only arches
Patch: %{name}-ocaml.patch
BuildRequires: cmake
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildSystem: cmake
BuildOption(conf): -G Ninja
BuildOption(conf): -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/z3
BuildOption(conf): -DZ3_BUILD_DOCUMENTATION:BOOL=ON
%ifarch %{java_arches}
BuildOption(conf): -DZ3_BUILD_JAVA_BINDINGS:BOOL=ON
%endif
BuildOption(conf): -DZ3_BUILD_PYTHON_BINDINGS:BOOL=ON
BuildOption(conf): -DCMAKE_INSTALL_PYTHON_PKG_DIR=%{python3_sitelib}
BuildOption(conf): -DZ3_INCLUDE_GIT_HASH:BOOL=OFF
BuildOption(conf): -DZ3_INCLUDE_GIT_DESCRIBE:BOOL=OFF
BuildOption(conf): -DZ3_USE_LIB_GMP:BOOL=ON
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: gmp-devel
@ -37,40 +55,32 @@ BuildRequires: javapackages-tools
%endif
BuildRequires: make
BuildRequires: ninja-build
%ifnarch %{ix86}
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-zarith-devel
%endif
BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
%description
Z3 is a satisfiability modulo theories (SMT) solver; given a set of
constraints with variables, it reports a set of values for those
variables that would meet the constraints. The Z3 input format is an
extension of the one defined by the SMT-LIB 2.0 standard. Z3 supports
arithmetic, fixed-size bit-vectors, extensional arrays, datatypes,
uninterpreted functions, and quantifiers.
constraints with variables, it reports a set of values for those variables
that would meet the constraints. The Z3 input format is an extension of the
one defined by the SMT-LIB 2.0 standard. Z3 supports arithmetic, fixed-size
bit-vectors, extensional arrays, datatypes, uninterpreted functions, and
quantifiers.
%package libs
Summary: Library for applications that use z3 functionality
# This can be removed when F40 reaches EOL
%ifnarch %{java_arches}
Obsoletes: java-z3 < 4.8.17-5
%endif
%description libs
Library for applications that use z3 functionality.
%package devel
Summary: Header files for build applications that use z3
Summary: Header files for building applications that use z3
Requires: z3-libs%{?_isa} = %{version}-%{release}
%description devel
Header files for build applications that use z3.
Header files for building applications that use z3.
%package doc
# The content is MIT.
@ -78,37 +88,19 @@ Header files for build applications that use z3.
# examples/tptp/tptp5.tab.c
# examples/tptp/tptp5.tab.c
# Other licenses are due to files installed by doxygen.
# html/bc_s.png: GPL-1.0-or-later
# html/bdwn.png: GPL-1.0-or-later
# html/closed.png: GPL-1.0-or-later
# html/doc.png: GPL-1.0-or-later
# html/clipboard.js: MIT
# html/cookie.js: MIT
# html/doxygen.css: GPL-1.0-or-later
# html/doxygen.svg: GPL-1.0-or-later
# html/dynsections.js: MIT
# html/folderclosed.png: GPL-1.0-or-later
# html/folderopen.png: GPL-1.0-or-later
# html/jquery.js: MIT
# html/nav_f.png: GPL-1.0-or-later
# html/nav_g.png: GPL-1.0-or-later
# html/nav_h.png: GPL-1.0-or-later
# html/open.png: GPL-1.0-or-later
# html/navtree.css: GPL-1.0-or-later
# html/search/search.css: GPL-1.0-or-later
# html/search/search.js: MIT
# html/search/search_l.png: GPL-1.0-or-later
# html/search/search_m.png: GPL-1.0-or-later
# html/search/search_r.png: GPL-1.0-or-later
# html/splitbar.png: GPL-1.0-or-later
# html/sync_off.png: GPL-1.0-or-later
# html/sync_on.png: GPL-1.0-or-later
# html/tab_a.png: GPL-1.0-or-later
# html/tab_b.png: GPL-1.0-or-later
# html/tab_h.png: GPL-1.0-or-later
# html/tab_s.png: GPL-1.0-or-later
# html/tabs.css: GPL-1.0-or-later
License: MIT AND GPL-3.0-or-later WITH Bison-exception-2.2 AND GPL-1.0-or-later
Summary: API documentation for Z3
# FIXME: this should be noarch, but we end up with different numbers of inheritance
# graphs on different architectures. Why?
BuildArch: noarch
%description doc
API documentation for Z3.
@ -124,8 +116,6 @@ Requires: javapackages-tools
Java interface to z3.
%endif
# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
%ifnarch %{ix86}
%package -n ocaml-z3
Summary: Ocaml interface to z3
Requires: z3-libs%{?_isa} = %{version}-%{release}
@ -140,20 +130,22 @@ Requires: ocaml-zarith-devel%{?_isa}
%description -n ocaml-z3-devel
Files for building ocaml applications that use z3.
%endif
%package -n python3-z3
Summary: Python 3 interface to z3
BuildArch: noarch
Requires: z3-libs = %{version}-%{release}
# Provide the PyPI name
%py_provides python3-z3-solver
%description -n python3-z3
Python 3 interface to z3.
%prep
%autosetup -N -n %{name}-%{name}-%{version}
%ifnarch %{ocaml_native_compiler}
%patch -P0 -p1
%patch 0 -p1
%endif
# Enable verbose builds, use Fedora CFLAGS, preserve timestamps when installing,
@ -165,37 +157,29 @@ sed \
-e "s/\(['\"]\)cp\([^[:alnum:]]\)/\1cp -p\2/" \
-e "s/\(SLIBEXTRAFLAGS = '\)'/\1-Wl,--no-whole-archive'/" \
-e '/SLIBFLAGS/s|-shared|& %{build_ldflags} -Wl,--whole-archive|' \
-e 's/\(libz3$(SO_EXT)\)\(\\n\)/\1 -Wl,--no-whole-archive\2/' \
-e 's/\(libz3$(SO_EXT)\)\( \$(SLINK\)/\1 -Wl,--no-whole-archive\2/' \
-e "s/OCAML_FLAGS = ''/OCAML_FLAGS = '-g'/" \
-i scripts/mk_util.py
# Comply with the Java packaging guidelines and fill in the version for python
majver=$(cut -d. -f-2 <<< %{version})
sed -e '/libz3java/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so"),' \
-e "s/'so'/'so.$majver'/" \
-e "s/'so'/'so.%{majver}'/" \
-i scripts/update_api.py
# Turn off HTML timestamps for reproducible builds
sed -i '/HTML_TIMESTAMP/s/YES/NO/' doc/z3api.cfg.in doc/z3code.dox
%build
%build -p
export PYTHON=%{python3}
%cmake -G Ninja \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/z3 \
-DCMAKE_JAVA_COMPILE_FLAGS="-source;1.8;-target;1.8" \
-DZ3_BUILD_DOCUMENTATION:BOOL=ON \
%ifarch %{java_arches}
-DZ3_BUILD_JAVA_BINDINGS:BOOL=ON \
%endif
-DZ3_BUILD_PYTHON_BINDINGS:BOOL=ON \
-DZ3_INCLUDE_GIT_HASH:BOOL=OFF \
-DZ3_INCLUDE_GIT_DESCRIBE:BOOL=OFF \
-DZ3_USE_LIB_GMP:BOOL=ON
%build -a
# Remove meaningless memory addresses from the pydoc documentation
# See https://github.com/python/cpython/issues/83572
sed -ri 's/, handle [0-9a-fA-F]+//' \
%{_vpath_builddir}/doc/api/html/z3{,.z3{,num,poly,printer,rcf,util}}.html
sed -ri 's/ at 0x[0-9a-fA-F]+//g' \
%{_vpath_builddir}/doc/api/html/z3.z3core.html
%cmake_build
%ifnarch %{ix86}
# The cmake build system does not build the OCaml interface. Do that manually.
#
# First, run the configure script to generate several files.
@ -212,12 +196,8 @@ sed -i '/^api/s/ libz3\$(SO_EXT)//g' build/Makefile
# Fourth, build the OCaml interface
%make_build -C build ml
%endif
%install
# Install the C++, python3, and Java interfaces
%cmake_install
%install -a
%ifarch %{java_arches}
# Move the Java interface to its correct location
mkdir -p %{buildroot}%{_libdir}/z3
@ -227,7 +207,6 @@ ln -s %{_jnidir}/com.microsoft.z3.jar %{buildroot}%{_libdir}/z3
mv %{buildroot}%{_libdir}/libz3java.so %{buildroot}%{_libdir}/z3
%endif
%ifnarch %{ix86}
# Install the OCaml interface
cd build/api/ml
mkdir -p %{buildroot}%{ocamldir}/Z3
@ -238,7 +217,6 @@ cp -p META *.{a,cma,cmi,mli} %{buildroot}%{ocamldir}/Z3
mkdir -p %{buildroot}%{ocamldir}/stublibs
cp -p *.so %{buildroot}%{ocamldir}/stublibs
cd -
%endif
# We handle the documentation files below
rm -rf %{buildroot}%{_docdir}/Z3
@ -251,8 +229,8 @@ help2man -N -o %{buildroot}%{_mandir}/man1/z3.1 \
# Fix the pkgconfig file
sed -i 's,//usr,,' %{buildroot}%{_libdir}/pkgconfig/z3.pc
%if %{with test}
%check
%if %{with test}
cd build
make test-z3
./test-z3 /a
@ -266,7 +244,7 @@ cd -
%files libs
%license LICENSE.txt
%{_libdir}/libz3.so.4.13*
%{_libdir}/libz3.so.5.1{,.*}
%files devel
%{_includedir}/z3/
@ -281,10 +259,9 @@ cd -
%ifarch %{java_arches}
%files -n java-z3
%{_libdir}/z3/
%{_jnidir}/com.microsoft.z3*jar
%{_jnidir}/com.microsoft.z3.jar
%endif
%ifnarch %{ix86}
%files -n ocaml-z3
%dir %{ocamldir}/Z3/
%{ocamldir}/Z3/META
@ -293,7 +270,7 @@ cd -
%ifarch %{ocaml_native_compiler}
%{ocamldir}/Z3/*.cmxs
%endif
%{ocamldir}/stublibs/*.so
%{ocamldir}/stublibs/dllz3ml.so
%files -n ocaml-z3-devel
%{ocamldir}/Z3/*.a
@ -302,7 +279,6 @@ cd -
%{ocamldir}/Z3/*.cmxa
%endif
%{ocamldir}/Z3/*.mli
%endif
%files -n python3-z3
%{python3_sitelib}/z3/