From 5941d0f86d99221b06406f7d98567d72d6ad64b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 30 Aug 2020 14:38:18 +0200 Subject: [PATCH] paraview: fixes and patchs but still fails to build This is more of a WIP of required patches and C{,XX}FLAGS because it still fails to build for x86_64-musl and i686. --- .../patches/fix-page_size-macro.patch | 13 ++++++ .../patches/fix-vtksys-execinfo.patch | 12 +++++ srcpkgs/paraview/patches/vtk-isnan.patch | 45 +++++++++++++++++++ srcpkgs/paraview/template | 10 +++-- 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/paraview/patches/fix-page_size-macro.patch create mode 100644 srcpkgs/paraview/patches/fix-vtksys-execinfo.patch create mode 100644 srcpkgs/paraview/patches/vtk-isnan.patch diff --git a/srcpkgs/paraview/patches/fix-page_size-macro.patch b/srcpkgs/paraview/patches/fix-page_size-macro.patch new file mode 100644 index 00000000000..b632eae4ea6 --- /dev/null +++ b/srcpkgs/paraview/patches/fix-page_size-macro.patch @@ -0,0 +1,13 @@ +--- Plugins/Datamine/Readers/dmfile.cxx 2020-08-04 22:12:01.000000000 +0200 ++++ Plugins/Datamine/Readers/dmfile.cxx 2020-08-30 13:22:12.387889301 +0200 +@@ -421,8 +421,8 @@ + + // number of records per page + // There is only 508 bytes per page ( table is 512 with 4 reserved ) +- const int PAGE_SIZE = 508; +- int numRecsPerPage = PAGE_SIZE / recordLength; ++ const int DM_PAGE_SIZE = 508; ++ int numRecsPerPage = DM_PAGE_SIZE / recordLength; + + // number of record on last page + int numRecsLastPage = GetNLastPageRecs(); diff --git a/srcpkgs/paraview/patches/fix-vtksys-execinfo.patch b/srcpkgs/paraview/patches/fix-vtksys-execinfo.patch new file mode 100644 index 00000000000..fc17223a066 --- /dev/null +++ b/srcpkgs/paraview/patches/fix-vtksys-execinfo.patch @@ -0,0 +1,12 @@ +--- VTK/Utilities/KWSys/vtksys/CMakeLists.txt 2020-08-30 14:24:27.200081977 +0200 ++++ VTK/Utilities/KWSys/vtksys/CMakeLists.txt 2020-08-30 14:26:38.533088752 +0200 +@@ -592,7 +592,8 @@ + # check for simple stack trace + # usually it's in libc but on FreeBSD + # it's in libexecinfo +- FIND_LIBRARY(EXECINFO_LIB "execinfo") ++ FIND_PACKAGE(PkgConfig REQUIRED) ++ PKG_CHECK_MODULES(EXECINFO IMPORTED_TARGET libexecinfo) + MARK_AS_ADVANCED(EXECINFO_LIB) + IF (NOT EXECINFO_LIB) + SET(EXECINFO_LIB "") diff --git a/srcpkgs/paraview/patches/vtk-isnan.patch b/srcpkgs/paraview/patches/vtk-isnan.patch new file mode 100644 index 00000000000..2032af41546 --- /dev/null +++ b/srcpkgs/paraview/patches/vtk-isnan.patch @@ -0,0 +1,45 @@ +--- VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2020-08-04 22:12:01.000000000 +0200 ++++ VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2020-08-29 22:33:06.824012475 +0200 +@@ -36,20 +36,20 @@ + template + struct has_NaN + { +- static bool isnan(T x) { return std::isnan(x); } ++ static bool vtkisnan(T x) { return std::isnan(x); } + }; + + template + struct has_NaN + { +- static bool isnan(T) { return false; } ++ static bool vtkisnan(T) { return false; } + }; + + template +-bool isnan(T x) ++bool vtkisnan(T x) + { + // Select the correct partially specialized type. +- return has_NaN::has_quiet_NaN>::isnan(x); ++ return has_NaN::has_quiet_NaN>::vtkisnan(x); + } + } // namespace detail + +@@ -127,7 +127,7 @@ + for (vtkIdType i = 0; i < num; ++i) + { + auto value = this->AssociatedArray->GetValue(i); +- if (::detail::isnan(value)) ++ if (::detail::vtkisnan(value)) + { + NanIndices.push_back(i); + } +@@ -140,7 +140,7 @@ + std::vector* FindIndexVec(ValueType value) + { + std::vector* indices{ nullptr }; +- if (::detail::isnan(value) && !this->NanIndices.empty()) ++ if (::detail::vtkisnan(value) && !this->NanIndices.empty()) + { + indices = &this->NanIndices; + } diff --git a/srcpkgs/paraview/template b/srcpkgs/paraview/template index 5cf3ee74adb..bb05dcaf5ce 100644 --- a/srcpkgs/paraview/template +++ b/srcpkgs/paraview/template @@ -4,7 +4,8 @@ version=5.8.1 revision=1 wrksrc=ParaView-v${version} build_style=cmake -configure_args="-DPARAVIEW_ENABLE_FFMPEG=ON +configure_args="-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/usr + -DPARAVIEW_ENABLE_FFMPEG=ON -DPARAVIEW_ENABLE_GDAL=ON -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON @@ -14,6 +15,8 @@ configure_args="-DPARAVIEW_ENABLE_FFMPEG=ON -DVTKm_ENABLE_MPI=ON -DVTKm_ENABLE_RENDERING=ON -DVTKm_USE_DOUBLE_PRECISION=ON" +#make_build_args="VERBOSE=1" +hostmakedepends="pkg-config which" makedepends="MesaLib-devel libfreeglut-devel glu-devel libXt-devel openmpi-devel qt5-devel qt5-x11extras-devel qt5-tools-devel qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds @@ -30,9 +33,8 @@ license="BSD-3-Clause" homepage="https://www.paraview.org" distfiles="https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v${version:0:3}&type=source&os=Sources&downloadFile=ParaView-v${version}.tar.xz>paraview-${version}.tar.xz" checksum=7653950392a0d7c0287c26f1d3a25cdbaa11baa7524b0af0e6a1a0d7d487d034 -patch_args="-Np1" -CFLAGS="-D_GNU_SOURCE -fcommon" -CXXFLAGS="-D_GNU_SOURCE -fcommon" +CFLAGS="-DYYERROR_VERBOSE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DGNU_SOURCE -fcommon" +CXXFLAGS="${CFLAGS}" # qhelpgenerator: could not find a Qt installation of '' export QT_SELECT="5"