void-packages/srcpkgs/OpenCPN/patches/actually-set-arch.patch

29 lines
1.1 KiB
Diff

--- cmake/GetArch.cmake 2020-07-15 20:02:29.000000000 +0200
+++ - 2020-07-25 17:12:30.624868454 +0200
@@ -14,6 +14,25 @@
# default
set (ARCH "i386")
set (LIB_INSTALL_DIR "lib")
+ IF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "aarch64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "armhf")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc*" OR CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc*")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "ppc64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "powerpc")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "x86_64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "i386")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
if (EXISTS /etc/debian_version)
set (PACKAGE_FORMAT "DEB")
set (PACKAGE_RECS "xcalib,xdg-utils")