PATCH_LIST= FILE_LIST= SRC_FETCH_METHOD=http SRC_GIT_COMMIT=${PKGVER} SRC_FETCH_PATH="https://github.com/warmcat/libwebsockets/archive/refs/tags/v${SRC_GIT_COMMIT}.tar.gz" FLXARCH=$FLX_ARCH_SMALL MAKEDEPENDS=( "libuv-*:::*.h *.so *.so.* *.a" "openssl-*:::*.h *.so *.so.*" ) function do_config { cat < ./cmake.toolchain set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR ${FLXARCH}) set(CMAKE_SYSROOT ${FLXROOTDIR}) set(CMAKE_C_COMPILER ${FLXCROSS}gcc) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) EOF cmake . -DCMAKE_TOOLCHAIN_FILE=./cmake.toolchain -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DLWS_OPENSSL_LIBRARIES="${FLXROOTDIR}/usr/lib/libssl.so;${FLXROOTDIR}/usr/lib/libcrypto.so" -DLWS_OPENSSL_INCLUDE_DIRS:PATH=${FLXROOTDIR}/usr/include/openssl \ -DLIBUV_INCLUDE_DIRS=${FLXROOTDIR}/usr/include -DLIBUV_LIBRARIES=${FLXROOTDIR}/usr/lib \ -DLWS_IPV6=OFF -DLWS_WITH_SSL=ON -DLWS_WITH_LIBUV=ON -DLWS_WITH_STATIC=OFF -DLWS_LINK_TESTAPPS_DYNAMIC=ON -DLWS_WITH_SDEVENT=OFF \ -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_STATIC=ON -DLWS_WITH_SHARED=OFF \ -DCMAKE_INSTALL_PREFIX="${ROOTDIR}/usr" # (Note: the following paragraph is obsolete now and has been fixed by using a proper cmake.toolchain file) # the cmake script detecting if we have HMAC_CTX_new fails, because it runs against our system libssl and librypto... for now, patch the config.h file # otherwise we get: lws-genhash.h:85:18: error: field 'ctx' has incomplete type: HMAC_CTX ctx; # echo '#define LWS_HAVE_HMAC_CTX_new' >> lws_config.h } function do_compile_only { $FLXPMAKE CC="$CC" } function do_clean { # running the regular clean function will delete include/libwebsockets.h rm -fv ./CMakeCache.txt } function do_prepack { mkdir -p "${ROOTDIR}/usr/include/libwebsockets" mkdir -p "${ROOTDIR}/usr/lib" make install set_default_perm $ROOTDIR }