[packages/xdmf] - updated to 3.0.0 snapshot - removed outdated include,soname,log2,destdir,format,lib patches - adde
qboosh
qboosh at pld-linux.org
Thu Jan 2 21:18:23 CET 2020
commit a6e82770295109a987300990278ce3b66fdd35a4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jan 2 21:18:16 2020 +0100
- updated to 3.0.0 snapshot
- removed outdated include,soname,log2,destdir,format,lib patches
- added swig patch (fixes for swig 4 and current cmake)
- build utils with metis and fortran
- build java bindings
xdmf-destdir.patch | 11 ----
xdmf-format.patch | 20 -------
xdmf-include.patch | 30 ----------
xdmf-lib.patch | 159 -----------------------------------------------------
xdmf-log2.patch | 55 ------------------
xdmf-soname.patch | 16 ------
xdmf-swig.patch | 85 ++++++++++++++++++++++++++++
xdmf.spec | 146 ++++++++++++++++++++++++++++--------------------
8 files changed, 170 insertions(+), 352 deletions(-)
---
diff --git a/xdmf.spec b/xdmf.spec
index ceab938..3aba1ae 100644
--- a/xdmf.spec
+++ b/xdmf.spec
@@ -1,42 +1,44 @@
-# TODO: MPI
-# fix utils:
-# - installs libmetis conflicting with system metis
-# - wants preinstalled libvtk{NetCDF,exoIIc} or installs own versions
-# - installs headers to /usr/include/utils/Xdmf* (too generic dir name)
+# TODO: parallel (MPI, MPI4PY, H5FDdsm)?
+# - use exodusii
+# - python3 module
+# - system loki library?
#
# Conditional build:
+%bcond_without apidocs # Doxygen docs
+%bcond_without fortran # Fortran support in XdmfUtils
+%bcond_without metis # Metis partitioner in XdmfUtils
%bcond_with mpi # MPI support
-%bcond_with utils # build XdmfUtils (see TODO above)
+%bcond_without java # Java wrappers
+%bcond_without python # Python wrappers
#
-%define rel 5
Summary: eXtensible Data Model and Format library
Summary(pl.UTF-8): Biblioteka rozszerzalnego modelu i formatu danych (XDMF)
Name: xdmf
-# Debian says 2.1, but no version information anywhere in sources/CVS
-Version: 0
-%define snap 20100330
+# see CMakeLists.txt /XDMF_VERSION
+Version: 3.0.0
+%define gitref 8d9c98081d89ac77a132d56bc8bef53581db4078
+%define snap 20190115
+%define rel 1
Release: 0.%{snap}.%{rel}
-# specified in libsrc/{gzstream,bz2stream}.*
-License: LGPL v2.1+
+License: BSD-like
Group: Libraries
-# cvs -d :pserver:anonymous:xdmf at public.kitware.com:/cvsroot/Xdmf co Xdmf
-Source0: %{name}.tar.xz
-# Source0-md5: 63f99d11bea8d56d4185cb8facd44ca2
-Patch0: %{name}-include.patch
-Patch1: %{name}-soname.patch
-Patch2: %{name}-log2.patch
-Patch3: %{name}-destdir.patch
-Patch4: %{name}-format.patch
-Patch5: %{name}-lib.patch
+Source0: https://gitlab.kitware.com/xdmf/xdmf/-/archive/%{gitref}/xdmf-%{snap}.tar.bz2
+# Source0-md5: 32fbbd1f6b584e27bb5a30945f6b787a
+Patch0: %{name}-swig.patch
URL: http://www.xdmf.org/
BuildRequires: bzip2-devel
+BuildRequires: boost-devel
BuildRequires: cmake >= 2.4
BuildRequires: hdf5-devel >= 1.8
+%{?with_java:BuildRequires: jdk}
BuildRequires: libstdc++-devel
+BuildRequires: libtiff-devel
BuildRequires: libxml2-devel >= 2
-BuildRequires: python-devel >= 2
+%{?with_python:BuildRequires: python-devel >= 2}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
+%{?with_java:BuildRequires: swig >= 2.0.0}
+%{?with_python:BuildRequires: swig-python >= 2.0.0}
BuildRequires: tar >= 1:1.22
BuildRequires: xz
BuildRequires: zlib-devel
@@ -64,6 +66,18 @@ Header files for Xdmf library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki Xdmf.
+%package -n java-xdmf
+Summary: Java binding for Xdmf library
+Summary(pl.UTF-8): Interfejs Javy do biblioteki Xdmf
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n java-xdmf
+Java binding for Xdmf library.
+
+%description -n java-xdmf -l pl.UTF-8
+Interfejs Javy do biblioteki Xdmf.
+
%package -n python-xdmf
Summary: Python binding for Xdmf library
Summary(pl.UTF-8): Pythonowy interfejs do biblioteki Xdmf
@@ -77,27 +91,26 @@ Python binding for Xdmf library.
Pythonowy interfejs do biblioteki Xdmf.
%prep
-%setup -q -n Xdmf
+%setup -q -n %{name}-%{gitref}
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
%build
mkdir build
cd build
%cmake .. \
- -DPythonLibs_FIND_VERSION=2 \
- -DPythonLibs_FIND_VERSION_MAJOR=2 \
+ -DREQUESTED_PYTHON_VERSION=2 \
+ %{?with_apidocs:-DXDMF_BUILD_DOCUMENTATION=ON} \
+ %{?with_fortran:-DXDMF_BUILD_FORTRAN=ON} \
%{!?with_mpi:-DXDMF_BUILD_MPI=OFF} \
- %{?with_utils:-DXDMF_BUILD_UTILS=ON} \
+ %{?with_metis:-DXDMF_BUILD_PARTITIONER=ON} \
+ -DXDMF_BUILD_UTILS=ON \
-DXDMF_SYSTEM_HDF5=ON \
-DXDMF_SYSTEM_LIBXML2=ON \
-DXDMF_SYSTEM_ZLIB=ON \
-DXDMF_USE_RPATH=OFF \
- -DXDMF_WRAP_PYTHON=ON
+ %{?with_java:-DXDMF_WRAP_JAVA=ON} \
+ %{?with_python:-DXDMF_WRAP_PYTHON=ON}
+# TODO: -DXDMF_BUILD_EXODUS_IO=ON BR: Exodus-devel
%{__make}
@@ -107,9 +120,11 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-# cmake compiles only to .pyc
+%if %{with python}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -119,42 +134,51 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libXdmf.so.2
-%if %{with utils}
-%attr(755,root,root) %{_libdir}/libXdmfUtils.so
-%attr(755,root,root) %{_libdir}/libmetis.so
-%attr(755,root,root) %{_libdir}/libvtkNetCDF.so
-%attr(755,root,root) %{_libdir}/libvtkexoIIc.so
-%attr(755,root,root) %{_bindir}/XdmfDiff
-%attr(755,root,root) %{_bindir}/XdmfExodusConverter
+%doc Copyright.txt README.md
+%if %{with metis}
%attr(755,root,root) %{_bindir}/XdmfPartitioner
%endif
+%attr(755,root,root) %{_libdir}/libXdmf.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libXdmf.so.3
+%attr(755,root,root) %{_libdir}/libXdmfCore.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libXdmfCore.so.3
+%attr(755,root,root) %{_libdir}/libXdmfUtils.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libXdmfUtils.so.3
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libXdmf.so
-%{_libdir}/XdmfCMake
-%{_includedir}/Xdmf*.h
-%{_includedir}/bz2stream.h
-%{_includedir}/gzstream.h
-%if %{with utils}
-%{_includedir}/XdmfSTLConverter.txx
-# FIXME: too generic dir
-%dir %{_includedir}/utils
-%{_includedir}/utils/Xdmf*.h
-# FIXME: conflict with system metis
-%{_includedir}/metis
-%{_includedir}/vtkexodus2
-%{_includedir}/vtknetcdf
+%attr(755,root,root) %{_libdir}/libXdmfCore.so
+%attr(755,root,root) %{_libdir}/libXdmfUtils.so
+%{_libdir}/cmake/Xdmf
+%{_includedir}/ProjectVersion.hpp
+%{_includedir}/Xdmf*.hpp
+%{_includedir}/Xdmf*.i
+%{_includedir}/XdmfArray.tpp
+%{_includedir}/loki
+%if %{with fortran}
+%{_includedir}/Xdmf.f
+%endif
+
+%if %{with java}
+%files -n java-xdmf
+%defattr(644,root,root,755)
+%{_libdir}/java/Xdmf.jar
+%{_libdir}/java/XdmfCore.jar
+%{_libdir}/java/XdmfUtils.jar
+%attr(755,root,root) %{_libdir}/java/libXdmfJava.so
+%attr(755,root,root) %{_libdir}/java/libXdmfCoreJava.so
+%attr(755,root,root) %{_libdir}/java/libXdmfUtilsJava.so
%endif
+%if %{with python}
%files -n python-xdmf
%defattr(644,root,root,755)
-%dir %{py_sitedir}/Xdmf
-%attr(755,root,root) %{py_sitedir}/Xdmf/_Xdmf.so
-%{py_sitedir}/Xdmf/Xdmf.py[co]
-%{py_sitedir}/Xdmf/__init__.py[co]
-%if %{with utils}
-%attr(755,root,root) %{py_sitedir}/Xdmf/_XdmfUtils.so
-%{py_sitedir}/Xdmf/XdmfUtils.py[co]
+%dir %{py_sitedir}/xdmf
+%attr(755,root,root) %{py_sitedir}/xdmf/_Xdmf.so
+%attr(755,root,root) %{py_sitedir}/xdmf/_XdmfCore.so
+%attr(755,root,root) %{py_sitedir}/xdmf/_XdmfUtils.so
+%{py_sitedir}/xdmf/Xdmf.py[co]
+%{py_sitedir}/xdmf/XdmfCore.py[co]
+%{py_sitedir}/xdmf/XdmfUtils.py[co]
%endif
diff --git a/xdmf-destdir.patch b/xdmf-destdir.patch
deleted file mode 100644
index 15a3f01..0000000
--- a/xdmf-destdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- Xdmf/libsrc/CMakeLists.txt.orig 2013-09-13 18:11:14.450878952 +0200
-+++ Xdmf/libsrc/CMakeLists.txt 2013-09-13 18:24:45.464178361 +0200
-@@ -506,7 +506,7 @@
-
- # Compile Byte Code
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${Xdmf_SOURCE_DIR}/CMake/CompileXdmfByteCode.py
-- ${CMAKE_INSTALL_PREFIX}/${XDMF_WRAP_PYTHON_INSTALL_PY_DIR})")
-+ \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${XDMF_WRAP_PYTHON_INSTALL_PY_DIR})")
-
- ENDIF(XDMF_WRAP_PYTHON)
-
diff --git a/xdmf-format.patch b/xdmf-format.patch
deleted file mode 100644
index edd41ec..0000000
--- a/xdmf-format.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- Xdmf/Utilities/metis/util.c.orig 2013-09-13 21:24:12.598895465 +0200
-+++ Xdmf/Utilities/metis/util.c 2013-09-14 07:03:03.775021464 +0200
-@@ -20,15 +20,14 @@
- void errexit(char *f_str,...)
- {
- va_list argp;
-- char out1[256], out2[256];
-+ char out1[256];
-
- va_start(argp, f_str);
- vsprintf(out1, f_str, argp);
- va_end(argp);
-
-- sprintf(out2, "Error! %s", out1);
-+ fprintf(stdout, "Error! %s", out1);
-
-- fprintf(stdout, out2);
- fflush(stdout);
-
- abort();
diff --git a/xdmf-include.patch b/xdmf-include.patch
deleted file mode 100644
index 9dd1289..0000000
--- a/xdmf-include.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- Xdmf/libsrc/XdmfArray.h.orig 2010-03-24 21:03:48.000000000 +0100
-+++ Xdmf/libsrc/XdmfArray.h 2013-09-13 16:09:37.644518551 +0200
-@@ -46,6 +46,7 @@ accomplished directly thru XdmfArrays by
-
- #ifndef SWIG
- #include <stdlib.h>
-+#include <string.h>
- #endif
-
- class XDMF_EXPORT XdmfArray : public XdmfDataDesc {
---- Xdmf/libsrc/XdmfObject.h.orig 2009-12-23 18:23:49.000000000 +0100
-+++ Xdmf/libsrc/XdmfObject.h 2013-09-13 16:13:03.814509766 +0200
-@@ -81,6 +81,7 @@
-
- # ifdef UNIX
- # include "sys/file.h"
-+# include <string.h>
- # include "strings.h"
- # define STRCASECMP strcasecmp
- # define STRNCASECMP strncasecmp
---- Xdmf/libsrc/utils/XdmfExodusReader.cxx.orig 2010-03-18 16:24:25.000000000 +0100
-+++ Xdmf/libsrc/utils/XdmfExodusReader.cxx 2013-09-13 17:25:22.130994452 +0200
-@@ -24,6 +24,7 @@
- /*******************************************************************/
-
- #include "XdmfExodusReader.h"
-+#include <algorithm>
- #include <exodusII.h>
-
- //
diff --git a/xdmf-lib.patch b/xdmf-lib.patch
deleted file mode 100644
index ed5c022..0000000
--- a/xdmf-lib.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- Xdmf/CMakeLists.txt.orig 2010-04-05 21:24:41.000000000 +0200
-+++ Xdmf/CMakeLists.txt 2013-09-14 07:26:23.036584397 +0200
-@@ -41,7 +41,7 @@
- INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
- INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-
--SET(VTK_INSTALL_LIB_DIR "/lib")
-+SET(VTK_INSTALL_LIB_DIR "/lib${LIB_SUFFIX}")
-
- OPTION(XDMF_MEMORY_DEBUG "Enable Memory Debugging in Xdmf" OFF)
- IF(XDMF_MEMORY_DEBUG)
-@@ -63,7 +63,7 @@
- SET(XDMF_METIS_INCLUDE_DIR_CONFIG ${METIS_INCLUDE_DIRS})
- SET(XDMF_METIS_INCLUDE_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/metis)
- SET(XDMF_METIS_LIBRARY_DIR_CONFIG ${Xdmf_BINARY_DIR}/bin)
-- SET(XDMF_METIS_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_METIS_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- ENDIF(XDMF_BUILD_UTILS)
-
- #############################################################################
-@@ -130,7 +130,7 @@
- SET(XDMF_ZLIB_INCLUDE_DIR_CONFIG ${HDF5_ZLIB_INCLUDE_DIRS})
- SET(XDMF_ZLIB_INCLUDE_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/vtkzlib)
- SET(XDMF_ZLIB_LIBRARY_DIR_CONFIG ${Xdmf_BINARY_DIR}/bin)
-- SET(XDMF_ZLIB_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_ZLIB_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- SET(XDMF_ZLIB_LIBRARIES vtkzlib)
-
- ENDIF(XDMF_SYSTEM_ZLIB)
-@@ -166,7 +166,7 @@
- SET(XDMF_NETCDF_INCLUDE_DIR_CONFIG ${NETCDF_INCLUDE_DIRS})
- SET(XDMF_NETCDF_INCLUDE_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/vtknetcdf)
- SET(XDMF_NETCDF_LIBRARY_DIR_CONFIG ${CMAKE_INSTALL_PREFIX}/bin)
-- SET(XDMF_NETCDF_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_NETCDF_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
-
- ENDIF(XDMF_BUILD_VTK AND EXISTS ${VTK_INSTALL_PREFIX}${VTK_INSTALL_INCLUDE_DIR}/vtk_netcdf.h)
-
-@@ -203,7 +203,7 @@
- SET(XDMF_EXODUSII_INCLUDE_DIR_CONFIG ${EXODUSII_INCLUDE_DIRS})
- SET(XDMF_EXODUSII_INCLUDE_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/vtkexodus2)
- SET(XDMF_EXODUSII_LIBRARY_DIR_CONFIG ${Xdmf_BINARY_DIR}/bin)
-- SET(XDMF_EXODUSII_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_EXODUSII_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
-
- ENDIF(XDMF_BUILD_VTK AND EXISTS ${VTK_INSTALL_PREFIX}${VTK_INSTALL_INCLUDE_DIR}/vtkexodus2/exodusII.h)
-
-@@ -242,7 +242,7 @@
- SET(XDMF_LIBXML2_INCLUDE_DIR_CONFIG ${XDMF_LIBXML2_INCLUDE_DIRS})
- SET(XDMF_LIBXML2_INCLUDE_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/vtklibxml2)
- SET(XDMF_LIBXML2_LIBRARY_DIR_CONFIG ${Xdmf_BINARY_DIR}/bin)
-- SET(XDMF_LIBXML2_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_LIBXML2_LIBRARY_DIR_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- SET(XDMF_LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
-
- ELSE(NOT XDMF_SYSTEM_LIBXML2)
-@@ -344,7 +344,7 @@
- SET(XDMF_HDF5_INCLUDE_CONFIG ${Xdmf_SOURCE_DIR}/Utilities/hdf5 ${Xdmf_BINARY_DIR}/Utilities/hdf5 ${Xdmf_SOURCE_DIR}/Utilities)
- SET(XDMF_HDF5_INCLUDE_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/include/vtkhdf5)
- SET(XDMF_HDF5_LIBRARY_PATH_CONFIG ${Xdmf_BINARY_DIR}/bin)
-- SET(XDMF_HDF5_LIBRARY_PATH_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(XDMF_HDF5_LIBRARY_PATH_INSTALL_CONFIG ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- SET(XDMF_HDF5_LIBRARIES ${HDF5_LIBRARY})
-
- ENDIF(XDMF_SYSTEM_HDF5)
-@@ -417,7 +417,7 @@
- SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
- # the RPATH to be used when installing
-- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-
- # add the automatically determined parts of the RPATH
- # which point to directories outside the build tree to the install RPATH
-@@ -473,7 +473,7 @@
- ${Xdmf_BINARY_DIR}/XDMFConfig.cmake @ONLY IMMEDIATE)
-
- SET(XDMF_INSTALL_BIN_DIR "/bin")
--SET(XDMF_INSTALL_LIB_DIR "/lib")
-+SET(XDMF_INSTALL_LIB_DIR "/lib${LIB_SUFFIX}")
- SET(XDMF_INSTALL_INCLUDE_DIR "/include")
- SET(XDMF_INSTALL_INCLUDE_VTK_DIR "/include")
-
-@@ -513,11 +513,11 @@
- SET(XDMF_INCLUDE_DIRS_CONFIG ${XDMF_INCLUDE_DIRS_CONFIG} ${DOLLAR}{XDMF_INSTALL_DIR}/include/utils)
- ENDIF(XDMF_BUILD_UTILS)
- SET(XDMF_LIBRARY_DIRS_CONFIG
-- ${DOLLAR}{XDMF_INSTALL_DIR}/lib
-+ ${DOLLAR}{XDMF_INSTALL_DIR}/lib${LIB_SUFFIX}
- )
-- SET(XDMF_USE_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib/XdmfCMake/UseXDMF.cmake)
-- SET(XDMF_BUILD_SETTINGS_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib/XdmfCMake/XDMFBuildSettings.cmake)
-- SET(XDMF_LIBRARY_DEPENDS_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib/XdmfCMake/XDMFLibraryDepends.cmake)
-+ SET(XDMF_USE_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib${LIB_SUFFIX}/XdmfCMake/UseXDMF.cmake)
-+ SET(XDMF_BUILD_SETTINGS_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib${LIB_SUFFIX}/XdmfCMake/XDMFBuildSettings.cmake)
-+ SET(XDMF_LIBRARY_DEPENDS_FILE ${DOLLAR}{XDMF_INSTALL_DIR}/lib${LIB_SUFFIX}/XdmfCMake/XDMFLibraryDepends.cmake)
- SET(XDMF_KITS_DIR ${DOLLAR}{XDMF_INSTALL_DIR}/vtk)
- CONFIGURE_FILE(${Xdmf_SOURCE_DIR}/XDMFConfig.cmake.in
- ${Xdmf_BINARY_DIR}/XDMFConfigInstall.cmake @ONLY IMMEDIATE)
---- Xdmf/Utilities/CMakeLists.txt.orig 2009-01-22 22:47:53.000000000 +0100
-+++ Xdmf/Utilities/CMakeLists.txt 2013-09-14 07:38:48.141127926 +0200
-@@ -1,9 +1,9 @@
- # SET(VTKHDF5_INSTALL_LIB_DIR /lib/Xdmf)
--SET(VTKHDF5_INSTALL_LIB_DIR /lib)
-+SET(VTKHDF5_INSTALL_LIB_DIR /lib${LIB_SUFFIX})
- SUBDIRS(hdf5)
-
- IF(XDMF_BUILD_VTK)
- SUBDIRS(Doxygen)
- ENDIF(XDMF_BUILD_VTK)
-
--SET(VTK_INSTALL_LIB_DIR "/lib")
-+SET(VTK_INSTALL_LIB_DIR "/lib${LIB_SUFFIX}")
---- Xdmf/Utilities/metis/CMakeLists.txt.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/CMakeLists.txt 2013-09-14 07:39:44.270398581 +0200
-@@ -59,7 +59,7 @@
- SET(VTK_INSTALL_BIN_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/bin)
- ENDIF(NOT VTK_INSTALL_BIN_DIR_CM24)
- IF(NOT VTK_INSTALL_LIB_DIR_CM24)
-- SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- ENDIF(NOT VTK_INSTALL_LIB_DIR_CM24)
- IF(NOT VTK_INSTALL_INCLUDE_DIR_CM24)
- SET(VTK_INSTALL_INCLUDE_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/include)
---- Xdmf/Utilities/vtkexodus2/CMakeLists.txt.orig 2010-01-06 17:33:02.000000000 +0100
-+++ Xdmf/Utilities/vtkexodus2/CMakeLists.txt 2013-09-14 07:40:28.665791674 +0200
-@@ -209,7 +209,7 @@
- SET(VTK_INSTALL_BIN_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/bin)
- ENDIF(NOT VTK_INSTALL_BIN_DIR_CM24)
- IF(NOT VTK_INSTALL_LIB_DIR_CM24)
-- SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- ENDIF(NOT VTK_INSTALL_LIB_DIR_CM24)
- IF(NOT VTK_INSTALL_INCLUDE_DIR_CM24)
- SET(VTK_INSTALL_INCLUDE_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/include)
---- Xdmf/Utilities/vtknetcdf/CMakeLists.txt.orig 2010-01-06 17:34:04.000000000 +0100
-+++ Xdmf/Utilities/vtknetcdf/CMakeLists.txt 2013-09-14 07:41:28.941921726 +0200
-@@ -264,7 +264,7 @@
- SET(VTK_INSTALL_BIN_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/bin)
- ENDIF(NOT VTK_INSTALL_BIN_DIR_CM24)
- IF(NOT VTK_INSTALL_LIB_DIR_CM24)
-- SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib)
-+ SET(VTK_INSTALL_LIB_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- ENDIF(NOT VTK_INSTALL_LIB_DIR_CM24)
- IF(NOT VTK_INSTALL_INCLUDE_DIR_CM24)
- SET(VTK_INSTALL_INCLUDE_DIR_CM24 ${CMAKE_INSTALL_PREFIX}/include)
---- Xdmf/CMake/setup_install_paths.py.orig 2010-01-06 17:32:58.000000000 +0100
-+++ Xdmf/CMake/setup_install_paths.py 2013-09-14 09:27:23.336736013 +0200
-@@ -86,8 +86,8 @@
- data = home
- elif os.name == 'posix':
- ver = sys.version[0:3]
-- purelib = prefix+'/lib/python'+ver+'/site-packages'
-- platlib = exec_prefix+'/lib/python'+ver+'/site-packages'
-+ purelib = prefix+'/' + sys.lib + '/python'+ver+'/site-packages'
-+ platlib = exec_prefix+'/' + sys.lib + '/python'+ver+'/site-packages'
- scripts = prefix+'/bin'
- data = prefix
- elif sys.version < '2.2':
diff --git a/xdmf-log2.patch b/xdmf-log2.patch
deleted file mode 100644
index 08110cc..0000000
--- a/xdmf-log2.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- Xdmf/Utilities/metis/util.c.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/util.c 2013-09-13 17:11:43.511029060 +0200
-@@ -509,7 +509,7 @@ void InitRandom(int seed)
- /*************************************************************************
- * This function returns the log2(x)
- **************************************************************************/
--int log2(int a)
-+int intlog2(int a)
- {
- int i;
-
---- Xdmf/Utilities/metis/rename.h.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/rename.h 2013-09-13 17:12:24.884360419 +0200
-@@ -410,7 +410,7 @@
- #define RandomPermute __RandomPermute
- #define ispow2 __ispow2
- #define InitRandom __InitRandom
--#define log2 __log2
-+#define intlog2 __intlog2
-
-
-
---- Xdmf/Utilities/metis/kmetis.c.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/kmetis.c 2013-09-13 17:12:59.174358871 +0200
-@@ -66,7 +66,7 @@ void METIS_WPartGraphKway(int *nvtxs, id
- ctrl.dbglvl = options[OPTION_DBGLVL];
- }
- ctrl.optype = OP_KMETIS;
-- ctrl.CoarsenTo = amax((*nvtxs)/(40*log2(*nparts)), 20*(*nparts));
-+ ctrl.CoarsenTo = amax((*nvtxs)/(40*intlog2(*nparts)), 20*(*nparts));
- ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo);
-
- InitRandom(-1);
---- Xdmf/Utilities/metis/kvmetis.c.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/kvmetis.c 2013-09-13 17:13:06.084358658 +0200
-@@ -66,7 +66,7 @@ void METIS_WPartGraphVKway(int *nvtxs, i
- ctrl.dbglvl = options[OPTION_DBGLVL];
- }
- ctrl.optype = OP_KVMETIS;
-- ctrl.CoarsenTo = amax((*nvtxs)/(40*log2(*nparts)), 20*(*nparts));
-+ ctrl.CoarsenTo = amax((*nvtxs)/(40*intlog2(*nparts)), 20*(*nparts));
- ctrl.maxvwgt = 1.5*((graph.vwgt ? idxsum(*nvtxs, graph.vwgt) : (*nvtxs))/ctrl.CoarsenTo);
-
- InitRandom(-1);
---- Xdmf/Utilities/metis/mkmetis.c.orig 2010-03-24 21:03:47.000000000 +0100
-+++ Xdmf/Utilities/metis/mkmetis.c 2013-09-13 17:13:17.037691588 +0200
-@@ -47,7 +47,7 @@ void METIS_mCPartGraphKway(int *nvtxs, i
- ctrl.dbglvl = options[OPTION_DBGLVL];
- }
- ctrl.optype = OP_KMETIS;
-- ctrl.CoarsenTo = amax((*nvtxs)/(20*log2(*nparts)), 30*(*nparts));
-+ ctrl.CoarsenTo = amax((*nvtxs)/(20*intlog2(*nparts)), 30*(*nparts));
-
- ctrl.nmaxvwgt = 1.5/(1.0*ctrl.CoarsenTo);
-
diff --git a/xdmf-soname.patch b/xdmf-soname.patch
deleted file mode 100644
index ba4b483..0000000
--- a/xdmf-soname.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Add a soname to the libXdmf.so.2.1 library
-Author: Alastair McKinstry <mckinstry at debian.org>
-Last-Updated: 2011-06-20
-Forwarded: not-needed
-
---- xdmf-2.1.orig/libsrc/CMakeLists.txt
-+++ xdmf-2.1/libsrc/CMakeLists.txt
-@@ -417,6 +417,8 @@ ENDIF(VTK_BUILD_SHARED_LIBS OR BUILD_SHA
-
- ADD_LIBRARY(Xdmf ${LIBTYPE} ${XdmfSources})
-
-+SET_TARGET_PROPERTIES(Xdmf PROPERTIES SOVERSION 2)
-+
- IF(XDMF_USE_MYSQL)
- ADD_DEFINITIONS("-DXDMF_USE_MYSQL")
- INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_PATH})
diff --git a/xdmf-swig.patch b/xdmf-swig.patch
new file mode 100644
index 0000000..df1e1e3
--- /dev/null
+++ b/xdmf-swig.patch
@@ -0,0 +1,85 @@
+--- xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt.orig 2019-01-14 21:18:11.000000000 +0100
++++ xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt 2019-12-26 20:18:56.479467552 +0100
+@@ -116,7 +116,7 @@
+ set(CMAKE_SWIG_OUTDIR ${CMAKE_BINARY_DIR})
+ # optimize swig generation --- these are all flags corresponding to -O
+ # except -fvirtual which breaks visitor operation
+- set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -modern -fastdispatch -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone)
++ set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -fastdispatch -fastproxy)
+ #Enables DSM
+ if (XDMF_BUILD_DSM)
+ set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DXDMF_BUILD_DSM)
+@@ -158,7 +158,7 @@
+
+ set(
+ PYTHON_INSTALL_DIR
+- ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/xdmf
++ ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/xdmf
+ )
+
+ string(TOUPPER ${python_name} python_name_upper)
+@@ -170,7 +170,7 @@
+ PARENT_SCOPE)
+ endif()
+
+- install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${python_name}.py
++ install(FILES ${CMAKE_BINARY_DIR}/${python_name}.py
+ DESTINATION ${PYTHON_INSTALL_DIR})
+ install(TARGETS ${SWIG_MODULE_${python_name}Python_REAL_NAME}
+ DESTINATION ${PYTHON_INSTALL_DIR})
+#--- xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt.orig 2019-12-31 19:20:24.581481687 +0100
+#+++ xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt 2020-01-01 17:57:37.662906442 +0100
+#@@ -221,7 +221,7 @@
+# add_custom_target(Compiled_${java_name}_Jar ALL DEPENDS
+# ${${java_name}_JAVA_JAR})
+# add_custom_command(OUTPUT ${${java_name}_JAVA_JAR}
+#- COMMAND ${CMAKE_COMMAND} -E chdir ${XDMF_JAVA_PACKAGE_DIR}
+#+ COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_SWIG_OUTDIR}
+# ${JAVA_COMPILE} -cp \".${java_cp_jars}\" ${java_files}
+# COMMAND ${JAVA_ARCHIVE} -cvf ${${java_name}_JAVA_JAR}
+# "${XDMF_JAVA_PACKAGE_DIR}/*.class")
+--- xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/Xdmf.i.orig 2019-01-14 21:18:11.000000000 +0100
++++ xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/Xdmf.i 2020-01-02 19:38:20.022103199 +0100
+@@ -1054,6 +1054,7 @@
+ %ignore XdmfSet::getAttribute(const std::string &) const;
+
+ // Ignore ItemTags
++%ignore XdmfAggregate::ItemTag;
+ %ignore XdmfAttribute::ItemTag;
+ %ignore XdmfCurvilinearGrid::ItemTag;
+ %ignore XdmfDomain::ItemTag;
+--- xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/core/XdmfCore.i.orig 2019-12-31 19:20:24.584815002 +0100
++++ xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/core/XdmfCore.i 2020-01-02 19:39:24.755085844 +0100
+@@ -429,7 +429,10 @@
+
+ // Ignore ItemTags
+ %ignore XdmfArray::ItemTag;
++%ignore XdmfFunction::ItemTag;
+ %ignore XdmfInformation::ItemTag;
++%ignore XdmfSparseMatrix::ItemTag;
++%ignore XdmfSubset::ItemTag;
+
+ // Define equality operators
+ %extend XdmfItem {
+@@ -1272,6 +1275,7 @@
+ %include std_string.i
+ %include std_vector.i
+ %include std_map.i
++%include std_pair.i
+
+ %shared_ptr(Loki::BaseVisitor)
+ %shared_ptr(Loki::BaseVisitable<void>)
+--- xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt.orig 2020-01-02 20:37:35.359508950 +0100
++++ xdmf-8d9c98081d89ac77a132d56bc8bef53581db4078/CMakeLists.txt 2020-01-02 20:38:28.862552433 +0100
+@@ -195,9 +195,9 @@
+ # Target Name = the output target name will have ${java_name}Java as its name
+ # Target Jar = the output target jar will have ${java_name}Java.jar as its name
+ macro(XDMF_SWIG_JAVA java_name)
+- set(${java_name}_JAVA_JAR ${CMAKE_BINARY_DIR}/${java_name}.jar)
++ set(${java_name}_JAVA_JAR ${CMAKE_CURRENT_BINARY_DIR}/${java_name}.jar)
+ set(XDMF_JAVA_PACKAGE_DIR mil/army/arl/xdmf)
+- set(XDMF_JAVA_DIR ${CMAKE_BINARY_DIR}/${XDMF_JAVA_PACKAGE_DIR})
++ set(XDMF_JAVA_DIR ${CMAKE_CURRENT_BINARY_DIR}/${XDMF_JAVA_PACKAGE_DIR})
+ set(CMAKE_SWIG_OUTDIR ${XDMF_JAVA_DIR})
+ set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -v -make_default -package mil.army.arl.xdmf)
+ set_source_files_properties(${java_name}.i PROPERTIES CPLUSPLUS ON)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xdmf.git/commitdiff/a6e82770295109a987300990278ce3b66fdd35a4
More information about the pld-cvs-commit
mailing list