view src/cgal.mk @ 5531:eae508c12529

Add build rule for build-octave (bug #49503). * src/build-octave.mk: Add new build rule for build-octave which can be used for cross-building binary packages that depend on Octave as a build tool. * dist-files.mk: Add new file to list. * index.html: Add new package to list. * src/of-communications.mk, src/of-image.mk, src/of-mapping.mk, src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk, src/of-windows.mk: Add optional dependency on build-octave. * configure.ac: Add new configure switch "--disable-system-octave" that is needed to build the build-octave package. * Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the default build tools and build it only if a package explicitly depends on it. Display warning about missing native Octave version only if necessary.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 08 Sep 2020 23:04:38 +0200
parents 13be64f9f16d
children d862fd40cc42
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := cgal
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 4.0.2
$(PKG)_CHECKSUM := 20c58ebc021754e8be35237bcda43b0084f60617
$(PKG)_SUBDIR   := CGAL-$($(PKG)_VERSION)
$(PKG)_FILE     := CGAL-$($(PKG)_VERSION).tar.xz
$(PKG)_URL      := https://gforge.inria.fr/frs/download.php/31176/$($(PKG)_FILE)
$(PKG)_DEPS     := boost gmp mpfr qt

define $(PKG)_UPDATE
    $(WGET) -q -O- 'https://gforge.inria.fr/frs/?group_id=52' | \
    grep 'CGAL-' | \
    $(SED) -n 's,.*CGAL-\([0-9][^>a-z]*\)\.tar.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)' && cmake \
        -DCGAL_INSTALL_CMAKE_DIR:STRING="lib/CGAL" \
        -DCGAL_INSTALL_INC_DIR:STRING="include" \
        -DCGAL_INSTALL_DOC_DIR:STRING="share/doc/CGAL-3.9" \
        -DCGAL_INSTALL_BIN_DIR:STRING="bin" \
        -DBOOST_LIB_DIAGNOSTIC_DEFINITIONS:STRING="-DBOOST_LIB_DIAGNOSTIC" \
        -DWITH_CGAL_Qt3:BOOL="0" \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
        -DBOOST_COMPILER=_win32 \
        -DBOOST_THREAD_USE_LIB=1 \
        -DBOOST_USE_STATIC_LIBS=1 \
        -DBUILD_SHARED_LIBS=0 \
        -C TryRunResults.cgal.cmake .
    $(MAKE) -C '$(1)' -j $(JOBS)
    cd '$(1)/examples/AABB_tree' && cmake \
        -DBOOST_LIB_DIAGNOSTIC_DEFINITIONS:STRING="-DBOOST_LIB_DIAGNOSTIC" \
        -DWITH_CGAL_Qt3:BOOL="0" \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
        -DBOOST_COMPILER=_win32 \
        -DBOOST_THREAD_USE_LIB=1 \
        -DBOOST_USE_STATIC_LIBS=1 \
        -DBUILD_SHARED_LIBS=0 \
        -DCGAL_DIR:STRING="../.." .

    $(MAKE) -C '$(1)/examples/AABB_tree' -j $(JOBS)
    $(MAKE) -C '$(1)' -j $(JOBS) install
    $(INSTALL) '$(1)/examples/AABB_tree/AABB_polyhedron_edge_example.exe' '$(HOST_BINDIR)/test-cgal.exe'
endef