View | Details | Raw Unified | Return to bug 278008
Collapse All | Expand All

(-)b/archivers/zstd/Makefile (-36 / +25 lines)
Lines 1-8 Link Here
1
PORTNAME=	zstd
1
PORTNAME=	zstd
2
PORTVERSION=	1.5.5
2
DISTVERSION=	1.5.6
3
PORTREVISION=	1
4
CATEGORIES=	archivers
3
CATEGORIES=	archivers
5
MASTER_SITES=	https://github.com/facebook/zstd/releases/download/v${PORTVERSION}/
4
MASTER_SITES=	https://github.com/facebook/${PORTNAME}/releases/download/v${DISTVERSION}/
5
6
PATCH_SITES=	https://github.com/facebook/${PORTNAME}/commit/
7
PATCHFILES=	103a85e6f64f305684db354a0eb9a10d5c586d5c.patch:-p1
6
8
7
MAINTAINER=	sunpoet@FreeBSD.org
9
MAINTAINER=	sunpoet@FreeBSD.org
8
COMMENT=	Fast real-time compression algorithm
10
COMMENT=	Fast real-time compression algorithm
Lines 11-59 WWW= https://facebook.github.io/zstd/ \ Link Here
11
13
12
LICENSE=	BSD3CLAUSE GPLv2
14
LICENSE=	BSD3CLAUSE GPLv2
13
LICENSE_COMB=	dual
15
LICENSE_COMB=	dual
14
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE
16
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/../../LICENSE
15
LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
17
LICENSE_FILE_GPLv2=	${WRKSRC}/../../COPYING
16
18
17
LIB_DEPENDS=	liblz4.so:archivers/liblz4
19
LIB_DEPENDS=	liblz4.so:archivers/liblz4
18
20
19
USES=		gmake localbase:ldflags tar:zst
21
USES=		cmake:testing cpe pathfix pkgconfig tar:zst
20
22
CPE_PRODUCT=	zstandard
21
ALL_TARGET=	default
23
CPE_VENDOR=	facebook
22
BINARY_ALIAS=	gmd5sum=md5sum
23
CFLAGS+=	-fPIC
24
MAKE_ENV=	INSTALL_DATA="${INSTALL_DATA}" \
25
		INSTALL_MAN="${INSTALL_MAN}" \
26
		INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
27
		INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
28
		MANDIR=${PREFIX}/share/man \
29
		V=1
30
TEST_TARGET=	shortest
31
USE_LDCONFIG=	yes
24
USE_LDCONFIG=	yes
32
25
33
PLIST_SUB=	BUILD_TYPE=${BUILD_TYPE:tl} PORTVERSION=${PORTVERSION}
26
PATCH_WRKSRC=	${WRKDIR}/${DISTNAME}
34
SUB_FILES=	zstdConfigVersion.cmake zstdTargets-BUILD_TYPE.cmake
27
WRKSRC_SUBDIR=	build/cmake
35
SUB_LIST=	BUILD_TYPE_CAPS=${BUILD_TYPE:tu} BUILD_TYPE_MIXED=${BUILD_TYPE} PORTVERSION=${PORTVERSION}
36
28
37
.if defined(WITH_DEBUG)
29
PLIST_SUB=	DISTVERSION=${DISTVERSION}
38
BUILD_TYPE=     Debug
39
.else
40
BUILD_TYPE=     Release
41
.endif
42
30
43
OPTIONS_DEFINE=	OPTIMIZED_CFLAGS
31
CMAKE_TESTING_ON=	ZSTD_BUILD_TESTS
44
32
45
OPTIMIZED_CFLAGS_VARS=	CFLAGS+=-O3
33
CMAKE_ON=	ZSTD_LZ4_SUPPORT \
34
		ZSTD_LZMA_SUPPORT
35
36
CMAKE_ARGS=	-DCMAKE_C_VISIBILITY_PRESET=hidden \
37
		-DCMAKE_CTEST_ARGUMENTS="-E;'fuzzer'"
46
38
47
post-build:
39
OPTIONS_DEFINE=		OPTIMIZED_CFLAGS
48
	cd ${WRKSRC}/programs && ${DO_MAKE_BUILD} zstd-frugal
40
OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS
41
42
OPTIMIZED_CFLAGS_VARS=	CFLAGS+=-O3
49
43
50
post-install:
44
post-install:
51
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/cmake/zstd
45
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/programs/zstd-frugal ${STAGEDIR}${PREFIX}/bin
52
	${INSTALL_PROGRAM} ${WRKSRC}/programs/zstd-frugal ${STAGEDIR}${PREFIX}/bin/zstd-frugal
46
	${RLN} zstd.1 ${STAGEDIR}${PREFIX}/share/man/man1/zstdmt.1
53
	${INSTALL_DATA} ${WRKSRC}/build/cmake/zstdConfig.cmake ${STAGEDIR}${PREFIX}/lib/cmake/zstd/zstdConfig.cmake
54
	${INSTALL_DATA} ${WRKDIR}/zstdConfigVersion.cmake ${STAGEDIR}${PREFIX}/lib/cmake/zstd/zstdConfigVersion.cmake
55
	${INSTALL_DATA} ${WRKDIR}/zstdTargets-BUILD_TYPE.cmake ${STAGEDIR}${PREFIX}/lib/cmake/zstd/zstdTargets-${BUILD_TYPE:tl}.cmake
56
	${INSTALL_DATA} ${FILESDIR}/zstdTargets.cmake ${STAGEDIR}${PREFIX}/lib/cmake/zstd/zstdTargets.cmake
57
	${LN} -s zstd.1.gz ${STAGEDIR}${PREFIX}/share/man/man1/zstdmt.1.gz
58
47
59
.include <bsd.port.mk>
48
.include <bsd.port.mk>
(-)b/archivers/zstd/distinfo (-3 / +5 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1684104304
1
TIMESTAMP = 1711569662
2
SHA256 (zstd-1.5.5.tar.zst) = ce264bca60eb2f0e99e4508cffd0d4d19dd362e84244d7fc941e79fa69ccf673
2
SHA256 (zstd-1.5.6.tar.zst) = 4aa8dd1c1115c0fd6b6b66c35c7f6ce7bd58cc1dfd3e4f175b45b39e84b14352
3
SIZE (zstd-1.5.5.tar.zst) = 1817544
3
SIZE (zstd-1.5.6.tar.zst) = 1845516
4
SHA256 (103a85e6f64f305684db354a0eb9a10d5c586d5c.patch) = e695d9b15007b4043a139347cdc75fc1ca74f64a0a5a6321a7378f06fda56417
5
SIZE (103a85e6f64f305684db354a0eb9a10d5c586d5c.patch) = 1546
(-)a/archivers/zstd/files/zstdConfigVersion.cmake.in (-70 lines)
Removed Link Here
1
# This is a basic version file for the Config-mode of find_package().
2
# It is used by write_basic_package_version_file() as input file for configure_file()
3
# to create a version-file which can be installed along a config.cmake file.
4
#
5
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
6
# the requested version string are exactly the same and it sets
7
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
8
# but only if the requested major version is the same as the current one.
9
# The variable CVF_VERSION must be set before calling configure_file().
10
11
12
set(PACKAGE_VERSION "%%PORTVERSION%%")
13
14
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
15
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
16
else()
17
18
  if("%%PORTVERSION%%" MATCHES "^([0-9]+)\\.")
19
    set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
20
    if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
21
      string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
22
    endif()
23
  else()
24
    set(CVF_VERSION_MAJOR "%%PORTVERSION%%")
25
  endif()
26
27
  if(PACKAGE_FIND_VERSION_RANGE)
28
    # both endpoints of the range must have the expected major version
29
    math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
30
    if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
31
        OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
32
          OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
33
      set(PACKAGE_VERSION_COMPATIBLE FALSE)
34
    elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
35
        AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
36
        OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
37
      set(PACKAGE_VERSION_COMPATIBLE TRUE)
38
    else()
39
      set(PACKAGE_VERSION_COMPATIBLE FALSE)
40
    endif()
41
  else()
42
    if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
43
      set(PACKAGE_VERSION_COMPATIBLE TRUE)
44
    else()
45
      set(PACKAGE_VERSION_COMPATIBLE FALSE)
46
    endif()
47
48
    if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
49
      set(PACKAGE_VERSION_EXACT TRUE)
50
    endif()
51
  endif()
52
endif()
53
54
55
# if the installed project requested no architecture check, don't perform the check
56
if("FALSE")
57
  return()
58
endif()
59
60
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
61
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
62
  return()
63
endif()
64
65
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
66
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
67
  math(EXPR installedBits "8 * 8")
68
  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
69
  set(PACKAGE_VERSION_UNSUITABLE TRUE)
70
endif()
(-)a/archivers/zstd/files/zstdTargets-BUILD_TYPE.cmake.in (-29 lines)
Removed Link Here
1
#----------------------------------------------------------------
2
# Generated CMake target import file for configuration "%%BUILD_TYPE_MIXED%%".
3
#----------------------------------------------------------------
4
5
# Commands may need to know the format version.
6
set(CMAKE_IMPORT_FILE_VERSION 1)
7
8
# Import target "zstd::libzstd_shared" for configuration "%%BUILD_TYPE_MIXED%%"
9
set_property(TARGET zstd::libzstd_shared APPEND PROPERTY IMPORTED_CONFIGURATIONS %%BUILD_TYPE_CAPS%%)
10
set_target_properties(zstd::libzstd_shared PROPERTIES
11
  IMPORTED_LOCATION_%%BUILD_TYPE_CAPS%% "${_IMPORT_PREFIX}/lib/libzstd.so.%%PORTVERSION%%"
12
  IMPORTED_SONAME_%%BUILD_TYPE_CAPS%% "libzstd.so.1"
13
  )
14
15
list(APPEND _cmake_import_check_targets zstd::libzstd_shared )
16
list(APPEND _cmake_import_check_files_for_zstd::libzstd_shared "${_IMPORT_PREFIX}/lib/libzstd.so.%%PORTVERSION%%" )
17
18
# Import target "zstd::libzstd_static" for configuration "%%BUILD_TYPE_MIXED%%"
19
set_property(TARGET zstd::libzstd_static APPEND PROPERTY IMPORTED_CONFIGURATIONS %%BUILD_TYPE_CAPS%%)
20
set_target_properties(zstd::libzstd_static PROPERTIES
21
  IMPORTED_LINK_INTERFACE_LANGUAGES_%%BUILD_TYPE_CAPS%% "C"
22
  IMPORTED_LOCATION_%%BUILD_TYPE_CAPS%% "${_IMPORT_PREFIX}/lib/libzstd.a"
23
  )
24
25
list(APPEND _cmake_import_check_targets zstd::libzstd_static )
26
list(APPEND _cmake_import_check_files_for_zstd::libzstd_static "${_IMPORT_PREFIX}/lib/libzstd.a" )
27
28
# Commands beyond this point should not need to know the version.
29
set(CMAKE_IMPORT_FILE_VERSION)
(-)a/archivers/zstd/files/zstdTargets.cmake (-115 lines)
Removed Link Here
1
# Generated by CMake
2
3
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
4
   message(FATAL_ERROR "CMake >= 2.8.0 required")
5
endif()
6
if(CMAKE_VERSION VERSION_LESS "2.8.3")
7
   message(FATAL_ERROR "CMake >= 2.8.3 required")
8
endif()
9
cmake_policy(PUSH)
10
cmake_policy(VERSION 2.8.3...3.23)
11
#----------------------------------------------------------------
12
# Generated CMake target import file.
13
#----------------------------------------------------------------
14
15
# Commands may need to know the format version.
16
set(CMAKE_IMPORT_FILE_VERSION 1)
17
18
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
19
set(_cmake_targets_defined "")
20
set(_cmake_targets_not_defined "")
21
set(_cmake_expected_targets "")
22
foreach(_cmake_expected_target IN ITEMS zstd::libzstd_shared zstd::libzstd_static)
23
  list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
24
  if(TARGET "${_cmake_expected_target}")
25
    list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
26
  else()
27
    list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
28
  endif()
29
endforeach()
30
unset(_cmake_expected_target)
31
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
32
  unset(_cmake_targets_defined)
33
  unset(_cmake_targets_not_defined)
34
  unset(_cmake_expected_targets)
35
  unset(CMAKE_IMPORT_FILE_VERSION)
36
  cmake_policy(POP)
37
  return()
38
endif()
39
if(NOT _cmake_targets_defined STREQUAL "")
40
  string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
41
  string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
42
  message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
43
endif()
44
unset(_cmake_targets_defined)
45
unset(_cmake_targets_not_defined)
46
unset(_cmake_expected_targets)
47
48
49
# Compute the installation prefix relative to this file.
50
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
51
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
52
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
53
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
54
if(_IMPORT_PREFIX STREQUAL "/")
55
  set(_IMPORT_PREFIX "")
56
endif()
57
58
# Create imported target zstd::libzstd_shared
59
add_library(zstd::libzstd_shared SHARED IMPORTED)
60
61
set_target_properties(zstd::libzstd_shared PROPERTIES
62
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
63
  INTERFACE_LINK_LIBRARIES "-pthread"
64
)
65
66
# Create imported target zstd::libzstd_static
67
add_library(zstd::libzstd_static STATIC IMPORTED)
68
69
set_target_properties(zstd::libzstd_static PROPERTIES
70
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
71
  INTERFACE_LINK_LIBRARIES "-pthread"
72
)
73
74
if(CMAKE_VERSION VERSION_LESS 2.8.12)
75
  message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
76
endif()
77
78
# Load information for each installed configuration.
79
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/zstdTargets-*.cmake")
80
foreach(_cmake_config_file IN LISTS _cmake_config_files)
81
  include("${_cmake_config_file}")
82
endforeach()
83
unset(_cmake_config_file)
84
unset(_cmake_config_files)
85
86
# Cleanup temporary variables.
87
set(_IMPORT_PREFIX)
88
89
# Loop over all imported files and verify that they actually exist
90
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
91
  foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
92
    if(NOT EXISTS "${_cmake_file}")
93
      message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
94
   \"${_cmake_file}\"
95
but this file does not exist.  Possible reasons include:
96
* The file was deleted, renamed, or moved to another location.
97
* An install or uninstall procedure did not complete successfully.
98
* The installation package was faulty and contained
99
   \"${CMAKE_CURRENT_LIST_FILE}\"
100
but not all the files it references.
101
")
102
    endif()
103
  endforeach()
104
  unset(_cmake_file)
105
  unset("_cmake_import_check_files_for_${_cmake_target}")
106
endforeach()
107
unset(_cmake_target)
108
unset(_cmake_import_check_targets)
109
110
# This file does not depend on other imported targets which have
111
# been exported from the same project but in a separate export set.
112
113
# Commands beyond this point should not need to know the version.
114
set(CMAKE_IMPORT_FILE_VERSION)
115
cmake_policy(POP)
(-)b/archivers/zstd/pkg-plist (-2 / +2 lines)
Lines 10-21 include/zstd.h Link Here
10
include/zstd_errors.h
10
include/zstd_errors.h
11
lib/cmake/zstd/zstdConfig.cmake
11
lib/cmake/zstd/zstdConfig.cmake
12
lib/cmake/zstd/zstdConfigVersion.cmake
12
lib/cmake/zstd/zstdConfigVersion.cmake
13
lib/cmake/zstd/zstdTargets-%%BUILD_TYPE%%.cmake
13
lib/cmake/zstd/zstdTargets-%%CMAKE_BUILD_TYPE%%.cmake
14
lib/cmake/zstd/zstdTargets.cmake
14
lib/cmake/zstd/zstdTargets.cmake
15
lib/libzstd.a
15
lib/libzstd.a
16
lib/libzstd.so
16
lib/libzstd.so
17
lib/libzstd.so.1
17
lib/libzstd.so.1
18
lib/libzstd.so.%%PORTVERSION%%
18
lib/libzstd.so.%%DISTVERSION%%
19
libdata/pkgconfig/libzstd.pc
19
libdata/pkgconfig/libzstd.pc
20
share/man/man1/unzstd.1.gz
20
share/man/man1/unzstd.1.gz
21
share/man/man1/zstd.1.gz
21
share/man/man1/zstd.1.gz

Return to bug 278008