diff options
Diffstat (limited to 'testing/source/vtown/deps')
22 files changed, 1158 insertions, 0 deletions
diff --git a/testing/source/vtown/deps/SDL2/SDL2-2.0.9-khrplatform.patch b/testing/source/vtown/deps/SDL2/SDL2-2.0.9-khrplatform.patch new file mode 100644 index 00000000..b6c39278 --- /dev/null +++ b/testing/source/vtown/deps/SDL2/SDL2-2.0.9-khrplatform.patch @@ -0,0 +1,15 @@ +diff -up SDL2-2.0.9/include/SDL_opengl_glext.h.khrplatform SDL2-2.0.9/include/SDL_opengl_glext.h +--- SDL2-2.0.9/include/SDL_opengl_glext.h.khrplatform 2019-02-15 20:22:39.173773779 -0500 ++++ SDL2-2.0.9/include/SDL_opengl_glext.h 2019-02-15 20:22:58.176399330 -0500 +@@ -469,8 +469,9 @@ GLAPI void APIENTRY glBlendEquation (GLe + typedef long GLsizeiptr; + typedef long GLintptr; + #else +-typedef ptrdiff_t GLsizeiptr; +-typedef ptrdiff_t GLintptr; ++#include <KHR/khrplatform.h> ++typedef khronos_intptr_t GLintptr; ++typedef khronos_ssize_t GLsizeiptr; + #endif + #define GL_BUFFER_SIZE 0x8764 + #define GL_BUFFER_USAGE 0x8765 diff --git a/testing/source/vtown/deps/SDL2/SDL2.SlackBuild b/testing/source/vtown/deps/SDL2/SDL2.SlackBuild new file mode 100755 index 00000000..4f6c8ea3 --- /dev/null +++ b/testing/source/vtown/deps/SDL2/SDL2.SlackBuild @@ -0,0 +1,154 @@ +#!/bin/bash + +# Copyright 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=SDL2 +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2_vtown_1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# Fix video-opengles1 build failure: +zcat $CWD/SDL2-2.0.9-khrplatform.patch.gz | patch -p1 --verbose || exit 1 + +# Configure: +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux || exit 1 + +# Build and install: +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# Don't package the static libraries: +( cd $PKG/usr/lib${LIBDIRSUFFIX} + for file in *.so ; do + rm -f $(basename $file .so).a + done +) + +# Don't package .la files: +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la + +# Strip binaries: +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a \ + AUTHORS* BUGS* COPYING* CHANGES* CREDITS* NEWS* README* TODO* WhatsNew* \ + $PKG/usr/doc/${PKGNAM}-$VERSION + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + diff --git a/testing/source/vtown/deps/SDL2/slack-desc b/testing/source/vtown/deps/SDL2/slack-desc new file mode 100644 index 00000000..149d83fe --- /dev/null +++ b/testing/source/vtown/deps/SDL2/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +SDL2: SDL2 (Simple DirectMedia Layer Version 2) +SDL2: +SDL2: Simple DirectMedia Layer is a cross-platform development library +SDL2: designed to provide low-level access to audio, keyboard, mouse, +SDL2: joystick, and graphics hardware ia via OpenGL. It is used by +SDL2: video playback software, emulators, and games. +SDL2: +SDL2: Homepage: http://www.libsdl.org +SDL2: +SDL2: +SDL2: diff --git a/testing/source/vtown/deps/qt5/doinst.sh b/testing/source/vtown/deps/qt5/doinst.sh new file mode 100644 index 00000000..3e5691a0 --- /dev/null +++ b/testing/source/vtown/deps/qt5/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/testing/source/vtown/deps/qt5/patches/qt5.mysql.h.diff b/testing/source/vtown/deps/qt5/patches/qt5.mysql.h.diff new file mode 100644 index 00000000..f1cf11b9 --- /dev/null +++ b/testing/source/vtown/deps/qt5/patches/qt5.mysql.h.diff @@ -0,0 +1,11 @@ +--- qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.orig 2017-05-26 14:43:31.000000000 +0200 ++++ qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-06-17 22:11:34.211899826 +0200 +@@ -57,7 +57,7 @@ + #include <QtCore/qt_windows.h> + #endif + +-#include <mysql.h> ++#include <mysql/mysql.h> + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_MYSQL diff --git a/testing/source/vtown/deps/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch b/testing/source/vtown/deps/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch new file mode 100644 index 00000000..ff00e63b --- /dev/null +++ b/testing/source/vtown/deps/qt5/patches/qt5.qtbase_cmake_isystem_includes.patch @@ -0,0 +1,14 @@ +diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in +--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500 ++++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500 +@@ -66,8 +66,10 @@ unset(_GL_INCDIRS) + # Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is + # optional. + ++if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include") + list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) + set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) ++endif() + + unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE) + diff --git a/testing/source/vtown/deps/qt5/profile.d/qt5.csh b/testing/source/vtown/deps/qt5/profile.d/qt5.csh new file mode 100644 index 00000000..ec1ecd9b --- /dev/null +++ b/testing/source/vtown/deps/qt5/profile.d/qt5.csh @@ -0,0 +1,17 @@ +#!/bin/csh +# Environment path variables for the Qt package: +if ( ! $?QT5DIR ) then + # It's best to use the generic directory to avoid + # compiling in a version-containing path: + if ( -d /usr/lib@LIBDIRSUFFIX@/qt5 ) then + setenv QT5DIR /usr/lib@LIBDIRSUFFIX@/qt5 + else + # Find the newest Qt directory and set $QT5DIR to that: + foreach qtd ( /usr/lib@LIBDIRSUFFIX@/qt5-* ) + if ( -d $qtd ) then + setenv QT5DIR $qtd + endif + end + endif +endif +set path = ( $path $QT5DIR/bin ) diff --git a/testing/source/vtown/deps/qt5/profile.d/qt5.sh b/testing/source/vtown/deps/qt5/profile.d/qt5.sh new file mode 100644 index 00000000..8ee075e1 --- /dev/null +++ b/testing/source/vtown/deps/qt5/profile.d/qt5.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Environment variables for the Qt package. +# +# It's best to use the generic directory to avoid +# compiling in a version-containing path: +if [ -d /usr/lib@LIBDIRSUFFIX@/qt5 ]; then + QT5DIR=/usr/lib@LIBDIRSUFFIX@/qt5 +else + # Find the newest Qt directory and set $QT5DIR to that: + for qtd in /usr/lib@LIBDIRSUFFIX@/qt5-* ; do + if [ -d $qtd ]; then + QT5DIR=$qtd + fi + done +fi +PATH="$PATH:$QT5DIR/bin" +export QT5DIR diff --git a/testing/source/vtown/deps/qt5/qt5.SlackBuild b/testing/source/vtown/deps/qt5/qt5.SlackBuild new file mode 100755 index 00000000..de522772 --- /dev/null +++ b/testing/source/vtown/deps/qt5/qt5.SlackBuild @@ -0,0 +1,341 @@ +#!/bin/sh + +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Merged some ideas from Alex Sarmardzic's script for qt4 at SlackBuilds.org +# ^^ Modified by Robby Workman <rworkman@slackware.com> for QT4 & KDE4 +# +# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Eric Hameleers, Eindhoven, NL +# Modifications for qt 5.2.0 2013 by Michael James, AU +# Modifications for qt 5.x by Eric Hameleers, Eindhoven, NL + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=qt5 +VERSION=$(ls qt-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev) +BUILD=${BUILD:-2_vtown_1} +PKGSRC=$(echo $VERSION | cut -d - -f 1) +PKGVER=$(echo $VERSION | tr - _) + +USE_CODECS=${USE_CODECS:-NO} +SYSTEM_FFMPEG=${SYSTEM_FFMPEG:-YES} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-${PKGVER}-${ARCH}-${BUILD}.txz" + exit 0 +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="" + SLKLDFLAGS="-L/usr/lib64" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + # To prevent "qatomic_armv6.h error: output number 2 not directly addressable" + # More permanent solution is to patch gcc: + # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731 + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +TMP=${TMP:-/tmp} +PKG=$TMP/package-${PKGNAM} + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf qt-everywhere-src-$VERSION +echo "Extracting qt-everywhere-src-$VERSION.tar.xz" +tar xf $CWD/qt-everywhere-src-$VERSION.tar.xz || exit 1 +cd qt-everywhere-src-$PKGSRC || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# Use -reduce-relocations only on i?86 and x86_64 architextures. +# https://bugreports.qt-project.org/browse/QTBUG-36129 +if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then + RELOCATIONS="-reduce-relocations" +else + RELOCATIONS="" +fi + +# Fix path to mysql header: +zcat $CWD/patches/qt5.mysql.h.diff.gz | patch -p1 --verbose || exit 1 + +# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui +# and for it breaks KWin compilation with: +# /usr/include/c++/9.1.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory +# See also https://bugzilla.redhat.com/1704474 +cd qtbase + zcat $CWD/patches/qt5.qtbase_cmake_isystem_includes.patch.gz | patch -p1 --verbose || exit 1 +cd - 1>/dev/null + +# If PulseAudio is not found, use the _alsa $TAG and disable it in the build: +if ! pkg-config --exists libpulse 2>/dev/null ; then + PULSEAUDIO_OPTION="-no-pulseaudio -no-webengine-pulseaudio" + TAG="_alsa" +else + unset PULSEAUDIO_OPTION + unset TAG +fi + +# Use our custom compiler and linker flags: +sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${SLKCFLAGS}|" \ + -i qtbase/mkspecs/common/gcc-base.conf || exit 1 +sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \ + -i qtbase/mkspecs/common/g++-unix.conf || exit 1 + +if [ ! "$USE_CODECS" = "NO" ]; then + CODEC_OPTION="-proprietary-codecs -webengine-proprietary-codecs" +else + unset CODEC_OPTION +fi + +if [ "$SYSTEM_FFMPEG" = "YES" ]; then + FFMPEG_OPTION="-webengine-ffmpeg" +else + unset FFMPEG_OPTION +fi + +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +export OPENSOURCE_CXXFLAGS="$SLKCFLAGS" +export QTDIR="${TMP}/qt-everywhere-src-${PKGSRC}" +export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PATH}" +export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins" +./configure -v \ + -confirm-license \ + -opensource \ + -prefix /usr \ + -libdir /usr/lib${LIBDIRSUFFIX} \ + -bindir /usr/lib${LIBDIRSUFFIX}/qt5/bin \ + -sysconfdir /etc/xdg \ + -headerdir /usr/include/qt5 \ + -datadir /usr/share/qt5 \ + -archdatadir /usr/lib${LIBDIRSUFFIX}/qt5 \ + -docdir /usr/doc/qt5-$PKGVER \ + -examplesdir /usr/doc/qt5-$PKGVER/examples \ + -system-libpng \ + -system-libjpeg \ + -system-sqlite \ + -system-zlib \ + -plugin-sql-mysql \ + -plugin-sql-sqlite \ + -accessibility \ + -alsa \ + -dbus \ + -glib \ + -icu \ + -opengl \ + -openssl-linked \ + -optimized-qmake \ + -qpa xcb \ + -qt-harfbuzz \ + -verbose \ + -xcb \ + -nomake examples \ + -nomake tests \ + -no-mimetype-database \ + -no-separate-debug-info \ + -no-strip \ + -no-use-gold-linker \ + ${CODEC_OPTION} \ + ${FFMPEG_OPTION} \ + ${PULSEAUDIO_OPTION} \ + ${RELOCATIONS} \ + -no-pch + # No-precompiled-headers is ccache-friendly. + +# Sometimes a failure happens when parallelizing make. Try again if make fails, +# but make a failure the second time around (single threaded) a fatal error: +make $NUMJOBS || make || exit 1 +make install INSTALL_ROOT=$PKG || exit 1 + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Remove rpaths: +for file in $(find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do + if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then + patchelf --remove-rpath $file + fi +done + +# Don't ship .la files: +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la + +# Fix internal linking for Qt5WebEngineCore.pc , +# thanks to Larry Hajali's SBo script: +sed -i \ + -e 's|-Wl,--start-group.* -Wl,--end-group||' \ + -e "s|-L${PWD}/qtwebengine/src/core/api/Release||" \ + $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebEngineCore.pc + +# Fix the path in prl files: +find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; + +# Fix the qmake path in pri file: +sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \ + $PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri + +# Install symlinks to the Qt5 binaries in the $PATH: +mkdir -p $PKG/usr/bin +for FILE in $PKG/usr/lib${LIBDIRSUFFIX}/qt5/bin/* ; do + ln -s ../lib${LIBDIRSUFFIX}/qt5/bin/$(basename $FILE) $PKG/usr/bin/$(basename $FILE)-qt5 +done + +# Set the QT5DIR variable in the environment: +mkdir -p $PKG/etc/profile.d +sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.sh \ + > $PKG/etc/profile.d/$PKGNAM.sh +sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.csh \ + > $PKG/etc/profile.d/$PKGNAM.csh +chmod 0755 $PKG/etc/profile.d/* + +# Add menu entries for all those hidden but great Qt applications: +# Qt5 logo: +mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps +convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt5-logo.png +# Assistant icons +install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-assistant.png +install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-assistant.png +# Designer icon +install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-designer.png +# QDbusViewer icons +install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-qdbusviewer.png +install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-qdbusviewer.png +# Linguist icons +for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do + size=$(echo $(basename ${icon}) | cut -d- -f2) + install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/qt5-linguist.png +done + +# And the .desktop files too: +mkdir -p $PKG/usr/share/applications +cat <<EOF > $PKG/usr/share/applications/qt5-designer.desktop +[Desktop Entry] +Name=Qt5 Designer +GenericName=Interface Designer +Comment=Design GUIs for Qt5 applications +Exec=designer-qt5 +Icon=qt5-designer +MimeType=application/x-designer; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF +cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop +[Desktop Entry] +Name=Qt5 Assistant +Comment=Shows Qt5 documentation and examples +Exec=assistant-qt5 +Icon=qt5-assistant +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development;Documentation; +EOF +cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop +[Desktop Entry] +Name=Qt5 Linguist +Comment=Add translations to Qt5 applications +Exec=linguist-qt5 +Icon=qt5-linguist +MimeType=text/vnd.trolltech.linguist;application/x-linguist; +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Qt;Development; +EOF +cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop +[Desktop Entry] +Name=Qt5 QDbusViewer +GenericName=Qt5 D-Bus Debugger +Comment=Debug D-Bus applications +Exec=qdbusviewer-qt5 +Icon=qt5-qdbusviewer +Terminal=false +Type=Application +Categories=Qt;Development;Debugger; +EOF + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/$PKGNAM-$PKGVER +cp -a \ + README qtbase/{header*,LGPL_EXCEPTION.txt,LICENSE*} \ + $PKG/usr/doc/$PKGNAM-$PKGVER +if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt5/doc/html ]; then + ( cd $PKG/usr/doc/$PKGNAM-$PKGVER + ln -sf /usr/lib${LIBDIRSUFFIX}/qt5/doc/html . + ) +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$PKGVER-$ARCH-${BUILD}${TAG}.txz diff --git a/testing/source/vtown/deps/qt5/qt5.url b/testing/source/vtown/deps/qt5/qt5.url new file mode 100644 index 00000000..7df396ed --- /dev/null +++ b/testing/source/vtown/deps/qt5/qt5.url @@ -0,0 +1 @@ +https://download.qt.io/official_releases/qt diff --git a/testing/source/vtown/deps/qt5/slack-desc b/testing/source/vtown/deps/qt5/slack-desc new file mode 100644 index 00000000..d9b24602 --- /dev/null +++ b/testing/source/vtown/deps/qt5/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +qt5: qt5 (a multi-platform C++ graphical user interface toolkit) +qt5: +qt5: Qt is a complete and well-developed object-oriented framework for +qt5: developing graphical user interface (GUI) applications using C++. +qt5: +qt5: Homepage: http://www.qt.io/ +qt5: +qt5: +qt5: +qt5: +qt5: diff --git a/testing/source/vtown/deps/upower/doinst.sh b/testing/source/vtown/deps/upower/doinst.sh new file mode 100644 index 00000000..46abf401 --- /dev/null +++ b/testing/source/vtown/deps/upower/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/UPower/UPower.conf.new + diff --git a/testing/source/vtown/deps/upower/patches/0002-linux-Fix-memory-leak-in-Bluez-backend.patch b/testing/source/vtown/deps/upower/patches/0002-linux-Fix-memory-leak-in-Bluez-backend.patch new file mode 100644 index 00000000..0a45dcf1 --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0002-linux-Fix-memory-leak-in-Bluez-backend.patch @@ -0,0 +1,51 @@ +From 8e6cb06ff68a283b9857d4d0e831d93c42521534 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Thu, 17 Oct 2019 16:36:58 +0200 +Subject: [PATCH 2/7] linux: Fix memory leak in Bluez backend + +g_dbus_proxy_get_cached_property() returns transfer full GVariants. +--- + src/linux/up-device-bluez.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/src/linux/up-device-bluez.c b/src/linux/up-device-bluez.c +index cd89529..5e595a9 100644 +--- a/src/linux/up-device-bluez.c ++++ b/src/linux/up-device-bluez.c +@@ -71,9 +71,10 @@ up_device_bluez_coldplug (UpDevice *device) + GDBusProxy *proxy; + GError *error = NULL; + UpDeviceKind kind; ++ guint16 appearance; + const char *uuid; + const char *model; +- guint16 appearance; ++ GVariant *v; + guchar percentage; + + /* Static device properties */ +@@ -93,10 +94,18 @@ up_device_bluez_coldplug (UpDevice *device) + return FALSE; + } + +- appearance = g_variant_get_uint16 (g_dbus_proxy_get_cached_property (proxy, "Appearance")); ++ v = g_dbus_proxy_get_cached_property (proxy, "Appearance"); ++ appearance = g_variant_get_uint16 (v); + kind = appearance_to_kind (appearance); +- uuid = g_variant_get_string (g_dbus_proxy_get_cached_property (proxy, "Address"), NULL); +- model = g_variant_get_string (g_dbus_proxy_get_cached_property (proxy, "Alias"), NULL); ++ g_variant_unref (v); ++ ++ v = g_dbus_proxy_get_cached_property (proxy, "Address"); ++ uuid = g_variant_get_string (v, NULL); ++ g_variant_unref (v); ++ ++ v = g_dbus_proxy_get_cached_property (proxy, "Alias"); ++ model = g_variant_get_string (v, NULL); ++ g_variant_unref (v); + + /* hardcode some values */ + g_object_set (device, +-- +2.24.1 + diff --git a/testing/source/vtown/deps/upower/patches/0003-linux-Fix-warning-when-bluez-Appearance-property-isn.patch b/testing/source/vtown/deps/upower/patches/0003-linux-Fix-warning-when-bluez-Appearance-property-isn.patch new file mode 100644 index 00000000..156631a7 --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0003-linux-Fix-warning-when-bluez-Appearance-property-isn.patch @@ -0,0 +1,49 @@ +From ed0dfe4427770776a081877f77f1263491fbe1b6 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Thu, 17 Oct 2019 16:43:15 +0200 +Subject: [PATCH 3/7] linux: Fix warning when bluez Appearance property isn't + set + +The Appearance property might not be available, and would cause +warnings like: +upowerd[17733]: g_variant_get_type: assertion 'value != NULL' failed +upowerd[17733]: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed +upowerd[17733]: g_variant_get_uint16: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_UINT16)' failed +--- + src/linux/up-device-bluez.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/src/linux/up-device-bluez.c b/src/linux/up-device-bluez.c +index 5e595a9..2074746 100644 +--- a/src/linux/up-device-bluez.c ++++ b/src/linux/up-device-bluez.c +@@ -71,7 +71,6 @@ up_device_bluez_coldplug (UpDevice *device) + GDBusProxy *proxy; + GError *error = NULL; + UpDeviceKind kind; +- guint16 appearance; + const char *uuid; + const char *model; + GVariant *v; +@@ -95,9 +94,15 @@ up_device_bluez_coldplug (UpDevice *device) + } + + v = g_dbus_proxy_get_cached_property (proxy, "Appearance"); +- appearance = g_variant_get_uint16 (v); +- kind = appearance_to_kind (appearance); +- g_variant_unref (v); ++ if (v) { ++ guint16 appearance; ++ ++ appearance = g_variant_get_uint16 (v); ++ kind = appearance_to_kind (appearance); ++ g_variant_unref (v); ++ } else { ++ kind = UP_DEVICE_KIND_UNKNOWN; ++ } + + v = g_dbus_proxy_get_cached_property (proxy, "Address"); + uuid = g_variant_get_string (v, NULL); +-- +2.24.1 + diff --git a/testing/source/vtown/deps/upower/patches/0006-lib-Add-Pen-device-type.patch b/testing/source/vtown/deps/upower/patches/0006-lib-Add-Pen-device-type.patch new file mode 100644 index 00000000..f05b108d --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0006-lib-Add-Pen-device-type.patch @@ -0,0 +1,89 @@ +From 72b85b8c1371f3396c293d9a2aa373b6a7551f63 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Thu, 24 Oct 2019 12:50:26 +0200 +Subject: [PATCH 6/7] lib: Add "Pen" device type + +So we can track the battery information for powered tablet pens, rather +than labelling them as tablets. +--- + libupower-glib/up-device.c | 6 ++++-- + libupower-glib/up-types.c | 4 ++++ + libupower-glib/up-types.h | 1 + + src/linux/integration-test | 3 ++- + 4 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c +index e21274d..01f752f 100644 +--- a/libupower-glib/up-device.c ++++ b/libupower-glib/up-device.c +@@ -313,7 +313,8 @@ up_device_to_text (UpDevice *device) + kind == UP_DEVICE_KIND_BATTERY || + kind == UP_DEVICE_KIND_MOUSE || + kind == UP_DEVICE_KIND_KEYBOARD || +- kind == UP_DEVICE_KIND_GAMING_INPUT) && ++ kind == UP_DEVICE_KIND_GAMING_INPUT || ++ kind == UP_DEVICE_KIND_PEN) && + !is_display) + g_string_append_printf (string, " rechargeable: %s\n", up_device_bool_to_string (up_exported_device_get_is_rechargeable (priv->proxy_device))); + if (kind == UP_DEVICE_KIND_BATTERY || +@@ -367,7 +368,8 @@ up_device_to_text (UpDevice *device) + kind == UP_DEVICE_KIND_COMPUTER || + kind == UP_DEVICE_KIND_MEDIA_PLAYER || + kind == UP_DEVICE_KIND_UPS || +- kind == UP_DEVICE_KIND_GAMING_INPUT) { ++ kind == UP_DEVICE_KIND_GAMING_INPUT || ++ kind == UP_DEVICE_KIND_PEN) { + if (battery_level == UP_DEVICE_LEVEL_NONE) + g_string_append_printf (string, " percentage: %g%%\n", up_exported_device_get_percentage (priv->proxy_device)); + else +diff --git a/libupower-glib/up-types.c b/libupower-glib/up-types.c +index 525cd02..7cf9573 100644 +--- a/libupower-glib/up-types.c ++++ b/libupower-glib/up-types.c +@@ -71,6 +71,8 @@ up_device_kind_to_string (UpDeviceKind type_enum) + return "computer"; + case UP_DEVICE_KIND_GAMING_INPUT: + return "gaming-input"; ++ case UP_DEVICE_KIND_PEN: ++ return "pen"; + default: + return "unknown"; + } +@@ -113,6 +115,8 @@ up_device_kind_from_string (const gchar *type) + return UP_DEVICE_KIND_TABLET; + if (g_str_equal (type, "gaming-input")) + return UP_DEVICE_KIND_GAMING_INPUT; ++ if (g_str_equal (type, "pen")) ++ return UP_DEVICE_KIND_PEN; + return UP_DEVICE_KIND_UNKNOWN; + } + +diff --git a/libupower-glib/up-types.h b/libupower-glib/up-types.h +index 079bccd..379d46c 100644 +--- a/libupower-glib/up-types.h ++++ b/libupower-glib/up-types.h +@@ -49,6 +49,7 @@ typedef enum { + UP_DEVICE_KIND_TABLET, + UP_DEVICE_KIND_COMPUTER, + UP_DEVICE_KIND_GAMING_INPUT, ++ UP_DEVICE_KIND_PEN, + UP_DEVICE_KIND_LAST + } UpDeviceKind; + +diff --git a/src/linux/integration-test b/src/linux/integration-test +index 7098a67..e5c6c46 100755 +--- a/src/linux/integration-test ++++ b/src/linux/integration-test +@@ -86,7 +86,8 @@ BATTERY_IFACE = 'org.bluez.Battery1' + UP_DEVICE_KIND_MEDIA_PLAYER, + UP_DEVICE_KIND_TABLET, + UP_DEVICE_KIND_COMPUTER, +- UP_DEVICE_KIND_GAMING_INPUT) = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) ++ UP_DEVICE_KIND_GAMING_INPUT, ++ UP_DEVICE_KIND_PEN) = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) + + class Tests(dbusmock.DBusTestCase): + @classmethod +-- +2.24.1 + diff --git a/testing/source/vtown/deps/upower/patches/0007-linux-Detect-Bluetooth-pens.patch b/testing/source/vtown/deps/upower/patches/0007-linux-Detect-Bluetooth-pens.patch new file mode 100644 index 00000000..13624db0 --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0007-linux-Detect-Bluetooth-pens.patch @@ -0,0 +1,28 @@ +From 85cd95ae53499788a0df86af28876ec27074caa2 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Thu, 24 Oct 2019 12:52:33 +0200 +Subject: [PATCH 1/3] linux: Detect Bluetooth pens + +Numbers from: +https://www.bluetooth.com/specifications/assigned-numbers/baseband/ +--- + src/linux/up-device-bluez.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/linux/up-device-bluez.c b/src/linux/up-device-bluez.c +index 2074746..8673d82 100644 +--- a/src/linux/up-device-bluez.c ++++ b/src/linux/up-device-bluez.c +@@ -52,6 +52,9 @@ appearance_to_kind (guint16 appearance) + return UP_DEVICE_KIND_GAMING_INPUT; + case 0x05: + return UP_DEVICE_KIND_TABLET; ++ case 0x0e: ++ case 0x0f: ++ return UP_DEVICE_KIND_PEN; + } + break; + } +-- +2.26.2 + diff --git a/testing/source/vtown/deps/upower/patches/0008-linux-Identify-keyboard-pointing-device-combos-as-ke.patch b/testing/source/vtown/deps/upower/patches/0008-linux-Identify-keyboard-pointing-device-combos-as-ke.patch new file mode 100644 index 00000000..f8fece70 --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0008-linux-Identify-keyboard-pointing-device-combos-as-ke.patch @@ -0,0 +1,46 @@ +From e0b8354e9cf53a271e66a7ba44fd567daeac2416 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Tue, 5 May 2020 16:07:31 +0200 +Subject: [PATCH 2/3] linux: Identify keyboard/pointing device combos as + keyboards + +Rather than using the type of the first sibling device we find, which is +usually the pointing device portion, make sure that keyboard/pointing +device combo devices are identified as keyboards. +--- + src/linux/up-device-supply.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c +index d7e4423..9302119 100644 +--- a/src/linux/up-device-supply.c ++++ b/src/linux/up-device-supply.c +@@ -888,7 +888,7 @@ up_device_supply_get_sibling_with_subsystem (GUdevDevice *device, + class[0] = subsystem; + client = g_udev_client_new (class); + devices = g_udev_client_query_by_subsystem (client, subsystem); +- for (l = devices; l != NULL && sibling == NULL; l = l->next) { ++ for (l = devices; l != NULL; l = l->next) { + GUdevDevice *d = l->data; + GUdevDevice *p; + const char *p_path; +@@ -897,8 +897,14 @@ up_device_supply_get_sibling_with_subsystem (GUdevDevice *device, + if (!p) + continue; + p_path = g_udev_device_get_sysfs_path (p); +- if (g_strcmp0 (p_path, parent_path) == 0) +- sibling = g_object_ref (d); ++ if (g_strcmp0 (p_path, parent_path) == 0) { ++ if (sibling != NULL && ++ g_udev_device_get_property_as_boolean (d, "ID_INPUT_KEYBOARD")) { ++ g_clear_object (&sibling); ++ } ++ if (sibling == NULL) ++ sibling = g_object_ref (d); ++ } + + g_object_unref (p); + } +-- +2.26.2 + diff --git a/testing/source/vtown/deps/upower/patches/0011-linux-Add-support-for-iPhone-XR-XS-models.patch b/testing/source/vtown/deps/upower/patches/0011-linux-Add-support-for-iPhone-XR-XS-models.patch new file mode 100644 index 00000000..2426e044 --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0011-linux-Add-support-for-iPhone-XR-XS-models.patch @@ -0,0 +1,76 @@ +From 97185bae75b16bea48d532aa5511417e485b1c06 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Wed, 17 Jun 2020 10:51:09 +0200 +Subject: [PATCH 1/4] linux: Add support for iPhone XR, XS models + +Modifying the udev serial to be acceptable as an hyphened UDID, as the +usbmux stack expects. + +Closes: #114 +--- + src/linux/up-device-idevice.c | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/src/linux/up-device-idevice.c b/src/linux/up-device-idevice.c +index a808269..d2fa0a1 100644 +--- a/src/linux/up-device-idevice.c ++++ b/src/linux/up-device-idevice.c +@@ -203,6 +203,28 @@ out: + return G_SOURCE_CONTINUE; + } + ++static char * ++get_device_uuid (GUdevDevice *native) ++{ ++ const char *uuid; ++ char *retval; ++ ++ uuid = g_udev_device_get_property (native, "ID_SERIAL_SHORT"); ++ if (uuid == NULL) ++ return NULL; ++ ++ if (strlen (uuid) != 24) ++ return g_strdup (uuid); ++ ++ /* new style UDID: add hyphen between first 8 and following 16 digits */ ++ retval = g_malloc0 (24 + 1 + 1); ++ memcpy (&retval[0], &uuid[0], 8); ++ retval[8] = '-'; ++ memcpy (&retval[9], &uuid[8], 16); ++ ++ return retval; ++} ++ + /** + * up_device_idevice_coldplug: + * +@@ -213,7 +235,7 @@ up_device_idevice_coldplug (UpDevice *device) + { + UpDeviceIdevice *idevice = UP_DEVICE_IDEVICE (device); + GUdevDevice *native; +- const gchar *uuid; ++ char *uuid; + const gchar *model; + UpDeviceKind kind; + +@@ -223,7 +245,7 @@ up_device_idevice_coldplug (UpDevice *device) + return FALSE; + + /* Get the UUID */ +- uuid = g_udev_device_get_property (native, "ID_SERIAL_SHORT"); ++ uuid = get_device_uuid (native); + if (uuid == NULL) + return FALSE; + +@@ -253,6 +275,8 @@ up_device_idevice_coldplug (UpDevice *device) + g_source_set_name_by_id (idevice->priv->start_id, + "[upower] up_device_idevice_start_poll_cb (linux)"); + ++ g_free (uuid); ++ + return TRUE; + } + +-- +2.27.0 + diff --git a/testing/source/vtown/deps/upower/patches/0012-build-Use-a-newer-libplist-if-available.patch b/testing/source/vtown/deps/upower/patches/0012-build-Use-a-newer-libplist-if-available.patch new file mode 100644 index 00000000..d7e24ecf --- /dev/null +++ b/testing/source/vtown/deps/upower/patches/0012-build-Use-a-newer-libplist-if-available.patch @@ -0,0 +1,28 @@ +From 694207d3f08bdd2095f01eee09eb523363800825 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera <hadess@hadess.net> +Date: Tue, 16 Jun 2020 14:04:25 +0200 +Subject: [PATCH 2/4] build: Use a newer libplist if available + +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a96b794..5f08d91 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -202,8 +202,10 @@ if test x$with_backend = xlinux; then + PKG_CHECK_MODULES(USB, [libusb-1.0 >= 1.0.0]) + AC_ARG_WITH(idevice, AS_HELP_STRING([--without-idevice],[Build without libimobiledevice]), + with_idevice=$withval,with_idevice=yes) ++ LIBPLIST_DEP=libplist ++ PKG_CHECK_EXISTS(libplist-2.0, LIBPLIST_DEP=libplist-2.0) + AS_IF([test "x$with_idevice" != "xno"], +- [PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7 libplist >= 0.12, have_idevice=yes, have_idevice=no)], ++ [PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7 $LIBPLIST_DEP, have_idevice=yes, have_idevice=no)], + [have_idevice=no]) + AS_IF([test "x$have_idevice" = "xyes"], + [AC_DEFINE(HAVE_IDEVICE, 1, [Define to 1 if iDevice is going to be built])]) +-- +2.27.0 + diff --git a/testing/source/vtown/deps/upower/slack-desc b/testing/source/vtown/deps/upower/slack-desc new file mode 100644 index 00000000..b4401b93 --- /dev/null +++ b/testing/source/vtown/deps/upower/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +upower: UPower (power management abstraction daemon) +upower: +upower: UPower is an abstraction for enumerating power devices, listening to +upower: device events and querying history and statistics. Any application or +upower: service on the system can access the org.freedesktop.UPower service +upower: via the system message bus. Some operations (such as suspending the +upower: system) are restricted using PolicyKit. +upower: +upower: Homepage: http://upower.freedesktop.org/ +upower: +upower: diff --git a/testing/source/vtown/deps/upower/upower.SlackBuild b/testing/source/vtown/deps/upower/upower.SlackBuild new file mode 100755 index 00000000..ddd7e218 --- /dev/null +++ b/testing/source/vtown/deps/upower/upower.SlackBuild @@ -0,0 +1,139 @@ +#!/bin/bash + +# Slackware build script for upower + +# Copyright 2010, 2011, 2015 Robby Workman, Tuscaloosa, Alabama, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=upower +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)} +BUILD=${BUILD:-1_vtown_1} + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +# Automatically determine the architecture we're building on: +MARCH=$( uname -m ) +if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i586 ;; + armv7hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +zcat $CWD/patches/0002-linux-Fix-memory-leak-in-Bluez-backend.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0003-linux-Fix-warning-when-bluez-Appearance-property-isn.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0006-lib-Add-Pen-device-type.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0007-linux-Detect-Bluetooth-pens.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0008-linux-Identify-keyboard-pointing-device-combos-as-ke.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0011-linux-Add-support-for-iPhone-XR-XS-models.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/patches/0012-build-Use-a-newer-libplist-if-available.patch.gz | patch -p1 --verbose || exit 1 + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --disable-static \ + --enable-man-pages \ + --build=$TARGET || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Don't clobber the config file on upgrades +mv $PKG/etc/UPower/UPower.conf $PKG/etc/UPower/UPower.conf.new + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \ + $PKG/usr/doc/$PKGNAM-$VERSION + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/testing/source/vtown/deps/upower/upower.url b/testing/source/vtown/deps/upower/upower.url new file mode 100644 index 00000000..9a4f5559 --- /dev/null +++ b/testing/source/vtown/deps/upower/upower.url @@ -0,0 +1 @@ +https://gitlab.freedesktop.org/upower/upower/-/releases |