Browse Source

libmosquitto: Prevent cmake build

android-5
Fredrik Fornwall 8 years ago
parent
commit
298654c87b
  1. 5
      packages/libmosquitto/build.sh
  2. 29
      packages/libmosquitto/lib-CMakeLists.txt.patch

5
packages/libmosquitto/build.sh

@ -7,6 +7,11 @@ TERMUX_PKG_BUILD_IN_SRC=Yes
TERMUX_PKG_DEPENDS="c-ares, openssl"
TERMUX_PKG_MAINTAINER="Nathaniel Wesley Filardo @nwf"
termux_step_configure() {
# Prevent cmake configuration.
return
}
termux_step_make() {
for i in lib client; do make -C $i; done
}

29
packages/libmosquitto/lib-CMakeLists.txt.patch

@ -0,0 +1,29 @@
diff -u -r ../mosquitto-1.4.10/lib/CMakeLists.txt ./lib/CMakeLists.txt
--- ../mosquitto-1.4.10/lib/CMakeLists.txt 2016-08-17 13:05:14.000000000 +0200
+++ ./lib/CMakeLists.txt 2017-01-15 21:09:21.548573341 +0100
@@ -7,7 +7,12 @@
set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib)
set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include)
else (WIN32)
- set (PTHREAD_LIBRARIES pthread)
+ find_library(LIBPTHREAD pthread)
+ if (LIBPTHREAD)
+ set (PTHREAD_LIBRARIES pthread)
+ else (LIBPTHREAD)
+ set (PTHREAD_LIBRARIES "")
+ endif()
set (PTHREAD_INCLUDE_DIR "")
endif (WIN32)
else (${WITH_THREADING} STREQUAL ON)
@@ -44,7 +49,10 @@
set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})
if (UNIX AND NOT APPLE)
- set (LIBRARIES ${LIBRARIES} rt)
+ find_library(LIBRT rt)
+ if (LIBRT)
+ set (LIBRARIES ${LIBRARIES} rt)
+ endif (LIBRT)
endif (UNIX AND NOT APPLE)
if (WIN32)
Loading…
Cancel
Save