chore(linter compliance): qt related packages

[no ci]
This commit is contained in:
TomIO 2024-04-23 00:20:34 +02:00 committed by TomIO
parent 2970a00200
commit c78ebc083c
15 changed files with 586 additions and 586 deletions

View File

@ -15,32 +15,32 @@ TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_configure () {
# -r to force Makefile generations for all subdirs at this step so process_stub can be patched
# Disable QML Designer plugin which requires OpenGL
# Disable clang refactoring plugin which has odd linking issues at the moment
export QTC_DO_NOT_BUILD_QMLDESIGNER=1
export QTC_DISABLE_CLANG_REFACTORING=1
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" -r \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
# -r to force Makefile generations for all subdirs at this step so process_stub can be patched
# Disable QML Designer plugin which requires OpenGL
# Disable clang refactoring plugin which has odd linking issues at the moment
export QTC_DO_NOT_BUILD_QMLDESIGNER=1
export QTC_DISABLE_CLANG_REFACTORING=1
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" -r \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_configure() {
# process_stub's Makefile has the incorrect LINK executable (it should've been QMAKE_CXX)
sed -i "s|^LINK = clang|LINK = ${CXX}|" \
${TERMUX_PKG_SRCDIR}/src/libs/utils/Makefile.process_stub
# process_stub's Makefile has the incorrect LINK executable (it should've been QMAKE_CXX)
sed -i "s|^LINK = clang|LINK = ${CXX}|" \
${TERMUX_PKG_SRCDIR}/src/libs/utils/Makefile.process_stub
# clangbackend's Makefile lacks -lc++_shared to link against libc++ on x86_64
sed -i -e 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
# clangbackend's Makefile lacks -lc++_shared to link against libc++ on x86_64
sed -i -e 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
-e 's|-Wl,-rpath,'${TERMUX_COMMON_CACHEDIR//./\\.}'/android-r[0-9][^/]*/lib64||g' \
-e 's|-L'${TERMUX_COMMON_CACHEDIR//./\\.}'/android-r[0-9][^/]*/lib64||g' \
${TERMUX_PKG_SRCDIR}/src/tools/clangbackend/Makefile
${TERMUX_PKG_SRCDIR}/src/tools/clangbackend/Makefile
# make sure clangtools link against libc++_shared on x86_64
sed -i -e 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
# make sure clangtools link against libc++_shared on x86_64
sed -i -e 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
-e 's|-Wl,-rpath,'${TERMUX_COMMON_CACHEDIR//./\\.}'/android-r[0-9][^/]*/lib64||g' \
-e 's|-L'${TERMUX_COMMON_CACHEDIR//./\\.}'/android-r[0-9][^/]*/lib64||g' \
${TERMUX_PKG_SRCDIR}/src/plugins/clangtools/Makefile
${TERMUX_PKG_SRCDIR}/src/plugins/clangtools/Makefile
# required by make install, otherwise it installs to '/'
export INSTALL_ROOT="${TERMUX_PREFIX}"
# required by make install, otherwise it installs to '/'
export INSTALL_ROOT="${TERMUX_PREFIX}"
}

View File

@ -23,188 +23,188 @@ TERMUX_PKG_REPLACES="qt5-base"
TERMUX_PKG_BREAKS="qt5-x11extras, qt5-tools, qt5-declarative"
termux_step_pre_configure () {
if [ "${TERMUX_ARCH}" = "arm" ]; then
## -mfpu=neon causes build failure on ARM.
CFLAGS="${CFLAGS/-mfpu=neon/} -mfpu=vfp"
CXXFLAGS="${CXXFLAGS/-mfpu=neon/} -mfpu=vfp"
fi
if [ "${TERMUX_ARCH}" = "arm" ]; then
## -mfpu=neon causes build failure on ARM.
CFLAGS="${CFLAGS/-mfpu=neon/} -mfpu=vfp"
CXXFLAGS="${CXXFLAGS/-mfpu=neon/} -mfpu=vfp"
fi
# This is needed for some packages depends on qt5-qtbase, such
# as qt5-qtwebengine
# https://github.com/termux/termux-packages/issues/18810
export LDFLAGS+=" -Wl,--undefined-version"
# This is needed for some packages depends on qt5-qtbase, such
# as qt5-qtwebengine
# https://github.com/termux/termux-packages/issues/18810
export LDFLAGS+=" -Wl,--undefined-version"
## Create qmake.conf suitable for cross-compiling.
sed \
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
-e "s|@TERMUX_CC@|${TERMUX_HOST_PLATFORM}-clang|" \
-e "s|@TERMUX_CXX@|${TERMUX_HOST_PLATFORM}-clang++|" \
-e "s|@TERMUX_AR@|llvm-ar|" \
-e "s|@TERMUX_NM@|llvm-nm|" \
-e "s|@TERMUX_OBJCOPY@|llvm-objcopy|" \
-e "s|@TERMUX_PKGCONFIG@|${TERMUX_HOST_PLATFORM}-pkg-config|" \
-e "s|@TERMUX_STRIP@|llvm-strip|" \
-e "s|@TERMUX_CFLAGS@|${CPPFLAGS} ${CFLAGS}|" \
-e "s|@TERMUX_CXXFLAGS@|${CPPFLAGS} ${CXXFLAGS}|" \
-e "s|@TERMUX_LDFLAGS@|${LDFLAGS}|" \
"${TERMUX_PKG_BUILDER_DIR}/qmake.conf" > "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross/qmake.conf"
## Create qmake.conf suitable for cross-compiling.
sed \
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
-e "s|@TERMUX_CC@|${TERMUX_HOST_PLATFORM}-clang|" \
-e "s|@TERMUX_CXX@|${TERMUX_HOST_PLATFORM}-clang++|" \
-e "s|@TERMUX_AR@|llvm-ar|" \
-e "s|@TERMUX_NM@|llvm-nm|" \
-e "s|@TERMUX_OBJCOPY@|llvm-objcopy|" \
-e "s|@TERMUX_PKGCONFIG@|${TERMUX_HOST_PLATFORM}-pkg-config|" \
-e "s|@TERMUX_STRIP@|llvm-strip|" \
-e "s|@TERMUX_CFLAGS@|${CPPFLAGS} ${CFLAGS}|" \
-e "s|@TERMUX_CXXFLAGS@|${CPPFLAGS} ${CXXFLAGS}|" \
-e "s|@TERMUX_LDFLAGS@|${LDFLAGS}|" \
"${TERMUX_PKG_BUILDER_DIR}/qmake.conf" > "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross/qmake.conf"
}
termux_step_configure () {
unset CC CXX LD CFLAGS LDFLAGS PKG_CONFIG_PATH
unset CC CXX LD CFLAGS LDFLAGS PKG_CONFIG_PATH
"${TERMUX_PKG_SRCDIR}"/configure -v \
-opensource \
-confirm-license \
-release \
-optimized-tools \
-xplatform termux-cross \
-shared \
-no-rpath \
-no-use-gold-linker \
-prefix "${TERMUX_PREFIX}" \
-docdir "${TERMUX_PREFIX}/share/doc/qt" \
-archdatadir "${TERMUX_PREFIX}/lib/qt" \
-datadir "${TERMUX_PREFIX}/share/qt" \
-plugindir "${TERMUX_PREFIX}/libexec/qt" \
-hostbindir "${TERMUX_PREFIX}/opt/qt/cross/bin" \
-hostlibdir "${TERMUX_PREFIX}/opt/qt/cross/lib" \
-I "${TERMUX_PREFIX}/include" \
-I "${TERMUX_PREFIX}/include/glib-2.0" \
-I "${TERMUX_PREFIX}/lib/glib-2.0/include" \
-I "${TERMUX_PREFIX}/include/gio-unix-2.0" \
-I "${TERMUX_PREFIX}/include/cairo" \
-I "${TERMUX_PREFIX}/include/pango-1.0" \
-I "${TERMUX_PREFIX}/include/fribidi" \
-I "${TERMUX_PREFIX}/include/harfbuzz" \
-I "${TERMUX_PREFIX}/include/atk-1.0" \
-I "${TERMUX_PREFIX}/include/pixman-1" \
-I "${TERMUX_PREFIX}/include/uuid" \
-I "${TERMUX_PREFIX}/include/libxml2" \
-I "${TERMUX_PREFIX}/include/freetype2" \
-I "${TERMUX_PREFIX}/include/gdk-pixbuf-2.0" \
-I "${TERMUX_PREFIX}/include/gtk-3.0" \
-L "${TERMUX_PREFIX}/lib" \
-nomake examples \
-no-pch \
-no-accessibility \
-glib \
-gtk \
-icu \
-system-doubleconversion \
-system-pcre \
-system-zlib \
-system-freetype \
-ssl \
-openssl-linked \
-no-system-proxies \
-no-cups \
-system-harfbuzz \
-no-opengl \
-no-vulkan \
-qpa xcb \
-no-eglfs \
-no-gbm \
-no-kms \
-no-linuxfb \
-no-libudev \
-no-evdev \
-no-libinput \
-no-mtdev \
-no-tslib \
-xcb \
-xcb-xlib \
-gif \
-system-libpng \
-system-libjpeg \
-system-sqlite \
-sql-sqlite \
-posix-ipc
"${TERMUX_PKG_SRCDIR}"/configure -v \
-opensource \
-confirm-license \
-release \
-optimized-tools \
-xplatform termux-cross \
-shared \
-no-rpath \
-no-use-gold-linker \
-prefix "${TERMUX_PREFIX}" \
-docdir "${TERMUX_PREFIX}/share/doc/qt" \
-archdatadir "${TERMUX_PREFIX}/lib/qt" \
-datadir "${TERMUX_PREFIX}/share/qt" \
-plugindir "${TERMUX_PREFIX}/libexec/qt" \
-hostbindir "${TERMUX_PREFIX}/opt/qt/cross/bin" \
-hostlibdir "${TERMUX_PREFIX}/opt/qt/cross/lib" \
-I "${TERMUX_PREFIX}/include" \
-I "${TERMUX_PREFIX}/include/glib-2.0" \
-I "${TERMUX_PREFIX}/lib/glib-2.0/include" \
-I "${TERMUX_PREFIX}/include/gio-unix-2.0" \
-I "${TERMUX_PREFIX}/include/cairo" \
-I "${TERMUX_PREFIX}/include/pango-1.0" \
-I "${TERMUX_PREFIX}/include/fribidi" \
-I "${TERMUX_PREFIX}/include/harfbuzz" \
-I "${TERMUX_PREFIX}/include/atk-1.0" \
-I "${TERMUX_PREFIX}/include/pixman-1" \
-I "${TERMUX_PREFIX}/include/uuid" \
-I "${TERMUX_PREFIX}/include/libxml2" \
-I "${TERMUX_PREFIX}/include/freetype2" \
-I "${TERMUX_PREFIX}/include/gdk-pixbuf-2.0" \
-I "${TERMUX_PREFIX}/include/gtk-3.0" \
-L "${TERMUX_PREFIX}/lib" \
-nomake examples \
-no-pch \
-no-accessibility \
-glib \
-gtk \
-icu \
-system-doubleconversion \
-system-pcre \
-system-zlib \
-system-freetype \
-ssl \
-openssl-linked \
-no-system-proxies \
-no-cups \
-system-harfbuzz \
-no-opengl \
-no-vulkan \
-qpa xcb \
-no-eglfs \
-no-gbm \
-no-kms \
-no-linuxfb \
-no-libudev \
-no-evdev \
-no-libinput \
-no-mtdev \
-no-tslib \
-xcb \
-xcb-xlib \
-gif \
-system-libpng \
-system-libjpeg \
-system-sqlite \
-sql-sqlite \
-posix-ipc
}
termux_step_post_make_install() {
#######################################################
##
## Compiling necessary libraries for target.
##
#######################################################
cd "${TERMUX_PKG_SRCDIR}/src/tools/bootstrap" && {
make clean
#######################################################
##
## Compiling necessary libraries for target.
##
#######################################################
cd "${TERMUX_PKG_SRCDIR}/src/tools/bootstrap" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross" \
DEFINES+="QT_POSIX_IPC"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross" \
DEFINES+="QT_POSIX_IPC"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../../lib/libQt5Bootstrap.a "${TERMUX_PREFIX}/lib/libQt5Bootstrap.a"
install -Dm644 ../../../lib/libQt5Bootstrap.prl "${TERMUX_PREFIX}/lib/libQt5Bootstrap.prl"
}
cd "${TERMUX_PKG_SRCDIR}/src/tools/bootstrap-dbus" && {
# create the dbus bootstrap archieve but we don't need to install this
make clean
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../../lib/libQt5Bootstrap.a "${TERMUX_PREFIX}/lib/libQt5Bootstrap.a"
install -Dm644 ../../../lib/libQt5Bootstrap.prl "${TERMUX_PREFIX}/lib/libQt5Bootstrap.prl"
}
cd "${TERMUX_PKG_SRCDIR}/src/tools/bootstrap-dbus" && {
# create the dbus bootstrap archieve but we don't need to install this
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
}
make -j "${TERMUX_MAKE_PROCESSES}"
}
#######################################################
##
## Compiling necessary programs for target.
##
#######################################################
## Note: qmake can be built only on host so it is omitted here.
for i in moc qlalr qvkgen rcc uic qdbuscpp2xml qdbusxml2cpp; do
cd "${TERMUX_PKG_SRCDIR}/src/tools/${i}" && {
make clean
#######################################################
##
## Compiling necessary programs for target.
##
#######################################################
## Note: qmake can be built only on host so it is omitted here.
for i in moc qlalr qvkgen rcc uic qdbuscpp2xml qdbusxml2cpp; do
cd "${TERMUX_PKG_SRCDIR}/src/tools/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/mkspecs/termux-cross"
## Fix build failure on at least 'i686'.
sed \
-i 's@$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)@$(LINK) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(LFLAGS) -lz@g' \
Makefile
## Fix build failure on at least 'i686'.
sed \
-i 's@$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)@$(LINK) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(LFLAGS) -lz@g' \
Makefile
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
unset i
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
unset i
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
# Limit the scope, otherwise it'll touch other Qt files in a dirty host env
for i in Bootstrap Concurrent Core DBus DeviceDiscoverySupport EdidSupport EventDispatcherSupport FbSupport FontDatabaseSupport Gui InputSupport Network PrintSupport ServiceSupport Sql Test ThemeSupport Widget XcbQpa XkbCommonSupport Xml Zlib; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${i}.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset i
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.prl"
# Limit the scope, otherwise it'll touch other Qt files in a dirty host env
for i in Bootstrap Concurrent Core DBus DeviceDiscoverySupport EdidSupport EventDispatcherSupport FbSupport FontDatabaseSupport Gui InputSupport Network PrintSupport ServiceSupport Sql Test ThemeSupport Widget XcbQpa XkbCommonSupport Xml Zlib; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${i}.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset i
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.prl"
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
## Create qmake.conf suitable for compiling host tools (for other modules)
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/qplatformdefs.host.h" \
"${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host/qplatformdefs.h"
sed \
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
"${TERMUX_PKG_BUILDER_DIR}/qmake.host.conf" > "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host/qmake.conf"
## Create qmake.conf suitable for compiling host tools (for other modules)
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/qplatformdefs.host.h" \
"${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host/qplatformdefs.h"
sed \
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
"${TERMUX_PKG_BUILDER_DIR}/qmake.host.conf" > "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host/qmake.conf"
}
termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -19,145 +19,145 @@ opt/qt/cross/lib/libQt5Bootstrap.*
TERMUX_PKG_REPLACES="qt5-declarative"
termux_step_pre_configure () {
pushd "${TERMUX_PKG_SRCDIR}/src/qmltyperegistrar"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
popd
pushd "${TERMUX_PKG_SRCDIR}/src/qmltyperegistrar"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
popd
#######################################################
##
## Hijack the bootstrap library for cross building
##
#######################################################
for i in a prl; do
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5Bootstrap.${i}" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
done
unset i
#######################################################
##
## Hijack the bootstrap library for cross building
##
#######################################################
for i in a prl; do
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5Bootstrap.${i}" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
done
unset i
}
termux_step_configure () {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install () {
#######################################################
##
## Compiling necessary binaries for target.
##
#######################################################
#######################################################
##
## Compiling necessary binaries for target.
##
#######################################################
## Qt Declarative utilities.
for i in qmlcachegen qmlformat qmlimportscanner qmllint qmlmin; do
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
## Qt Declarative utilities.
for i in qmlcachegen qmlformat qmlimportscanner qmllint qmlmin; do
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
for i in qmltyperegistrar; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
make clean
for i in qmltyperegistrar; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
# Install the QmlDevTools for target (needed by some packages such as qttools)
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.a"
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
sed -i 's|/opt/qt/cross/|/|g' "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
# Install the QmlDevTools for target (needed by some packages such as qttools)
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.a"
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
sed -i 's|/opt/qt/cross/|/|g' "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
#######################################################
##
## Restore the bootstrap library
##
#######################################################
for i in a prl; do
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
done
unset i
#######################################################
##
## Restore the bootstrap library
##
#######################################################
for i in a prl; do
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
done
unset i
#######################################################
##
## Compiling necessary binaries for the host
##
#######################################################
#######################################################
##
## Compiling necessary binaries for the host
##
#######################################################
## libQt5QmlDevTools.a (qt5-declarative)
cd "${TERMUX_PKG_SRCDIR}/src/qmldevtools" && {
make clean
## libQt5QmlDevTools.a (qt5-declarative)
cd "${TERMUX_PKG_SRCDIR}/src/qmldevtools" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.a"
install -Dm644 ../../lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
}
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.a"
install -Dm644 ../../lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
}
## Qt Declarative utilities.
for i in qmlcachegen qmlformat qmlimportscanner qmllint qmlmin; do
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
make clean
## Qt Declarative utilities.
for i in qmlcachegen qmlformat qmlimportscanner qmllint qmlmin; do
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
for i in qmltyperegistrar; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
make clean
for i in qmltyperegistrar; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
# Limit the scope, otherwise it'll touch qtbase files
for pref in Qml Quick Packet; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${pref}*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset pref
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
# Limit the scope, otherwise it'll touch qtbase files
for pref in Qml Quick Packet; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${pref}*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset pref
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
}
termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -11,24 +11,24 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Location*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Position*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Location*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Position*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -12,28 +12,28 @@ 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" \
GST_VERSION=1.0 \
INCLUDEPATH+="${TERMUX_PREFIX}/include/gstreamer-1.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/include/glib-2.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/lib/glib-2.0/include"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross" \
GST_VERSION=1.0 \
INCLUDEPATH+="${TERMUX_PREFIX}/include/gstreamer-1.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/include/glib-2.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/lib/glib-2.0/include"
}
termux_step_make_install() {
make install
make install
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Multimedia*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Multimedia*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,18 +11,18 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,24 +11,24 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5QuickControls2*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5QuickTemplates2*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5QuickControls2*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5QuickTemplates2*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,22 +11,22 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## 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' "{}" \;
## 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
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,24 +11,24 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_make_install() {
make install
make install
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Svg*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5Svg*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -20,213 +20,213 @@ opt/qt/cross/lib/libQt5QmlDevTools.*
TERMUX_PKG_REPLACES="qt5-tools"
termux_step_pre_configure () {
#######################################################
##
## Hijack the bootstrap library
##
#######################################################
for i in Bootstrap QmlDevTools; do
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5${i}.a" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a"
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5${i}.prl" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl"
done
unset i
#######################################################
##
## Hijack the bootstrap library
##
#######################################################
for i in Bootstrap QmlDevTools; do
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5${i}.a" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a"
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl.bak"
ln -s -f "${TERMUX_PREFIX}/lib/libQt5${i}.prl" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl"
done
unset i
}
termux_step_configure () {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Compiling necessary programs for target.
##
#######################################################
#######################################################
##
## Compiling necessary programs for target.
##
#######################################################
## Some top-level tools
# FIXME: qdoc cannot be built at the moment because qmake couldn't find libclang when built with -I
for i in makeqpf pixeltool qev qtattributionsscanner; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
## Some top-level tools
# FIXME: qdoc cannot be built at the moment because qmake couldn't find libclang when built with -I
for i in makeqpf pixeltool qev qtattributionsscanner; do
cd "${TERMUX_PKG_SRCDIR}/src/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
unset i
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
unset i
# QDbusViewer desktop file (the binary would be installed already)
install -D -m644 \
"${TERMUX_PKG_SRCDIR}/src/qdbus/qdbusviewer/images/qdbusviewer.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/qdbusviewer.png"
install -D -m644 \
"${TERMUX_PKG_SRCDIR}/src/qdbus/qdbusviewer/images/qdbusviewer-128.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/qdbusviewer.png"
install -D -m644 \
"${TERMUX_PKG_BUILDER_DIR}/qdbusviewer.desktop" \
"${TERMUX_PREFIX}/share/applications/qdbusviewer.desktop"
# QDbusViewer desktop file (the binary would be installed already)
install -D -m644 \
"${TERMUX_PKG_SRCDIR}/src/qdbus/qdbusviewer/images/qdbusviewer.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/qdbusviewer.png"
install -D -m644 \
"${TERMUX_PKG_SRCDIR}/src/qdbus/qdbusviewer/images/qdbusviewer-128.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/qdbusviewer.png"
install -D -m644 \
"${TERMUX_PKG_BUILDER_DIR}/qdbusviewer.desktop" \
"${TERMUX_PREFIX}/share/applications/qdbusviewer.desktop"
# qdistancefieldgenerator (it has a different directory name but supports make install)
cd "${TERMUX_PKG_SRCDIR}/src/distancefieldgenerator" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
# qdistancefieldgenerator (it has a different directory name but supports make install)
cd "${TERMUX_PKG_SRCDIR}/src/distancefieldgenerator" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
#######################################################
##
## Qt Linguist
##
#######################################################
#######################################################
##
## Qt Linguist
##
#######################################################
# Install the linguist utilities to the correct path
for i in lconvert lprodump lrelease{,-pro} lupdate{,-pro}; do
install -Dm700 "${TERMUX_PKG_SRCDIR}/bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
done
# Install the linguist utilities to the correct path
for i in lconvert lprodump lrelease{,-pro} lupdate{,-pro}; do
install -Dm700 "${TERMUX_PKG_SRCDIR}/bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
done
# Build and install linguist program
cd "${TERMUX_PKG_SRCDIR}/src/linguist/linguist" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
# Build and install linguist program
cd "${TERMUX_PKG_SRCDIR}/src/linguist/linguist" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
# Install the linguist desktop file
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/linguist/linguist/images/icons/linguist-32-32.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/linguist.png"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/linguist/linguist/images/icons/linguist-128-32.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/linguist.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/linguist.desktop" \
"${TERMUX_PREFIX}/share/applications/linguist.desktop"
# Install the linguist desktop file
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/linguist/linguist/images/icons/linguist-32-32.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/linguist.png"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/linguist/linguist/images/icons/linguist-128-32.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/linguist.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/linguist.desktop" \
"${TERMUX_PREFIX}/share/applications/linguist.desktop"
#######################################################
##
## Qt Assistant
##
#######################################################
#######################################################
##
## Qt Assistant
##
#######################################################
for i in qcollectiongenerator qhelpgenerator assistant; do
cd "${TERMUX_PKG_SRCDIR}/src/assistant/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
for i in qcollectiongenerator qhelpgenerator assistant; do
cd "${TERMUX_PKG_SRCDIR}/src/assistant/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/assistant/assistant/images/assistant.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/assistant.png"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/assistant/assistant/images/assistant-128.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/assistant.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/assistant.desktop" \
"${TERMUX_PREFIX}/share/applications/assistant.desktop"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/assistant/assistant/images/assistant.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/32x32/apps/assistant.png"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/assistant/assistant/images/assistant-128.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/assistant.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/assistant.desktop" \
"${TERMUX_PREFIX}/share/applications/assistant.desktop"
#######################################################
##
## Qt Designer
##
#######################################################
#######################################################
##
## Qt Designer
##
#######################################################
for i in lib components designer plugins; do
cd "${TERMUX_PKG_SRCDIR}/src/designer/src/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
for i in lib components designer plugins; do
cd "${TERMUX_PKG_SRCDIR}/src/designer/src/${i}" && {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
done
make -j "${TERMUX_MAKE_PROCESSES}"
make install
}
done
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/designer/src/designer/images/designer.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/designer.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/designer.desktop" \
"${TERMUX_PREFIX}/share/applications/designer.desktop"
install -Dm644 \
"${TERMUX_PKG_SRCDIR}/src/designer/src/designer/images/designer.png" \
"${TERMUX_PREFIX}/share/icons/hicolor/128x128/apps/designer.png"
install -Dm644 \
"${TERMUX_PKG_BUILDER_DIR}/designer.desktop" \
"${TERMUX_PREFIX}/share/applications/designer.desktop"
#######################################################
##
## Restore the bootstrap library
##
#######################################################
for i in Bootstrap QmlDevTools; do
mv "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a"
mv "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl"
done
#######################################################
##
## Restore the bootstrap library
##
#######################################################
for i in Bootstrap QmlDevTools; do
mv "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.a"
mv "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl.bak" \
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5${i}.prl"
done
#######################################################
##
## Compiling necessary programs for host
##
#######################################################
#######################################################
##
## Compiling necessary programs for host
##
#######################################################
# These programs were built and linked for the target
# We need to build them again but for the host
cd "${TERMUX_PKG_SRCDIR}/src/qtattributionsscanner" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 \
"../../bin/qtattributionsscanner" \
"${TERMUX_PREFIX}/opt/qt/cross/bin/qtattributionsscanner"
}
# These programs were built and linked for the target
# We need to build them again but for the host
cd "${TERMUX_PKG_SRCDIR}/src/qtattributionsscanner" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 \
"../../bin/qtattributionsscanner" \
"${TERMUX_PREFIX}/opt/qt/cross/bin/qtattributionsscanner"
}
for i in lconvert lprodump lrelease{,-pro} lupdate{,-pro}; do
cd "${TERMUX_PKG_SRCDIR}/src/linguist/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
for i in lconvert lprodump lrelease{,-pro} lupdate{,-pro}; do
cd "${TERMUX_PKG_SRCDIR}/src/linguist/${i}" && {
make clean
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
}
done
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
# Limit the scope, otherwise it'll touch qtbase files
for pref in Designer Help UiTools UiPlugin; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${pref}*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset pref
# Limit the scope, otherwise it'll touch qtbase files
for pref in Designer Help UiTools UiPlugin; do
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${pref}*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
done
unset pref
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
}
termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -11,22 +11,22 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5WebChannel*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5WebChannel*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,21 +11,21 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/lib/libQt5WebSockets.prl"
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/lib/libQt5WebSockets.prl"
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -14,24 +14,24 @@ TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_REPLACES="qt5-x11extras"
termux_step_configure () {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_make_install() {
make install
make install
#######################################################
##
## Fixes & cleanup.
##
#######################################################
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5X11*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5X11*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -11,16 +11,16 @@ 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_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_make_install() {
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5XmlPatterns*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5XmlPatterns*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}

View File

@ -12,7 +12,7 @@ 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" \
PREFIX="${TERMUX_PREFIX}"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross" \
PREFIX="${TERMUX_PREFIX}"
}