diff --git a/srcpkgs/OpenCPN/patches/actually-set-arch.patch b/srcpkgs/OpenCPN/patches/actually-set-arch.patch new file mode 100644 index 00000000000..1eee23f625e --- /dev/null +++ b/srcpkgs/OpenCPN/patches/actually-set-arch.patch @@ -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 () diff --git a/srcpkgs/OpenCPN/patches/glshim-musl.patch b/srcpkgs/OpenCPN/patches/glshim-musl.patch new file mode 100644 index 00000000000..e3029467973 --- /dev/null +++ b/srcpkgs/OpenCPN/patches/glshim-musl.patch @@ -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 ++#endif + #include + #include + #include +@@ -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); + } diff --git a/srcpkgs/OpenCPN/template b/srcpkgs/OpenCPN/template index 5193ef47f50..8b580d395cf 100644 --- a/srcpkgs/OpenCPN/template +++ b/srcpkgs/OpenCPN/template @@ -5,9 +5,7 @@ revision=1 build_style=cmake configure_args="-DBUNDLE_GSHHS=NONE -DBUNDLE_TCDATA=ON -DBUNDLE_DOCS=ON -DOCPN_FORCE_GTK3=ON - -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3 - -DwxWidgets_CONFIG_OPTIONS=--prefix=${XBPS_CROSS_BASE}/usr - -DOCPN_USE_CRASHREPORT=$(vopt_if crashreport) + -DOCPN_USE_CRASHREPORT=$(vopt_if crashreport ON OFF) -DUSE_BUNDLED_LIBS=OFF" hostmakedepends="pkg-config" 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/" distfiles="https://github.com/OpenCPN/OpenCPN/archive/v${version}.tar.gz" checksum=095097748ec45fcb9e9595ee86493ab629fad1a363eb5ec9b2ff82f0512fe875 -nocross="CMake doesn't find wx-wdigets" build_options="lzma libarchive exif crashreport" build_options_default="lzma libarchive exif" @@ -35,6 +32,10 @@ case $XBPS_TARGET_MACHINE in *) build_options_default+=" crashreport";; esac +if [ -z "$CROSS_BUILD" ]; then + configure_args+=" -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3" +fi + post_install() { vlicense src/glshim/LICENSE LICENSE.glshim }