Add distutils patch.
- Use more specific globs in %%files. - Convert License tags to SPDX.
This commit is contained in:
parent
2b6ac51cc8
commit
f9405438e5
25
stp-distutils.patch
Normal file
25
stp-distutils.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 23a6af263dd41259d3430aadee15ba41883c27ba Mon Sep 17 00:00:00 2001
|
||||
From: Jerry James <loganjerry@gmail.com>
|
||||
Date: Tue, 18 Oct 2022 11:58:54 -0600
|
||||
Subject: [PATCH] Use sysconfig, not distutils, to find python root
|
||||
|
||||
---
|
||||
bindings/python/stp/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bindings/python/stp/CMakeLists.txt b/bindings/python/stp/CMakeLists.txt
|
||||
index c62c726c..40d16e6c 100644
|
||||
--- a/bindings/python/stp/CMakeLists.txt
|
||||
+++ b/bindings/python/stp/CMakeLists.txt
|
||||
@@ -59,7 +59,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in
|
||||
# Try to guess the right place by asking the current python interpreter for its
|
||||
# Python library directory
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
|
||||
- "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
|
||||
+ "import sys; import sysconfig; print(sysconfig.get_path('purelib', vars={'base': sys.base_prefix}))"
|
||||
RESULT_VARIABLE RETURN_CODE
|
||||
OUTPUT_VARIABLE PYTHON_LIB_DIR_DETECTED
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2017-11-16 15:35:07.000000000 -0700
|
||||
+++ tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2017-11-25 08:42:45.331112638 -0700
|
||||
--- stp-2.3.3/tools/rewrite_rule_gen/rewrite_rule_gen.cpp.orig 2017-11-16 15:35:07.000000000 -0700
|
||||
+++ stp-2.3.3/tools/rewrite_rule_gen/rewrite_rule_gen.cpp 2017-11-25 08:42:45.331112638 -0700
|
||||
@@ -1223,7 +1223,7 @@ void rule_to_string(const ASTNode& n, AS
|
||||
for (size_t i = 0; i < n.Degree(); i++)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- lib/CMakeLists.txt.orig 2019-03-02 07:26:01.000000000 -0700
|
||||
+++ lib/CMakeLists.txt 2021-07-14 09:03:32.415946180 -0600
|
||||
--- stp-2.3.3/lib/CMakeLists.txt.orig 2019-03-02 07:26:01.000000000 -0700
|
||||
+++ stp-2.3.3/lib/CMakeLists.txt 2021-07-14 09:03:32.415946180 -0600
|
||||
@@ -139,9 +139,15 @@ if (USE_RISS)
|
||||
${stp_link_libs} -lriss-coprocessor)
|
||||
endif()
|
||||
|
29
stp.spec
29
stp.spec
@ -1,9 +1,13 @@
|
||||
Name: stp
|
||||
Version: 2.3.3
|
||||
Release: 22%{?dist}
|
||||
Release: 23%{?dist}
|
||||
Summary: Constraint solver/decision procedure
|
||||
|
||||
License: MIT
|
||||
# MIT: the project as a whole
|
||||
# MIT-Modern-Variant: lib/extlib-abc
|
||||
# LGPL-2.0-or-later: lib/extlib-constbv
|
||||
# BSD-3-Clause: include/stp/Simplifier/constantBitP/MersenneTwister.h
|
||||
License: MIT AND MIT-Modern-Variant AND LGPL-2.0-or-later AND BSD-3-Clause
|
||||
URL: http://stp.github.io/
|
||||
Source0: https://github.com/stp/stp/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
# Fix some format specifier problems
|
||||
@ -11,6 +15,9 @@ Patch0: %{name}-format.patch
|
||||
# Do not declare cryptominisat and minisat as public libs
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1981466
|
||||
Patch1: %{name}-private-libs.patch
|
||||
# Distutils has been deprecated. Use sysconfig instead.
|
||||
# https://github.com/stp/stp/pull/450
|
||||
Patch2: %{name}-distutils.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: boost-devel
|
||||
@ -44,6 +51,7 @@ input formula.
|
||||
Additional information can be found at https://stp.readthedocs.io/.
|
||||
|
||||
%package devel
|
||||
License: MIT
|
||||
Summary: Development files for STP constraint solver/decision procedure
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
@ -53,6 +61,7 @@ a constraint solver (also referred to as a decision procedure
|
||||
or automated prover). Provides a static library.
|
||||
|
||||
%package -n python3-%{name}
|
||||
License: MIT
|
||||
Summary: Python 3 interface to STP
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
@ -61,7 +70,7 @@ BuildArch: noarch
|
||||
Python 3 interface to STP.
|
||||
|
||||
%prep
|
||||
%autosetup -p0
|
||||
%autosetup -p1
|
||||
|
||||
# We do not want to know about the order of member initializers
|
||||
sed -i "s/-Wno-deprecated/-Wno-reorder/" CMakeLists.txt
|
||||
@ -80,8 +89,8 @@ sed -e '/CMAKE_SKIP_BUILD_RPATH/s/FALSE/TRUE/' \
|
||||
-i CMakeLists.txt
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -I %{_includedir}/minisat"
|
||||
export CXXFLAGS="%{optflags} -I %{_includedir}/minisat"
|
||||
export CFLAGS='%{build_cflags} -I %{_includedir}/minisat'
|
||||
export CXXFLAGS='%{build_cxxflags} -I %{_includedir}/minisat'
|
||||
%cmake -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/python%{python3_version} \
|
||||
-DPYTHON_LIBRARY:FILEPATH=%{_libdir}/libpython%{python3_version}.so \
|
||||
-DPYTHON_INCLUDE_DIR:FILEPATH=%{_includedir}/python%{python3_version}
|
||||
@ -100,8 +109,9 @@ mkdir -p %{buildroot}%{_datadir}
|
||||
mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}/man
|
||||
|
||||
%files
|
||||
%{_bindir}/*
|
||||
%{_libdir}/libstp.so.*
|
||||
%{_bindir}/stp
|
||||
%{_bindir}/stp_simple
|
||||
%{_libdir}/libstp.so.2*
|
||||
%{_mandir}/man1/stp.1*
|
||||
%doc AUTHORS README.markdown papers
|
||||
%license LICENSE LICENSE_COMPONENTS
|
||||
@ -115,6 +125,11 @@ mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}/man
|
||||
%{python3_sitelib}/%{name}/
|
||||
|
||||
%changelog
|
||||
* Wed Dec 14 2022 Jerry James <loganjerry@gmail.com> - 2.3.3-23
|
||||
- Add distutils patch
|
||||
- Use more specific globs in %%files
|
||||
- Convert License tags to SPDX
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user