Compare commits

...

16 Commits

Author SHA1 Message Date
Jerry James 7e13c11207 Fix python package library load name (bz 2255464) 2023-12-21 09:06:18 -07:00
Richard W.M. Jones 4b6c6d8a09 OCaml 5.1.1 + s390x code gen fix for Fedora 40 2023-12-18 17:56:01 +00:00
Richard W.M. Jones 28838627de OCaml 5.1.1 rebuild for Fedora 40 2023-12-12 16:17:08 +00:00
Jerry James 69a9e69b24 Version 4.12.4
Drop upstreamed patches: python, stdint, escapes
2023-12-10 10:31:57 -07:00
Richard W.M. Jones 6e97219e4f OCaml 5.1 rebuild for Fedora 40 2023-10-05 20:46:07 +01:00
Jerry James 75819831d1 Rebuild for ocaml-zarith 1.13 2023-07-27 10:28:07 -06:00
Jerry James e32772559e Exclude OCaml BRs on i386 2023-07-23 10:03:32 -06:00
Jerry James 7ce32a5a19 Do not build or install the i386 OCaml interface 2023-07-23 08:41:01 -06:00
Fedora Release Engineering 8f4eee1504 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:35:07 +00:00
Jerry James 7fe18e3f96 Exclude the OCaml and Java subpackages only on i386 2023-07-21 08:41:35 -06:00
Richard W.M. Jones 332c05596a OCaml 5.0 rebuild for Fedora 39 2023-07-12 15:30:38 +01:00
Richard W.M. Jones a9a7082547 ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) 2023-07-11 11:36:26 +01:00
Jerry James b4c9000b46 OCaml 5.0.0 rebuild 2023-07-10 16:55:13 -06:00
Jerry James 67bb880db8 Rebuild for OCaml 5.0 2023-06-21 13:39:46 -06:00
Python Maint 647df7bf04 Rebuilt for Python 3.12 2023-06-15 14:41:58 +02:00
Jerry James ee66c97a95 Version 4.12.2 2023-05-15 08:44:33 -06:00
4 changed files with 125 additions and 34 deletions

View File

@ -1 +1 @@
SHA512 (z3-4.12.1.tar.gz) = 031fba9cc000a8da0025f95fa3f1c7519071d1b7775b377ff3192c505bb4c7e3d267da246c9ae68c940224e055a3c30571d2c0d7fbb042ec9a3d5849543a385c
SHA512 (z3-4.12.4.tar.gz) = fcb778d2e3e0d13fc68afcd8724548279f9edbbb4aac1bbb93e00959c33330ab2fd84f2c2e4b0b78f767819725a90b845fc606a9adc931ae1f0a11f4deae433b

56
z3-ocaml.patch Normal file
View File

@ -0,0 +1,56 @@
--- 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')

View File

@ -1,21 +0,0 @@
--- a/scripts/update_api.py 2020-09-10 12:51:28.000000000 -0600
+++ b/scripts/update_api.py 2020-12-25 17:03:00.196777823 -0700
@@ -1755,15 +1755,15 @@ def write_core_py_preamble(core_py):
# Automatically generated file
import sys, os
import ctypes
-import pkg_resources
+import sysconfig
from .z3types import *
from .z3consts import *
-_ext = 'dll' if sys.platform in ('win32', 'cygwin') else 'dylib' if sys.platform == 'darwin' else 'so'
+_ext = 'dll' if sys.platform in ('win32', 'cygwin') else 'dylib' if sys.platform == 'darwin' else 'so.@MAJVER@'
_lib = None
_default_dirs = ['.',
os.path.dirname(os.path.abspath(__file__)),
- pkg_resources.resource_filename('z3', 'lib'),
+ sysconfig.get_config_var('LIBDIR'),
os.path.join(sys.prefix, 'lib'),
None]
_all_dirs = []

80
z3.spec
View File

@ -7,23 +7,20 @@
# unless somebody is really, really persuasive and available to help fix it
# if it breaks.
# Do not embed bad package note paths in the OCaml files.
%undefine _package_note_flags
# Tests are off by default because some of the tests require more memory than
# the koji builders have available.
%bcond_with test
Name: z3
Version: 4.12.1
Release: 2%{?dist}
Version: 4.12.4
Release: 4%{?dist}
Summary: Satisfiability Modulo Theories (SMT) solver
License: MIT
URL: https://github.com/Z3Prover/z3
Source0: https://github.com/Z3Prover/z3/archive/%{name}-%{version}.tar.gz
# Change the way python finds the shared object; see bz 1910923
Patch0: %{name}-python.patch
# Do not try to build or install native OCaml artifacts on bytecode-only arches
Patch0: %{name}-ocaml.patch
BuildRequires: cmake
BuildRequires: doxygen
@ -37,10 +34,12 @@ 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}
@ -122,6 +121,8 @@ 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}
@ -136,6 +137,7 @@ 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
@ -146,7 +148,11 @@ Requires: z3-libs = %{version}-%{release}
Python 3 interface to z3.
%prep
%autosetup -p1 -n %{name}-%{name}-%{version}
%autosetup -N -n %{name}-%{name}-%{version}
%ifnarch %{ocaml_native_compiler}
%patch -P0 -p1
%endif
%autopatch -m 1 -p1
# Enable verbose builds, use Fedora CFLAGS, preserve timestamps when installing,
# include the entire contents of the archives in the library, link the library
@ -164,7 +170,7 @@ sed \
# 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/@MAJVER@/$majver/" \
-e "s/'so'/'so.$majver'/" \
-i scripts/update_api.py
# Turn off HTML timestamps for reproducible builds
@ -188,6 +194,7 @@ export PYTHON=%{python3}
%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.
@ -204,6 +211,7 @@ sed -i '/^api/s/ libz3\$(SO_EXT)//g' build/Makefile
# Fourth, build the OCaml interface
%make_build -C build ml
%endif
%install
export LANG="C.UTF-8"
@ -220,13 +228,18 @@ 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
pushd build/api/ml
cd build/api/ml
mkdir -p %{buildroot}%{ocamldir}/Z3
cp -p META *.{a,cma,cmi,cmx,cmxa,cmxs,mli} %{buildroot}%{ocamldir}/Z3
%ifarch %{ocaml_native_compiler}
cp -p *.cmx{,a,s} %{buildroot}%{ocamldir}/Z3
%endif
cp -p META *.{a,cma,cmi,mli} %{buildroot}%{ocamldir}/Z3
mkdir -p %{buildroot}%{ocamldir}/stublibs
cp -p *.so %{buildroot}%{ocamldir}/stublibs
popd
cd -
%endif
# We handle the documentation files below
rm -rf %{buildroot}%{_docdir}/Z3
@ -272,24 +285,67 @@ cd -
%{_jnidir}/com.microsoft.z3*jar
%endif
%ifnarch %{ix86}
%files -n ocaml-z3
%dir %{ocamldir}/Z3/
%{ocamldir}/Z3/META
%{ocamldir}/Z3/*.cma
%{ocamldir}/Z3/*.cmi
%ifarch %{ocaml_native_compiler}
%{ocamldir}/Z3/*.cmxs
%endif
%{ocamldir}/stublibs/*.so
%files -n ocaml-z3-devel
%{ocamldir}/Z3/*.a
%ifarch %{ocaml_native_compiler}
%{ocamldir}/Z3/*.cmx
%{ocamldir}/Z3/*.cmxa
%endif
%{ocamldir}/Z3/*.mli
%endif
%files -n python3-z3
%{python3_sitelib}/z3/
%changelog
* Thu Dec 21 2023 Jerry James <loganjerry@gmail.com> - 4.12.4-4
- Fix python package library load name (bz 2255464)
* Mon Dec 18 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.4-3
- OCaml 5.1.1 + s390x code gen fix for Fedora 40
* Tue Dec 12 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.4-2
- OCaml 5.1.1 rebuild for Fedora 40
* Sat Dec 9 2023 Jerry James <loganjerry@gmail.com> - 4.12.4-1
- Version 4.12.4
- Drop upstreamed patches: python, stdint, escapes
* Thu Oct 05 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.2-7
- OCaml 5.1 rebuild for Fedora 40
* Thu Jul 27 2023 Jerry James <loganjerry@gmail.com> - 4.12.2-6
- Rebuild for ocaml-zarith 1.13
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 21 2023 Jerry James <loganjerry@gmail.com> - 4.12.2-4
- Exclude the OCaml and Java subpackages only on i386
* Wed Jul 12 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.2-4
- OCaml 5.0 rebuild for Fedora 39
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 4.12.2-3
- OCaml 5.0.0 rebuild
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 4.12.2-2
- Rebuilt for Python 3.12
* Mon May 15 2023 Jerry James <loganjerry@gmail.com> - 4.12.2-1
- Version 4.12.2
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.1-2
- Rebuild OCaml packages for F38