SHA256
1
0
forked from pool/paraview

Accepting request 444980 from home:badshah400:branches:science

- Replicate the %cmake macro manually, stripping out the problematic and unused options. In particular, this restores  passing rpm_opt_flags to C/C++ during compilation.
- Update paraview-fix-file-contains-date-time.patch to remove references to __DATE__ and __TIME__ also from Plugins/CDIReader/cdilib.c; suppresses an rpmlint warning.
- Update %{name}-rpmlintrc file to also suppress warnings about:
  * no-manual-page-for-binary: upstream doesn't supply manpages and we don't care.
  * hidden-file-or-dir: this hidden file is really used as a catalogue of available plugins by paraview.

OBS-URL: https://build.opensuse.org/request/show/444980
OBS-URL: https://build.opensuse.org/package/show/science/paraview?expand=0&rev=47
This commit is contained in:
Christoph G 2016-12-09 06:05:38 +00:00 committed by Git OBS Bridge
parent d3c9ee6857
commit ef94ba280f
4 changed files with 65 additions and 7 deletions

View File

@ -24,3 +24,16 @@ Index: ParaView-v5.2.0/Plugins/AnalyzeNIfTIReaderWriter/vtknifti1_io.cxx
}
Index: ParaView-v5.2.0/Plugins/CDIReader/cdilib.c
===================================================================
--- ParaView-v5.2.0.orig/Plugins/CDIReader/cdilib.c
+++ ParaView-v5.2.0/Plugins/CDIReader/cdilib.c
@@ -5274,7 +5274,7 @@ static void file_table_print(void);
#define LIBVERSION 1.8.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
-static const char file_libvers[] = STRING(LIBVERSION) " of " __DATE__ " " __TIME__;
+static const char file_libvers[] = STRING(LIBVERSION);
typedef struct _filePtrToIdx {
int idx;
bfile_t *ptr;

View File

@ -1,3 +1,9 @@
# paraview has *.so symbolic links to other files
# and these are mistaken by rpmlint to be devel files
addFilter("devel-file-in-non-devel-package")
# Upstream doesn't supply manpages, so no go here
addFilter("no-manual-page-for-binary")
# The hidden .plugin file is really needed
addFilter("hidden-file-or-dir .*/usr/lib64/paraview/.plugins")

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Dec 8 15:30:11 UTC 2016 - badshah400@gmail.com
- Replicate the %cmake macro manually, stripping out the
problematic and unused options. In particular, this restores
passing rpm_opt_flags to C/C++ during compilation.
- Update paraview-fix-file-contains-date-time.patch to remove
references to __DATE__ and __TIME__ also from
Plugins/CDIReader/cdilib.c; suppresses an rpmlint warning.
- Update %{name}-rpmlintrc file to also suppress warnings about:
* no-manual-page-for-binary: upstream doesn't supply manpages
and we don't care.
* hidden-file-or-dir: this hidden file is really used as a
catalogue of available plugins by paraview.
-------------------------------------------------------------------
Thu Nov 24 18:38:09 UTC 2016 - badshah400@gmail.com

View File

@ -160,8 +160,24 @@ sed -i -e 's/-Wl,--fatal-warnings//' VTK/CMake/vtkCompilerExtras.cmake
export CC='gcc'
export CXX='g++'
export MAKE='make'
mkdir build && pushd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
# FIXME: WE CANNOT USE THE %%cmake MACRO BECAUSE SOME OF ITS OPTIONS CAUSE ISSUES (SEE FIXME'S BELOW); REPLICATE IT HERE LEAVING OUT THE PROBLEMATIC AND UNUSED OPTIONS
find ./ -name CMakeLists.txt \
-exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} +
mkdir -p build
cd build
cmake $OLDPWD \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \
-DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_COLOR_MAKEFILE:BOOL=OFF \
-DPV_INSTALL_LIB_DIR:PATH=%{_lib}/%{name} \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/%{name} \
-DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/%{name} \
@ -170,7 +186,7 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DVTK_INSTALL_DOC_DIR=share/doc/packages/%{name} \
-DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
-DCMAKE_C_COMPILER:FILEPATH=$CC \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DPARAVIEW_BUILD_QT_GUI:BOOL=ON \
%if 0%{?use_qt5}
-DPARAVIEW_QT_VERSION:STRING="5" \
@ -193,11 +209,19 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DVTK_USE_SYSTEM_GL2PS:BOOL=OFF \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
..
-DBUILD_TESTING:BOOL=OFF
# FIXME: CAUSES ERRORS WITH THE IN-APP PYTHON SHELL WHICH STILL LOOKS FOR PY MODULES IN THE DEFAULT DIR %{_libdir}/%{name}/site-packages
# -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="%{python_sitearch}/%{name}" \
# FIXME: TURN ON WHEN UPDATED GL2PS > 1.3.9 IS RELEASED
# -DVTK_USE_SYSTEM_GL2PS:BOOL=ON \
# FIXME: CAUSES ERRORS WITH THE IN-APP PYTHON SHELL WHICH STILL LOOKS FOR PY MODULES IN THE DEFAULT DIR %%{_libdir}/%%{name}/site-packages
# -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH="%%{python_sitearch}/%%{name}" \
# FIXME: CAUSES PYTHON BYTECODE TIMESTAMP WARNINGS
# -G"Unix Makefiles" \
# https://gitlab.kitware.com/paraview/paraview/issues/17049 from
# -DCMAKE_SKIP_RPATH:BOOL=ON
%make_jobs