Skip to content

Commit

Permalink
Fix build for non-x86 hosts (don't assume non-linux is i386!)
Browse files Browse the repository at this point in the history
  • Loading branch information
bouyer committed Apr 18, 2017
1 parent c20bd31 commit d14370b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
4 changes: 2 additions & 2 deletions geography/opencpn/distinfo
@@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.11 2017/04/14 16:20:15 bouyer Exp $
$NetBSD: distinfo,v 1.12 2017/04/18 13:31:55 bouyer Exp $

SHA1 (OpenCPN-4.6.1-89f78e06c52683faac51c30baa1f25fee7ed6c97.zip) = e977ab8292c2ec5836eea2dce7257f60d0d4ad52
RMD160 (OpenCPN-4.6.1-89f78e06c52683faac51c30baa1f25fee7ed6c97.zip) = eb840b5d694f17ae12caa7d08134986d6d143acf
SHA512 (OpenCPN-4.6.1-89f78e06c52683faac51c30baa1f25fee7ed6c97.zip) = 8ef95ee173084d91d54651c13e155112df88ce87c32d5124695da0a4507a2650f3e0094cea3287a750c8f90fd9f6240d8ab4faf665d9b15cbbcebcc131ea8efa
Size (OpenCPN-4.6.1-89f78e06c52683faac51c30baa1f25fee7ed6c97.zip) = 55864452 bytes
SHA1 (patch-CMakeLists.txt) = 90c44c4bcc55c360a0553193c975223e8bf6ad25
SHA1 (patch-CMakeLists.txt) = c20b25c64790f5a595a5ef2940f430e588ffdf14
SHA1 (patch-FindPortaudio.cmake) = e1bebe2203c6f3dc76f92ee5bdcb01eca66b6b9a
SHA1 (patch-plugins_chartdldr_pi_CMakeLists.txt) = 52962f6feac45a766fc2dff08d2802e946ccfc85
SHA1 (patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake) = 29fbfaee37e2a932b923df6ff7541dad37e14d65
Expand Down
33 changes: 28 additions & 5 deletions geography/opencpn/patches/patch-CMakeLists.txt
@@ -1,16 +1,39 @@
$NetBSD: patch-CMakeLists.txt,v 1.5 2017/04/14 16:20:15 bouyer Exp $
$NetBSD: patch-CMakeLists.txt,v 1.6 2017/04/18 13:31:55 bouyer Exp $

--- CMakeLists.txt.orig 2017-04-02 05:17:09.000000000 +0200
+++ CMakeLists.txt 2017-04-14 13:06:55.000000000 +0200
@@ -99,7 +99,6 @@
+++ CMakeLists.txt 2017-04-18 15:03:46.000000000 +0200
@@ -65,8 +65,21 @@
# Based on code from nohal
IF (NOT WIN32)
# default
- SET (ARCH "i386")
+ 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")
+ 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*")
SET (LIB_INSTALL_DIR "lib")
+
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")
@@ -99,7 +112,6 @@
ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET (ARCH "x86_64")
- SET (LIB_INSTALL_DIR "lib64")
ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET (ARCH "i386")
SET (LIB_INSTALL_DIR "lib")
@@ -318,7 +317,7 @@
@@ -318,7 +330,7 @@

# Search for opengles, short of running a program to test the speed
# of acceleration, I simply use gles on "native linux" arm systems
Expand All @@ -19,7 +42,7 @@ $NetBSD: patch-CMakeLists.txt,v 1.5 2017/04/14 16:20:15 bouyer Exp $
find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
IF (OPENGLESv1_INCLUDE_DIR)
MESSAGE (STATUS "Found OpenGLESv1")
@@ -1861,10 +1860,10 @@
@@ -1861,10 +1873,10 @@

# Certain older Cmake FindGTK2 modules ( e.g. cmake-2.8.0-2) do not yield all of the required link libraries
# So, add them manually. These declarations may be redundant in some architectures, but do no harm.
Expand Down

0 comments on commit d14370b

Please sign in to comment.