OpenCPN: fix ppc64, arm and cross builds
This commit is contained in:
parent
b80cc64f65
commit
c3166c669f
3 changed files with 68 additions and 4 deletions
37
srcpkgs/OpenCPN/patches/actually-set-arch.patch
Normal file
37
srcpkgs/OpenCPN/patches/actually-set-arch.patch
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
--- 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 ()
|
26
srcpkgs/OpenCPN/patches/glshim-musl.patch
Normal file
26
srcpkgs/OpenCPN/patches/glshim-musl.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- src/glshim/src/glx/glx.c 2018-11-07 04:14:41.000000000 +0100
|
||||||
|
+++ - 2019-01-30 20:49:46.097821225 +0100
|
||||||
|
@@ -1,4 +1,6 @@
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <linux/fb.h>
|
||||||
|
#include <signal.h>
|
||||||
|
@@ -168,7 +170,7 @@
|
||||||
|
bcm_host_deinit();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
if (g_stacktrace) {
|
||||||
|
switch (sig) {
|
||||||
|
case SIGBUS:
|
||||||
|
@@ -187,6 +189,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
signal(sig, SIG_DFL);
|
||||||
|
raise(sig);
|
||||||
|
}
|
|
@ -5,9 +5,7 @@ revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DBUNDLE_GSHHS=NONE -DBUNDLE_TCDATA=ON
|
configure_args="-DBUNDLE_GSHHS=NONE -DBUNDLE_TCDATA=ON
|
||||||
-DBUNDLE_DOCS=ON -DOCPN_FORCE_GTK3=ON
|
-DBUNDLE_DOCS=ON -DOCPN_FORCE_GTK3=ON
|
||||||
-DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3
|
-DOCPN_USE_CRASHREPORT=$(vopt_if crashreport ON OFF)
|
||||||
-DwxWidgets_CONFIG_OPTIONS=--prefix=${XBPS_CROSS_BASE}/usr
|
|
||||||
-DOCPN_USE_CRASHREPORT=$(vopt_if crashreport)
|
|
||||||
-DUSE_BUNDLED_LIBS=OFF"
|
-DUSE_BUNDLED_LIBS=OFF"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
makedepends="gtk+3-devel libcurl-devel portaudio-devel tinyxml-devel
|
makedepends="gtk+3-devel libcurl-devel portaudio-devel tinyxml-devel
|
||||||
|
@ -21,7 +19,6 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.0-or-later, MIT, wxWidgets,
|
||||||
homepage="https://opencpn.org/"
|
homepage="https://opencpn.org/"
|
||||||
distfiles="https://github.com/OpenCPN/OpenCPN/archive/v${version}.tar.gz"
|
distfiles="https://github.com/OpenCPN/OpenCPN/archive/v${version}.tar.gz"
|
||||||
checksum=095097748ec45fcb9e9595ee86493ab629fad1a363eb5ec9b2ff82f0512fe875
|
checksum=095097748ec45fcb9e9595ee86493ab629fad1a363eb5ec9b2ff82f0512fe875
|
||||||
nocross="CMake doesn't find wx-wdigets"
|
|
||||||
|
|
||||||
build_options="lzma libarchive exif crashreport"
|
build_options="lzma libarchive exif crashreport"
|
||||||
build_options_default="lzma libarchive exif"
|
build_options_default="lzma libarchive exif"
|
||||||
|
@ -35,6 +32,10 @@ case $XBPS_TARGET_MACHINE in
|
||||||
*) build_options_default+=" crashreport";;
|
*) build_options_default+=" crashreport";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
configure_args+=" -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3"
|
||||||
|
fi
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense src/glshim/LICENSE LICENSE.glshim
|
vlicense src/glshim/LICENSE LICENSE.glshim
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue