Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions opencv-cpp20.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/modules/imgproc/test/test_houghlines.cpp 2023-07-18 08:46:05.532555671 +0200
+++ b/modules/imgproc/test/test_houghlines.cpp 2023-07-18 08:46:39.922490881 +0200
@@ -53,7 +53,7 @@
T value;
float theta_eps;
float rho_eps;
- SimilarWith<T>(T val, float e, float r_e): value(val), theta_eps(e), rho_eps(r_e) { };
+ SimilarWith(T val, float e, float r_e): value(val), theta_eps(e), rho_eps(r_e) { };
bool operator()(const T& other);
};

5 changes: 4 additions & 1 deletion opencv.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
%define github_user opencv

Source0: git+https://github.com/%{github_user}/opencv.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Patch0: opencv-cpp20
BuildRequires: cmake ninja
Requires: python3 py3-numpy libpng libjpeg-turbo libtiff zlib eigen OpenBLAS

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1

%build
rm -rf ../build
Expand All @@ -30,7 +32,8 @@ cmake ../%{n}-%{realversion} \
-DPYTHON3_INCLUDE_DIR:PATH="${PYTHON3_ROOT}/include/python%{cms_python3_major_minor_version}" \
-DPYTHON3_LIBRARY:FILEPATH="${PYTHON3_ROOT}/lib/libpython%{cms_python3_major_minor_version}.so" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${LIBPNG_ROOT};${LIBTIFF_ROOT};${LIBJPEG_TURBO_ROOT};${ZLIB_ROOT};${PYTHON3_ROOT};${PY2_NUMPY_ROOT};${PY3_NUMPY_ROOT};${EIGEN_ROOT};${OPENBLAS_ROOT}"
-DCMAKE_PREFIX_PATH="${LIBPNG_ROOT};${LIBTIFF_ROOT};${LIBJPEG_TURBO_ROOT};${ZLIB_ROOT};${PYTHON3_ROOT};${PY2_NUMPY_ROOT};${PY3_NUMPY_ROOT};${EIGEN_ROOT};${OPENBLAS_ROOT}" \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard}

ninja -v %{makeprocesses}

Expand Down
2 changes: 1 addition & 1 deletion pip/onnx.file
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Patch0: py3-onnx
%define patchsrc0 grep -q 'CMAKE_CXX_STANDARD *11' CMakeLists.txt && sed -i -e 's|CMAKE_CXX_STANDARD *11|CMAKE_CXX_STANDARD %{cms_cxx_standard}|' CMakeLists.txt
Requires: cmake protobuf py3-protobuf py3-six py3-typing-extensions py3-numpy py3-pytest-runner
%define runpath_opts -n pb -n onnx
%define PipPreBuild export ONNX_ML=1;export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} -DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DProtobuf_USE_STATIC_LIBS=OFF -DCMAKE_PREFIX_PATH=%{cmake_prefix_path}"
%define PipPreBuild export ONNX_ML=1;export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} -DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DProtobuf_USE_STATIC_LIBS=OFF -DCMAKE_PREFIX_PATH=%{cmake_prefix_path}"
5 changes: 1 addition & 4 deletions protobuf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ cd ../build
cmake ../%{n}-%{realversion} \
-G Ninja \
-DCMAKE_INSTALL_PREFIX="%{i}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-Dprotobuf_BUILD_TESTS=OFF \
-Dprotobuf_BUILD_SHARED_LIBS=ON \
-Dutf8_range_ENABLE_INSTALL=ON \
Expand All @@ -45,5 +43,4 @@ ninja -v %{makeprocesses}

cd ../build
ninja -v %{makeprocesses} install
rm -rf %{i}/lib/pkgconfig

rm -rf %{i}/lib/pkgconfig
2 changes: 1 addition & 1 deletion py3-onnx.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
+CMAKE = find_executable("cmake")
MAKE = find_executable("make")

install_requires = []
install_requires = []
35 changes: 35 additions & 0 deletions sherpa-cpp20.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 1de52ee230891277370fc4f787fc8cb4b7626ef2 Mon Sep 17 00:00:00 2001
From: iarspider <iarspider@gmail.com>
Date: Wed, 28 Jun 2023 07:35:10 +0000
Subject: [PATCH] [ATOOLS] Fix C++20 compilation errors

---
ATOOLS/Org/Getter_Function.H | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ATOOLS/Org/Getter_Function.H b/ATOOLS/Org/Getter_Function.H
index f68d190ca2..09340da390 100644
--- a/ATOOLS/Org/Getter_Function.H
+++ b/ATOOLS/Org/Getter_Function.H
@@ -84,7 +84,7 @@ namespace ATOOLS {
void PrintInfo(std::ostream &str,const size_t width) const; \
Object_Type *operator()(const Parameter_Type &parameters) const; \
public: \
- Getter<OBJECT,PARAMETER,NAME,SORT>(const bool &d=true): \
+ Getter(const bool &d=true): \
Getter_Function<OBJECT,PARAMETER,SORT>(TAG) \
{ SetDisplay(d); } \
}; \
@@ -107,8 +107,7 @@ namespace ATOOLS {
void PrintInfo(std::ostream &str,const size_t width) const; \
Object_Type *operator()(const Parameter_Type &parameters) const; \
public: \
- Getter<OBJECT,PARAMETER,NAME,SORT> \
- (const std::string &name,const bool d=true): \
+ Getter(const std::string &name,const bool d=true): \
Getter_Function<OBJECT,PARAMETER,SORT>(name) \
{ SetDisplay(d); } \
}; \
--
GitLab

2 changes: 2 additions & 0 deletions sherpa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Source: http://www.hepforge.org/archive/sherpa/SHERPA-MC-%{realversion}.tar.gz
Requires: hepmc lhapdf blackhat sqlite python3 fastjet openmpi
BuildRequires: mcfm swig autotools
Patch0: sherpa-2.2.10-hepmcshort
Patch1: sherpa-cpp20

%ifos linux
%ifnarch ppc64le
Expand All @@ -25,6 +26,7 @@ perl -p -i -e 's|-rdynamic||g' configure AddOns/Analysis/Scripts/Makefile.in
%endif

%patch0 -p1
%patch1 -p1

%build
export PYTHON=$(which python3)
Expand Down