Source: cgal Version: 4.11-2 Severity: minor Tags: patch User: [email protected] Usertags: rebootstrap
cgal fails to cross build from source, because it configures for the build architecture by failing to pass the correct cross toolchain flags to cmake. The easiest way to fix this is to defer to dh_auto_configure and that actually makes debian/rules a little simpler. After doing so, configuration still fails, because it runs try_run checks for discovering dependency versions. There are approaches for extracting strings from compiled objects by other means than running them, but this is non-trivial. I haven't attempted to fix this, but think that cgal must have regressed upstream in this respect as other parts of it carefully check CMAKE_CROSSCOMPILING. Please close this bug when applying the attached patch to make the underlying upstream failure visible even though cgal will still fail to cross build. Helmut
diff --minimal -Nru cgal-4.11/debian/changelog cgal-4.11/debian/changelog --- cgal-4.11/debian/changelog 2017-11-04 19:50:06.000000000 +0100 +++ cgal-4.11/debian/changelog 2017-12-04 23:01:31.000000000 +0100 @@ -1,3 +1,11 @@ +cgal (4.11-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Address FCBFS: Let dh_auto_configure pass cross flags to cmake. + (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 04 Dec 2017 23:01:31 +0100 + cgal (4.11-2) unstable; urgency=medium * Upload to unstable. diff --minimal -Nru cgal-4.11/debian/rules cgal-4.11/debian/rules --- cgal-4.11/debian/rules 2017-11-04 19:50:06.000000000 +0100 +++ cgal-4.11/debian/rules 2017-12-04 23:01:29.000000000 +0100 @@ -39,23 +39,20 @@ override_dh_auto_configure-arch: # Fail early if SOVERSION changed grep -q "CGAL_SONAME_VERSION \"13\"" CMakeLists.txt - mkdir -p static - cd static && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ + QTDIR= dh_auto_configure --builddirectory=static -- \ + -DCMAKE_BUILD_TYPE=Release \ -DWITH_GMPXX=ON -DWITH_demos=OFF -DWITH_examples=OFF \ -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=FALSE \ -DCGAL_INSTALL_LIB_DIR=lib/$(DEB_HOST_MULTIARCH) \ -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL $(CMAKE_QT5) - mkdir -p shared - cd shared && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ + QTDIR= dh_auto_configure --builddirectory=shared -- \ + -DCMAKE_BUILD_TYPE=Release \ -DWITH_GMPXX=ON -DWITH_demos=OFF -DWITH_examples=OFF \ -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE \ -DCGAL_INSTALL_LIB_DIR=lib/$(DEB_HOST_MULTIARCH) \ -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL $(CMAKE_QT5) - mkdir -p shared/demo/CGAL_ipelets - cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ + QTDIR= dh_auto_configure --builddirectory=shared/demo/CGAL_ipelets --sourcedirectory=demo/CGAL_ipelets -- \ + -DCMAKE_BUILD_TYPE=Release \ -DCGAL_DIR=$(CURDIR)/shared override_dh_auto_configure-indep:

