diff options
author | Dima Panov <fluffy@FreeBSD.org> | 2025-07-22 22:50:35 +0000 |
---|---|---|
committer | Dima Panov <fluffy@FreeBSD.org> | 2025-07-22 22:50:35 +0000 |
commit | 6c10934b133c2c930babf4a636cdcda1b5753885 (patch) | |
tree | 8c048d135bc245da3fa014d45ba7c861f3a0917c | |
parent | aa6dff4fc5a2af00e680a4158040f475efbb58df (diff) |
-rw-r--r-- | devel/boost-all/common.mk | 5 | ||||
-rw-r--r-- | devel/boost-all/compiled.mk | 5 | ||||
-rw-r--r-- | devel/boost-docs/Makefile | 2 | ||||
-rw-r--r-- | devel/boost-jam/Makefile | 4 | ||||
-rw-r--r-- | devel/boost-libs/Makefile | 27 | ||||
-rw-r--r-- | devel/boost-libs/files/patch-AT_NO_AUTOMOUNT | 36 | ||||
-rw-r--r-- | devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp | 25 | ||||
-rw-r--r-- | devel/boost-mpi-libs/Makefile | 6 | ||||
-rw-r--r-- | devel/boost-python-libs/Makefile | 10 |
9 files changed, 98 insertions, 22 deletions
diff --git a/devel/boost-all/common.mk b/devel/boost-all/common.mk index 77e19ac399aa..78dad78cb94d 100644 --- a/devel/boost-all/common.mk +++ b/devel/boost-all/common.mk @@ -23,3 +23,8 @@ BOOST_SHARED_LIB_VER=${BOOST_MAJOR_VER}.${BOOST_MINOR_VER}.${BOOST_PATCH_VER} WRKSRC= ${WRKDIR}/${DISTVERSIONPREFIX}${BOOST_MAJOR_VER}_${BOOST_MINOR_VER}_${BOOST_PATCH_VER} +EXTRACT_AFTER_ARGS+=--exclude '*.log' + +.if ${PORTNAME} != "boost-docs" +EXTRACT_AFTER_ARGS+=--exclude docs +.endif diff --git a/devel/boost-all/compiled.mk b/devel/boost-all/compiled.mk index a75d885b8b45..8c2122de507e 100644 --- a/devel/boost-all/compiled.mk +++ b/devel/boost-all/compiled.mk @@ -4,7 +4,7 @@ MAKE_CMD?= bjam MAKEFILE= # MAKE_FLAGS= # ALL_TARGET= stage -#USES+= compiler:c++17-lang +USES+= compiler:c++17-lang USE_CXXSTD= gnu++17 LDFLAGS+= -Wl,--as-needed @@ -49,9 +49,8 @@ MAKE_ARGS+= pch=off ((${OSVERSION} >= 1500000 && ${OSVERSION} < 1500017) || \ ${PORT_OPTIONS:MLLVM_FROM_PORTS}) USES+= llvm:build +USES:= ${USES:Ncompiler\:*} # XXX avoid warnings CHOSEN_COMPILER_TYPE= clang -.else -USES+= compiler:c++17-lang .endif post-patch: diff --git a/devel/boost-docs/Makefile b/devel/boost-docs/Makefile index e6218a830f4e..491fe6535360 100644 --- a/devel/boost-docs/Makefile +++ b/devel/boost-docs/Makefile @@ -20,7 +20,7 @@ SHEBANG_GLOB= *.py PORTDOCS= * -.include "${.CURDIR}/../boost-all/common.mk" +.include "${.CURDIR:H}/boost-all/common.mk" do-install: # Documentation & examples diff --git a/devel/boost-jam/Makefile b/devel/boost-jam/Makefile index d2ebf66f0751..d76495877ab6 100644 --- a/devel/boost-jam/Makefile +++ b/devel/boost-jam/Makefile @@ -18,7 +18,9 @@ USES= compiler:c++11-lang WRKSRC_SUBDIR= tools/build/src/engine -.include "${.CURDIR}/../boost-all/common.mk" +.include "${.CURDIR:H}/boost-all/common.mk" + +EXTRACT_AFTER_ARGS=${DISTNAME}/${WRKSRC_SUBDIR} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bjam ${STAGEDIR}${PREFIX}/bin diff --git a/devel/boost-libs/Makefile b/devel/boost-libs/Makefile index 819a0fef24d3..e97e92a60981 100644 --- a/devel/boost-libs/Makefile +++ b/devel/boost-libs/Makefile @@ -1,5 +1,5 @@ PORTNAME= boost-libs -PORTREVISION?= 1 +PORTREVISION?= 2 COMMENT= Free portable C++ libraries (without Boost.Python) WWW= https://www.boost.org/ @@ -31,24 +31,36 @@ LIB_DEPENDS+= libzstd.so:archivers/zstd # -RELEASE built with WITH_LLVM_ASSERTIONS set, then he can't build # this port successfully on such system. So provide LLVM_FROM_PORTS # option as a last resort for him. -OPTIONS_DEFINE= DEBUG LLVM_FROM_PORTS OPTIMIZED_CFLAGS +OPTIONS_DEFINE= DEBUG GIL_EXT LLVM_FROM_PORTS OPTIMIZED_CFLAGS ZSTD OPTIONS_MULTI= LOCALE OPTIONS_MULTI_LOCALE= ICONV ICU -OPTIONS_DEFAULT= ICONV ICU +OPTIONS_DEFAULT= ICONV ICU ZSTD +GIL_EXT_DESC= Extra file-formats for Generic Image Library component ICONV_DESC= Boost.Locale with iconv encoding support ICU_DESC= Boost.Regex/Locale with ICU unicode support LLVM_FROM_PORTS_DESC= Use LLVM from ports to build +GIL_EXT_LIB_DEPENDS= libpng.so:graphics/png \ + libraw.so:graphics/libraw \ + libtiff.so:graphics/tiff +GIL_EXT_USES= localbase:ldflags jpeg +GIL_EXT_MAKE_ARGS_OFF= -sBOOST_GIL_ENABLE_EXT_IO=0 + ICONV_USES= iconv ICONV_MAKE_ARGS= -sICONV_PATH=${ICONV_PREFIX} ICONV_MAKE_ARGS_OFF= boost.locale.iconv=off + ICU_LIB_DEPENDS= libicuuc.so:devel/icu ICU_MAKE_ARGS= -sICU_PATH=${LOCALBASE} ICU_MAKE_ARGS_OFF= boost.locale.icu=off -.include "${.CURDIR}/../boost-all/common.mk" +ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd +ZSTD_USES= localbase:ldflags +ZSTD_MAKE_ARGS_OFF= -sNO_ZSTD=1 + +.include "${.CURDIR:H}/boost-all/common.mk" -.include "${.CURDIR}/../boost-all/compiled.mk" +.include "${.CURDIR:H}/boost-all/compiled.mk" MAKE_ARGS+= --without-python MAKE_ARGS+= --without-mpi @@ -61,7 +73,6 @@ MAKE_ARGS+= -sZSTD_PATH=${LOCALBASE} MAKE_ARGS+= -sZSTD_LIBRARY_PATH=${LOCALBASE}/lib MAKE_ARGS+= -sZSTD_INCLUDE=${LOCALBASE}/include - .include <bsd.port.options.mk> # boost.stacktrace.from_exceptions is ready only for amd64 yet @@ -91,6 +102,10 @@ do-install: # For some reasons BJAM forget about the links @cd ${WRKSRC}/stage/ && ${FIND} lib -type l | ${PAX} -rw -p p ${STAGEDIR}${PREFIX} +do-test: + ${LN} -s ${STAGEDIR}${PREFIX}/include ${WRKSRC}/libs/predef + cd ${WRKSRC}/status && bjam ${MAKE_ARGS:NDESTDIR=*} + # display pkg-message post-install: @${TOUCH} ${PKGMESSAGE} diff --git a/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT b/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT new file mode 100644 index 000000000000..9db1dbe7d9ef --- /dev/null +++ b/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT @@ -0,0 +1,36 @@ +The AT_NO_AUTOMOUNT seems to be a Linux-only thing... + + -mi + +--- libs/filesystem/config/has_posix_at_apis.cpp 2025-05-29 12:45:36.456840000 -0400 ++++ libs/filesystem/config/has_posix_at_apis.cpp 2025-05-29 18:17:30.866425000 -0400 +@@ -23,5 +23,5 @@ + + struct stat st; +- res |= fstatat(fd1, "y", &st, AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW); ++ res |= fstatat(fd1, "y", &st, AT_SYMLINK_NOFOLLOW); + + res |= linkat(fd1, "y", fd1, "z", 0); +--- libs/filesystem/src/operations.cpp 2025-05-29 18:20:19.260975000 -0400 ++++ libs/filesystem/src/operations.cpp 2025-05-29 20:12:31.002264000 -0400 +@@ -355,5 +355,5 @@ + { + struct ::stat st; +- flags &= AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW; ++ flags &= AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW; + int res = ::fstatat(dirfd, path, &st, flags); + if (BOOST_LIKELY(res == 0)) +@@ -508,5 +508,5 @@ + #elif defined(BOOST_FILESYSTEM_HAS_POSIX_AT_APIS) + struct ::stat path_stat; +- int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_NO_AUTOMOUNT); ++ int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, 0); + #else + struct ::stat path_stat; +@@ -569,5 +569,5 @@ + #elif defined(BOOST_FILESYSTEM_HAS_POSIX_AT_APIS) + struct ::stat path_stat; +- int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT); ++ int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_SYMLINK_NOFOLLOW); + #else + struct ::stat path_stat; diff --git a/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp b/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp index 4afbd9cc2be5..85d01b6cf416 100644 --- a/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp +++ b/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp @@ -1,11 +1,30 @@ ---- boost/dll/detail/posix/program_location_impl.hpp.orig 2025-06-14 19:35:17 UTC +From d662bcbb67ae5da919d35f83e0bcc21769de0ac4 Mon Sep 17 00:00:00 2001 +From: Antony Polukhin <antoshkka@gmail.com> +Date: Wed, 11 Jun 2025 09:59:25 +0300 +Subject: [PATCH] Fix usage of missing variable (#98) + +Fixes https://github.com/boostorg/dll/issues/96 +--- boost/dll/detail/posix/program_location_impl.hpp.orig 2025-04-03 11:37:24 UTC +++ boost/dll/detail/posix/program_location_impl.hpp -@@ -70,7 +70,7 @@ namespace boost { namespace dll { namespace detail { +@@ -70,9 +70,10 @@ namespace boost { namespace dll { namespace detail { mib[2] = KERN_PROC_PATHNAME; mib[3] = -1; char path[1024]; - size_t size = sizeof(buf); +- if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) + size_t size = sizeof(path); - if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) ++ if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) { return boost::dll::fs::path(path); ++ } + const auto errno_snapshot = static_cast<std::errc>(errno); + if (errno_snapshot != std::errc::not_enough_memory) { +@@ -83,7 +84,7 @@ namespace boost { namespace dll { namespace detail { + + std::string p; + p.resize(size); +- if (sysctl(mib, 4, p.data(), &size, nullptr, 0) != 0) { ++ if (sysctl(mib, 4, &p[0], &size, nullptr, 0) != 0) { + ec = std::make_error_code( + static_cast<std::errc>(errno) + ); diff --git a/devel/boost-mpi-libs/Makefile b/devel/boost-mpi-libs/Makefile index 729889698961..9a7a91d42f4c 100644 --- a/devel/boost-mpi-libs/Makefile +++ b/devel/boost-mpi-libs/Makefile @@ -8,7 +8,7 @@ WWW= https://www.boost.org/ LICENSE= BSL LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt -PATCHDIR= ${.CURDIR}/../boost-libs/files +PATCHDIR= ${.CURDIR:H}/boost-libs/files BUILD_DEPENDS= bjam:devel/boost-jam \ ${PYNUMPY} @@ -39,9 +39,9 @@ OPTIONS_EXCLUDE_powerpc=OPENMPI MPICH_USES= mpi:mpich OPENMPI_USES= mpi:openmpi -.include "${.CURDIR}/../boost-all/common.mk" +.include "${.CURDIR:H}/boost-all/common.mk" -.include "${.CURDIR}/../boost-all/compiled.mk" +.include "${.CURDIR:H}/boost-all/compiled.mk" MAKE_ENV+= PYTHON_ROOT="${LOCALBASE}"\ PYTHON_VERSION="${PYTHON_VERSION}"\ diff --git a/devel/boost-python-libs/Makefile b/devel/boost-python-libs/Makefile index f17fa8ddc028..14f57e60724a 100644 --- a/devel/boost-python-libs/Makefile +++ b/devel/boost-python-libs/Makefile @@ -7,23 +7,23 @@ WWW= https://www.boost.org/ LICENSE= BSL LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt -PATCHDIR= ${.CURDIR}/../boost-libs/files +PATCHDIR= ${.CURDIR:H}/boost-libs/files BUILD_DEPENDS= bjam:devel/boost-jam \ - ${PYTHON_PKGNAMEPREFIX}numpy>=1.26:math/py-numpy@${PY_FLAVOR} + ${PYNUMPY} LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libboost_container.so:devel/boost-libs -USES= python +USES= python:3.9-3.11 # upper bound inherited from math/py-numpy USE_PYTHON= flavors #LDFLAGS+= -Wl,--as-needed OPTIONS_DEFINE= DEBUG OPTIMIZED_CFLAGS -.include "${.CURDIR}/../boost-all/common.mk" +.include "${.CURDIR:H}/boost-all/common.mk" -.include "${.CURDIR}/../boost-all/compiled.mk" +.include "${.CURDIR:H}/boost-all/compiled.mk" MAKE_ENV+= PYTHON_ROOT="${LOCALBASE}"\ PYTHON_VERSION="${PYTHON_VERSION}"\ |