Make theses build (and run) on linux

This commit is contained in:
bouyer 2016-05-21 10:50:41 +00:00
parent 22d91bec8a
commit 6397424f69
14 changed files with 165 additions and 39 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.1 2016/04/24 10:21:54 bouyer Exp $
$NetBSD: distinfo,v 1.2 2016/05/21 10:50:41 bouyer Exp $
SHA1 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = a1e06d6c810ad8e02a1f8f35677517e18adc28f6
RMD160 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 60c84b16d04a2e10a189a7c72e14b4f1405c9686
SHA512 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 639392c7c219cafcbcba88f04f9b75801c4f7e66a4c641fb28af79025333b9b57a16d37820a04cc353432f775e2fa3ee7d556d49f61c8d4741ba373998c27ee9
Size (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 1124238 bytes
SHA1 (patch-cmake_PluginConfigure.cmake) = 15ee7241c1ef77bf5ac2da414d727a5e2f40b7a1
SHA1 (patch-cmake_PluginConfigure.cmake) = 62dbbc6d13959fa313e6ea91ad6a28ee37da5fdd
SHA1 (patch-cmake_PluginInstall.cmake) = 43a906b0a75a1e358ccd96992e1c14d526d07b4b

View file

@ -1,15 +1,19 @@
$NetBSD: patch-cmake_PluginConfigure.cmake,v 1.1 2016/04/24 10:21:54 bouyer Exp $
$NetBSD: patch-cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
Do not overwrite CMAKE_SHARED_LINKER_FLAGS
--- cmake/PluginConfigure.cmake.orig 2016-04-13 08:28:11.000000000 +0200
+++ cmake/PluginConfigure.cmake 2016-04-15 16:03:44.000000000 +0200
@@ -45,11 +45,9 @@
+++ cmake/PluginConfigure.cmake 2016-05-21 12:20:47.579936156 +0200
@@ -45,11 +45,13 @@
# ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
ENDIF(PROFILING)
- IF(NOT APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
- ELSE(NOT APPLE)
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
+ ADD_DEFINITIONS( "-fPIC")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
- ENDIF(NOT APPLE)

View file

@ -0,0 +1,20 @@
$NetBSD: patch-cmake_PluginInstall.cmake,v 1.1 2016/05/21 10:50:41 bouyer Exp $
--- cmake/PluginInstall.cmake.orig 2016-04-13 08:28:11.000000000 +0200
+++ cmake/PluginInstall.cmake 2016-05-21 12:20:58.903393680 +0200
@@ -85,7 +85,6 @@
# SET (PACKAGE_DEPS "wxGTK mesa-libGLU mesa-libGL gettext zlib bzip2 portaudio")
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")
@@ -96,7 +95,6 @@
# SET (PACKAGE_DEPS "libwx_baseu-2_8-0-wxcontainer MesaGLw libbz2-1 portaudio")
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")

View file

@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.1 2016/04/24 10:23:38 bouyer Exp $
$NetBSD: distinfo,v 1.2 2016/05/21 10:50:41 bouyer Exp $
SHA1 (watchdog_pi-20160415-f525c6b25646ae9a81cd0fe6e53aa267529af964.tar.gz) = b87098bc762224d7b58b115d7e8e16fc9874996d
RMD160 (watchdog_pi-20160415-f525c6b25646ae9a81cd0fe6e53aa267529af964.tar.gz) = 60f4de1fc7b716946c7e1a65c4dca93a9347da22
SHA512 (watchdog_pi-20160415-f525c6b25646ae9a81cd0fe6e53aa267529af964.tar.gz) = e930baa1164e794cbc752e1cb321a6203857c1f24fcf90a20beea22586e71aac1f468eeae825d2c38cec7a57056ac102928b39cb815b3d907f21ee0c696f3f54
Size (watchdog_pi-20160415-f525c6b25646ae9a81cd0fe6e53aa267529af964.tar.gz) = 409199 bytes
SHA1 (patch-cmake_PluginConfigure.cmake) = 2b4058ef26c9e711a05c93103da576bd3fb60a58
SHA1 (patch-cmake_PluginConfigure.cmake) = 72713695893417f0e56fa78c624295fc0ca39470

View file

@ -1,15 +1,19 @@
$NetBSD: patch-cmake_PluginConfigure.cmake,v 1.1 2016/04/24 10:23:38 bouyer Exp $
$NetBSD: patch-cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
Do not overwrite CMAKE_SHARED_LINKER_FLAGS
--- cmake/PluginConfigure.cmake.orig 2016-04-13 23:56:21.000000000 +0200
+++ cmake/PluginConfigure.cmake 2016-04-15 16:25:56.000000000 +0200
@@ -40,11 +40,9 @@
+++ cmake/PluginConfigure.cmake 2016-05-21 12:26:00.398634165 +0200
@@ -40,11 +40,13 @@
ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O0 -fexceptions" )
ENDIF(PROFILING)
- IF(NOT APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
- ELSE(NOT APPLE)
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
+ ADD_DEFINITIONS( "-fPIC")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
- ENDIF(NOT APPLE)

View file

@ -1,15 +1,18 @@
$NetBSD: distinfo,v 1.7 2016/04/01 19:56:02 joerg Exp $
$NetBSD: distinfo,v 1.8 2016/05/21 10:50:41 bouyer Exp $
SHA1 (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = 39baa5f89ded9a5c62824e6e1445dbfc4f168578
RMD160 (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = d344b9caffe40dabcad1d9ac148ce54d75f1573c
SHA512 (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = 3ea2136ab777f711aeaa66f34722b3b091af91104ff60303b61c587f95354826afae6dbc8f6a9228357399ae36e96a34098596c0a278d2184ce59283c88f4051
Size (OpenCPN-4.2.0-a555b4988b50f555be052394c184ef26c5ad0e8a.zip) = 42779485 bytes
SHA1 (patch-CMakeLists.txt) = 124a5f3836cf57b61c1452a5ded65dc7b16a4c69
SHA1 (patch-CMakeLists.txt) = c61ed69c19d98bc5407cd28857b21d5158c9c1f9
SHA1 (patch-FindPortaudio.cmake) = e1bebe2203c6f3dc76f92ee5bdcb01eca66b6b9a
SHA1 (patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake) = 9d6ade1c32f7d52b53848a2e382a4838d0240530
SHA1 (patch-plugins_dashboard_pi_CMakeLists.txt) = f96234755ccdb0cf4d890b44c3983a71700e6de7
SHA1 (patch-plugins_grib_pi_CMakeLists.txt) = fbac6b6da5c8efceb6931a6b41bec4a8ea7cbccb
SHA1 (patch-plugins_wmm_pi_cmake_PluginConfigure.cmake) = 086de4106760df22b30330a40e3ec52d88d8b996
SHA1 (patch-plugins_chartdldr_pi_CMakeLists.txt) = 52962f6feac45a766fc2dff08d2802e946ccfc85
SHA1 (patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake) = 29fbfaee37e2a932b923df6ff7541dad37e14d65
SHA1 (patch-plugins_dashboard_pi_CMakeLists.txt) = 76a6198e58f81c129f15fa6671da180c263c231e
SHA1 (patch-plugins_demo_pi_sample_CMakeLists.txt) = 6fde2dae588e0d8250bd1e0d60a465fb20d9a599
SHA1 (patch-plugins_grib_pi_CMakeLists.txt) = 49f997c27aa4710721d36945a681854579112a49
SHA1 (patch-plugins_wmm_pi_CMakeLists.txt) = 88339a61dd4b78b823bbd34bd1b02863d150f046
SHA1 (patch-plugins_wmm_pi_cmake_PluginConfigure.cmake) = f1c91cfa744ed76d938bfb5bdb4116df9f45604a
SHA1 (patch-src_chart1.cpp) = ae7c1d8a59c9a275914a613205de71e2dca89dc6
SHA1 (patch-src_chartimg.cpp) = f0e3841ab1920dcab74462a5007b74e905d794c0
SHA1 (patch-src_chcanv.cpp) = af76f36b6fd6d613720945195d5a24902012a020

View file

@ -1,8 +1,24 @@
$NetBSD: patch-CMakeLists.txt,v 1.3 2016/03/14 11:01:06 bouyer Exp $
$NetBSD: patch-CMakeLists.txt,v 1.4 2016/05/21 10:50:41 bouyer Exp $
--- CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
+++ CMakeLists.txt 2016-02-17 17:40:51.000000000 +0100
@@ -282,7 +282,7 @@
+++ CMakeLists.txt 2016-05-21 12:06:28.121554591 +0200
@@ -81,7 +81,6 @@
# SET (PACKAGE_DEPS "wxGTK mesa-libGLU mesa-libGL gettext zlib bzip2 portaudio")
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")
@@ -92,7 +91,6 @@
# SET (PACKAGE_DEPS "libwx_baseu-2_8-0-wxcontainer MesaGLw libbz2-1 portaudio")
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")
@@ -282,7 +280,7 @@
# Search for opengles, short of running a program to test the speed
# of acceleration, I simply use gles on "native linux" arm systems
@ -11,14 +27,16 @@ $NetBSD: patch-CMakeLists.txt,v 1.3 2016/03/14 11:01:06 bouyer Exp $
find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
IF (OPENGLESv1_INCLUDE_DIR)
MESSAGE (STATUS "Found OpenGLESv1")
@@ -1755,9 +1755,9 @@
@@ -1755,9 +1753,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.
-IF(UNIX)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
-TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
-ENDIF(UNIX)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
IF(QT_LINUX)

View file

@ -0,0 +1,14 @@
$NetBSD: patch-plugins_chartdldr_pi_CMakeLists.txt,v 1.1 2016/05/21 10:50:41 bouyer Exp $
--- plugins/chartdldr_pi/CMakeLists.txt.orig 2016-05-21 11:06:35.652268145 +0200
+++ plugins/chartdldr_pi/CMakeLists.txt 2016-05-21 11:08:36.585112791 +0200
@@ -130,6 +130,9 @@
ENDIF(QT_ANDROID)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
INCLUDE("cmake/PluginInstall.cmake")
INCLUDE("cmake/PluginLocalization.cmake")
INCLUDE("cmake/PluginPackage.cmake")

View file

@ -1,12 +1,16 @@
--- plugins/chartdldr_pi/cmake/PluginConfigure.cmake.orig 2016-02-10 17:29:03.000000000 +0100
+++ plugins/chartdldr_pi/cmake/PluginConfigure.cmake 2016-02-10 17:29:36.000000000 +0100
@@ -41,11 +41,9 @@
$NetBSD: patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
--- plugins/chartdldr_pi/cmake/PluginConfigure.cmake.orig 2016-02-03 18:44:17.000000000 +0100
+++ plugins/chartdldr_pi/cmake/PluginConfigure.cmake 2016-05-21 11:07:31.835017011 +0200
@@ -41,11 +41,12 @@
ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
ENDIF(PROFILING)
- IF(NOT APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
- ELSE(NOT APPLE)
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
- ENDIF(NOT APPLE)

View file

@ -1,13 +1,24 @@
--- plugins/dashboard_pi/CMakeLists.txt.orig 2016-02-10 17:24:22.000000000 +0100
+++ plugins/dashboard_pi/CMakeLists.txt 2016-02-10 17:24:27.000000000 +0100
@@ -43,10 +43,9 @@
#ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
#TODO: Should we use -fno-stack-protector
$NetBSD: patch-plugins_dashboard_pi_CMakeLists.txt,v 1.2 2016/05/21 10:50:41 bouyer Exp $
--- plugins/dashboard_pi/CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
+++ plugins/dashboard_pi/CMakeLists.txt 2016-05-21 11:08:40.892255884 +0200
@@ -45,7 +45,9 @@
# IF NOT DEBUGGING CFLAGS="-O2 -march=native"
IF(NOT WIN32 AND NOT APPLE)
ADD_DEFINITIONS( "-Wall -O2 -fexceptions -fvisibility=hidden" )
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
ENDIF(NOT WIN32 AND NOT APPLE)
IF( APPLE )
ADD_DEFINITIONS( "-O3 -fexceptions -fvisibility=hidden" )
@@ -263,5 +265,8 @@
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/data)
ENDIF(WIN32)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
INCLUDE("../PluginLocalization.cmake")
PLUGIN_LOCALIZATION()

View file

@ -0,0 +1,13 @@
$NetBSD: patch-plugins_demo_pi_sample_CMakeLists.txt,v 1.1 2016/05/21 10:50:41 bouyer Exp $
--- plugins/demo_pi_sample/CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
+++ plugins/demo_pi_sample/CMakeLists.txt 2016-05-21 11:07:56.299797236 +0200
@@ -143,4 +143,7 @@
IF(WIN32)
INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME DESTINATION "plugins")
ENDIF(WIN32)
-
+
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")

View file

@ -1,10 +1,26 @@
--- plugins/grib_pi/CMakeLists.txt.orig 2016-02-10 17:26:23.000000000 +0100
+++ plugins/grib_pi/CMakeLists.txt 2016-02-10 17:27:16.000000000 +0100
@@ -44,7 +44,6 @@
$NetBSD: patch-plugins_grib_pi_CMakeLists.txt,v 1.2 2016/05/21 10:50:41 bouyer Exp $
--- plugins/grib_pi/CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
+++ plugins/grib_pi/CMakeLists.txt 2016-05-21 11:08:48.884522634 +0200
@@ -42,9 +42,11 @@
#ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
#TODO: Should we use -fno-stack-protector
# IF NOT DEBUGGING CFLAGS="-O2 -march=native"
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
IF(NOT WIN32 AND NOT APPLE)
ADD_DEFINITIONS( "-Wall -fexceptions -fvisibility=hidden" )
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
ENDIF(NOT WIN32 AND NOT APPLE)
IF( APPLE )
@@ -258,5 +260,8 @@
ENDIF(WIN32)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
INCLUDE("../PluginLocalization.cmake")
PLUGIN_LOCALIZATION()

View file

@ -0,0 +1,14 @@
$NetBSD: patch-plugins_wmm_pi_CMakeLists.txt,v 1.1 2016/05/21 10:50:41 bouyer Exp $
--- plugins/wmm_pi/CMakeLists.txt.orig 2016-05-21 11:06:35.658268321 +0200
+++ plugins/wmm_pi/CMakeLists.txt 2016-05-21 11:08:53.418675661 +0200
@@ -58,6 +58,9 @@
TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} "-lgnustl_shared")
ENDIF(QT_ANDROID)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
INCLUDE("cmake/PluginInstall.cmake")
INCLUDE("cmake/PluginLocalization.cmake")
INCLUDE("cmake/PluginPackage.cmake")

View file

@ -1,12 +1,16 @@
--- plugins/wmm_pi/cmake/PluginConfigure.cmake.orig 2016-02-10 17:29:03.000000000 +0100
+++ plugins/wmm_pi/cmake/PluginConfigure.cmake 2016-02-10 17:30:10.000000000 +0100
@@ -41,11 +41,9 @@
$NetBSD: patch-plugins_wmm_pi_cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
--- plugins/wmm_pi/cmake/PluginConfigure.cmake.orig 2016-02-03 18:44:17.000000000 +0100
+++ plugins/wmm_pi/cmake/PluginConfigure.cmake 2016-05-21 11:07:42.654361498 +0200
@@ -41,11 +41,12 @@
ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
ENDIF(PROFILING)
- IF(NOT APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
- ELSE(NOT APPLE)
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
- ENDIF(NOT APPLE)