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

38 lines
1.5 KiB
Diff
Raw Normal View History

--- CMakeLists.txt
+++ CMakeLists.txt
@@ -93,6 +93,25 @@ IF (NOT WIN32)
# 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_DEPS "libc6, libwxgtk3.0-0, wx3.0-i18n, libglu1-mesa (>= 7.0.0), libgl1-mesa-glx (>= 7.0.0), zlib1g, bzip2, libtinyxml2.6.2, libportaudio2")
@@ -1579,7 +1579,7 @@ IF (OPENGL_FOUND)
ENDIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
ELSE ()
- IF(NOT (ARCH MATCHES "arm64" OR ARCH MATCHES "aarch64"))
+ IF(ARCH MATCHES "armhf")
set_source_files_properties(src/mipmap/mipmap_neon.c PROPERTIES COMPILE_FLAGS "-mfpu=neon")
ENDIF()
ENDIF ()