Commit 23a5b788 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/cmake: refactor lib64 patch

Check for /etc/alpine-release, similar to what arch linux does.

ref #12773
parent bb57a5f5
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=3.20.4
pkgrel=0
pkgrel=1
pkgdesc="Cross-platform, open-source make system"
url="https://www.cmake.org/"
arch="all"
......@@ -60,5 +60,5 @@ package() {
sha512sums="
f53902a917b8d7b949af305afed3b32fcf981c5c647a77ee7a3bcae1bb5620381a1eacdac4b86bd7e5ea0a7806ec5fbd9a4f4853553f78db4d41d7dd2867c99f cmake-3.20.4.tar.gz
87051601dda49894a1631156bf63aaa79fcf7cb7bb6705712889b9012d87d2f11d2707a1d729223b180668ad61f22b16893658e9777beee330c7e9a90e7421e6 patch-adjust-lib64.patch
26e5886ffa30c801b58eaa966c410f71e219914feee446d14c42d75c0a17202a2e168f7eab40f472aa594fd2a1e8572274ec6c0a8207fd5edb75f994479344eb patch-adjust-lib64.patch
"
--- cmake-3.19.5/Modules/GNUInstallDirs.cmake.orig
+++ cmake-3.19.5/Modules/GNUInstallDirs.cmake
@@ -224,28 +224,6 @@
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
"Please enable at least one language before including GNUInstallDirs.")
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index f7d8c36a26..d81033ca90 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -239,6 +239,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
endif()
- if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
- AND NOT CMAKE_CROSSCOMPILING
- AND NOT EXISTS "/etc/arch-release")
- if (EXISTS "/etc/debian_version") # is this a debian system ?
- if(CMAKE_LIBRARY_ARCHITECTURE)
- if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
- set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
- endif()
- if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX
- AND "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
- set(__LAST_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
- endif()
- endif()
- else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
- set(_LIBDIR_DEFAULT "lib64")
- if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
- set(__LAST_LIBDIR_DEFAULT "lib64")
- endif()
- endif()
- endif()
- endif()
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "Object code libraries (${_LIBDIR_DEFAULT})")
elseif(DEFINED __LAST_LIBDIR_DEFAULT
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
AND NOT CMAKE_CROSSCOMPILING
+ AND NOT EXISTS "/etc/alpine-release"
AND NOT EXISTS "/etc/arch-release")
if (EXISTS "/etc/debian_version") # is this a debian system ?
if(CMAKE_LIBRARY_ARCHITECTURE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment