view src/build-zstd.mk @ 6335:0825abaf61a7

mingw-w64: Special case for large input for complex inverse trigonometric functions (bug #49091). * src/mingw-w64-complex-inverse-trig.patch: Add patch for mingw-w64 CRT that implements a special case for large input for complex inverse trigonometric functions cacosh and casinh (and therefore functions that are derived from it, like cacos and casin). * dist-files.mk: Add new patch to list.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 23 Jul 2022 19:00:09 +0200
parents 7bfe14b84c7f
children 90698b8fdad8
line wrap: on
line source

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

PKG             := build-zstd
$(PKG)_IGNORE   := 
$(PKG)_VERSION  := 1.5.2
$(PKG)_CHECKSUM := c56c8e6d703d14029464b2a1a66164dc5cf80855
$(PKG)_SUBDIR   := zstd-$($(PKG)_VERSION)
$(PKG)_FILE     := zstd-$($(PKG)_VERSION).tar.lz
$(PKG)_URL      := https://github.com/facebook/zstd/releases/download/v$($(PKG)_VERSION)/zstd-$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS     := build-cmake

define $(PKG)_UPDATE
    $(WGET) -q -O- 'https://github.com/facebook/zstd/tags' | \
    $(SED) -n 's|.*releases/tag/v\([^"]*\).*|\1|p' | $(SORT) -V | \
    tail -1
endef

$(PKG)_CMAKE_FLAGS := -DZSTD_BUILD_TESTS=ON -DZSTD_BUILD_SHARED=OFF \
	-DZSTD_BUILD_STATIC=ON -DZSTD_PROGRAMS_LINK_SHARED=OFF -DZSTD_MULTITHREAD_SUPPORT=OFF

define $(PKG)_BUILD
  mkdir '$(1)/.build' && cd '$(1)/.build' && cmake $(1)/build/cmake/ \
    $($(PKG)_CMAKE_FLAGS) \
    $(CMAKE_CCACHE_FLAGS) \
    -DCMAKE_INSTALL_PREFIX='$(3)$(BUILD_TOOLS_PREFIX)' \
    -DBUILD_TESTING=Off

  cmake --build '$(1)/.build' -j '$(JOBS)'
  cmake --install '$(1)/.build'
endef