Bug 267748 - devel/cmake-core: CMAKE_INSTALL_FULL_LOCALSTATEDIR points to /usr/local/var which is invalid on FreeBSD
Summary: devel/cmake-core: CMAKE_INSTALL_FULL_LOCALSTATEDIR points to /usr/local/var w...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL: https://gitlab.kitware.com/cmake/cmak...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-13 19:46 UTC by Yuri Victorovich
Modified: 2023-04-13 19:07 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments
Patch against GNUInstallDirs module (711 bytes, patch)
2022-11-13 23:21 UTC, Adriaan de Groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-11-13 19:46:54 UTC
CMakeLists.txt:
> include(GNUInstallDirs)
> message("CMAKE_INSTALL_FULL_LOCALSTATEDIR=${CMAKE_INSTALL_FULL_LOCALSTATEDIR}")

prints:
> CMAKE_INSTALL_FULL_LOCALSTATEDIR=/usr/local/var

It should be /var because system doesn't have the /usr/local/var directory, and the ports framework prints this warning:
> Warning: port uses /usr/local/var instead of /var
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2022-11-13 23:20:37 UTC
Meta-commentary placed in the CMake issue.

A handful of ports create `/usr/local/var` (security/krb5* and textproc/refdb) and should probably be fixed.
Comment 2 Adriaan de Groot freebsd_committer freebsd_triage 2022-11-13 23:21:32 UTC
Created attachment 238064 [details]
Patch against GNUInstallDirs module

This patch does "the trick" for me, but only with the most minimal of testing.
Comment 3 Adriaan de Groot freebsd_committer freebsd_triage 2023-03-27 21:47:18 UTC
Trying this one in the cmake 3.26.1 exp-run.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-12 22:30:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2f35240f67b54feb5c212d35cae3b80d24bf52ff

commit 2f35240f67b54feb5c212d35cae3b80d24bf52ff
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2023-03-16 21:21:10 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2023-04-12 22:27:28 +0000

    devel/cmake: update to 3.26.1, latest upstream

    See release notes at
            https://cmake.org/cmake/help/v3.26/release/3.26.html

    Some "while we're at it" changes:
    - remove obsolete patch, reported by: diizzy (PR 270337)
    - set LOCALSTATEDIR to /var (PR 267748)

    Thanks antoine@ for the exp-run.

    PR:             270491 270337 267748

 Mk/Uses/cmake.mk                                    |  2 +-
 devel/cmake-core/distinfo                           |  6 +++---
 .../files/patch-Modules_GNUInstallDirs.cmake (new)  | 15 +++++++++++++++
 .../files/patch-Utilities_cmcurl_lib_url.c (gone)   | 13 -------------
 devel/cmake-core/pkg-plist                          | 21 +++++++++++++++++++++
 devel/cmake-man/pkg-plist                           |  1 +
 devel/cmake-modules-webos/distinfo                  |  1 +
 7 files changed, 42 insertions(+), 17 deletions(-)