mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
testing/intiface-central: new aport
This commit is contained in:
parent
04e2ddf864
commit
d24e3b2301
89
testing/intiface-central/APKBUILD
Normal file
89
testing/intiface-central/APKBUILD
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
|
||||||
|
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
|
||||||
|
pkgname=intiface-central
|
||||||
|
pkgver=2.4.3
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Frontend application for the Buttplug Sex Toy Control Library"
|
||||||
|
url="https://intiface.com/central/"
|
||||||
|
arch="aarch64 x86_64" # flutter
|
||||||
|
license="GPL-3.0-only"
|
||||||
|
makedepends="
|
||||||
|
cargo
|
||||||
|
corrosion
|
||||||
|
dbus-dev
|
||||||
|
eudev-dev
|
||||||
|
flutter-desktop
|
||||||
|
openssl-dev
|
||||||
|
patchelf
|
||||||
|
"
|
||||||
|
options="net !check" # no tests
|
||||||
|
source="
|
||||||
|
https://github.com/intiface/intiface-central/archive/refs/tags/v$pkgver/intiface-central-$pkgver.tar.gz
|
||||||
|
|
||||||
|
system-corrosion.patch
|
||||||
|
system-flutter.patch
|
||||||
|
lock.patch
|
||||||
|
pmos-fit-screen.patch
|
||||||
|
pkgconf2.patch
|
||||||
|
no-werror.patch
|
||||||
|
|
||||||
|
intiface-central
|
||||||
|
intiface-central.desktop
|
||||||
|
"
|
||||||
|
|
||||||
|
case "$CARCH" in
|
||||||
|
x86_64) _flutter_arch="x64" ;;
|
||||||
|
aarch64) _flutter_arch="arm64" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
|
||||||
|
flutter pub get --enforce-lockfile
|
||||||
|
|
||||||
|
(
|
||||||
|
cd intiface-engine-flutter-bridge
|
||||||
|
|
||||||
|
cargo fetch --target="$CTARGET" --locked
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
flutter build linux --release
|
||||||
|
|
||||||
|
for _elf in build/linux/$_flutter_arch/release/bundle/lib/lib*.so; do
|
||||||
|
# running patchelf on libapp (the AOT snapshot of the whole Dart codebase)
|
||||||
|
# breaks it with "[FATAL:flutter/runtime/dart_vm_initializer.cc(89)]
|
||||||
|
# Error while initializing the Dart VM: Invalid vm isolate snapshot seen".
|
||||||
|
#
|
||||||
|
# it has no rpath and only links to libc soname anyway. 🤷♀️
|
||||||
|
[ "$(basename "$_elf")" != "libapp.so" ] || continue
|
||||||
|
|
||||||
|
patchelf --set-rpath '$ORIGIN' "$_elf"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
local bundle="$builddir"/build/linux/$_flutter_arch/release/bundle
|
||||||
|
|
||||||
|
install -Dm755 "$bundle"/${pkgname/-/_} "$pkgdir"/usr/lib/$pkgname/${pkgname/-/_}
|
||||||
|
cp -r "$bundle"/lib "$pkgdir"/usr/lib/$pkgname/lib
|
||||||
|
cp -r "$bundle"/data "$pkgdir"/usr/lib/$pkgname/data
|
||||||
|
|
||||||
|
install -Dm755 "$srcdir"/$pkgname "$pkgdir"/usr/bin/$pkgname
|
||||||
|
|
||||||
|
install -Dm644 "$srcdir"/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
|
||||||
|
install -Dm644 assets/icons/intiface_central_icon.png "$pkgdir"/usr/share/icons/hicolor/512x512/apps/$pkgname.png
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
3de8a563587ea32c3fd223a053352816430e8bda8a2e3da273622b299b1cc0036215e0e1a90e69fbd57adc87d7e0ad89527568493c1019e16d6edb9f8f3082aa intiface-central-2.4.3.tar.gz
|
||||||
|
ecad3c5cee9c53fc88b539d3088907539aff0b28980a89d4be2acb3c329a7a2154cb12743c0786e5c4a33de78af06b61b5b35f8eee633989cc943dc14e87dba6 system-corrosion.patch
|
||||||
|
91014708ab7bb81518ce93db0612209d6479dfa503064d9e9d3186cd5e861165a3f63e286d271d5aac8a1d676868fc3acf51648ac01c16a215062a317ccb6623 system-flutter.patch
|
||||||
|
cbd0ac34175d812dd5ce29610e9998fd82daceb7e46e325e99218b8c34b81eae3de2ce31aab5bf8c275aca740fcfc323e3646b050e5f0b9b1f66d1d89e7f37ac lock.patch
|
||||||
|
0e0b76ef2b9ffe5555a06b85a04df73283a9360c80803dead7776ed055883ffcb5c9d5a1faf6411431ee0c5b587dcc5aac3446d2846628845af8815841bf045a pmos-fit-screen.patch
|
||||||
|
7f56c2cec0c2c3d400d412b14307865938c98d5b43089330bdef641f1b55488c5f6d9e0dafd8da4998a4992555d2589ec9f97c46addfb26ad3c5c936a2270836 pkgconf2.patch
|
||||||
|
1d2b7d28a09e26ed48d89aa5f5dffb738ba367fa2760b12980225239705e16fa1ec89901d7aecf26c8527de721a5f50f50cc77ea009cd5f25f219d1af8730ed8 no-werror.patch
|
||||||
|
a69d49b59ebd0dbeeace74954d72cd97c38aa79597887648f0c8f5ec4ecb191a1b47c43d3007e7c826323800a601951e621ee60ed739f17f67fca2f8855d95b0 intiface-central
|
||||||
|
4015b388f997eb3abc2ecd69947bb703926e01de82807a940a42902f46e90d6759f609921215ba865cb6c91f5c6d404115c16a0a7ebe4bcc35315a4910adc081 intiface-central.desktop
|
||||||
|
"
|
7
testing/intiface-central/intiface-central
Normal file
7
testing/intiface-central/intiface-central
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# fixes "Error loading shared library lib/libintiface_engine_flutter_bridge.so:
|
||||||
|
# No such file or directory"
|
||||||
|
cd /usr/lib/intiface-central
|
||||||
|
|
||||||
|
exec /usr/lib/intiface-central/intiface_central
|
8
testing/intiface-central/intiface-central.desktop
Normal file
8
testing/intiface-central/intiface-central.desktop
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Intiface Central
|
||||||
|
Icon=intiface-central
|
||||||
|
Exec=intiface-central %U
|
||||||
|
Categories=Utility;Robotics;
|
||||||
|
Keywords=Buttplug;Teledildonics;
|
||||||
|
X-Purism-FormFactor=Workstation;Mobile;
|
4638
testing/intiface-central/lock.patch
Normal file
4638
testing/intiface-central/lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
11
testing/intiface-central/no-werror.patch
Normal file
11
testing/intiface-central/no-werror.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- ./linux/CMakeLists.txt.orig
|
||||||
|
+++ ./linux/CMakeLists.txt
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
# of modifying this function.
|
||||||
|
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||||
|
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||||
|
- target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||||
|
+ target_compile_options(${TARGET} PRIVATE -Wall)
|
||||||
|
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||||
|
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||||
|
endfunction()
|
22
testing/intiface-central/pkgconf2.patch
Normal file
22
testing/intiface-central/pkgconf2.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- ./intiface-engine-flutter-bridge/Cargo.toml.orig
|
||||||
|
+++ ./intiface-engine-flutter-bridge/Cargo.toml
|
||||||
|
@@ -46,3 +46,7 @@
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
flutter_rust_bridge_codegen = "1.78.0"
|
||||||
|
+
|
||||||
|
+[patch.crates-io.pkg-config]
|
||||||
|
+git = "https://github.com/selfisekai/pkg-config-rs.git"
|
||||||
|
+rev = "4ea97bced7657de9f93b8ba151ac5029e6346ecc"
|
||||||
|
--- ./intiface-engine-flutter-bridge/Cargo.lock.orig
|
||||||
|
+++ ./intiface-engine-flutter-bridge/Cargo.lock
|
||||||
|
@@ -2142,8 +2142,7 @@
|
||||||
|
[[package]]
|
||||||
|
name = "pkg-config"
|
||||||
|
version = "0.3.27"
|
||||||
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
-checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||||
|
+source = "git+https://github.com/selfisekai/pkg-config-rs.git?rev=4ea97bced7657de9f93b8ba151ac5029e6346ecc#4ea97bced7657de9f93b8ba151ac5029e6346ecc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ppv-lite86"
|
122
testing/intiface-central/pmos-fit-screen.patch
Normal file
122
testing/intiface-central/pmos-fit-screen.patch
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
From 369131e50242091de00163d0b1fc16de33336928 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Lauren N. Liberda" <lauren@selfisekai.rocks>
|
||||||
|
Date: Tue, 30 May 2023 03:06:58 +0200
|
||||||
|
Subject: [PATCH 1/2] fix window/layout on pmos
|
||||||
|
|
||||||
|
---
|
||||||
|
.../intiface_configuration_cubit.dart | 19 ++++++++++++++---
|
||||||
|
lib/intiface_central_app.dart | 21 +++++++++++--------
|
||||||
|
lib/util/intiface_util.dart | 8 +++++++
|
||||||
|
3 files changed, 36 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/configuration/intiface_configuration_cubit.dart b/lib/configuration/intiface_configuration_cubit.dart
|
||||||
|
index 6d761bf..0f23aa4 100644
|
||||||
|
--- a/lib/configuration/intiface_configuration_cubit.dart
|
||||||
|
+++ b/lib/configuration/intiface_configuration_cubit.dart
|
||||||
|
@@ -81,6 +81,11 @@ class WebsocketServerPort extends IntifaceConfigurationState {
|
||||||
|
WebsocketServerPort(this.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
+class Pmos extends IntifaceConfigurationState {
|
||||||
|
+ final bool value;
|
||||||
|
+ Pmos(this.value);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
class UseCompactDisplay extends IntifaceConfigurationState {
|
||||||
|
final bool value;
|
||||||
|
UseCompactDisplay(this.value);
|
||||||
|
@@ -139,8 +144,10 @@ class IntifaceConfigurationCubit extends Cubit<IntifaceConfigurationState> {
|
||||||
|
// Our initializer runs through all of our known configuration values, either setting them to what they already are,
|
||||||
|
// or providing them with default values.
|
||||||
|
|
||||||
|
- // Window settings for desktop. Will be ignored on mobile. Default to expanded.
|
||||||
|
- useCompactDisplay = _prefs.getBool("useCompactDisplay") ?? false;
|
||||||
|
+ pmos = await isPostmarket();
|
||||||
|
+
|
||||||
|
+ // Window settings for desktop. Will be ignored on mobile. Default to expanded except pmos.
|
||||||
|
+ useCompactDisplay = _prefs.getBool("useCompactDisplay") ?? pmos;
|
||||||
|
|
||||||
|
// Check all of our values to make sure they exist. If not, set defaults, based on platform if needed.
|
||||||
|
serverName = _prefs.getString("serverName") ?? "Intiface Server";
|
||||||
|
@@ -157,7 +164,7 @@ class IntifaceConfigurationCubit extends Cubit<IntifaceConfigurationState> {
|
||||||
|
showExtendedUI = _prefs.getBool("showExtendedUI") ?? false;
|
||||||
|
allowRawMessages = _prefs.getBool("allowRawMessages") ?? false;
|
||||||
|
unreadNews = _prefs.getBool("unreadNews") ?? false;
|
||||||
|
- useSideNavigationBar = _prefs.getBool("useSideNavigationBar") ?? isDesktop();
|
||||||
|
+ useSideNavigationBar = _prefs.getBool("useSideNavigationBar") ?? isDesktop() && !pmos;
|
||||||
|
useLightTheme = _prefs.getBool("useLightTheme") ?? true;
|
||||||
|
|
||||||
|
// True on all platforms
|
||||||
|
@@ -206,6 +213,12 @@ class IntifaceConfigurationCubit extends Cubit<IntifaceConfigurationState> {
|
||||||
|
emit(CurrentDeviceConfigEtag(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
+ bool get pmos => _prefs.getBool("pmos")!;
|
||||||
|
+ set pmos(bool value) {
|
||||||
|
+ _prefs.setBool("pmos", value);
|
||||||
|
+ emit(Pmos(value));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// Slam to false until we figure out how to window resizing.
|
||||||
|
bool get useCompactDisplay => false; //_prefs.getBool("useCompactDisplay")!;
|
||||||
|
set useCompactDisplay(bool value) {
|
||||||
|
diff --git a/lib/intiface_central_app.dart b/lib/intiface_central_app.dart
|
||||||
|
index 1fac674..d547773 100644
|
||||||
|
--- a/lib/intiface_central_app.dart
|
||||||
|
+++ b/lib/intiface_central_app.dart
|
||||||
|
@@ -90,20 +90,23 @@ class IntifaceCentralApp extends StatelessWidget with WindowListener {
|
||||||
|
);
|
||||||
|
|
||||||
|
windowManager.addListener(this);
|
||||||
|
- windowManager.setPosition(guiSettingsCubit.getWindowPosition());
|
||||||
|
- windowDisplayModeResize(configCubit.useCompactDisplay, guiSettingsCubit);
|
||||||
|
+ if (!configCubit.pmos) {
|
||||||
|
+ windowManager.setPosition(guiSettingsCubit.getWindowPosition());
|
||||||
|
+ windowDisplayModeResize(configCubit.useCompactDisplay, guiSettingsCubit);
|
||||||
|
+
|
||||||
|
+ configCubit.stream.listen((event) {
|
||||||
|
+ if (event is! UseCompactDisplay) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ windowDisplayModeResize(event.value, guiSettingsCubit);
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
|
await windowManager.show();
|
||||||
|
await windowManager.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
- configCubit.stream.listen((event) {
|
||||||
|
- if (event is! UseCompactDisplay) {
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- windowDisplayModeResize(event.value, guiSettingsCubit);
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
// Only add app update checks on desktop, mobile apps will use stores.
|
||||||
|
updateRepo.addProvider(IntifaceCentralDesktopUpdater(configCubit.currentAppVersion));
|
||||||
|
} else {
|
||||||
|
diff --git a/lib/util/intiface_util.dart b/lib/util/intiface_util.dart
|
||||||
|
index 2f2ccb6..fb3031e 100644
|
||||||
|
--- a/lib/util/intiface_util.dart
|
||||||
|
+++ b/lib/util/intiface_util.dart
|
||||||
|
@@ -1,3 +1,4 @@
|
||||||
|
+import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
import 'package:path/path.dart' as p;
|
||||||
|
import 'dart:io';
|
||||||
|
@@ -81,3 +82,10 @@ class IntifacePaths {
|
||||||
|
|
||||||
|
bool isDesktop() => Platform.isLinux || Platform.isMacOS || Platform.isWindows;
|
||||||
|
bool isMobile() => Platform.isAndroid || Platform.isIOS;
|
||||||
|
+Future<bool> isPostmarket() async {
|
||||||
|
+ if (!Platform.isLinux) return false;
|
||||||
|
+
|
||||||
|
+ DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||||
|
+ LinuxDeviceInfo linuxInfo = await deviceInfo.linuxInfo;
|
||||||
|
+ return linuxInfo.id == "postmarketos";
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
24
testing/intiface-central/system-corrosion.patch
Normal file
24
testing/intiface-central/system-corrosion.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- ./linux/rust.cmake.orig
|
||||||
|
+++ ./linux/rust.cmake
|
||||||
|
@@ -2,19 +2,9 @@
|
||||||
|
# many dependencies we would need to install Corrosion on the system.
|
||||||
|
# See instructions on https://github.com/AndrewGaspar/corrosion#cmake-install
|
||||||
|
# Once done, uncomment this line:
|
||||||
|
-# find_package(Corrosion REQUIRED)
|
||||||
|
+find_package(Corrosion REQUIRED)
|
||||||
|
|
||||||
|
-include(FetchContent)
|
||||||
|
-
|
||||||
|
-FetchContent_Declare(
|
||||||
|
- Corrosion
|
||||||
|
- GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git
|
||||||
|
- GIT_TAG origin/master # Optionally specify a version tag or branch here
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
-FetchContent_MakeAvailable(Corrosion)
|
||||||
|
-
|
||||||
|
-corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml)
|
||||||
|
+corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml FROZEN)
|
||||||
|
|
||||||
|
# Flutter-specific
|
||||||
|
|
15
testing/intiface-central/system-flutter.patch
Normal file
15
testing/intiface-central/system-flutter.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- a/linux/CMakeLists.txt
|
||||||
|
+++ b/linux/CMakeLists.txt
|
||||||
|
@@ -110,12 +110,6 @@
|
||||||
|
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
-install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
||||||
|
- COMPONENT Runtime)
|
||||||
|
-
|
||||||
|
-install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||||
|
- COMPONENT Runtime)
|
||||||
|
-
|
||||||
|
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
||||||
|
install(FILES "${bundled_library}"
|
||||||
|
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
Loading…
Reference in New Issue
Block a user