From 50c608041c29c99b7cdc9e2524c64106d0f0b67f Mon Sep 17 00:00:00 2001 From: Simeon Huang Date: Fri, 14 May 2021 15:31:17 +0100 Subject: [PATCH] add qt5 qtsensors module --- x11-packages/qt5-qtsensors/build.sh | 32 +++++++++++++++++++++++ x11-packages/qt5-qtsensors/no_librt.patch | 31 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 x11-packages/qt5-qtsensors/build.sh create mode 100644 x11-packages/qt5-qtsensors/no_librt.patch diff --git a/x11-packages/qt5-qtsensors/build.sh b/x11-packages/qt5-qtsensors/build.sh new file mode 100644 index 000000000..27897fb81 --- /dev/null +++ b/x11-packages/qt5-qtsensors/build.sh @@ -0,0 +1,32 @@ +TERMUX_PKG_HOMEPAGE=https://www.qt.io/ +TERMUX_PKG_DESCRIPTION="Qt 5 Sensors Library" +TERMUX_PKG_LICENSE="LGPL-3.0" +TERMUX_PKG_MAINTAINER="Simeon Huang " +TERMUX_PKG_VERSION=5.12.10 +TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/submodules/${TERMUX_PKG_NAME#qt5-}-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=b508dc30eef7fe4171f5426e7a234a47e54457bce3910722937c1eb6a505c081 +TERMUX_PKG_DEPENDS="qt5-qtbase, qt5-qtdeclarative" +TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_NO_STATICSPLIT=true + +termux_step_configure () { + "${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \ + -spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross" +} + +termux_step_post_make_install() { + ####################################################### + ## + ## Fixes & cleanup. + ## + ####################################################### + + ## Drop QMAKE_PRL_BUILD_DIR because reference the build dir. + find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Sensors*.prl" \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \; + + ## Remove *.la files. + find "${TERMUX_PREFIX}/lib" -iname \*.la -delete +} + diff --git a/x11-packages/qt5-qtsensors/no_librt.patch b/x11-packages/qt5-qtsensors/no_librt.patch new file mode 100644 index 000000000..519758326 --- /dev/null +++ b/x11-packages/qt5-qtsensors/no_librt.patch @@ -0,0 +1,31 @@ +--- src/src/plugins/sensors/dummy/dummy.pro 2020-10-15 06:53:19.000000000 +0000 ++++ src.mod/src/plugins/sensors/dummy/dummy.pro 2021-05-14 14:22:51.194482639 +0000 +@@ -12,8 +12,6 @@ + + OTHER_FILES = plugin.json + +-unix:!darwin:!qnx:!android:!openbsd: LIBS += -lrt +- + PLUGIN_TYPE = sensors + PLUGIN_CLASS_NAME = dummySensorPlugin + load(qt_plugin) +--- src/src/plugins/sensors/linux/linux.pro 2020-10-15 06:53:19.000000000 +0000 ++++ src.mod/src/plugins/sensors/linux/linux.pro 2021-05-14 14:22:09.604788205 +0000 +@@ -3,7 +3,6 @@ + + OTHER_FILES = plugin.json + +-!android:LIBS += -lrt + HEADERS += linuxsysaccelerometer.h + SOURCES += linuxsysaccelerometer.cpp \ + main.cpp +--- src/src/plugins/sensors/iio-sensor-proxy/iio-sensor-proxy.pro 2020-10-15 06:53:19.000000000 +0000 ++++ src.mod/src/plugins/sensors/iio-sensor-proxy/iio-sensor-proxy.pro 2021-05-14 14:28:09.397847029 +0000 +@@ -5,7 +5,6 @@ + PLUGIN_CLASS_NAME = IIOSensorProxySensorPlugin + load(qt_plugin) + +-!android:LIBS += -lrt + HEADERS += iiosensorproxysensorbase.h \ + iiosensorproxylightsensor.h \ + iiosensorproxyorientationsensor.h \