public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/z3] f45: Version 5.3.1
@ 2026-10-25 12:41 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-10-25 12:41 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/z3
            Branch : f45
            Commit : 37767d684289ea82b2ee75af04fbd1eaad23024d
            Author : Jerry James <loganjerry@gmail.com>
            Date   : 2026-10-24T13:13:17-06:00
            Stats  : +26/-111 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/z3/c/37767d684289ea82b2ee75af04fbd1eaad23024d?branch=f45

            Log:
            Version 5.3.1

- Drop irrelevant OCaml bytecode patch

---
diff --git a/sources b/sources
index 949de7f..1478bf1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (z3-5.1.0.tar.gz) = 03a854f720a56484ab99b8a5517150f1c9106400f54ad758cfa58e3ee2f95e349396a64d4f527a5bb9ee37f10ad9ecfa1916d1f5c921f04089deda409374491b
+SHA512 (z3-5.3.1.tar.gz) = 6c2c3fbefa6890f25c21a6830b56cc6e28591a21e7fb22b31ff88b7559c082afbe903614869822088466152db4b26e1faeb57206bd95b1aa1a921873ad1615a2

diff --git a/z3-ocaml.patch b/z3-ocaml.patch
deleted file mode 100644
index 32e0857..0000000
--- a/z3-ocaml.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- z3-z3-4.12.2/scripts/mk_util.py.orig	2023-05-12 13:59:04.000000000 -0600
-+++ z3-z3-4.12.2/scripts/mk_util.py	2023-07-06 11:53:06.045350565 -0600
-@@ -34,7 +34,7 @@ EXAMP_DEBUG_FLAG=''
- LDFLAGS=getenv("LDFLAGS", "")
- JNI_HOME=getenv("JNI_HOME", None)
- OCAMLC=getenv("OCAMLC", "ocamlc")
--OCAMLOPT=getenv("OCAMLOPT", "ocamlopt")
-+OCAMLOPT=getenv("OCAMLOPT", None)
- OCAML_LIB=getenv("OCAML_LIB", None)
- OCAMLFIND=getenv("OCAMLFIND", "ocamlfind")
- DOTNET="dotnet"
-@@ -460,13 +460,9 @@ def check_ml():
-         raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
-     if is_verbose():
-         print ('Testing %s...' % OCAMLOPT)
--    r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
--    if r != 0:
--        raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
-     try:
-         rmf('hello.cmi')
-         rmf('hello.cmo')
--        rmf('hello.cmx')
-         rmf('a.out')
-         rmf('hello.o')
-     except:
-@@ -2069,7 +2065,7 @@ class MLComponent(Component):
-             out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
- 
-             out.write('\n')
--            out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
-+            out.write('ml: %s.cma\n' % z3mls)
-             if IS_OSX:
-                 out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
-                 out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
-@@ -2091,8 +2087,6 @@ class MLComponent(Component):
-             out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
-             out.write(os.path.join(self.sub_dir, 'META '))
-             out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
--            out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
--            out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
- 
-     def mk_install(self, out):
-         if is_ml_enabled() and self._install_bindings():
-@@ -2119,12 +2113,9 @@ class MLComponent(Component):
-                 else:
-                     out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
-                 out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
--                out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
-             out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
-             out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
-             out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
--            out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
--            out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
-             out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
-             if is_windows() or is_cygwin_mingw() or is_msys2():
-                 out.write('.dll')

diff --git a/z3.spec b/z3.spec
index 3c1df16..a6c5a58 100644
--- a/z3.spec
+++ b/z3.spec
@@ -15,7 +15,7 @@
 %bcond test 0
 
 Name:           z3
-Version:        5.1.0
+Version:        5.3.1
 Release:        %autorelease
 Summary:        Satisfiability Modulo Theories (SMT) solver
 
@@ -26,8 +26,6 @@ License:        MIT
 URL:            https://github.com/Z3Prover/z3/wiki
 VCS :           git:%{giturl}.git
 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
 
 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
@@ -38,6 +36,7 @@ BuildOption(conf): -DZ3_BUILD_DOCUMENTATION:BOOL=ON
 %ifarch %{java_arches}
 BuildOption(conf): -DZ3_BUILD_JAVA_BINDINGS:BOOL=ON
 %endif
+BuildOption(conf): -DZ3_BUILD_OCAML_BINDINGS:BOOL=ON
 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
@@ -125,6 +124,7 @@ Ocaml interface to z3.
 
 %package -n ocaml-z3-devel
 Summary:        Files for building ocaml applications that use z3
+Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
 Requires:       ocaml-z3%{?_isa} = %{version}-%{release}
 Requires:       ocaml-zarith-devel%{?_isa}
 
@@ -144,22 +144,6 @@ Python 3 interface to z3.
 
 %prep
 %autosetup -N -n %{name}-%{name}-%{version}
-%ifnarch %{ocaml_native_compiler}
-%patch 0 -p1
-%endif
-
-# Enable verbose builds, use Fedora CFLAGS, preserve timestamps when installing,
-# include the entire contents of the archives in the library, link the library
-# with the correct flags, and build the ocaml files with debuginfo.
-sed \
-  -e 's/@$(CXX)/$(CXX)/' \
-  -e '/O3/d' \
-  -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)\)\( \$(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
 sed -e '/libz3java/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so"),' \
@@ -169,6 +153,9 @@ sed -e '/libz3java/s,\(System\.load\)Library("\(.*\)"),\1("%{_libdir}/z3/\2.so")
 # Turn off HTML timestamps for reproducible builds
 sed -i '/HTML_TIMESTAMP/s/YES/NO/' doc/z3api.cfg.in doc/z3code.dox
 
+# We are Linux, not OS X
+sed -i 's/DYLD_LIBRARY_PATH/LD_LIBRARY_PATH/g' src/api/ml/CMakeLists.txt
+
 %build -p
 export PYTHON=%{python3}
 
@@ -180,23 +167,6 @@ sed -ri 's/, handle [0-9a-fA-F]+//' \
 sed -ri 's/ at 0x[0-9a-fA-F]+//g' \
     %{_vpath_builddir}/doc/api/html/z3.z3core.html
 
-# The cmake build system does not build the OCaml interface.  Do that manually.
-#
-# First, run the configure script to generate several files.
-# This is NOT an autoconf-generated configure script.
-./configure -p %{_prefix} --gmp --ml
-
-# Second, to prevent make from rebuilding the entire library, copy the
-# cmake-built library to where make expects it.
-cp -dp %{_vpath_builddir}/libz3.so* build
-
-# Third, make wants to rebuild libz3.so since its dependencies do not exist.
-# Do selective Makefile surgery to prevent this.
-sed -i '/^api/s/ libz3\$(SO_EXT)//g' build/Makefile
-
-# Fourth, build the OCaml interface
-%make_build -C build ml
-
 %install -a
 %ifarch %{java_arches}
 # Move the Java interface to its correct location
@@ -207,19 +177,20 @@ ln -s %{_jnidir}/com.microsoft.z3.jar %{buildroot}%{_libdir}/z3
 mv %{buildroot}%{_libdir}/libz3java.so %{buildroot}%{_libdir}/z3
 %endif
 
-# Install the OCaml interface
-cd build/api/ml
-mkdir -p %{buildroot}%{ocamldir}/Z3
+# Fix permissions
+chmod 0755 %{buildroot}%{ocamldir}/stublibs/dllz3ml.so
 %ifarch %{ocaml_native_compiler}
-cp -p *.cmx{,a,s} %{buildroot}%{ocamldir}/Z3
+chmod 0755 %{buildroot}%{ocamldir}/z3/z3ml.cmxs
 %endif
-cp -p META *.{a,cma,cmi,mli} %{buildroot}%{ocamldir}/Z3
-mkdir -p %{buildroot}%{ocamldir}/stublibs
-cp -p *.so %{buildroot}%{ocamldir}/stublibs
-cd -
+
+# Fix the python symlink
+rm %{buildroot}%{python3_sitelib}/z3/libz3.so.%{majver}
+ln -s %{_libdir}/libz3.so.%{majver} \
+      %{buildroot}%{python3_sitelib}/z3/libz3.so.%{majver}
 
 # We handle the documentation files below
 rm -rf %{buildroot}%{_docdir}/Z3
+rm -f examples/ml/*.{cmi,cmo,cmx,o}
 
 # Make a man page
 mkdir -p %{buildroot}%{_mandir}/man1
@@ -244,7 +215,7 @@ cd -
 
 %files libs
 %license LICENSE.txt
-%{_libdir}/libz3.so.5.1{,.*}
+%{_libdir}/libz3.so.5.3{,.*}
 
 %files devel
 %{_includedir}/z3/
@@ -263,22 +234,22 @@ cd -
 %endif
 
 %files -n ocaml-z3
-%dir %{ocamldir}/Z3/
-%{ocamldir}/Z3/META
-%{ocamldir}/Z3/*.cma
-%{ocamldir}/Z3/*.cmi
+%dir %{ocamldir}/z3/
+%{ocamldir}/z3/META
+%{ocamldir}/z3/*.cma
+%{ocamldir}/z3/*.cmi
 %ifarch %{ocaml_native_compiler}
-%{ocamldir}/Z3/*.cmxs
+%{ocamldir}/z3/*.cmxs
 %endif
 %{ocamldir}/stublibs/dllz3ml.so
 
 %files -n ocaml-z3-devel
-%{ocamldir}/Z3/*.a
+%{ocamldir}/z3/*.a
 %ifarch %{ocaml_native_compiler}
-%{ocamldir}/Z3/*.cmx
-%{ocamldir}/Z3/*.cmxa
+%{ocamldir}/z3/*.cmx
+%{ocamldir}/z3/*.cmxa
 %endif
-%{ocamldir}/Z3/*.mli
+%{ocamldir}/z3/*.mli
 
 %files -n python3-z3
 %{python3_sitelib}/z3/

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-25 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 12:41 [rpms/z3] f45: Version 5.3.1 Jerry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox