mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
Add compatibility libraries and update package dependencies for PortMaster
- Introduced portmaster-compat-libs package to aggregate compatibility libraries. - Added compat-codec2, compat-x264, and compat-x265 packages for multimedia support. - Updated package.mk files to include new dependencies and improve installation scripts. - Enhanced start_portmaster.sh to handle mod_ArchR.txt for modular support. - Adjusted ffmpeg configuration to enable ffmpeg and ffprobe without ffplay.
This commit is contained in:
@@ -7,7 +7,7 @@ PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/PortsMaster/PortMaster-GUI"
|
||||
PKG_URL="https://github.com/PortsMaster/PortMaster-GUI/releases/download/${PKG_VERSION}/PortMaster.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain archr-hotkey gamecontrollerdb oga_controls control-gen xmlstarlet list-guid gst-plugins-base Python3 xz"
|
||||
PKG_DEPENDS_TARGET="toolchain archr-hotkey gamecontrollerdb oga_controls control-gen xmlstarlet list-guid gst-plugins-base Python3 xz portmaster-compat-libs"
|
||||
PKG_LONGDESC="Portmaster - a simple tool that allows you to download various game ports"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
@@ -28,4 +28,8 @@ makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/lib/compat
|
||||
curl -Lo ${PKG_BUILD}/compat.zip ${COMPAT_URL}
|
||||
unzip -qq ${PKG_BUILD}/compat.zip -d ${INSTALL}/usr/lib/compat
|
||||
|
||||
# libcodec2.so.0.9, libx264.so.160 e libx265.so.192 (SONAMEs do
|
||||
# Debian 11 listados no PortMaster_CFW.md) sao instaladas como
|
||||
# arquivos reais pelo pacote portmaster-compat-libs (dependencia).
|
||||
}
|
||||
|
||||
@@ -15,11 +15,15 @@ fi
|
||||
|
||||
cd /storage/.config/PortMaster
|
||||
|
||||
#Grab the latest control.txt & mapper.txt, then set correct permissions
|
||||
#Grab the latest control.txt, mapper.txt & mod_ArchR.txt, then set correct permissions
|
||||
cp /usr/config/PortMaster/control.txt control.txt
|
||||
chmod +x /storage/.config/PortMaster/control.txt
|
||||
cp /usr/config/PortMaster/mapper.txt mapper.txt
|
||||
chmod +x /storage/.config/PortMaster/mapper.txt
|
||||
if [ -f /usr/config/PortMaster/mod_ArchR.txt ]; then
|
||||
cp /usr/config/PortMaster/mod_ArchR.txt mod_ArchR.txt
|
||||
chmod +x /storage/.config/PortMaster/mod_ArchR.txt
|
||||
fi
|
||||
|
||||
|
||||
#Use our gamecontrollerdb.txt
|
||||
@@ -47,6 +51,7 @@ rm -f gptokeyb
|
||||
#Copy over required files for ports
|
||||
cp /storage/.config/PortMaster/control.txt /storage/roms/ports/PortMaster/control.txt
|
||||
cp /storage/.config/PortMaster/mapper.txt /storage/roms/ports/PortMaster/mapper.txt
|
||||
[ -f /storage/.config/PortMaster/mod_ArchR.txt ] && cp /storage/.config/PortMaster/mod_ArchR.txt /storage/roms/ports/PortMaster/mod_ArchR.txt
|
||||
cp /storage/.config/PortMaster/gamecontrollerdb.txt /storage/roms/ports/PortMaster/gamecontrollerdb.txt
|
||||
cp /usr/bin/oga_controls* /storage/roms/ports/PortMaster/
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
|
||||
directory="roms"
|
||||
controlfolder="/$directory/ports/PortMaster"
|
||||
# ArchR roda EmulationStation/runemu/PortMaster como root (modelo herdado de
|
||||
# JELOS/ROCKNIX). Por isso ESUDO fica vazio: ports que executam mount,
|
||||
# umount, chmod /dev/uinput, zramctl, swapon ou systemctl funcionam sem
|
||||
# privilege escalation. Se algum dia o frontend rodar como usuario comum,
|
||||
# adicionar doas/sudo e definir ESUDO="doas" (ou "sudo") aqui.
|
||||
ESUDO=""
|
||||
ESUDOKILL="-1"
|
||||
ESUDOKILL2="-1"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
## Modular - ArchR
|
||||
#
|
||||
# A modular file that is sourced for specific script lines required by ports
|
||||
# running on ArchR. Triggered by PortMaster.sh via:
|
||||
# [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
|
||||
#
|
||||
# CFW_NAME is read from /etc/os-release (NAME="ArchR").
|
||||
|
||||
PORT_32BIT="${PORT_32BIT:-"N"}"
|
||||
|
||||
if [[ "$PORT_32BIT" == "Y" ]]; then
|
||||
export SPA_PLUGIN_DIR="/usr/lib32/spa-0.2"
|
||||
export PIPEWIRE_MODULE_DIR="/usr/lib32/pipewire-0.3/"
|
||||
fi
|
||||
|
||||
export LIBGL_DRIVERS_PATH=/usr/lib32/dri:/usr/lib/dri
|
||||
|
||||
# Use for Godot 2
|
||||
GODOT2_OPTS="-r ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f"
|
||||
|
||||
# Use for Godot 3+
|
||||
GODOT_OPTS="--resolution ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} -f"
|
||||
|
||||
pm_platform_helper() {
|
||||
if [ -e "$PM_PIPE" ]; then
|
||||
PortMasterDialogExit
|
||||
fi
|
||||
|
||||
if [ -e "/usr/bin/portmaster_sway_fullscreen.sh" ]; then
|
||||
/usr/bin/portmaster_sway_fullscreen.sh "$(basename "$1")"
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
PKG_NAME="vim"
|
||||
PKG_VERSION="9.1.0"
|
||||
PKG_SHA256="ddb435f6e386c53799a3025bdc5a3533beac735a0ee596cb27ada97366a1c725"
|
||||
PKG_LICENSE="VIM"
|
||||
PKG_SITE="http://www.vim.org/"
|
||||
PKG_URL="https://github.com/vim/vim/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain ncurses"
|
||||
PKG_LONGDESC="Vim is a highly configurable text editor built to enable efficient text editing."
|
||||
PKG_BUILD_FLAGS="-sysroot -cfg-libs"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="vim_cv_getcwd_broken=no \
|
||||
vim_cv_memmove_handles_overlap=yes \
|
||||
vim_cv_stat_ignores_slash=yes \
|
||||
vim_cv_terminfo=yes \
|
||||
vim_cv_tgetent=zero \
|
||||
vim_cv_toupper_broken=no \
|
||||
vim_cv_tty_group=world \
|
||||
vim_cv_tty_mode=0620 \
|
||||
ac_cv_sizeof_int=4 \
|
||||
ac_cv_small_wchar_t=no \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-canberra \
|
||||
--disable-nls \
|
||||
--enable-selinux=no \
|
||||
--enable-gui=no \
|
||||
--with-compiledby=ArchR \
|
||||
--with-features=normal \
|
||||
--with-tlib=ncursesw \
|
||||
--without-x"
|
||||
|
||||
pre_configure_target() {
|
||||
cd ..
|
||||
rm -rf .${TARGET_NAME}
|
||||
# tgetent vive em libtinfow.so. libncursesw.so so o referencia via
|
||||
# DT_NEEDED, e com `-Wl,--as-needed` o ld dropa -lncursesw quando o
|
||||
# conftest do configure procura tgetent diretamente. Linkamos -ltinfow
|
||||
# explicito para que o symbol seja resolvido na configure-time.
|
||||
export LIBS="-ltinfow ${LIBS}"
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
# Trim runtime to the bare minimum: keep colors/syntax/indent, drop
|
||||
# docs/tutorials/spell files. PortMaster_CFW.md only requires a
|
||||
# working `vim` binary; the full ~30MB runtime would balloon the
|
||||
# image. Strip language packs we don't ship locales for.
|
||||
if [ -d "${INSTALL}/usr/share/vim/vim91" ]; then
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/doc
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/tutor
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/spell
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/lang
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/keymap
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/print
|
||||
rm -rf ${INSTALL}/usr/share/vim/vim91/tools
|
||||
fi
|
||||
rm -rf ${INSTALL}/usr/share/applications
|
||||
rm -rf ${INSTALL}/usr/share/icons
|
||||
rm -rf ${INSTALL}/usr/share/man
|
||||
|
||||
# Drop xxd (we already have busybox alternatives if needed) and
|
||||
# symlink ex/view/vimdiff to vim; saves a few MB of duplicates.
|
||||
rm -f ${INSTALL}/usr/bin/xxd
|
||||
rm -f ${INSTALL}/usr/bin/ex ${INSTALL}/usr/bin/view ${INSTALL}/usr/bin/vimdiff ${INSTALL}/usr/bin/rvim ${INSTALL}/usr/bin/rview
|
||||
ln -sf vim ${INSTALL}/usr/bin/vi
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
PKG_NAME="compat-codec2"
|
||||
PKG_VERSION="0.9.2"
|
||||
PKG_SHA256="19181a446f4df3e6d616b50cabdac4485abb9cd3242cf312a0785f892ed4c76c"
|
||||
PKG_LICENSE="LGPL-2.1"
|
||||
PKG_SITE="https://github.com/drowe67/codec2"
|
||||
PKG_URL="https://snapshot.debian.org/archive/debian/20191223T030135Z/pool/main/c/codec2/codec2_0.9.2.orig.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Codec2 v0.9.2 (libcodec2.so.0.9) for PortMaster compat layer."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
PKG_BUILD_FLAGS="-cfg-libs"
|
||||
|
||||
# codec2 0.9.2 + Ninja gera build.ninja com $ nao escapado (bug do gerador
|
||||
# Ninja desta versao especifica). Forcamos Unix Makefiles via cmake manual.
|
||||
|
||||
configure_target() {
|
||||
cd ${PKG_BUILD}
|
||||
mkdir -p build-target
|
||||
cd build-target
|
||||
cmake -G "Unix Makefiles" \
|
||||
${TARGET_CMAKE_OPTS} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DUNITTEST=OFF \
|
||||
..
|
||||
}
|
||||
|
||||
make_target() {
|
||||
cd ${PKG_BUILD}/build-target
|
||||
make ${MAKEFLAGS}
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
cd ${PKG_BUILD}/build-target
|
||||
make install DESTDIR=${INSTALL}
|
||||
|
||||
mkdir -p ${INSTALL}/usr/lib/compat
|
||||
if compgen -G "${INSTALL}/usr/lib/libcodec2.so*" > /dev/null; then
|
||||
cp -a ${INSTALL}/usr/lib/libcodec2.so.0.9* ${INSTALL}/usr/lib/compat/
|
||||
fi
|
||||
|
||||
rm -rf ${INSTALL}/usr/include
|
||||
rm -rf ${INSTALL}/usr/share
|
||||
rm -rf ${INSTALL}/usr/bin
|
||||
rm -rf ${INSTALL}/usr/lib/cmake
|
||||
rm -rf ${INSTALL}/usr/lib/pkgconfig
|
||||
rm -f ${INSTALL}/usr/lib/libcodec2*
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From: ArchR <noreply@archr-linux>
|
||||
Subject: [PATCH] codec2_native: compilar generate_codebook direto com host cc
|
||||
|
||||
codec2 0.9.2 usa ExternalProject_Add(codec2_native) para construir uma copia
|
||||
nativa de `generate_codebook` durante cross-compile. Sem CMAKE_ARGS explicitos
|
||||
a sub-build herda CMAKE_TOOLCHAIN_FILE/CFLAGS/CXXFLAGS do parent (aarch64) e
|
||||
falha (compilador cc do host nao aceita -mabi=lp64 / -mno-outline-atomics).
|
||||
|
||||
Substituimos o build CMake por um single-shot `cc -O2 -lm`, que compila o
|
||||
gerador no host sem nenhuma heranca de toolchain.
|
||||
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -79,8 +79,9 @@ if(CMAKE_CROSSCOMPILING)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(codec2_native
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}
|
||||
- BUILD_COMMAND $(MAKE) generate_codebook
|
||||
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy src/generate_codebook ${CMAKE_CURRENT_BINARY_DIR}
|
||||
+ CONFIGURE_COMMAND ""
|
||||
+ BUILD_COMMAND cc -O2 -o <BINARY_DIR>/generate_codebook ${CMAKE_SOURCE_DIR}/src/generate_codebook.c -lm
|
||||
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <BINARY_DIR>/generate_codebook ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
add_executable(generate_codebook IMPORTED)
|
||||
set_target_properties(generate_codebook PROPERTIES
|
||||
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
PKG_NAME="compat-x264"
|
||||
PKG_VERSION="cde9a93"
|
||||
PKG_SHA256="239f1d36dbe672a436a46098cb24d15e90df4a5eafda947acaa9d0cccd92c13e"
|
||||
PKG_LICENSE="GPL-2.0"
|
||||
PKG_SITE="https://www.videolan.org/developers/x264.html"
|
||||
PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="x264 git rev cde9a93 (libx264.so.160) for PortMaster compat layer."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
PKG_BUILD_FLAGS="-cfg-libs"
|
||||
|
||||
configure_target() {
|
||||
cd ${PKG_BUILD}
|
||||
./configure \
|
||||
--host=${TARGET_NAME} \
|
||||
--cross-prefix=${TARGET_PREFIX} \
|
||||
--sysroot=${SYSROOT_PREFIX} \
|
||||
--prefix=/usr \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--disable-cli \
|
||||
--disable-opencl \
|
||||
--disable-asm
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make DESTDIR=${INSTALL} install-lib-shared
|
||||
|
||||
mkdir -p ${INSTALL}/usr/lib/compat
|
||||
if compgen -G "${INSTALL}/usr/lib/libx264.so*" > /dev/null; then
|
||||
cp -a ${INSTALL}/usr/lib/libx264.so.160* ${INSTALL}/usr/lib/compat/
|
||||
fi
|
||||
|
||||
rm -rf ${INSTALL}/usr/include
|
||||
rm -rf ${INSTALL}/usr/lib/pkgconfig
|
||||
rm -f ${INSTALL}/usr/lib/libx264*
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
PKG_NAME="compat-x265"
|
||||
PKG_VERSION="3.4"
|
||||
PKG_SHA256="7f2771799bea0f53b5ab47603d5bea46ea2a221e047a7ff398115e9976fd5f86"
|
||||
PKG_LICENSE="GPL-2.0"
|
||||
PKG_SITE="https://www.videolan.org/developers/x265.html"
|
||||
PKG_URL="https://bitbucket.org/multicoreware/x265_git/get/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="x265 v3.4 (libx265.so.192) for PortMaster compat layer."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
PKG_BUILD_FLAGS="-cfg-libs"
|
||||
|
||||
# bitbucket /get/<tag>.tar.gz extrai para multicoreware-x265_git-<commit>/.
|
||||
# O CMakeLists.txt esta em source/.
|
||||
|
||||
configure_target() {
|
||||
cd ${PKG_BUILD}
|
||||
if [ -d source ]; then
|
||||
SRC_SUBDIR="source"
|
||||
else
|
||||
SRC_SUBDIR="$(ls -d */source 2>/dev/null | head -1)"
|
||||
fi
|
||||
|
||||
mkdir -p build-target
|
||||
cd build-target
|
||||
|
||||
cmake ${TARGET_CMAKE_OPTS} \
|
||||
-DENABLE_SHARED=ON \
|
||||
-DENABLE_CLI=OFF \
|
||||
-DENABLE_PIC=ON \
|
||||
-DENABLE_ASSEMBLY=OFF \
|
||||
-DHIGH_BIT_DEPTH=OFF \
|
||||
../${SRC_SUBDIR}
|
||||
}
|
||||
|
||||
make_target() {
|
||||
cd ${PKG_BUILD}/build-target
|
||||
make ${MAKEFLAGS}
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
cd ${PKG_BUILD}/build-target
|
||||
make install DESTDIR=${INSTALL}
|
||||
|
||||
mkdir -p ${INSTALL}/usr/lib/compat
|
||||
if compgen -G "${INSTALL}/usr/lib/libx265.so*" > /dev/null; then
|
||||
cp -a ${INSTALL}/usr/lib/libx265.so.192* ${INSTALL}/usr/lib/compat/
|
||||
fi
|
||||
|
||||
rm -rf ${INSTALL}/usr/include
|
||||
rm -rf ${INSTALL}/usr/share
|
||||
rm -rf ${INSTALL}/usr/lib/pkgconfig
|
||||
rm -f ${INSTALL}/usr/lib/libx265*
|
||||
}
|
||||
@@ -134,7 +134,10 @@ pre_configure_target() {
|
||||
if [ "${FFMPEG_TESTING}" = "yes" ]; then
|
||||
PKG_FFMPEG_TESTING="--enable-encoder=wrapped_avframe --enable-muxer=null"
|
||||
else
|
||||
PKG_FFMPEG_TESTING="--disable-programs"
|
||||
# PortMaster_CFW.md lista /usr/bin/ffmpeg como ferramenta esperada.
|
||||
# Habilitar ffmpeg + ffprobe sem ffplay (evita pull de SDL2 no link
|
||||
# do binario; libavformat/avcodec ja sao usadas no resto do sistema).
|
||||
PKG_FFMPEG_TESTING="--disable-programs --enable-ffmpeg --enable-ffprobe"
|
||||
fi
|
||||
|
||||
configure_target() {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
PKG_NAME="portmaster-compat-libs"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_ARCH="aarch64"
|
||||
PKG_LICENSE="GPL-2.0"
|
||||
PKG_SITE="https://github.com/archr-linux/Arch-R"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain compat-codec2 compat-x264 compat-x265"
|
||||
PKG_LONGDESC="Meta-pacote: agrega libcodec2.so.0.9 + libx264.so.160 + libx265.so.192 (SONAMEs Debian 11/darkOS exigidos pelo PortMaster_CFW.md) compilados do upstream para /usr/lib/compat."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
PKG_SECTION="virtual"
|
||||
|
||||
unpack() {
|
||||
: # Sem fontes proprias; tudo vem via PKG_DEPENDS_TARGET.
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # Instalacao real e feita pelos pacotes compat-* dependencias.
|
||||
}
|
||||
@@ -3,7 +3,19 @@
|
||||
|
||||
. ${ROOT}/packages/virtual/debug/package.mk
|
||||
|
||||
PKG_DEPENDS_TARGET+=" nvtop apitrace"
|
||||
PKG_DEPENDS_TARGET+=" nvtop apitrace valgrind vim"
|
||||
|
||||
# strace is broken on 6.19 kernels, so temporarily remove
|
||||
PKG_DEPENDS_TARGET=${PKG_DEPENDS_TARGET//"strace"/}
|
||||
# strace 6.19 quebra apenas em devices SM8650|SM8550|SM8250|H700 (case do
|
||||
# packages/debug/strace/package.mk). Demais devices, incluindo RK3326,
|
||||
# recebem strace 6.17 e funcionam normalmente.
|
||||
case "${DEVICE}" in
|
||||
SM8650|SM8550|SM8250|H700)
|
||||
PKG_DEPENDS_TARGET=${PKG_DEPENDS_TARGET//"strace"/}
|
||||
;;
|
||||
esac
|
||||
|
||||
# ltrace nao foi adicionado porque o upstream esta abandonado desde
|
||||
# 0.7.3 (2013), nao tem suporte estavel a aarch64 e os mantenedores
|
||||
# do Debian/Alpine reportam falhas com glibc moderna. Ports que
|
||||
# precisem de tracing de symbol-level devem usar gdb (presente) ou
|
||||
# perf trace.
|
||||
|
||||
Reference in New Issue
Block a user