这是indexloc提供的服务,不要输入任何密码
Skip to content

addpkg(x11/icewm): 3.8.1 #25433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions x11-packages/icewm/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
TERMUX_PKG_HOMEPAGE=https://ice-wm.org/
TERMUX_PKG_DESCRIPTION="Window manager with goals of speed, simplicity, and usability"
TERMUX_PKG_LICENSE="LGPL-2.0-only"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.8.1"
TERMUX_PKG_SRCURL="https://github.com/ice-wm/icewm/releases/download/$TERMUX_PKG_VERSION/icewm-$TERMUX_PKG_VERSION.tar.lz"
TERMUX_PKG_SHA256=3c525512b1e4f4cf7999a4687f1b82311d7448d8c174780b5efd3b8aafbfb4a2
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="alsa-lib, imlib2, libandroid-glob, libandroid-wordexp, librsvg, libsndfile, libxcomposite, libxdamage, libxinerama, libxpm, libxrandr, libxres"
TERMUX_PKG_BUILD_DEPENDS="aosp-libs"
TERMUX_PKG_SUGGESTS="xdg-menu"

termux_step_pre_configure() {
if [[ "$TERMUX_ON_DEVICE_BUILD" == "false" ]]; then
termux_setup_proot
patch="$TERMUX_PKG_BUILDER_DIR/genpref.diff"
echo "Applying patch: $(basename "$patch")"
patch --silent -p1 < "$patch"
fi

LDFLAGS+=" -landroid-glob -landroid-wordexp"
}
40 changes: 40 additions & 0 deletions x11-packages/icewm/cross-compiling.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
--- a/configure
+++ b/configure
@@ -22677,10 +22677,8 @@ rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strlcpy" >&5
$as_echo_n "checking for strlcpy... " >&6; }
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ $as_echo "yes"
+ $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22719,10 +22716,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strlcat" >&5
$as_echo_n "checking for strlcat... " >&6; }
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ $as_echo "yes"
+ $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22755,10 +22755,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11 by default" >&5
$as_echo_n "checking for C++11 by default... " >&6; }
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ $as_echo "yes"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
21 changes: 21 additions & 0 deletions x11-packages/icewm/fix-mailbox-port-datatype.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Fixes this error:

src/amailbox.cc:121:9: error: no matching function for call to 'inrange'
121 | if (inrange(fPort, 1, USHRT_MAX)) {
| ^~~~~~~
src/base.h:50:13: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'unsigned int')
50 | inline bool inrange(T value, T lower, T upper) {
| ^
1 error generated.

--- a/src/amailbox.cc
+++ b/src/amailbox.cc
@@ -118,7 +118,7 @@ void MailCheck::resolve() {
setState(IDLE);

fPort = portNumber();
- if (inrange(fPort, 1, USHRT_MAX)) {
+ if (inrange(fPort, 1, (int)USHRT_MAX)) {
if (ssl()) return; // fAddr is unnecessary for SSL

addrinfo hints = {};
11 changes: 11 additions & 0 deletions x11-packages/icewm/genpref.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -2197,7 +2197,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-nodist_pkgdataDATA


preferences: genpref$(EXEEXT)
- $(AM_V_GEN)./genpref$(EXEEXT) -o $@ -s
+ $(AM_V_GEN)termux-proot-run ./genpref$(EXEEXT) -o $@ -s

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
34 changes: 34 additions & 0 deletions x11-packages/icewm/mblen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
The `android_mblen()` implementation copied from the `imlib2` Termux package

--- a/src/ypaint.cc
+++ b/src/ypaint.cc
@@ -18,6 +18,11 @@

#ifdef CONFIG_I18N
#include <wctype.h>
+
+static int android_mblen(const char *s, size_t n)
+{
+ return mbtowc(0, s, n);
+}
#endif

static inline Display* display() { return xapp->display(); }
@@ -310,7 +315,7 @@ void Graphics::drawCharUnderline(int x, int y, const char *str, int charPos) {
int c = 0, cp = 0;

#ifdef CONFIG_I18N
- if (multiByte) mblen(nullptr, 0);
+ if (multiByte) android_mblen(nullptr, 0);
#endif
while (c <= len && cp <= charPos + 1) {
if (charPos == cp) {
@@ -325,7 +330,7 @@ void Graphics::drawCharUnderline(int x, int y, const char *str, int charPos) {
break;
#ifdef CONFIG_I18N
if (multiByte) {
- int nc = mblen(str + c, size_t(len - c));
+ int nc = android_mblen(str + c, size_t(len - c));
if (nc < 1) { // bad things
c++;
cp++;
25 changes: 25 additions & 0 deletions x11-packages/icewm/suppress-network-permission-warning.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Most Android 11+ devices do not have permission
to access /proc/net/dev without root, with
some exceptions, so suppress this warning with
the assumption that users of Android 11+ are
probably familiar with this limitation and would rather
not be annoyed by this warning spamming.
The other observable effect when this warning occurs is
the network status monitor not working,
and if the user sees that happening, trying the commands
'pkg install iproute2' and 'ip a' on the same device without
using root will show the user the same 'permission denied'
message, informing them that they are using a device
that does not permit network adapter metadata permission
without root.
--- a/src/apppstatus.cc
+++ b/src/apppstatus.cc
@@ -761,7 +761,7 @@ bool NetStatusControl::readNetDev(char* data, size_t size) {
if (fNetDev < 0) {
fNetDev = open(path, O_RDONLY | O_CLOEXEC);
if (fNetDev < 0) {
- fail("open %s", path);
+ //fail("open %s", path);
return false;
}
}
46 changes: 46 additions & 0 deletions x11-packages/xdg-menu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
TERMUX_PKG_HOMEPAGE=https://wiki.archlinux.org/title/Xdg-menu
TERMUX_PKG_DESCRIPTION="Tool that generates XDG Desktop Menus for icewm and other window managers"
TERMUX_PKG_LICENSE="GPL-2.0-or-later"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.7.6.6"
TERMUX_PKG_SRCURL="https://arch.p5n.pp.ru/~sergej/dl/2023/arch-xdg-menu-$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=01cbd3749939c180fed33783f0f7c4f47ac9563af2d1c4b39e23cb6cba792b40
TERMUX_PKG_DEPENDS="perl"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_CONFFILES="
etc/update-menus.conf
etc/xdg/menus/termux-applications.menu
"

# The original "termux_extract_src_archive" always strips the first components
# but the source of xdg-menu is directly under the root directory of the tar file
termux_extract_src_archive() {
local file="$TERMUX_PKG_CACHEDIR/$(basename "$TERMUX_PKG_SRCURL")"
mkdir -p "$TERMUX_PKG_SRCDIR"
tar -xf "$file" -C "$TERMUX_PKG_SRCDIR"
}

termux_step_make_install() {
install -D -m 0755 xdg_menu "$TERMUX_PREFIX"/bin/xdg_menu
install -D -m 0755 xdg_menu_su "$TERMUX_PREFIX"/bin/xdg_menu_su
install -D -m 0755 update-menus "$TERMUX_PREFIX"/bin/update-menus
install -D -m 0644 update-menus.conf "$TERMUX_PREFIX"/etc/update-menus.conf
mkdir -p "$TERMUX_PREFIX"/share/desktop-directories/
cp termux-desktop-directories/* "$TERMUX_PREFIX"/share/desktop-directories/
mkdir -p "$TERMUX_PREFIX"/etc/xdg/menus/
cp termux-xdg-menu/* "$TERMUX_PREFIX"/etc/xdg/menus/
}

termux_step_create_debscripts() {
cat <<- POSTINST_EOF > ./postinst
#!$TERMUX_PREFIX/bin/bash
set -e

echo "Sideloading Perl XML::Parser..."
cpan install XML::Parser

exit 0
POSTINST_EOF
chmod +x ./postinst
}
Loading