tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
boost .cmake files
Currently the devel/boost-libs install procedure, via
boost-install-cmake in meta-pkgs/boost-libs/Makefile.common, does the
following curious thing:
For each dir in ${BOOST_CMAKE_DIRS} (cmake, and cmake/boost_* for
various *):
1. Create ${DESTDIR}${PREFIX}/lib/${dir}.
2. Install all .cmake files from ${WRKSRC}/stage/lib/${dir} into
${DESTDIR}${PREFIX}/lib/${dir}.
But:
(a) For the first one, where dir=cmake, this actually tries to copy
_all_ the .cmake files -- but fails because they're all in
subdirectories that haven't been created yet...but the failure
doesn't stop anything, because semicolon-terminated find -exec
doesn't fail when the program fails once as long as it sometimes
succeeds.
(b) For the other ones, any directories not explicitly listed in
BOOST_CMAKE_DIRS in cmake-dirs.mk are omitted.
This strikes me as silly and error-prone. The attached patch
simplifies the logic by using pax to copy all the .cmake files in one
swell foop, without interleaving ${INSTALL_DATA_DIR} and
${INSTALL_DATA}.
This patch revealed several missing .cmake files -- it's not clear
whether they were intentionally omitted or not, but if there is a
reason to take some and leave other .cmake files, we should have that
reason written down so it's obvious to the next person. Under the
assumption this was a mistake, I updated the plist and tried to make
sure the plist options match.
Unlike the last few build-fix and print-PLIST changes, this
substantively changes the package that gets built, so I'm including a
revbump and posting for review first.
OK to commit?
From c1b2e88968b43355e95485f9a5c0d6d2d04d1feb Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Wed, 8 Jan 2025 11:37:29 +0000
Subject: [PATCH] meta-pkgs/boost, devel/boost-libs: Simplify cmake
installation.
No need to list the cmake directories explicitly -- we can just pax
the .cmake files over all at once.
This uses ${RUN} to avoid masking shell command failures (and to make
the output prettier).
Previously, this logic would:
1. Create lib/cmake and try to install all the .cmake files under
lib/cmake.
=> This step would fail because they're all in subdirectories and
the subdirectories haven't been created in the destdir. But
the shell loop would proceed anyway because it was run without
${RUN} or set -e.
2. Create lib/cmake/boost_date_time-${BOOST_VERSION} and install the
the .cmake files under that.
3. Create lib/cmake/boost_exception-${BOOST_VERSION} and install the
the .cmake files under that.
4. &c.
Step (1) could have caught everything but for the not-yet-created
subdirectories; steps (2) and on didn't catch everything because not
everything was listed in BOOST_CMAKE_DIRS (which is now unnecessary).
---
devel/boost-libs/Makefile | 2 ++
devel/boost-libs/PLIST | 8 +++++
meta-pkgs/boost/Makefile.common | 19 ++++-------
meta-pkgs/boost/cmake-dirs.mk | 57 ---------------------------------
4 files changed, 17 insertions(+), 69 deletions(-)
delete mode 100644 meta-pkgs/boost/cmake-dirs.mk
diff --git a/devel/boost-libs/Makefile b/devel/boost-libs/Makefile
index 1760c0d5d9f2..bb9199275c0b 100644
--- a/devel/boost-libs/Makefile
+++ b/devel/boost-libs/Makefile
@@ -5,6 +5,8 @@ BOOST_COMMENT= (binary libraries)
BOOST_CONFIG= installed
BOOST_INSTALL_LIBS= yes
+PKGREVISION= 1
+
.include "../../meta-pkgs/boost/Makefile.common"
INSTALLATION_DIRS+= lib
diff --git a/devel/boost-libs/PLIST b/devel/boost-libs/PLIST
index ea6d252118eb..e2ec08e15ec0 100644
--- a/devel/boost-libs/PLIST
+++ b/devel/boost-libs/PLIST
@@ -72,6 +72,8 @@ ${PLIST.log}lib/cmake/boost_log_setup-${PKGVERSION}/boost_log_setup-config-versi
${PLIST.log}lib/cmake/boost_log_setup-${PKGVERSION}/boost_log_setup-config.cmake
${PLIST.log}lib/cmake/boost_log_setup-${PKGVERSION}/libboost_log_setup-variant-shared.cmake
${PLIST.log}lib/cmake/boost_log_setup-${PKGVERSION}/libboost_log_setup-variant-static.cmake
+lib/cmake/boost_math-${PKGVERSION}/boost_math-config-version.cmake
+lib/cmake/boost_math-${PKGVERSION}/boost_math-config.cmake
lib/cmake/boost_math_c99-${PKGVERSION}/boost_math_c99-config-version.cmake
lib/cmake/boost_math_c99-${PKGVERSION}/boost_math_c99-config.cmake
lib/cmake/boost_math_c99-${PKGVERSION}/libboost_math_c99-variant-shared.cmake
@@ -98,6 +100,8 @@ ${PLIST.longdbl}lib/cmake/boost_math_tr1l-${PKGVERSION}/libboost_math_tr1l-varia
${PLIST.longdbl}lib/cmake/boost_math_tr1l-${PKGVERSION}/libboost_math_tr1l-variant-static.cmake
lib/cmake/boost_mpi-${PKGVERSION}/boost_mpi-config-version.cmake
lib/cmake/boost_mpi-${PKGVERSION}/boost_mpi-config.cmake
+lib/cmake/boost_mpi_python-${PKGVERSION}/boost_mpi_python-config-version.cmake
+lib/cmake/boost_mpi_python-${PKGVERSION}/boost_mpi_python-config.cmake
lib/cmake/boost_nowide-${PKGVERSION}/boost_nowide-config-version.cmake
lib/cmake/boost_nowide-${PKGVERSION}/boost_nowide-config.cmake
lib/cmake/boost_nowide-${PKGVERSION}/libboost_nowide-variant-shared.cmake
@@ -134,6 +138,10 @@ lib/cmake/boost_stacktrace_basic-${PKGVERSION}/boost_stacktrace_basic-config-ver
lib/cmake/boost_stacktrace_basic-${PKGVERSION}/boost_stacktrace_basic-config.cmake
lib/cmake/boost_stacktrace_basic-${PKGVERSION}/libboost_stacktrace_basic-variant-shared.cmake
lib/cmake/boost_stacktrace_basic-${PKGVERSION}/libboost_stacktrace_basic-variant-static.cmake
+${PLIST.stacktrace_from_exception}lib/cmake/boost_stacktrace_from_exception-${PKGVERSION}/boost_stacktrace_from_exception-config-version.cmake
+${PLIST.stacktrace_from_exception}lib/cmake/boost_stacktrace_from_exception-${PKGVERSION}/boost_stacktrace_from_exception-config.cmake
+${PLIST.stacktrace_from_exception}lib/cmake/boost_stacktrace_from_exception-${PKGVERSION}/libboost_stacktrace_from_exception-variant-shared.cmake
+${PLIST.stacktrace_from_exception}lib/cmake/boost_stacktrace_from_exception-${PKGVERSION}/libboost_stacktrace_from_exception-variant-static.cmake
lib/cmake/boost_stacktrace_noop-${PKGVERSION}/boost_stacktrace_noop-config-version.cmake
lib/cmake/boost_stacktrace_noop-${PKGVERSION}/boost_stacktrace_noop-config.cmake
lib/cmake/boost_stacktrace_noop-${PKGVERSION}/libboost_stacktrace_noop-variant-shared.cmake
diff --git a/meta-pkgs/boost/Makefile.common b/meta-pkgs/boost/Makefile.common
index 0df096ccfbb3..a50286cd9e8b 100644
--- a/meta-pkgs/boost/Makefile.common
+++ b/meta-pkgs/boost/Makefile.common
@@ -93,19 +93,14 @@ pre-configure:
#. endif
boost-install-libs:
- ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib
- cd ${WRKSRC}/stage/lib && pax -rw -p p libboost* ${DESTDIR}${PREFIX}/lib
-
-.include "cmake-dirs.mk"
+ @${STEP_MSG} Installing boost libraries
+ ${RUN}cd ${WRKSRC}/stage/lib && \
+ pax -rw -p p libboost* ${DESTDIR}${PREFIX}/lib
boost-install-cmake:
-. for dir in ${BOOST_CMAKE_DIRS}
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/${dir}
- cd ${WRKSRC}/stage/lib/${dir} && \
- ${FIND} . -type f -name "*.cmake" \
- | while read f; do \
- ${INSTALL_DATA} "$$f" ${DESTDIR}${PREFIX}/lib/${dir}/"$$f"; \
- done
-. endfor
+ @${STEP_MSG} Installing boost cmake files
+ ${RUN}cd ${WRKSRC}/stage/lib && \
+ ${FIND} cmake -type f -name '*.cmake' \
+ | pax -rw -p p ${DESTDIR}${PREFIX}/lib
.endif # ${BOOST_PACKAGE} == "meta-pkg"
diff --git a/meta-pkgs/boost/cmake-dirs.mk b/meta-pkgs/boost/cmake-dirs.mk
deleted file mode 100644
index 2037a40a6121..000000000000
--- a/meta-pkgs/boost/cmake-dirs.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-# $NetBSD: cmake-dirs.mk,v 1.1 2024/12/26 21:52:31 triaxx Exp $
-#
-# BOOST_CMAKE_DIRS is the list of directories from ${WRKSRC}/stage/lib that
-# contains CMake files.
-#
-# This file can be generated after 'make build' by running:
-# cd ${WRKSRC}/stage/lib && find cmake -type d
-#
-# TODO: implement a target to automatically generate this file
-
-BOOST_CMAKE_DIRS+= cmake
-BOOST_CMAKE_DIRS+= cmake/boost_date_time-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_exception-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_fiber-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_filesystem-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_graph-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_graph_parallel-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_iostreams-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_json-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_locale-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_thread-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_log-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_log_setup-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_c99-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_c99f-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_c99l-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_mpi-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_tr1-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_tr1f-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_math_tr1l-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_nowide-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_process-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_program_options-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_random-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_regex-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_serialization-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_wserialization-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_stacktrace_noop-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_stacktrace_basic-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_stacktrace_addr2line-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_system-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_timer-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_prg_exec_monitor-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_test_exec_monitor-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_unit_test_framework-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_type_erasure-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_wave-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_atomic-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_url-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/Boost-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_headers-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_charconv-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_chrono-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_container-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_context-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_contract-${BOOST_VERSION}
-BOOST_CMAKE_DIRS+= cmake/boost_coroutine-${BOOST_VERSION}
Home |
Main Index |
Thread Index |
Old Index