[dune-common] 02/06: Switch to CMake.
Ansgar Burchardt
ansgar at moszumanska.debian.org
Mon Nov 21 19:20:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
ansgar pushed a commit to branch master
in repository dune-common.
commit 9fddd4d922e1bc8748d1ac95c22d595b7a066aaf
Author: Ansgar Burchardt <ansgar at debian.org>
Date: Mon Nov 21 17:21:03 2016 +0100
Switch to CMake.
---
debian/clean | 1 -
debian/control | 6 +++---
debian/dune-debian.mk | 29 ++++------------------------
debian/libdune-common-dev.install | 7 +------
debian/libdune-common-doc.install | 1 +
debian/patches/dune-autogen.patch | 11 -----------
debian/patches/series | 1 -
debian/patches/soname.patch | 40 +++++++++++++++++++++++++++++++--------
debian/rules | 18 ++++++------------
9 files changed, 47 insertions(+), 67 deletions(-)
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index ae4000c..0000000
--- a/debian/clean
+++ /dev/null
@@ -1 +0,0 @@
-doc/buildsystem/buildsystem.pdf
diff --git a/debian/control b/debian/control
index da83f56..9306d88 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,8 @@ Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/dune-common
Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/dune-common.git
Homepage: http://www.dune-project.org/
Build-Depends: debhelper (>= 9),
- automake, autoconf, gfortran, libtool, mpi-default-bin, mpi-default-dev, pkg-config
-Build-Depends-Indep: doxygen, ghostscript, graphviz, texlive-latex-extra, texlive-latex-recommended, pgf
+ cmake, gfortran, mpi-default-bin, mpi-default-dev, pkg-config, python3
+Build-Depends-Indep: doxygen, ghostscript, graphviz, imagemagick, texlive-latex-extra, texlive-latex-recommended, pgf, python3-sphinx
Package: libdune-common-dev
Section: libdevel
@@ -17,7 +17,7 @@ Architecture: any
Multi-Arch: same
Depends: ${misc:Depends}, ${shlibs:Depends},
pkg-config, python, python-pyparsing
-Recommends: automake, autoconf, libtool
+Recommends: cmake, python3
Suggests: libdune-common-dbg (= ${binary:Version}),
libdune-common-doc (= ${source:Version})
Provides: ${dune:shared-library}
diff --git a/debian/dune-debian.mk b/debian/dune-debian.mk
index fbd580d..686182a 100644
--- a/debian/dune-debian.mk
+++ b/debian/dune-debian.mk
@@ -1,40 +1,19 @@
include /usr/share/dpkg/pkg-info.mk
-export USE_CMAKE=no
-
-DUNE_DEBIAN_DUNECONTROL ?= /usr/bin/dunecontrol
-DUNE_DEBIAN_CONFIGURE_FLAGS ?= \
- --enable-parallel \
- --enable-shared \
- --with-alberta=/usr \
- --with-gmp \
- --without-grape \
- --without-metis \
- --without-parmetis \
- --with-superlu \
- --with-ug=/usr \
- --with-umfpack-includedir=/usr/include/suitesparse --with-umfpack-libdir=/usr/lib \
- --without-x
+DUNE_CTEST ?= /usr/bin/dune-ctest
DUNE_DEBIAN_SHLIB = $(subst ~,.,lib$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM))
override_dh_auto_configure:
- $(DUNE_DEBIAN_DUNECONTROL) autogen
- dh_auto_configure -Sautoconf -- $(DUNE_DEBIAN_CONFIGURE_FLAGS)
+ dh_auto_configure -- -DBUILD_SHARED_LIBS=1
override_dh_auto_test:
# OpenMPI expects rsh/ssh to be in PATH even when it only starts local processes:
mkdir debian/tmp-test
ln -s /bin/false debian/tmp-test/ssh
ln -s /bin/false debian/tmp-test/rsh
- PATH=$(CURDIR)/debian/tmp-test:$$PATH dh_auto_test
- rm -rf debian/tmp-test
-
-override_dh_clean:
- dh_clean
- find . -name Makefile.in -delete
- rm -f aclocal.m4 compile config.guess config.h.in config.sub configure dependencies.m4 depcomp install-sh ltmain.sh missing test-driver
- rm -rf doc/doxygen/Doxyfile.in doc/doxygen/doxyerr.log doc/doxygen/doxygen-tag doc/doxygen/doxygen.log doc/doxygen/html
+ dh_auto_build -- build_tests
+ cd build; PATH=$(CURDIR)/debian/tmp-test:$$PATH $(DUNE_CTEST)
rm -rf debian/tmp-test
override_dh_gencontrol:
diff --git a/debian/libdune-common-dev.install b/debian/libdune-common-dev.install
index ec6c7a9..397a7c7 100644
--- a/debian/libdune-common-dev.install
+++ b/debian/libdune-common-dev.install
@@ -1,11 +1,6 @@
usr/bin
usr/include
-usr/lib/*/cmake
-usr/lib/*/dunecontrol usr/lib
-usr/lib/*/dunemodules.lib usr/lib
-usr/lib/*/lib*.a
-usr/lib/*/lib*.so
-usr/lib/*/pkgconfig
+usr/lib
usr/share/bash-completion
usr/share/dune-common
usr/share/dune
diff --git a/debian/libdune-common-doc.install b/debian/libdune-common-doc.install
index 6dbcbb2..fe56f80 100644
--- a/debian/libdune-common-doc.install
+++ b/debian/libdune-common-doc.install
@@ -1 +1,2 @@
usr/share/doc/dune-common/* usr/share/doc/libdune-common-doc
+build/doc/buildsystem/html usr/share/doc/libdune-common-doc/buildsystem
diff --git a/debian/patches/dune-autogen.patch b/debian/patches/dune-autogen.patch
deleted file mode 100644
index 84c486d..0000000
--- a/debian/patches/dune-autogen.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/bin/dune-autogen
-+++ b/bin/dune-autogen
-@@ -26,7 +26,7 @@
- rm -f $name.m4
-
- # add current dir to PATH
--PATH=`dirname "$0"`:$PATH
-+#PATH=`dirname "$0"`:$PATH
-
- # guess libtool prefix
- if test -n "$LIBTOOLIZE"; then
diff --git a/debian/patches/series b/debian/patches/series
index ed2211d..c1e38b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
soname.patch
-dune-autogen.patch
skip-dirs-starting-with-dot.patch
rename-git-whitespace-hook.patch
diff --git a/debian/patches/soname.patch b/debian/patches/soname.patch
index b41bd18..2db8fb1 100644
--- a/debian/patches/soname.patch
+++ b/debian/patches/soname.patch
@@ -1,9 +1,33 @@
---- a/lib/Makefile.am
-+++ b/lib/Makefile.am
-@@ -13,5 +13,6 @@
- nodist_EXTRA_libdunecommon_la_SOURCES = dummy.cc
- sourcescheck_DUMMY = dummy.cc
- libdunecommon_la_LIBADD = ../dune/common/libcommon.la
-+libdunecommon_la_LDFLAGS = -release $(subst -,,$(PACKAGE_VERSION))
+--- a/cmake/modules/DuneMacros.cmake
++++ b/cmake/modules/DuneMacros.cmake
+@@ -1011,8 +1011,13 @@
+ # More docu can be found at the top of this file.
+ macro(dune_add_library basename)
+ include(CMakeParseArguments)
+- cmake_parse_arguments(DUNE_LIB ";APPEND;NO_EXPORT;OBJECT" "COMPILE_FLAGS"
++ cmake_parse_arguments(DUNE_LIB ";APPEND;NO_EXPORT;OBJECT" "COMPILE_FLAGS;SOVERSION"
+ "ADD_LIBS;SOURCES" ${ARGN})
++ if(NOT DUNE_LIB_SOVERSION)
++ # If no explicit version is given, we assume the ABI is not stable and
++ # changes with every release.
++ set(DUNE_LIB_SOVERSION ${ProjectVersion})
++ endif()
+ if(DUNE_LIB_OBJECT)
+ if(DUNE_LIB_${basename}_SOURCES)
+ message(FATAL_ERROR "There is already a library with the name ${basename}, "
+@@ -1055,6 +1060,7 @@
+ endif()
+ # Build library in ${PROJECT_BINARY_DIR}/lib
+ set_target_properties(${basename} PROPERTIES
++ SOVERSION ${DUNE_LIB_SOVERSION}
+ LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib"
+ ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
- include $(top_srcdir)/am/global-rules
+@@ -1081,6 +1087,7 @@
+ #create shared libs
+ add_library(${basename}-shared SHARED ${DUNE_LIB_SOURCES})
+ set_target_properties(${basename}-shared PROPERTIES
++ SOVERSION ${DUNE_LIB_SOVERSION}
+ OUTPUT_NAME ${basename}
+ LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
+ # link with specified libraries.
diff --git a/debian/rules b/debian/rules
index 33021fd..0631925 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,26 +2,20 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DUNE_CTEST := $(CURDIR)/bin/dune-ctest
DUNE_DEBIAN_DUNECONTROL := $(CURDIR)/bin/dunecontrol
include debian/dune-debian.mk
%:
- dh $@ --parallel
+ dh $@ --parallel --builddirectory=build
-override_dh_auto_install-arch:
- set -e; for d in am bin cmake dune lib m4 share; do \
- $(MAKE) -C $$d install DESTDIR="$(CURDIR)/debian/tmp"; \
- done
- $(MAKE) install-data-am install-exec-am DESTDIR="$(CURDIR)/debian/tmp"
- mkdir doc/doxygen/html
- $(MAKE) -C doc/doxygen install-data-am DESTDIR="$(CURDIR)/debian/tmp"
+override_dh_auto_build-indep:
+ dh_auto_build -- doc
- mv debian/tmp/usr/bin/mpi-config debian/tmp/usr/bin/dune-mpi-config
+override_dh_install-arch:
mv debian/tmp/usr/bin/am2cmake.py debian/tmp/usr/bin/dune-am2cmake
mv debian/tmp/usr/bin/git-whitespace-hook debian/tmp/usr/bin/dune-git-whitespace-hook
-
-override_dh_auto_install-indep:
- $(MAKE) -C doc install DESTDIR="$(CURDIR)/debian/tmp"
+ dh_install -a
override_dh_strip:
dh_strip --dbg-package=libdune-common-dbg
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/dune-common.git
More information about the debian-science-commits
mailing list