From 2f850044c75400c738801147fae26c291c8eac34 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Sat, 17 Apr 2021 19:32:54 +0200
Subject: [PATCH 1/2] testing/mapplauncherd: upgrade to 4.1.43

---
 ...=> 0001-fix-cmake-and-add-pkgconfig.patch} | 155 +++++++++++++++---
 testing/mapplauncherd/APKBUILD                |  13 +-
 .../fix-musl-incompability.patch              |  62 -------
 testing/mapplauncherd/pkgconfig.patch         |  70 --------
 4 files changed, 140 insertions(+), 160 deletions(-)
 rename testing/mapplauncherd/{fix-cmake.patch => 0001-fix-cmake-and-add-pkgconfig.patch} (60%)
 delete mode 100644 testing/mapplauncherd/fix-musl-incompability.patch
 delete mode 100644 testing/mapplauncherd/pkgconfig.patch

diff --git a/testing/mapplauncherd/fix-cmake.patch b/testing/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
similarity index 60%
rename from testing/mapplauncherd/fix-cmake.patch
rename to testing/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
index 6e9e261db76c..bacd41858dd2 100644
--- a/testing/mapplauncherd/fix-cmake.patch
+++ b/testing/mapplauncherd/0001-fix-cmake-and-add-pkgconfig.patch
@@ -1,16 +1,16 @@
-From 3d8837e75e9ee7cd1c895814ad5a83cb206fb3c4 Mon Sep 17 00:00:00 2001
+From b05bf15c01175c5bae1ea01b60b2fb2f4d7ca4cb Mon Sep 17 00:00:00 2001
 From: Bart Ribbers <bribbers@disroot.org>
 Date: Tue, 31 Mar 2020 12:52:50 +0200
-Subject: [PATCH 1/4] Fix linking to systemd on non-glibc systems
+Subject: [PATCH 1/6] Fix linking to systemd on non-glibc systems
 
 Yes, systemd doesn't even run on non-glibc systems, but elogind does and
 this way it links to both systemd and elogind
 ---
- src/launcherlib/CMakeLists.txt | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
+ src/launcherlib/CMakeLists.txt | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
 
 diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index 50f1efe..e8c0458 100644
+index 2e32d69..2c9fb4d 100644
 --- a/src/launcherlib/CMakeLists.txt
 +++ b/src/launcherlib/CMakeLists.txt
 @@ -2,7 +2,12 @@ include(GNUInstallDirs)
@@ -27,14 +27,13 @@ index 50f1efe..e8c0458 100644
  
  # Hide all symbols except the ones explicitly exported in the code (like main())
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-@@ -14,14 +19,13 @@ set(SRC appdata.cpp booster.cpp connection.cpp daemon.cpp logger.cpp
- set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
-     singleinstance.h socketmanager.h ${COMMON}/protocol.h)
+@@ -16,12 +21,15 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
+ 
+ # Set libraries to be linked. Shared libraries to be preloaded are not linked in anymore,
+ # but dlopen():ed and listed in src/launcher/preload.h instead.
+-link_libraries(${LIBDL} "-L/lib -lsystemd -lcap")
++link_libraries(${LIBDL} "-L/lib -lcap")
  
--# Set libraries to be linked. Shared libraries to be preloaded are not linked in anymore,
--# but dlopen():ed and listed in src/launcher/preload.h instead.
--link_libraries(${LIBDL} "-L/lib -lsystemd")
--
  # Set executable
  add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
  set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
@@ -49,10 +48,10 @@ index 50f1efe..e8c0458 100644
 2.23.0
 
 
-From 2d01ee5e9a53adf77b4dc9e5ca27ea407340df6b Mon Sep 17 00:00:00 2001
+From e4d7e241753158fdf5fbbe5be0955e600a94b6c9 Mon Sep 17 00:00:00 2001
 From: Bart Ribbers <bribbers@disroot.org>
 Date: Tue, 31 Mar 2020 12:53:44 +0200
-Subject: [PATCH 2/4] Fix the install rules for executables
+Subject: [PATCH 2/6] Fix the install rules for executables
 
 ---
  src/invoker/CMakeLists.txt         | 2 +-
@@ -85,10 +84,10 @@ index cc04ba2..acc1439 100644
 2.23.0
 
 
-From 000443e01e881aa26fc0f4bb4f3a337aacbe20ce Mon Sep 17 00:00:00 2001
+From 233bcbb11bd0ac12f4fec6963715e4ad5c6ca9c5 Mon Sep 17 00:00:00 2001
 From: Bart Ribbers <bribbers@disroot.org>
 Date: Tue, 31 Mar 2020 13:50:00 +0200
-Subject: [PATCH 3/4] Make CMake respect current source dir when generating
+Subject: [PATCH 3/6] Make CMake respect current source dir when generating
  docs
 
 ---
@@ -115,10 +114,10 @@ index 0c5e5b4..1a91369 100644
 2.23.0
 
 
-From 0e30366e48f9c26ce5d5de9e883bef9d5f0e8946 Mon Sep 17 00:00:00 2001
+From aa52e831099e4639c3c1cb64f25330d93c767f87 Mon Sep 17 00:00:00 2001
 From: Bart Ribbers <bribbers@disroot.org>
 Date: Fri, 13 Nov 2020 15:16:22 +0100
-Subject: [PATCH 4/4] Respect GNUInstallDirs
+Subject: [PATCH 4/6] Respect GNUInstallDirs
 
 This allows packagers to set the proper directories to install stuff
 too using CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, etc.
@@ -187,10 +186,10 @@ index 3a35a6b..78be60c 100644
 -
 +install(TARGETS invoker DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
 diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index e8c0458..a704668 100644
+index 2c9fb4d..5396614 100644
 --- a/src/launcherlib/CMakeLists.txt
 +++ b/src/launcherlib/CMakeLists.txt
-@@ -28,5 +28,5 @@ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
+@@ -32,5 +32,5 @@ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
  
  # Add install rule
  install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
@@ -210,3 +209,119 @@ index acc1439..fd9be9c 100644
 -- 
 2.23.0
 
+
+From 9450c10b0f463cc0929bc90bc419af95422090c2 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Fri, 13 Nov 2020 16:53:18 +0100
+Subject: [PATCH 5/6] Add pkgconfig file
+
+Without it, -lapplauncherd is undefined and it can not be used to
+compile other applications with it. I needed this to get
+mapplauncherd-qt to compile
+---
+ CMakeLists.txt                     |  7 ++++---
+ src/launcherlib/CMakeLists.txt     | 25 +++++++++++++++++--------
+ src/launcherlib/applauncherd.pc.in |  9 +++++++++
+ 3 files changed, 30 insertions(+), 11 deletions(-)
+ create mode 100644 src/launcherlib/applauncherd.pc.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05bb06b..814890d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,8 @@
+-project(Applauncherd)
++cmake_minimum_required(VERSION 3.0)
++cmake_policy(VERSION 3.0)
+ 
+-cmake_minimum_required(VERSION 2.6)
+-cmake_policy(VERSION 2.6)
++project(Applauncherd
++	VERSION 4.1.43)
+ 
+ include(FeatureSummary)
+ include(GNUInstallDirs)
+diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
+index 5396614..adab08f 100644
+--- a/src/launcherlib/CMakeLists.txt
++++ b/src/launcherlib/CMakeLists.txt
+@@ -1,5 +1,3 @@
+-include(GNUInstallDirs)
+-
+ set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
+ 
+ # Find systemd
+@@ -24,13 +22,24 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
+ link_libraries(${LIBDL} "-L/lib -lcap")
+ 
+ # Set executable
+-add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
+-set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
+-
++add_library(applauncherd SHARED ${SRC} ${MOC_SRC})
+ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
+ 
++set_target_properties(applauncherd PROPERTIES
++    VERSION ${PROJECT_VERSION}
++    SOVERSION ${PROJECT_VERSION_MAJOR})
++
++# Configure and install the pkgconfig file
++configure_file(applauncherd.pc.in
++	${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
++	@ONLY)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
++	DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
+ 
+ # Add install rule
+-install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
+-  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
++install(TARGETS applauncherd
++    LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
++install(FILES ${HEADERS}
++    DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
++    COMPONENT Devel
++    PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+diff --git a/src/launcherlib/applauncherd.pc.in b/src/launcherlib/applauncherd.pc.in
+new file mode 100644
+index 0000000..2a8edad
+--- /dev/null
++++ b/src/launcherlib/applauncherd.pc.in
+@@ -0,0 +1,9 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/applauncherd
++
++Name: applauncherd
++Version: @PROJECT_VERSION@
++Libs: -lapplauncherd
++Cflags: -I${includedir}
+-- 
+2.23.0
+
+
+From ad49ea13ae04e3a00c4b996e5f0e2d82b00fe463 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Sat, 17 Apr 2021 19:10:25 +0200
+Subject: [PATCH 6/6] Packaging: add new pkgconfig file to devel package
+
+---
+ rpm/mapplauncherd.spec | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/rpm/mapplauncherd.spec b/rpm/mapplauncherd.spec
+index 6bf24d4..0bc8b74 100644
+--- a/rpm/mapplauncherd.spec
++++ b/rpm/mapplauncherd.spec
+@@ -93,6 +93,7 @@ install -D -m 0755 scripts/booster-cgroup-mount %{buildroot}/usr/lib/startup/boo
+ %files devel
+ %defattr(-,root,root,-)
+ %{_includedir}/applauncherd/*
++%{_libdir}/pkgconfig/*.pc
+ 
+ %files cgroup
+ %{_unitdir}/booster-cgroup-mount.service
+-- 
+2.23.0
+
diff --git a/testing/mapplauncherd/APKBUILD b/testing/mapplauncherd/APKBUILD
index 7d2339dcc831..08b9a0438801 100644
--- a/testing/mapplauncherd/APKBUILD
+++ b/testing/mapplauncherd/APKBUILD
@@ -1,7 +1,7 @@
 # Contributor: Bart Ribbers <bribbers@disroot.org>
 # Maintainer: Bart Ribbers <bribbers@disroot.org>
 pkgname=mapplauncherd
-pkgver=4.1.36
+pkgver=4.1.43
 pkgrel=0
 pkgdesc="A daemon that helps to launch applications faster"
 url="https://git.sailfishos.org/mer-core/mapplauncherd"
@@ -10,6 +10,7 @@ license="LGPL-2.1-only"
 depends_dev="
 	dbus-dev
 	elogind-dev
+	libcap-dev
 	"
 makedepends="$depends_dev
 	cmake
@@ -17,9 +18,7 @@ makedepends="$depends_dev
 	"
 subpackages="$pkgname-dev $pkgname-doc"
 source="https://git.sailfishos.org/mer-core/mapplauncherd/-/archive/$pkgver/mapplauncherd-$pkgver.tar.gz
-	fix-musl-incompability.patch
-	fix-cmake.patch
-	pkgconfig.patch
+	0001-fix-cmake-and-add-pkgconfig.patch
 	"
 options="!check" # No tests
 
@@ -36,7 +35,5 @@ build() {
 package() {
 	DESTDIR="$pkgdir" cmake --install build
 }
-sha512sums="a062e8d27081f2137607308e8849c9736c895f37a08d8dbd24326c90b3dc9643e506bd71e0797c532343afaeed9e415b53d78a5336938092126dd9931c3ea556  mapplauncherd-4.1.36.tar.gz
-72e98c79346684d663637bf5d52ce249dfe9eaef6cedc1c415635a7ba898ec43d394ababa10fb26ab908cb41b3a37038c71508ec20cd0a84167401d3d77df800  fix-musl-incompability.patch
-b99c4ec0b54a9e3ec2a92e1f3f572caf054de4ded3b0e70cd98b30950cf8fea52948127f753304e64d88ceb07d814cf3f34669ff8583145769c5bf7b517e1535  fix-cmake.patch
-b99628b1df305c99be1604c6ac97da03aca28925fd249651fb1964284d702e0243cbc7dfe1b63b9ae71e84d1284780677a1a2cbad5b7d89e801ca1071df84153  pkgconfig.patch"
+sha512sums="2fcf764738835f8ad2397a273a4a1264de651363bad885f715f15a08ff91e67bac7632d0900fd4c1c290ccd6ae2f9d266eb165946466a0e69d0ad7c2ba36d2bc  mapplauncherd-4.1.43.tar.gz
+40fc31e7b4420fbff1131a30705345714f1430e2cad0f137675131d1c4d7e106c14ceddefba5ef60cc09c196d8e17f13ea0eb92cd2abc7414fd697865eb8ac7f  0001-fix-cmake-and-add-pkgconfig.patch"
diff --git a/testing/mapplauncherd/fix-musl-incompability.patch b/testing/mapplauncherd/fix-musl-incompability.patch
deleted file mode 100644
index 0b1c64c1bc6f..000000000000
--- a/testing/mapplauncherd/fix-musl-incompability.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c
-index ba81f7b..1a806d9 100644
---- a/src/invoker/invoker.c
-+++ b/src/invoker/invoker.c
-@@ -26,7 +26,6 @@
- #include <string.h>
- #include <signal.h>
- #include <sys/socket.h>
--#include <bits/socket.h>
- #include <sys/un.h>
- #include <sys/uio.h>
- #include <sys/time.h>
-diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp
-index 235f2a0..3495503 100644
---- a/src/launcherlib/booster.cpp
-+++ b/src/launcherlib/booster.cpp
-@@ -46,6 +46,7 @@
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <grp.h>
-+#include <libgen.h>
- 
- #include "coverage.h"
- 
-@@ -327,9 +328,12 @@ void Booster::renameProcess(int parentArgc, char** parentArgv,
-         }
- 
-         // Set the process name using prctl, 'killall' and 'top' use it
--        if ( prctl(PR_SET_NAME, basename(sourceArgv[0])) == -1 )
-+	char* processName = strdup(sourceArgv[0]);
-+        if ( prctl(PR_SET_NAME, basename(processName)) == -1 )
-             Logger::logError("Booster: on set new process name: %s ", strerror(errno));
- 
-+	std::free(processName);
-+
-         setenv("_", sourceArgv[0], true);
-     }
- }
-@@ -583,7 +587,7 @@ void* Booster::loadMain()
-     else
-         dlopenFlags |= RTLD_LOCAL;
- 
--#if (PLATFORM_ID == Linux)
-+#if (PLATFORM_ID == Linux) && defined(__GLIBC__)
-     if (m_appData->dlopenDeep())
-         dlopenFlags |= RTLD_DEEPBIND;
- #endif
-diff --git a/src/launcherlib/connection.cpp b/src/launcherlib/connection.cpp
-index b5dd89d..71bd405 100644
---- a/src/launcherlib/connection.cpp
-+++ b/src/launcherlib/connection.cpp
-@@ -281,8 +281,8 @@ bool Connection::receiveArgs()
- {
-     // Get argc
-     recvMsg(&m_argc);
--    const uint32_t ARG_MAX = 1024;
--    if (m_argc > 0 && m_argc < ARG_MAX)
-+    const uint32_t argMax = 1024;
-+    if (m_argc > 0 && m_argc < argMax)
-     {
-         // Reserve memory for argv
-         m_argv = new const char * [m_argc];
diff --git a/testing/mapplauncherd/pkgconfig.patch b/testing/mapplauncherd/pkgconfig.patch
deleted file mode 100644
index 41a2917951fe..000000000000
--- a/testing/mapplauncherd/pkgconfig.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 05bb06b..bbaff7b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,7 +1,8 @@
--project(Applauncherd)
-+cmake_minimum_required(VERSION 3.6.0)
-+cmake_policy(VERSION 3.6.0)
- 
--cmake_minimum_required(VERSION 2.6)
--cmake_policy(VERSION 2.6)
-+project(Applauncherd
-+	VERSION 4.1.40)
- 
- include(FeatureSummary)
- include(GNUInstallDirs)
-diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
-index a704668..0fb3665 100644
---- a/src/launcherlib/CMakeLists.txt
-+++ b/src/launcherlib/CMakeLists.txt
-@@ -1,5 +1,3 @@
--include(GNUInstallDirs)
--
- set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
- 
- # Find systemd
-@@ -21,12 +19,23 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
- 
- # Set executable
- add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
--set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
--
- target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
- 
-+set_target_properties(applauncherd PROPERTIES
-+    VERSION ${PROJECT_VERSION}
-+    SOVERSION ${PROJECT_VERSION_MAJOR})
-+
-+# Configure and install the pkgconfig file
-+configure_file(applauncherd.pc.in
-+	${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
-+	@ONLY)
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
-+	DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
- 
- # Add install rule
--install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
--install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
--  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
-+install(TARGETS applauncherd
-+    LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
-+install(FILES ${HEADERS}
-+    DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
-+    COMPONENT Devel
-+    PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
-diff --git a/src/launcherlib/applauncherd.pc.in b/src/launcherlib/applauncherd.pc.in
-new file mode 100644
-index 0000000..2a8edad
---- /dev/null
-+++ b/src/launcherlib/applauncherd.pc.in
-@@ -0,0 +1,9 @@
-+prefix=@CMAKE_INSTALL_PREFIX@
-+exec_prefix=${prefix}
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/applauncherd
-+
-+Name: applauncherd
-+Version: @PROJECT_VERSION@
-+Libs: -lapplauncherd
-+Cflags: -I${includedir}
-- 
GitLab


From 99d07abbb1c92d2787c48d1d3ec49140fe77899b Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Sat, 17 Apr 2021 19:33:06 +0200
Subject: [PATCH 2/2] testing/mapplauncherd-qt: new aport

---
 testing/mapplauncherd-qt/APKBUILD             |  30 +++
 testing/mapplauncherd-qt/fix-cmake.patch      | 212 ++++++++++++++++++
 .../fix-musl-incompability.patch              |  62 +++++
 testing/mapplauncherd-qt/pkgconfig.patch      |  70 ++++++
 4 files changed, 374 insertions(+)
 create mode 100644 testing/mapplauncherd-qt/APKBUILD
 create mode 100644 testing/mapplauncherd-qt/fix-cmake.patch
 create mode 100644 testing/mapplauncherd-qt/fix-musl-incompability.patch
 create mode 100644 testing/mapplauncherd-qt/pkgconfig.patch

diff --git a/testing/mapplauncherd-qt/APKBUILD b/testing/mapplauncherd-qt/APKBUILD
new file mode 100644
index 000000000000..11bb635da9da
--- /dev/null
+++ b/testing/mapplauncherd-qt/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgname=mapplauncherd-qt
+pkgver=1.1.17
+pkgrel=0
+pkgdesc="Application launch boosters for Qt5"
+url="https://git.sailfishos.org/mer-core/mapplauncherd-qt"
+arch="all"
+license="LGPL-2.1-only"
+depends_dev="
+	libxml2-dev
+	mapplauncherd-dev
+	qt5-qtbase-dev
+	qt5-qtdeclarative-dev
+	"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev"
+source="https://git.sailfishos.org/mer-core/mapplauncherd-qt/-/archive/$pkgver/mapplauncherd-qt-$pkgver.tar.gz"
+options="!check" # No tests
+
+build() {
+	qmake-qt5 \
+		PREFIX=/usr
+	make
+}
+
+package() {
+	INSTALL_ROOT="$pkgdir" make install
+}
+sha512sums="da9be4f6c121927627ef2a18e07c82a5973bc3a8086e49955677a44c13673a78eef441b159b7d6c43003564fa12d1f8b3e93ed2917baf3a1e0dd36c37da950fe  mapplauncherd-qt-1.1.17.tar.gz"
diff --git a/testing/mapplauncherd-qt/fix-cmake.patch b/testing/mapplauncherd-qt/fix-cmake.patch
new file mode 100644
index 000000000000..6e9e261db76c
--- /dev/null
+++ b/testing/mapplauncherd-qt/fix-cmake.patch
@@ -0,0 +1,212 @@
+From 3d8837e75e9ee7cd1c895814ad5a83cb206fb3c4 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Tue, 31 Mar 2020 12:52:50 +0200
+Subject: [PATCH 1/4] Fix linking to systemd on non-glibc systems
+
+Yes, systemd doesn't even run on non-glibc systems, but elogind does and
+this way it links to both systemd and elogind
+---
+ src/launcherlib/CMakeLists.txt | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
+index 50f1efe..e8c0458 100644
+--- a/src/launcherlib/CMakeLists.txt
++++ b/src/launcherlib/CMakeLists.txt
+@@ -2,7 +2,12 @@ include(GNUInstallDirs)
+ 
+ set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
+ 
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${COMMON})
++# Find systemd
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(SYSTEMD "libsystemd" REQUIRED)
++
++# Set include dirs
++include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SYSTEMD_INCLUDE_DIRS} ${COMMON})
+ 
+ # Hide all symbols except the ones explicitly exported in the code (like main())
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+@@ -14,14 +19,13 @@ set(SRC appdata.cpp booster.cpp connection.cpp daemon.cpp logger.cpp
+ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
+     singleinstance.h socketmanager.h ${COMMON}/protocol.h)
+ 
+-# Set libraries to be linked. Shared libraries to be preloaded are not linked in anymore,
+-# but dlopen():ed and listed in src/launcher/preload.h instead.
+-link_libraries(${LIBDL} "-L/lib -lsystemd")
+-
+ # Set executable
+ add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
+ set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
+ 
++target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
++
++
+ # Add install rule
+ install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+ install(FILES ${HEADERS} DESTINATION /usr/include/applauncherd
+-- 
+2.23.0
+
+
+From 2d01ee5e9a53adf77b4dc9e5ca27ea407340df6b Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Tue, 31 Mar 2020 12:53:44 +0200
+Subject: [PATCH 2/4] Fix the install rules for executables
+
+---
+ src/invoker/CMakeLists.txt         | 2 +-
+ src/single-instance/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/invoker/CMakeLists.txt b/src/invoker/CMakeLists.txt
+index 6531ca0..3a35a6b 100644
+--- a/src/invoker/CMakeLists.txt
++++ b/src/invoker/CMakeLists.txt
+@@ -19,6 +19,6 @@ add_executable(invoker ${SRC})
+ target_link_libraries(invoker ${DBUS_LDFLAGS})
+ 
+ # Add install rule
+-install(PROGRAMS invoker DESTINATION /usr/bin/)
++install(TARGETS invoker DESTINATION /usr/bin/)
+ 
+ 
+diff --git a/src/single-instance/CMakeLists.txt b/src/single-instance/CMakeLists.txt
+index cc04ba2..acc1439 100644
+--- a/src/single-instance/CMakeLists.txt
++++ b/src/single-instance/CMakeLists.txt
+@@ -26,4 +26,4 @@ link_libraries(${DBUS_LDFLAGS})
+ add_executable(single-instance ${SRC})
+ 
+ # Add install rule
+-install(PROGRAMS single-instance DESTINATION /usr/bin/)
++install(TARGETS single-instance DESTINATION /usr/bin/)
+-- 
+2.23.0
+
+
+From 000443e01e881aa26fc0f4bb4f3a337aacbe20ce Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Tue, 31 Mar 2020 13:50:00 +0200
+Subject: [PATCH 3/4] Make CMake respect current source dir when generating
+ docs
+
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0c5e5b4..1a91369 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,7 +47,10 @@ add_subdirectory(src)
+ # Target for documentation (make doc)
+ find_program(Doxygen NAMES doxygen)
+ if (EXISTS ${Doxygen})
+-    add_custom_target(doc COMMAND cd doc && ${Doxygen} doxygen-impldoc.conf COMMAND cd doc && ${Doxygen} doxygen-userdoc.conf COMMAND cd doc && ${Doxygen} doxygen-mdeclarativecache.conf)
++    add_custom_target(doc
++        COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-impldoc.conf
++        COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-userdoc.conf
++        COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/doc && ${Doxygen} doxygen-mdeclarativecache.conf)
+ else (EXISTS ${Doxygen})
+     message(STATUS "Doxygen not found: you're not able to build documentation.")
+ endif (EXISTS ${Doxygen})
+-- 
+2.23.0
+
+
+From 0e30366e48f9c26ce5d5de9e883bef9d5f0e8946 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Fri, 13 Nov 2020 15:16:22 +0100
+Subject: [PATCH 4/4] Respect GNUInstallDirs
+
+This allows packagers to set the proper directories to install stuff
+too using CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, etc.
+
+Also make installing systemd unit files optional, for systemd without
+systemd, but enable them by default
+---
+ CMakeLists.txt                     | 11 ++++++++---
+ src/booster-generic/CMakeLists.txt |  7 +++++--
+ src/invoker/CMakeLists.txt         |  4 +---
+ src/launcherlib/CMakeLists.txt     |  2 +-
+ src/single-instance/CMakeLists.txt |  2 +-
+ 5 files changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1a91369..05bb06b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,11 @@ project(Applauncherd)
+ cmake_minimum_required(VERSION 2.6)
+ cmake_policy(VERSION 2.6)
+ 
++include(FeatureSummary)
++include(GNUInstallDirs)
++
++option(INSTALL_SYSTEMD_UNITS "Install systemd unit files" ON)
++
+ #
+ # NOTE: For verbose build use VERBOSE=1
+ #
+@@ -56,6 +61,6 @@ else (EXISTS ${Doxygen})
+ endif (EXISTS ${Doxygen})
+ 
+ # Install html documentation
+-install(DIRECTORY doc/implementation-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
+-install(DIRECTORY doc/user-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
+-install(DIRECTORY doc/mdeclarativecache-documentation DESTINATION /usr/share/doc/applauncherd OPTIONAL)
++install(DIRECTORY doc/implementation-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
++install(DIRECTORY doc/user-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
++install(DIRECTORY doc/mdeclarativecache-documentation DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR} OPTIONAL)
+diff --git a/src/booster-generic/CMakeLists.txt b/src/booster-generic/CMakeLists.txt
+index 2b0672b..71be130 100644
+--- a/src/booster-generic/CMakeLists.txt
++++ b/src/booster-generic/CMakeLists.txt
+@@ -17,5 +17,8 @@ add_executable(booster-generic ${SRC} ${MOC_SRC})
+ add_dependencies(booster-generic applauncherd)
+ 
+ # Add install rule
+-install(TARGETS booster-generic DESTINATION /usr/libexec/mapplauncherd/)
+-install(FILES booster-generic.service DESTINATION /usr/lib/systemd/user/)
++install(TARGETS booster-generic DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR}/mapplauncherd/)
++
++if(INSTALL_SYSTEMD_UNITS)
++	install(FILES booster-generic.service DESTINATION /usr/lib/systemd/user/)
++endif()
+diff --git a/src/invoker/CMakeLists.txt b/src/invoker/CMakeLists.txt
+index 3a35a6b..78be60c 100644
+--- a/src/invoker/CMakeLists.txt
++++ b/src/invoker/CMakeLists.txt
+@@ -19,6 +19,4 @@ add_executable(invoker ${SRC})
+ target_link_libraries(invoker ${DBUS_LDFLAGS})
+ 
+ # Add install rule
+-install(TARGETS invoker DESTINATION /usr/bin/)
+-
+-
++install(TARGETS invoker DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
+index e8c0458..a704668 100644
+--- a/src/launcherlib/CMakeLists.txt
++++ b/src/launcherlib/CMakeLists.txt
+@@ -28,5 +28,5 @@ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
+ 
+ # Add install rule
+ install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+-install(FILES ${HEADERS} DESTINATION /usr/include/applauncherd
++install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
+   PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+diff --git a/src/single-instance/CMakeLists.txt b/src/single-instance/CMakeLists.txt
+index acc1439..fd9be9c 100644
+--- a/src/single-instance/CMakeLists.txt
++++ b/src/single-instance/CMakeLists.txt
+@@ -26,4 +26,4 @@ link_libraries(${DBUS_LDFLAGS})
+ add_executable(single-instance ${SRC})
+ 
+ # Add install rule
+-install(TARGETS single-instance DESTINATION /usr/bin/)
++install(TARGETS single-instance DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+-- 
+2.23.0
+
diff --git a/testing/mapplauncherd-qt/fix-musl-incompability.patch b/testing/mapplauncherd-qt/fix-musl-incompability.patch
new file mode 100644
index 000000000000..0b1c64c1bc6f
--- /dev/null
+++ b/testing/mapplauncherd-qt/fix-musl-incompability.patch
@@ -0,0 +1,62 @@
+diff --git a/src/invoker/invoker.c b/src/invoker/invoker.c
+index ba81f7b..1a806d9 100644
+--- a/src/invoker/invoker.c
++++ b/src/invoker/invoker.c
+@@ -26,7 +26,6 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <sys/socket.h>
+-#include <bits/socket.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
+ #include <sys/time.h>
+diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp
+index 235f2a0..3495503 100644
+--- a/src/launcherlib/booster.cpp
++++ b/src/launcherlib/booster.cpp
+@@ -46,6 +46,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <grp.h>
++#include <libgen.h>
+ 
+ #include "coverage.h"
+ 
+@@ -327,9 +328,12 @@ void Booster::renameProcess(int parentArgc, char** parentArgv,
+         }
+ 
+         // Set the process name using prctl, 'killall' and 'top' use it
+-        if ( prctl(PR_SET_NAME, basename(sourceArgv[0])) == -1 )
++	char* processName = strdup(sourceArgv[0]);
++        if ( prctl(PR_SET_NAME, basename(processName)) == -1 )
+             Logger::logError("Booster: on set new process name: %s ", strerror(errno));
+ 
++	std::free(processName);
++
+         setenv("_", sourceArgv[0], true);
+     }
+ }
+@@ -583,7 +587,7 @@ void* Booster::loadMain()
+     else
+         dlopenFlags |= RTLD_LOCAL;
+ 
+-#if (PLATFORM_ID == Linux)
++#if (PLATFORM_ID == Linux) && defined(__GLIBC__)
+     if (m_appData->dlopenDeep())
+         dlopenFlags |= RTLD_DEEPBIND;
+ #endif
+diff --git a/src/launcherlib/connection.cpp b/src/launcherlib/connection.cpp
+index b5dd89d..71bd405 100644
+--- a/src/launcherlib/connection.cpp
++++ b/src/launcherlib/connection.cpp
+@@ -281,8 +281,8 @@ bool Connection::receiveArgs()
+ {
+     // Get argc
+     recvMsg(&m_argc);
+-    const uint32_t ARG_MAX = 1024;
+-    if (m_argc > 0 && m_argc < ARG_MAX)
++    const uint32_t argMax = 1024;
++    if (m_argc > 0 && m_argc < argMax)
+     {
+         // Reserve memory for argv
+         m_argv = new const char * [m_argc];
diff --git a/testing/mapplauncherd-qt/pkgconfig.patch b/testing/mapplauncherd-qt/pkgconfig.patch
new file mode 100644
index 000000000000..41a2917951fe
--- /dev/null
+++ b/testing/mapplauncherd-qt/pkgconfig.patch
@@ -0,0 +1,70 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05bb06b..bbaff7b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,8 @@
+-project(Applauncherd)
++cmake_minimum_required(VERSION 3.6.0)
++cmake_policy(VERSION 3.6.0)
+ 
+-cmake_minimum_required(VERSION 2.6)
+-cmake_policy(VERSION 2.6)
++project(Applauncherd
++	VERSION 4.1.40)
+ 
+ include(FeatureSummary)
+ include(GNUInstallDirs)
+diff --git a/src/launcherlib/CMakeLists.txt b/src/launcherlib/CMakeLists.txt
+index a704668..0fb3665 100644
+--- a/src/launcherlib/CMakeLists.txt
++++ b/src/launcherlib/CMakeLists.txt
+@@ -1,5 +1,3 @@
+-include(GNUInstallDirs)
+-
+ set(COMMON ${CMAKE_HOME_DIRECTORY}/src/common)
+ 
+ # Find systemd
+@@ -21,12 +19,23 @@ set(HEADERS appdata.h booster.h connection.h daemon.h logger.h launcherlib.h
+ 
+ # Set executable
+ add_library(applauncherd MODULE ${SRC} ${MOC_SRC})
+-set_target_properties(applauncherd PROPERTIES VERSION 0.1 SOVERSION 0)
+-
+ target_link_libraries(applauncherd ${SYSTEMD_LIBRARIES})
+ 
++set_target_properties(applauncherd PROPERTIES
++    VERSION ${PROJECT_VERSION}
++    SOVERSION ${PROJECT_VERSION_MAJOR})
++
++# Configure and install the pkgconfig file
++configure_file(applauncherd.pc.in
++	${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
++	@ONLY)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applauncherd.pc
++	DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
+ 
+ # Add install rule
+-install(TARGETS applauncherd DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
+-  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
++install(TARGETS applauncherd
++    LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
++install(FILES ${HEADERS}
++    DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/applauncherd
++    COMPONENT Devel
++    PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+diff --git a/src/launcherlib/applauncherd.pc.in b/src/launcherlib/applauncherd.pc.in
+new file mode 100644
+index 0000000..2a8edad
+--- /dev/null
++++ b/src/launcherlib/applauncherd.pc.in
+@@ -0,0 +1,9 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/applauncherd
++
++Name: applauncherd
++Version: @PROJECT_VERSION@
++Libs: -lapplauncherd
++Cflags: -I${includedir}
-- 
GitLab