Commit 9fddd4d9 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

Switch to CMake.

parent 3fc20836
doc/buildsystem/buildsystem.pdf
...@@ -8,8 +8,8 @@ Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/dune-common ...@@ -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 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/dune-common.git
Homepage: http://www.dune-project.org/ Homepage: http://www.dune-project.org/
Build-Depends: debhelper (>= 9), Build-Depends: debhelper (>= 9),
automake, autoconf, gfortran, libtool, mpi-default-bin, mpi-default-dev, pkg-config cmake, gfortran, mpi-default-bin, mpi-default-dev, pkg-config, python3
Build-Depends-Indep: doxygen, ghostscript, graphviz, texlive-latex-extra, texlive-latex-recommended, pgf Build-Depends-Indep: doxygen, ghostscript, graphviz, imagemagick, texlive-latex-extra, texlive-latex-recommended, pgf, python3-sphinx
Package: libdune-common-dev Package: libdune-common-dev
Section: libdevel Section: libdevel
...@@ -17,7 +17,7 @@ Architecture: any ...@@ -17,7 +17,7 @@ Architecture: any
Multi-Arch: same Multi-Arch: same
Depends: ${misc:Depends}, ${shlibs:Depends}, Depends: ${misc:Depends}, ${shlibs:Depends},
pkg-config, python, python-pyparsing pkg-config, python, python-pyparsing
Recommends: automake, autoconf, libtool Recommends: cmake, python3
Suggests: libdune-common-dbg (= ${binary:Version}), Suggests: libdune-common-dbg (= ${binary:Version}),
libdune-common-doc (= ${source:Version}) libdune-common-doc (= ${source:Version})
Provides: ${dune:shared-library} Provides: ${dune:shared-library}
......
include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/pkg-info.mk
export USE_CMAKE=no DUNE_CTEST ?= /usr/bin/dune-ctest
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_DEBIAN_SHLIB = $(subst ~,.,lib$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)) DUNE_DEBIAN_SHLIB = $(subst ~,.,lib$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM))
override_dh_auto_configure: override_dh_auto_configure:
$(DUNE_DEBIAN_DUNECONTROL) autogen dh_auto_configure -- -DBUILD_SHARED_LIBS=1
dh_auto_configure -Sautoconf -- $(DUNE_DEBIAN_CONFIGURE_FLAGS)
override_dh_auto_test: override_dh_auto_test:
# OpenMPI expects rsh/ssh to be in PATH even when it only starts local processes: # OpenMPI expects rsh/ssh to be in PATH even when it only starts local processes:
mkdir debian/tmp-test mkdir debian/tmp-test
ln -s /bin/false debian/tmp-test/ssh ln -s /bin/false debian/tmp-test/ssh
ln -s /bin/false debian/tmp-test/rsh ln -s /bin/false debian/tmp-test/rsh
PATH=$(CURDIR)/debian/tmp-test:$$PATH dh_auto_test dh_auto_build -- build_tests
rm -rf debian/tmp-test cd build; PATH=$(CURDIR)/debian/tmp-test:$$PATH $(DUNE_CTEST)
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
rm -rf debian/tmp-test rm -rf debian/tmp-test
override_dh_gencontrol: override_dh_gencontrol:
......
usr/bin usr/bin
usr/include usr/include
usr/lib/*/cmake usr/lib
usr/lib/*/dunecontrol usr/lib
usr/lib/*/dunemodules.lib usr/lib
usr/lib/*/lib*.a
usr/lib/*/lib*.so
usr/lib/*/pkgconfig
usr/share/bash-completion usr/share/bash-completion
usr/share/dune-common usr/share/dune-common
usr/share/dune usr/share/dune
......
usr/share/doc/dune-common/* usr/share/doc/libdune-common-doc usr/share/doc/dune-common/* usr/share/doc/libdune-common-doc
build/doc/buildsystem/html usr/share/doc/libdune-common-doc/buildsystem
--- 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
soname.patch soname.patch
dune-autogen.patch
skip-dirs-starting-with-dot.patch skip-dirs-starting-with-dot.patch
rename-git-whitespace-hook.patch rename-git-whitespace-hook.patch
--- a/lib/Makefile.am --- a/cmake/modules/DuneMacros.cmake
+++ b/lib/Makefile.am +++ b/cmake/modules/DuneMacros.cmake
@@ -13,5 +13,6 @@ @@ -1011,8 +1011,13 @@
nodist_EXTRA_libdunecommon_la_SOURCES = dummy.cc # More docu can be found at the top of this file.
sourcescheck_DUMMY = dummy.cc macro(dune_add_library basename)
libdunecommon_la_LIBADD = ../dune/common/libcommon.la include(CMakeParseArguments)
+libdunecommon_la_LDFLAGS = -release $(subst -,,$(PACKAGE_VERSION)) - 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.
...@@ -2,26 +2,20 @@ ...@@ -2,26 +2,20 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DUNE_CTEST := $(CURDIR)/bin/dune-ctest
DUNE_DEBIAN_DUNECONTROL := $(CURDIR)/bin/dunecontrol DUNE_DEBIAN_DUNECONTROL := $(CURDIR)/bin/dunecontrol
include debian/dune-debian.mk include debian/dune-debian.mk
%: %:
dh $@ --parallel dh $@ --parallel --builddirectory=build
override_dh_auto_install-arch: override_dh_auto_build-indep:
set -e; for d in am bin cmake dune lib m4 share; do \ dh_auto_build -- doc
$(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"
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/am2cmake.py debian/tmp/usr/bin/dune-am2cmake
mv debian/tmp/usr/bin/git-whitespace-hook debian/tmp/usr/bin/dune-git-whitespace-hook mv debian/tmp/usr/bin/git-whitespace-hook debian/tmp/usr/bin/dune-git-whitespace-hook
dh_install -a
override_dh_auto_install-indep:
$(MAKE) -C doc install DESTDIR="$(CURDIR)/debian/tmp"
override_dh_strip: override_dh_strip:
dh_strip --dbg-package=libdune-common-dbg dh_strip --dbg-package=libdune-common-dbg
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment