From: Drew Parsons Date: Fri, 26 Oct 2018 03:45:58 +0000 (+0800) Subject: mshr (2018.1.0+dfsg1-7) unstable; urgency=medium X-Git-Tag: archive/raspbian/2019.2.0_git20200924.c27eb18+dfsg1-10+rpi1~1^2^2^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7e51d11db4944e791a4f33c29b474c502b86ca62;p=mshr.git mshr (2018.1.0+dfsg1-7) unstable; urgency=medium * Debian patch fix_mesh3_internal.patch updates namespace for Mesh_3::internal::C3t3_initializer (CGAL 4.13). Closes: #911814. [dgit import unpatched mshr 2018.1.0+dfsg1-7] --- 7e51d11db4944e791a4f33c29b474c502b86ca62 diff --cc debian/changelog index 0000000,0000000..2c111e5 new file mode 100644 --- /dev/null +++ b/debian/changelog @@@ -1,0 -1,0 +1,159 @@@ ++mshr (2018.1.0+dfsg1-7) unstable; urgency=medium ++ ++ * Debian patch fix_mesh3_internal.patch updates namespace for ++ Mesh_3::internal::C3t3_initializer (CGAL 4.13). Closes: #911814. ++ ++ -- Drew Parsons Fri, 26 Oct 2018 11:45:58 +0800 ++ ++mshr (2018.1.0+dfsg1-6) unstable; urgency=medium ++ ++ * apply strict versioned depends on pybind11, ++ python3-mshr Depends: pybind11 (>= 2.2.4), pybind11 (<= 2.2.5) ++ ++ -- Drew Parsons Tue, 25 Sep 2018 04:04:24 +0800 ++ ++mshr (2018.1.0+dfsg1-5) unstable; urgency=medium ++ ++ * strip -g from dpkg-buildflags to reduce memory requirements of the ++ build (needed to build on Debian 32 bit and on ubuntu) ++ * Standards-Version: 4.2.1 ++ ++ -- Drew Parsons Tue, 04 Sep 2018 21:25:48 +0800 ++ ++mshr (2018.1.0+dfsg1-4) unstable; urgency=medium ++ ++ * fix debian/tests: demos are now provided by python3-mshr ++ ++ -- Drew Parsons Sat, 11 Aug 2018 22:42:56 +0800 ++ ++mshr (2018.1.0+dfsg1-3) unstable; urgency=medium ++ ++ * run autopkgtest on demos from mshr-demos package ++ - install demos in /usr/share/doc/mshr-demos/examples ++ * mark libmshr2018.1 as Multi-Arch: same ++ * drop mshr-demos (FTBFS on i386 interferes with package migration) ++ and install demos with python3-mshr. ++ ++ -- Drew Parsons Sat, 11 Aug 2018 02:47:12 +0800 ++ ++mshr (2018.1.0+dfsg1-2) unstable; urgency=medium ++ ++ * Upload to unstable. Closes: #905369. ++ * Standards-Version: 4.2.0 ++ * Build-Depends: python3-setuptools ++ * Add debian/tests (autopkgtest) ++ - debian patch test_controls.diff provides test.py scripts ++ ++ -- Drew Parsons Sat, 04 Aug 2018 13:31:48 +0800 ++ ++mshr (2018.1.0+dfsg1-1exp1) experimental; urgency=medium ++ ++ * New upstream release. ++ - debian patches applied upstream: ++ cgal_4.12.patch ++ tetgen_define_TETLIBRARY.patch ++ use_system_cgal_tetgen.patch ++ - removes python2 support (python-mshr is dropped) ++ - uses pybind11 instead of swig ++ * debian patch cmake_config_in_lib.patch places cmake config files ++ in lib not share, since MSHR_LIBRARIES_DIRS is arch-specific. ++ * apply dpkg-buildflags CXXFLAGS to cmake build (for hardening and ++ debug symbols) ++ * remove CGAL and tetgen licences from debian/copyright (these ++ 3rdParty sources have been removed from the source tarball) ++ * Standards-Version: 4.1.5 ++ * Build-Depends: python3-all-dev (i.e. add python3.7 support) ++ ++ -- Drew Parsons Tue, 10 Jul 2018 13:07:08 +0800 ++ ++mshr (2017.2.0+dfsg1-1) unstable; urgency=medium ++ ++ * Upload mshr without embedded CGAL and tetgen code. Closes: #824716. ++ * debian/copyright Files-Excluded: 3rdparty/CGAL 3rdparty/tetgen1.5.0 ++ CGAL and tetgen are provided by their own packages, so exclude ++ them from mshr to save space. ++ * Debian patch cgal_4.12.patch builds against CGAL 4.12. ++ * Build against system CGAL and tetgen. ++ Thanks Johannes Ring (upstream branch ++ johannr/optional-use-system-packages, applied as Debian patch ++ use_system_cgal_tetgen.patch) ++ - Build-Depends: libcgal-dev (>= 4.12), libtet1.5-dev. ++ - debian patch tetgen_define_TETLIBRARY.patch ensures tetgen ++ library API is used (defines TETLIBRARY) ++ * Build-Depends: cmake (>= 3.5) ++ * Standards-Version: 4.1.4 ++ * Debian patch demos_update.patch keeps extrude demo running ++ ++ -- Drew Parsons Wed, 23 May 2018 03:10:08 +0800 ++ ++mshr (2017.2.0-1) UNRELEASED; urgency=medium ++ ++ * Team upload. ++ * New upstream version. ++ * Standards-Version: 4.1.3 ++ * debhelper compatibility level 11 ++ ++ -- Drew Parsons Thu, 25 Jan 2018 16:59:08 +0800 ++ ++mshr (2017.1.0-2) UNRELEASED; urgency=medium ++ ++ * Team upload. ++ * Standards-Version: 4.1.2 ++ * Provide python3 support in python3-mshr ++ ++ -- Drew Parsons Tue, 12 Dec 2017 14:56:09 +0800 ++ ++mshr (2017.1.0-1) UNRELEASED; urgency=medium ++ ++ * Team upload. ++ ++ [ Johannes Ring ] ++ * New upstream release. ++ - Move debian/libmshr2016.2.install > debian/libmshr2017.1.install. ++ - Update package name for new SONAME 2017.1 (libmshr2016.2 -> ++ libmshr2017.1). ++ - Bump minimum required version of libdolfin-dev, python-ffc, ++ python-dolfin and dolfin-bin from 2016.2.0 to 2017.1.0. ++ ++ [ Drew Parsons ] ++ * Standards-Version: 4.1.0 ++ * debhelper compatibility level 10 ++ ++ -- Johannes Ring Thu, 11 May 2017 13:04:50 +0200 ++ ++mshr (2016.2.0-1) UNRELEASED; urgency=medium ++ ++ * New upstream release. ++ - Move debian/libmshr2016.1.install > debian/libmshr2016.2.install. ++ - Update package name for new SONAME 2016.2 (libmshr2016.1 -> ++ libmshr2016.2). ++ - Bump minimum required version of libdolfin-dev, python-ffc, ++ python-dolfin and dolfin-bin from 2016.1.0 to 2016.2.0. ++ ++ -- Johannes Ring Fri, 02 Dec 2016 15:22:32 +0100 ++ ++mshr (2016.1.0-2) UNRELEASED; urgency=medium ++ ++ * New upstream release. ++ * debian/control: ++ - Update package name for new SONAME 2016.1 (libmshr1.6 -> ++ libmshr2016.1). ++ - Bump minimum required version of libdolfin-dev, python-ffc, ++ python-dolfin and dolfin-bin from 1.6.0 to 2016.1.0. ++ - Add libproj-dev to Build-Depends and to Depends for binary package ++ libmshr-dev. ++ * Move debian/libmshr1.6.install -> debian/libmshr2016.1.install. ++ * Remove patch (fixed upstream). ++ * debian/rules: Add -fpermissive to CXX flags. ++ ++ -- Johannes Ring Fri, 02 Dec 2016 15:20:19 +0100 ++ ++mshr (1.6.0-1) unstable; urgency=low ++ ++ [ Johannes Ring ] ++ * Initial release (Closes: #824716) ++ ++ [ Drew Parsons ] ++ * Team upload. ++ ++ -- Drew Parsons Fri, 20 May 2016 08:23:26 +0800 diff --cc debian/compat index 0000000,0000000..b4de394 new file mode 100644 --- /dev/null +++ b/debian/compat @@@ -1,0 -1,0 +1,1 @@@ ++11 diff --cc debian/control index 0000000,0000000..2867c2b new file mode 100644 --- /dev/null +++ b/debian/control @@@ -1,0 -1,0 +1,74 @@@ ++Source: mshr ++Section: math ++Priority: optional ++Maintainer: Debian Science Team ++Uploaders: Johannes Ring , Drew Parsons ++Build-Depends: debhelper (>= 11), ++ python3-all-dev, ++ dh-python, ++ python3-setuptools, ++ cmake (>= 3.5), ++ python3-pybind11 (>= 2.2.2), ++ libmpfr-dev, ++ libgmp-dev, ++ libcgal-dev (>= 4.13), ++ libtet1.5-dev, ++ libdolfin-dev (>= 2018.1), ++ python3-ffc (>= 2018.1), ++ python3-numpy, ++ python3-petsc4py, ++ python3-slepc4py, ++ libproj-dev ++Standards-Version: 4.2.1 ++X-Python3-Version: >= 3.5 ++Homepage: http://fenicsproject.org ++Vcs-Git: https://salsa.debian.org/science-team/fenics/mshr.git ++Vcs-Browser: https://salsa.debian.org/science-team/fenics/mshr ++ ++Package: libmshr2018.1 ++Section: libs ++Architecture: any ++Multi-Arch: same ++Depends: ${shlibs:Depends}, ${misc:Depends} ++Description: Shared libraries for mshr ++ mshr generates simplicial DOLFIN meshes in 2D and 3D from geometries ++ described by Constructive Solid Geometry (CSG) or from surface files, ++ utilizing CGAL and Tetgen as mesh generation backends. ++ . ++ This package contains the shared libraries. ++ ++Package: libmshr-dev ++Section: libdevel ++Architecture: any ++Depends: libmshr2018.1 (= ${binary:Version}), ++ libdolfin-dev (>= ${fenics:Upstream-Version}), ++ python3-ffc (>= ${fenics:Upstream-Version}), ++ cmake (>= 2.8.0), ++ libproj-dev, ++ ${shlibs:Depends}, ++ ${misc:Depends} ++Description: Shared links and header files for mshr ++ mshr generates simplicial DOLFIN meshes in 2D and 3D from geometries ++ described by Constructive Solid Geometry (CSG) or from surface files, ++ utilizing CGAL and Tetgen as mesh generation backends. ++ . ++ This package contains the development files. ++ ++Package: python3-mshr ++Section: python ++Architecture: any ++Depends: libmshr-dev (= ${binary:Version}), ++ libmshr2018.1 (= ${binary:Version}), ++ python3-dolfin (>= ${fenics:Upstream-Version}), ++ dolfin-bin (>= ${fenics:Upstream-Version}), ++ python3-pybind11 (>= ${pybind11:Upstream-Version}), python3-pybind11 (<< ${pybind11:Next-Upstream-Version}), ++ ${python3:Depends}, ++ ${shlibs:Depends}, ++ ${misc:Depends} ++Description: Python 3 interface for mshr ++ mshr generates simplicial DOLFIN meshes in 2D and 3D from geometries ++ described by Constructive Solid Geometry (CSG) or from surface files, ++ utilizing CGAL and Tetgen as mesh generation backends. ++ . ++ This package contains the Python 3 interface for mshr, and examples ++ and demo programs. diff --cc debian/copyright index 0000000,0000000..bce0365 new file mode 100644 --- /dev/null +++ b/debian/copyright @@@ -1,0 -1,0 +1,25 @@@ ++Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ++Upstream-Name: mshr ++Source: http://fenicsproject.org ++Comment: Lead Author: Benjamin Kehlet ++ Contributors: ++ Anders Logg ++ Johannes Ring ++ Garth N. Wells ++Files-Excluded: 3rdparty/CGAL 3rdparty/tetgen1.5.0 ++ ++Files: * ++Copyright: © 2015 Benjamin Kehlet ++License: GPL-3+ ++ ++License: GPL-3+ ++ /usr/share/common-licenses/GPL-3 ++ ++License: LGPL-3+ ++ /usr/share/common-licenses/LGPL-3 ++ ++Files: debian/* ++Copyright: © 2015 Johannes Ring , ++ 2016 Drew Parsons ++License: GPL-2+ ++ /usr/share/common-licenses/GPL-2 diff --cc debian/docs index 0000000,0000000..a1320b1 new file mode 100644 --- /dev/null +++ b/debian/docs @@@ -1,0 -1,0 +1,1 @@@ ++README.rst diff --cc debian/libmshr-dev.install index 0000000,0000000..dcb8deb new file mode 100644 --- /dev/null +++ b/debian/libmshr-dev.install @@@ -1,0 -1,0 +1,5 @@@ ++usr/lib/**/*.so ++usr/include/mshr ++usr/include/mshr.h ++usr/lib/*/cmake/mshr/* ++usr/bin/mshrable diff --cc debian/libmshr-dev.manpages index 0000000,0000000..60ad814 new file mode 100644 --- /dev/null +++ b/debian/libmshr-dev.manpages @@@ -1,0 -1,0 +1,1 @@@ ++debian/mshrable.1 diff --cc debian/libmshr2018.1.install index 0000000,0000000..8755c99 new file mode 100644 --- /dev/null +++ b/debian/libmshr2018.1.install @@@ -1,0 -1,0 +1,1 @@@ ++usr/lib/**/lib*.so.* diff --cc debian/mshrable.1 index 0000000,0000000..336f2f8 new file mode 100644 --- /dev/null +++ b/debian/mshrable.1 @@@ -1,0 -1,0 +1,61 @@@ ++.TH "MSHRABLE" "1" ++.SH "NAME" ++mshrable \(em Generate mesh from surface file ++.SH "SYNOPSIS" ++.PP ++\fBmshrable\fR [\-f \fIFILE\fR] ++.SH "DESCRIPTION" ++.PP ++\fBmshrable\fR generates a mesh from a ++surface file. It uses mshr, which is the mesh generation ++component of FEniCS. It generates simplicial DOLFIN meshes in 2D ++and 3D from geometries described by Constructive Solid Geometry ++(CSG) or from surface files, utilizing CGAL and Tetgen as mesh ++generation backends. ++ ++.SH "OPTIONS" ++.PP ++ ++.IP "\-o [\-\-outfile] \fIarg\fR" 10 ++Filename of generated Dolfin mesh. ++ ++.IP "\-r [\-\-resolution] \fIarg (=15)\fR" 10 ++Resolution of result mesh. ++ ++.IP "\-s [\-\-stats]" 10 ++Write some statistics of the mesh to stdout. ++ ++.IP "\-\-polyout \fIarg\fR" 10 ++Write the polyhedron to .poly which Tetgen can read ++(and do not create a mesh). ++ ++.IP "\-\-polystats" 10 ++Write statistics of polyhedron (and do not create a ++mesh). ++ ++.IP "\-b [\-\-backend] \fIarg (=cgal)\fR" 10 ++Use 3D mesh generation backend [tetgen|cgal]. ++ ++.IP "\-\-degenerate_tolerance \fIarg (=9.9999999999999998e-13)\fR" 10 ++Tolerance for considering a facet as degenerate. Set ++to 0 to not remove degenerate facets. ++ ++.IP "\-\-check-mesh" 10 ++Check consistency of output mesh (most for debugging/testing. ++ ++.IP "\-v [\-\-verbose]" 10 ++Output more information about what is going on. ++ ++.IP "\-h [\-\-help]" 10 ++write help message. ++ ++.SH "SEE ALSO" ++.PP ++dolfin-convert (1), dolfin-order (1) ++.SH "AUTHOR" ++.PP ++\fBmshrable\fR was written by Benjamin ++Kehlet benjamik@simula.no. This man page was written by ++Drew Parsons dparsons@debian.org. ++ ++.\" created by instant / docbook-to-man diff --cc debian/mshrable.sgml index 0000000,0000000..a7c8f4a new file mode 100644 --- /dev/null +++ b/debian/mshrable.sgml @@@ -1,0 -1,0 +1,202 @@@ ++Drew"> ++ Parsons"> ++ ++ 19 May, 2016"> ++ 1"> ++ dparsons@debian.org"> ++ ++ MSHRABLE"> ++ ++ ++ Debian GNU/Linux"> ++ GNU"> ++]> ++ ++ ++ ++ ++ ++
++ &dhemail; ++
++ ++ &dhfirstname; ++ &dhsurname; ++ ++ ++ 2001 ++ &dhusername; ++ ++ &dhdate; ++
++ ++ &dhucpackage; ++ ++ &dhsection; ++ ++ ++ &dhpackage; ++ ++ Generate mesh from surface file ++ ++ ++ ++ &dhpackage; ++ -f FILE ++ ++ ++ ++ ++ DESCRIPTION ++ ++ &dhpackage; generates a mesh from a ++ surface file. It uses mshr, which is the mesh generation ++ component of FEniCS. It generates simplicial DOLFIN meshes in 2D ++ and 3D from geometries described by Constructive Solid Geometry ++ (CSG) or from surface files, utilizing CGAL and Tetgen as mesh ++ generation backends. ++ ++ ++ ++ ++ OPTIONS ++ ++ ++ ++ -o [--outfile] arg ++ ++ ++ Filename of generated Dolfin mesh. ++ ++ ++ ++ ++ ++ -r [--resolution] arg (=15) ++ ++ ++ Resolution of result mesh. ++ ++ ++ ++ ++ ++ -s [--stats] ++ ++ ++ Write some statistics of the mesh to stdout. ++ ++ ++ ++ ++ ++ --polyout arg ++ ++ ++ Write the polyhedron to .poly which Tetgen can read ++ (and do not create a mesh). ++ ++ ++ ++ ++ ++ --polystats ++ ++ ++ Write statistics of polyhedron (and do not create a ++ mesh). ++ ++ ++ ++ ++ ++ -b [--backend] arg (=cgal) ++ ++ ++ Use 3D mesh generation backend [tetgen|cgal]. ++ ++ ++ ++ ++ ++ --degenerate_tolerance arg (=9.9999999999999998e-13) ++ ++ ++ Tolerance for considering a facet as degenerate. Set ++ to 0 to not remove degenerate facets. ++ ++ ++ ++ ++ ++ --check-mesh ++ ++ ++ Check consistency of output mesh (most for debugging/testing. ++ ++ ++ ++ ++ ++ -v [--verbose] ++ ++ ++ Output more information about what is going on. ++ ++ ++ ++ ++ ++ -h [--help] ++ ++ ++ write help message. ++ ++ ++ ++ ++ ++ ++ ++ ++ SEE ALSO ++ ++ dolfin-convert (1), dolfin-order (1) ++ ++ ++ AUTHOR ++ &dhpackage; was written by Benjamin ++ Kehlet benjamik@simula.no. This man page was written by ++ &dhusername; &dhemail;. ++ ++ ++ ++ ++ ++ ++
++ ++ ++ diff --cc debian/patches/build_python.patch index 0000000,0000000..93207f6 new file mode 100644 --- /dev/null +++ b/debian/patches/build_python.patch @@@ -1,0 -1,0 +1,94 @@@ ++Index: mshr/python/CMakeLists.txt ++=================================================================== ++--- mshr.orig/python/CMakeLists.txt +++++ mshr/python/CMakeLists.txt ++@@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 3.5.0) ++ ++ PROJECT(mshr_pybind11_config) ++ +++# Add cmake directory to mshr module path +++list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") ++ ++ # pybind11_FOUND - true if pybind11 and all required components found on the system ++ # pybind11_VERSION - pybind11 version in format Major.Minor.Release ++@@ -23,7 +25,7 @@ find_package(pybind11 CONFIG HINTS ${PYB ++ ++ find_package(DOLFIN) ++ ++-find_package(mshr) +++find_package(mshr MODULE) ++ ++ configure_file("config.json.in" "config.json") ++ ++Index: mshr/python/cmake/Findmshr.cmake ++=================================================================== ++--- /dev/null +++++ mshr/python/cmake/Findmshr.cmake ++@@ -0,0 +1,51 @@ +++#.rst: +++# Findmshr +++# -------- +++# +++# Find mshr library +++# +++# Find the mshr includes and library. This module defines +++# +++# :: +++# +++# mshr_INCLUDE_DIRS, where to find mshr.h. +++# mshr_LIBRARIES, libraries to link against to use mshr +++# mshr_FOUND, If false (0), do not try to use mshr. +++# +++# +++# +++# +++# +++#============================================================================= +++find_path(mshr_INCLUDE_DIR mshr.h +++ DOC "The mshr include directory") +++ +++set(mshr_NAMES ${mshr_NAMES} libmshr mshr) +++find_library(mshr_LIBRARY NAMES ${mshr_NAMES} +++ DOC "The mshr library") +++ +++# handle the QUIETLY and REQUIRED arguments and set mshr_FOUND to TRUE if +++# all listed variables are TRUE +++include(FindPackageHandleStandardArgs) +++FIND_PACKAGE_HANDLE_STANDARD_ARGS(mshr +++ REQUIRED_VARS mshr_LIBRARY +++ mshr_INCLUDE_DIR +++ VERSION_VAR mshr_VERSION_STRING) +++ +++if(mshr_FOUND) +++ # FIND_PACKAGE_HANDLE_STANDARD_ARGS sets mshr_FOUND to TRUE not 1 +++ # which interferes with the json in config.json (must be true not TRUE) +++ # So set to 1 (following find_package(DOLFIN) ) +++ set( mshr_FOUND 1 ) +++ # use by setuptools.Extension, mshr_LIBRARIES must be in a form that appends to -l +++ # i.e. mshr not libmshr.so +++ set( mshr_LIBRARIES "mshr" ) +++ get_filename_component( mshr_LIBRARIES_DIRS ${mshr_LIBRARY} DIRECTORY ) +++ set( mshr_INCLUDE_DIRS ${mshr_INCLUDE_DIR} ) +++else() +++ set( mshr_FOUND 0) +++ set( mshr_LIBRARIES_DIRS "." ) +++ set( mshr_INCLUDE_DIRS "." ) +++endif() +++ +++mark_as_advanced(mshr_INCLUDE_DIR mshr_LIBRARY) ++Index: mshr/python/setup.py ++=================================================================== ++--- mshr.orig/python/setup.py +++++ mshr/python/setup.py ++@@ -9,7 +9,10 @@ from setuptools import setup, Extension ++ if not os.path.isfile(os.path.join("build", "config.json")) : ++ if not os.path.exists("build") : ++ os.mkdir("build") ++- subprocess.check_call(["cmake", os.getcwd()], cwd=os.path.abspath("build")) +++ cmake_command=["cmake", os.getcwd()] +++ if os.environ.get('CMAKE_PREFIX_PATH'): +++ cmake_command.extend(['-DCMAKE_PREFIX_PATH={}'.format(os.environ['CMAKE_PREFIX_PATH'])]) +++ subprocess.check_call(cmake_command, cwd=os.path.abspath("build")) ++ ++ with open(os.path.join("build", "config.json"), 'r') as infile : ++ config = json.load(infile) diff --cc debian/patches/cmake_config_in_lib.patch index 0000000,0000000..0a52fe4 new file mode 100644 --- /dev/null +++ b/debian/patches/cmake_config_in_lib.patch @@@ -1,0 -1,0 +1,15 @@@ ++Index: mshr/CMakeLists.txt ++=================================================================== ++--- mshr.orig/CMakeLists.txt +++++ mshr/CMakeLists.txt ++@@ -218,8 +218,8 @@ configure_file(mshr-config.cmake.in ++ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mshr-config.cmake" @ONLY) ++ ++ # Install the FooBarConfig.cmake and FooBarConfigVersion.cmake ++-install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mshrConfig.cmake" DESTINATION "${SHARE_DIR}/cmake" COMPONENT dev) ++-install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mshr-config.cmake" DESTINATION "${SHARE_DIR}/cmake" COMPONENT dev) +++install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mshrConfig.cmake" DESTINATION "${INSTALL_LIB_DIR}/cmake/mshr" COMPONENT dev) +++install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/mshr-config.cmake" DESTINATION "${INSTALL_LIB_DIR}/cmake/mshr" COMPONENT dev) ++ #install(FILES "Use-mshr.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) ++ ++ diff --cc debian/patches/demos_update.patch index 0000000,0000000..480d148 new file mode 100644 --- /dev/null +++ b/debian/patches/demos_update.patch @@@ -1,0 -1,0 +1,10 @@@ ++Index: mshr/demo/python/extrude.py ++=================================================================== ++--- mshr.orig/demo/python/extrude.py +++++ mshr/demo/python/extrude.py ++@@ -27,4 +27,4 @@ g3d = mshr.Extrude2D(g2d, ++ .2) # The z "thickness" ++ ++ m = mshr.generate_mesh(g3d, 15) ++-plot(m, interactive=True) +++plot(m) diff --cc debian/patches/depython_main_build.patch index 0000000,0000000..22f81c3 new file mode 100644 --- /dev/null +++ b/debian/patches/depython_main_build.patch @@@ -1,0 -1,0 +1,23 @@@ ++Index: mshr/CMakeLists.txt ++=================================================================== ++--- mshr.orig/CMakeLists.txt +++++ mshr/CMakeLists.txt ++@@ -91,7 +91,6 @@ include_directories(BEFORE ${EXTERNAL_IN ++ add_definitions("${EXTERNAL_DEFINITIONS}") ++ ++ find_package(DOLFIN REQUIRED) ++-include_directories(${DOLFIN_PYTHON_INCLUDE_DIRS}) ++ include(${DOLFIN_USE_FILE}) ++ ++ # Set installation directories ++@@ -196,8 +195,8 @@ file(RELATIVE_PATH REL_INCLUDE_DIR "${IN ++ ### add cmake configuration file ### ++ ++ # common for both config files ++-set(CONF_EXTERNAL_INCLUDE_DIRS "${DOLFIN_PYTHON_INCLUDE_DIRS};${DOLFIN_INCLUDE_DIRS};${DOLFIN_3RD_PARTY_INCLUDE_DIRS}") ++-set(CONF_EXTERNAL_LIBRARIES "${DOLFIN_PYTHON_LIBRARIES};${DOLFIN_LIBRARIES};${DOLFIN_3RD_PARTY_LIBRARIES}") +++set(CONF_EXTERNAL_INCLUDE_DIRS "${DOLFIN_INCLUDE_DIRS};${DOLFIN_3RD_PARTY_INCLUDE_DIRS}") +++set(CONF_EXTERNAL_LIBRARIES "${DOLFIN_LIBRARIES};${DOLFIN_3RD_PARTY_LIBRARIES}") ++ set(CONF_CXX_DEFINITIONS "${DOLFIN_CXX_DEFINITIONS}") ++ string(REPLACE "\"" "\\\"" CONF_CXX_DEFINITIONS "${CONF_CXX_DEFINITIONS}") ++ set(CONF_CXX_FLAGS "${DOLFIN_CXX_FLAGS}") diff --cc debian/patches/fix_mesh3_internal.patch index 0000000,0000000..4309896 new file mode 100644 --- /dev/null +++ b/debian/patches/fix_mesh3_internal.patch @@@ -1,0 -1,0 +1,27 @@@ ++Index: mshr/src/make_multicomponent_mesh_3.h ++=================================================================== ++--- mshr.orig/src/make_multicomponent_mesh_3.h +++++ mshr/src/make_multicomponent_mesh_3.h ++@@ -37,11 +37,11 @@ void make_multicomponent_mesh_3_impl(C3T ++ //std::cout << "Number of vertices initially: " << c3t3.triangulation().number_of_vertices() << std::endl; ++ ++ // Initialize c3t3 with points from the special features ++- CGAL::internal::Mesh_3::C3t3_initializer< +++ CGAL::Mesh_3::internal::C3t3_initializer< ++ C3T3, ++ MeshDomain, ++ MeshCriteria, ++- CGAL::internal::Mesh_3::has_Has_features::value > () (c3t3, +++ CGAL::Mesh_3::internal::has_Has_features::value > () (c3t3, ++ domain, ++ criteria, ++ with_features); ++@@ -49,7 +49,7 @@ void make_multicomponent_mesh_3_impl(C3T ++ // std::cout << "Number of vertices after features: " << c3t3.triangulation().number_of_vertices() << std::endl; ++ ++ // Inserts points from all connected components to the mesh ++- CGAL::internal::Mesh_3::init_c3t3(c3t3, domain, criteria, 0); +++ CGAL::Mesh_3::internal::init_c3t3(c3t3, domain, criteria, 0); ++ // std::cout << "Number of vertices before meshing: " << c3t3.triangulation().number_of_vertices() << std::endl; ++ ++ // Build mesher and launch refinement process diff --cc debian/patches/series index 0000000,0000000..2436c48 new file mode 100644 --- /dev/null +++ b/debian/patches/series @@@ -1,0 -1,0 +1,6 @@@ ++demos_update.patch ++cmake_config_in_lib.patch ++build_python.patch ++depython_main_build.patch ++test_controls.diff ++fix_mesh3_internal.patch diff --cc debian/patches/test_controls.diff index 0000000,0000000..54d7dae new file mode 100644 --- /dev/null +++ b/debian/patches/test_controls.diff @@@ -1,0 -1,0 +1,67 @@@ ++Index: mshr/demo/python/test.py ++=================================================================== ++--- /dev/null +++++ mshr/demo/python/test.py ++@@ -0,0 +1,27 @@ +++import os +++import pathlib +++import subprocess +++import sys +++import pytest +++ +++ +++# Get directory of this file +++dir_path = pathlib.Path(__file__).resolve().parent +++ +++# Build list of demo programs +++demos = [] +++for subdir in ['.']: +++ p = pathlib.Path(dir_path, subdir) +++ demo_files = list(p.glob('*.py')) +++ for f in demo_files: +++ demos.append((f.parent, f.name)) +++ +++ +++@pytest.mark.parametrize("path,name", demos) +++def test_demos(path, name): +++ +++ # Run in serial +++ ret = subprocess.run([sys.executable, name], +++ cwd=str(path), +++ env={**os.environ, 'MPLBACKEND': 'agg'}, +++ check=True) ++Index: mshr/test/test.py ++=================================================================== ++--- /dev/null +++++ mshr/test/test.py ++@@ -0,0 +1,30 @@ +++import os +++import pathlib +++import subprocess +++import sys +++import pytest +++ +++ +++# Get directory of this file +++dir_path = pathlib.Path(__file__).resolve().parent +++ +++# Build list of demo programs +++tests = [] +++for subdir in ['.']: +++ p = pathlib.Path(dir_path, subdir) +++ test_files = list(p.glob('**/*.py')) +++ for f in test_files: +++ tests.append((f.parent, f.name)) +++ +++ +++# remove tests that are known to break +++tests = [d for d in tests if d[1] != 'test-fuzzypointmap.py'] +++ +++ +++@pytest.mark.parametrize("path,name", tests) +++def test_demos(path, name): +++ +++ ret = subprocess.run([sys.executable, name], +++ cwd=str(path), +++ env={**os.environ, 'MPLBACKEND': 'agg'}, +++ check=True) diff --cc debian/python3-mshr.examples index 0000000,0000000..4b02f7b new file mode 100644 --- /dev/null +++ b/debian/python3-mshr.examples @@@ -1,0 -1,0 +1,1 @@@ ++demo/python/* diff --cc debian/python3-mshr.install index 0000000,0000000..7aadc9c new file mode 100644 --- /dev/null +++ b/debian/python3-mshr.install @@@ -1,0 -1,0 +1,1 @@@ ++usr/lib/python3*/*-packages/* diff --cc debian/rules index 0000000,0000000..cfbb048 new file mode 100755 --- /dev/null +++ b/debian/rules @@@ -1,0 -1,0 +1,92 @@@ ++#!/usr/bin/make -f ++ ++# FIXME: Is this needed? ++#CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) ++#CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) ++#CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) ++#LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) ++ ++DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) ++ ++MSHR_HOME = $(CURDIR)/$(DEB_SRCDIR) ++USCAN_DESTDIR := $(CURDIR) ++PY3VERS := $(shell py3versions --requested debian/control | tac -s' ') ++PYVERS = $(PY3VERS) ++ ++DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') ++DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-) ++DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') ++DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/\+dfsg.*$$//p') ++ ++FENICS_RELEASE_VERSION=$(DEB_STRIPPED_UPSTREAM_VERSION) ++FENICS_MAJOR_VERSION=$(shell echo $(FENICS_RELEASE_VERSION) | sed "s/^\([^.]*\)\..*$$/\1/") ++FENICS_MINOR_VERSION=$(shell echo $(FENICS_RELEASE_VERSION) | sed "s/^\([^.]*\)\.\([^.]*\)\..*$$/\2/") ++FENICS_VERSION=$(FENICS_MAJOR_VERSION).$(FENICS_MINOR_VERSION) ++FENICS_NEXT_VERSION=$(FENICS_MAJOR_VERSION).$(shell echo $$(( $(FENICS_MINOR_VERSION) + 1 )) ) ++ ++# dolfin has a strict dependency on the pybind11 version it was built against, ++# if pybind11.h will be used in C++ code fragments in python scripts. ++# Extract pybind11 version from pybind11-dev ++PYBIND11_DEB_VERSION=$(shell dpkg -s pybind11-dev | awk '/Version:/ {print $$2}') ++# extract the current pybind11 version X.Y.Z (drop epoch and debian package version) ++PYBIND11_UPSTREAM_VERSION=$(shell echo $(PYBIND11_DEB_VERSION) | sed "s/^.[^:]*://; s/-[^-]*$$//") ++PYBIND11_X_Y_VERSION=$(shell echo $(PYBIND11_UPSTREAM_VERSION) | sed "s/^\(.*\)\.\([^.]*\)$$/\1/") ++PYBIND11_Z_VERSION=$(shell echo $(PYBIND11_UPSTREAM_VERSION) | sed "s/^\(.*\)\.\([^.]*\)$$/\2/") ++PYBIND11_NEXT_UPSTREAM_VERSION=$(PYBIND11_X_Y_VERSION).$(shell echo $$(( $(PYBIND11_Z_VERSION) + 1 )) ) ++ ++# strip -g from dpkg-buildflags to reduce memory requirements of the build (needed to build on Debian 32 bit and on ubuntu) ++CMAKE_OPTS := \ ++ -D CMAKE_BUILD_TYPE:STRING=Release \ ++ -D BUILD_SHARED_LIBS:BOOL=ON \ ++ -D USE_SYSTEM_CGAL:BOOL=ON \ ++ -D USE_SYSTEM_TETGEN:BOOL=ON \ ++ -D ENABLE_MSHRABLE:BOOL=ON \ ++ -D CMAKE_SKIP_RPATH:BOOL=ON \ ++ -D CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF \ ++ -D INSTALL_LIB_DIR:PATH=lib/$(DEB_BUILD_MULTIARCH) \ ++ -D CMAKE_CXX_FLAGS:STRING="-fpermissive $(shell dpkg-buildflags --get CXXFLAGS | sed 's/-g //' )" \ ++ $(MSHR_HOME) ++ ++ifeq (,$(DISTRIBUTION)) ++ DISTRIBUTION := $(shell dpkg-parsechangelog --format rfc822 | sed -ne "s/^Distribution: //p") ++endif ++ ++ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"squeeze wheezy lucid maverick natty oneiric precise quantal raring saucy trusty")) ++ DISTRIBUTION := sid ++endif ++ ++%: ++ dh $@ --buildsystem=cmake \ ++ --with python3 ++ ++override_dh_auto_clean: ++ dh_auto_clean ++ rm -rf python/build* ++ ++override_dh_auto_configure: ++ dh_auto_configure -- $(CMAKE_OPTS) ;\ ++ ++override_dh_auto_install: ++ dh_auto_install ++ set -e; \ ++ for v in $(PYVERS); do \ ++ cd python; \ ++ CMAKE_PREFIX_PATH=$(CURDIR)/debian/tmp/usr $$v setup.py build --build-base=$(CURDIR)/python/build-$$v install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ ++ cd ..; \ ++ done ++ dh_numpy3 ++ ++override_dh_gencontrol: ++ dh_gencontrol -- -Vfenics:Upstream-Version=$(FENICS_VERSION) \ ++ -Vpybind11:Upstream-Version=$(PYBIND11_UPSTREAM_VERSION) -Vpybind11:Next-Upstream-Version=$(PYBIND11_NEXT_UPSTREAM_VERSION) ++ ++# debug symbols (-g) have been switched off in CMAKE_OPTS, so no point building dbgsym packages ++override_dh_strip: ++ dh_strip --no-automatic-dbgsym ++ ++#override_dh_shlibdeps: ++# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info ++ ++.PHONY: get-orig-source ++get-orig-source: ++ uscan --force-download --verbose --destdir $(USCAN_DESTDIR) diff --cc debian/source/format index 0000000,0000000..163aaf8 new file mode 100644 --- /dev/null +++ b/debian/source/format @@@ -1,0 -1,0 +1,1 @@@ ++3.0 (quilt) diff --cc debian/tests/control index 0000000,0000000..ecdbff4 new file mode 100644 --- /dev/null +++ b/debian/tests/control @@@ -1,0 -1,0 +1,3 @@@ ++Tests: test-mshr-python ++Depends: python3-mshr, ++ python3-pytest diff --cc debian/tests/test-mshr-python index 0000000,0000000..5635b88 new file mode 100644 --- /dev/null +++ b/debian/tests/test-mshr-python @@@ -1,0 -1,0 +1,7 @@@ ++echo "=== python unit tests ===" ++python3 -m pytest -v test/test.py ++ ++echo "=== python demo tests ===" ++DEMO_TEST_DIR=test-mshr-demos ++cp -r /usr/share/doc/python3-mshr/examples ${DEMO_TEST_DIR} ++python3 -m pytest -v ${DEMO_TEST_DIR}/test.py diff --cc debian/watch index 0000000,0000000..0bfb33d new file mode 100644 --- /dev/null +++ b/debian/watch @@@ -1,0 -1,0 +1,3 @@@ ++version=3 ++opts=dversionmangle=s/\+dfsg\d*$//,repacksuffix=+dfsg1 \ ++https://bitbucket.org/fenics-project/mshr/downloads/mshr-(.*)\.tar\.gz