Compare commits

..

1 Commits

Author SHA1 Message Date
David Abdurachmanov 741c8aefd3
Rebuilt for Fedora/RISCV (riscv64); adding .rvreX to Release:
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-05-10 10:16:12 +03:00
4 changed files with 36 additions and 124 deletions

View File

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

View File

@ -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')

21
z3-python.patch Normal file
View File

@ -0,0 +1,21 @@
--- 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 = []

81
z3.spec
View File

@ -7,20 +7,23 @@
# 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.4
Release: 4%{?dist}
Version: 4.12.1
Release: 2.rvre0%{?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
# Do not try to build or install native OCaml artifacts on bytecode-only arches
Patch0: %{name}-ocaml.patch
# Change the way python finds the shared object; see bz 1910923
Patch0: %{name}-python.patch
BuildRequires: cmake
BuildRequires: doxygen
@ -34,12 +37,10 @@ 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}
@ -121,8 +122,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}
@ -137,7 +136,6 @@ 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
@ -148,11 +146,7 @@ Requires: z3-libs = %{version}-%{release}
Python 3 interface to z3.
%prep
%autosetup -N -n %{name}-%{name}-%{version}
%ifnarch %{ocaml_native_compiler}
%patch -P0 -p1
%endif
%autopatch -m 1 -p1
%autosetup -p1 -n %{name}-%{name}-%{version}
# Enable verbose builds, use Fedora CFLAGS, preserve timestamps when installing,
# include the entire contents of the archives in the library, link the library
@ -170,7 +164,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/'so'/'so.$majver'/" \
-e "s/@MAJVER@/$majver/" \
-i scripts/update_api.py
# Turn off HTML timestamps for reproducible builds
@ -194,7 +188,6 @@ 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.
@ -211,7 +204,6 @@ 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"
@ -228,18 +220,13 @@ 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
pushd build/api/ml
mkdir -p %{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
cp -p META *.{a,cma,cmi,cmx,cmxa,cmxs,mli} %{buildroot}%{ocamldir}/Z3
mkdir -p %{buildroot}%{ocamldir}/stublibs
cp -p *.so %{buildroot}%{ocamldir}/stublibs
cd -
%endif
popd
# We handle the documentation files below
rm -rf %{buildroot}%{_docdir}/Z3
@ -285,66 +272,26 @@ 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
* Wed May 10 2023 David Abdurachmanov <davidlt@rivosinc.com> - 4.12.1-2.rvre0
- Rebuilt for Fedora/RISCV (riscv64)
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 4.12.1-2
- Rebuild OCaml packages for F38