Files
nixpkgs/pkgs/by-name/sn/snort/0001-cmake-fix-pkg-config-path-for-libdir.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.6 KiB
Diff

From a4dd3bf78fc8d4c22b40ddb4e91f525012703a5a Mon Sep 17 00:00:00 2001
From: Brian McGillion <bmg.avoin@gmail.com>
Date: Mon, 10 Feb 2025 23:31:47 +0400
Subject: [PATCH] cmake: fix pkg-config path for libdir
on systems that prefer absolute paths there is a mixing and matching of
the relative and absolute paths that can result in the below creation of
libdir having the prefix and the full path appended to it.
** added to highlight
``prefix=/nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
**libdir=${prefix}//nix/store/3npvhj5wfwhc0q42qwiinj64bzfb1vvz-snort-3.6.3.0/lib**
includedir=${prefix}/include
datarootdir=${prefix}/share
datadir=${datarootdir}
mandir=${datarootdir}/man
infodir=${datarootdir}/info
``
In order to preserve backwards compatibility we will use the cmake
fullpath option ${CMAKE_INSTALL_FULL_LIBDIR} in place of
${prefix}/${CMAKE_INSTALL_LIBDIR} which will support both contexts.
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
---
cmake/create_pkg_config.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/create_pkg_config.cmake b/cmake/create_pkg_config.cmake
index 300350cbd..4ce8b16e6 100644
--- a/cmake/create_pkg_config.cmake
+++ b/cmake/create_pkg_config.cmake
@@ -5,7 +5,7 @@
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(bindir "\${exec_prefix}/bin")
-set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
+set(libdir "\${CMAKE_INSTALL_FULL_LIBDIR}")
set(includedir "\${prefix}/include")
set(datarootdir "\${prefix}/share")
set(datadir "\${datarootdir}")
--
2.47.2