2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2019 Michal Nowak
13 # Copyright 2020 Nona Hansel
14 # Copyright 2021 Marco van Wieringen
19 include ..
/..
/..
/make-rules
/shared-macros.mk
22 COMPONENT_VERSION
= 1.5.6
23 COMPONENT_SUMMARY
= Zstandard
, or zstd for short
, is a fast lossless compression algorithm
, targeting real-time compression scenarios
24 COMPONENT_PROJECT_URL
= https
://facebook.github.io
/zstd
/
25 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
26 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
27 COMPONENT_ARCHIVE_URL
= https
://github.com
/facebook
/zstd
/releases
/download
/v
$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
28 COMPONENT_ARCHIVE_HASH
= sha256
:8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1
29 COMPONENT_FMRI
= compress
/zstd
30 COMPONENT_CLASSIFICATION
= Applications
/System Utilities
31 COMPONENT_LICENSE
= BSD
,GPLv2.0
33 include $(WS_MAKE_RULES
)/common.mk
35 CMAKE_ASM_FLAGS
.32 = -m32
36 CMAKE_ASM_FLAGS
.64 = -m64
38 CMAKE_OPTIONS
+= -DCMAKE_ASM_FLAGS
=$(CMAKE_ASM_FLAGS.
$(BITS
))
40 # Test suite expect files files not to be symlinks
41 COMPONENT_PRE_CMAKE_ACTION
= ( cp
-a
$(SOURCE_DIR
)/* $(@D
) )
43 # CMake files are in build/cmake directory,
44 # hence mangle with 'configure' target
45 $(BUILD_DIR
)/%/.configured
: $(SOURCE_DIR
)/.prep
46 ($(RM
) -rf
$(@D
) ; $(MKDIR
) $(@D
))
47 $(COMPONENT_PRE_CMAKE_ACTION
)
48 (cd
$(@D
) ; $(ENV
) $(CMAKE_ENV
) \
49 $(CMAKE
) $(CMAKE_OPTIONS
) $(COMPONENT_DIR
)/$(COMPONENT_SRC
)/build
/cmake
/)
50 $(COMPONENT_POST_CMAKE_ACTION
)
53 # Use make targets for tests directly
54 COMPONENT_TEST_CMD
= $(GMAKE
)
55 COMPONENT_TEST_ARGS
= -C
56 COMPONENT_TEST_TARGETS
= tests test-zstd
57 COMPONENT_TEST_ENV
= $(CMAKE_ENV
)
59 # Auto-generated dependencies
60 REQUIRED_PACKAGES
+= shell/ksh93
61 REQUIRED_PACKAGES
+= system
/library