wok annotate mc/receipt @ rev 25643

Fix mouse issue on mc with ncurses6
author Stanislas Leduc <shann@slitaz.org>
date Fri Jan 12 14:14:28 2024 +0100 (4 months ago)
parents 2c7fdf85178f
children
rev   line source
erjo@151 1 # SliTaz package receipt.
erjo@151 2
erjo@151 3 PACKAGE="mc"
Hans-G?nter@24882 4 VERSION="4.8.28"
pankso@202 5 CATEGORY="system-tools"
Hans-G?nter@21424 6 TAGS="file-manager text-editor"
erjo@151 7 SHORT_DESC="Midnight Commander - ncurses based file manager."
erjo@784 8 MAINTAINER="erjo@slitaz.org"
pascal@14999 9 LICENSE="GPL3"
Hans-G?nter@21424 10 WEB_SITE="https://www.midnight-commander.org/"
Hans-G?nter@21424 11
pascal@14999 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@21424 13 WGET_URL="http://ftp.midnight-commander.org/$TARBALL"
pascal@14999 14
Hans-G?nter@24882 15 SUGGESTED="cdrkit-isoinfo file gpm lynx mc-lang poppler-apps w3m wv xz"
Hans-G?nter@24882 16 DEPENDS="e2fsprogs gcc83-lib-base glib ncursesw util-linux-blkid"
Hans-G?nter@24882 17 BUILD_DEPENDS="gcc83 glib-dev gpm-dev ncursesw-dev ncurses-extra
Hans-G?nter@24882 18 util-linux-blkid-dev util-linux-mount-dev util-linux-uuid-dev"
Hans-G?nter@23168 19
psychomaniak@17254 20 GENERIC_MENUS="no"
erjo@151 21
Hans-G?nter@21424 22 HOST_ARCH="i486 arm"
Hans-G?nter@21424 23
pascal@24453 24 # What is the latest version available today?
pascal@24453 25 current_version()
pascal@24453 26 {
pascal@24453 27 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@24453 28 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
pascal@24453 29 }
pascal@24453 30
erjo@151 31 # Rules to configure and make the package.
erjo@151 32 compile_rules()
erjo@151 33 {
Hans-G?nter@24882 34 sed -i 's|lzma -cd|lzcat|' src/editor/edit.c
psychomaniak@17902 35
shann@25643 36 # Patch to use mouse with ncurses 6.x
shann@25643 37 # see https://midnight-commander.org/ticket/4144
shann@25643 38 patch -p1 < $stuff/fix-mouse-ncurses6.patch
shann@25643 39
Hans-G?nter@21424 40 ./configure \
Hans-G?nter@24882 41 CC=gcc-83 \
Hans-G?nter@24882 42 CXX=g++-83 \
Hans-G?nter@21424 43 --prefix=/usr \
Hans-G?nter@21424 44 --with-gpm-mouse \
Hans-G?nter@21424 45 --with-screen=ncurses \
maniac@21665 46 --without-subshell \
Hans-G?nter@21424 47 --libexecdir=/usr/lib \
Hans-G?nter@21424 48 --sysconfdir=/etc \
pankso@16181 49 $CONFIGURE_ARGS &&
Hans-G?nter@24882 50 make &&
Hans-G?nter@21424 51 make install
psychomaniak@18572 52
psychomaniak@18572 53 mkdir -p $install/usr/share/terminfo/s
Hans-G?nter@23168 54 cp -a /usr/share/terminfo/s/screen-256color \
Hans-G?nter@23168 55 $install/usr/share/terminfo/s
erjo@151 56 }
erjo@151 57
psychomaniak@17838 58 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@151 59 genpkg_rules()
erjo@151 60 {
psychomaniak@18572 61 mkdir -p $fs/usr/share/applications
Hans-G?nter@21424 62
Hans-G?nter@21424 63 cp -a $install/etc $fs/
Hans-G?nter@21424 64 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21424 65 cp -a $install/usr/lib $fs/usr
Hans-G?nter@21424 66 cp -a $install/usr/share/mc $fs/usr/share
Hans-G?nter@21424 67 cp -a $install/usr/share/terminfo $fs/usr/share
psychomaniak@17254 68
Hans-G?nter@24882 69 sed -i 's#&) ||#) ||#' $fs/usr/lib/mc/ext.d/*.sh
Hans-G?nter@24882 70 sed -i 's#|profile|#&receipt|#' $fs/usr/share/mc/syntax/Syntax
Hans-G?nter@24882 71 sed -i 's/lzma -dc/lzcat/g' $fs/usr/lib/mc/ext.d/archive.sh
Hans-G?nter@23168 72
Hans-G?nter@23168 73 cp -a $stuff/*.desktop $fs/usr/share/applications
psychomaniak@18572 74
psychomaniak@18571 75 cat > $fs/usr/bin/mc.sh <<EOF
psychomaniak@18571 76 case \$TERM in
Hans-G?nter@24882 77 (linux*)
psychomaniak@18571 78 {
psychomaniak@18571 79 cat <<EOT
psychomaniak@18571 80 shift keycode 59 = F11
psychomaniak@18571 81 shift keycode 60 = F12
psychomaniak@18571 82 shift keycode 61 = F13
psychomaniak@18571 83 shift keycode 62 = F14
psychomaniak@18571 84 shift keycode 63 = F15
psychomaniak@18571 85 shift keycode 64 = F16
psychomaniak@18571 86 shift keycode 65 = F17
psychomaniak@18571 87 shift keycode 66 = F18
psychomaniak@18571 88 shift keycode 67 = F19
psychomaniak@18571 89 shift keycode 68 = F20
psychomaniak@18571 90 EOT
Hans-G?nter@24882 91 } | loadkeys -uv
Hans-G?nter@24882 92 sleep 1
Hans-G?nter@24882 93 ;;
Hans-G?nter@24882 94 (xterm*)
psychomaniak@18571 95 export TERM='xterm-color'
psychomaniak@18571 96 [ -f '/usr/share/terminfo/s/screen-256color' ] && \\
Hans-G?nter@24882 97 export TERM='screen-256color'
Hans-G?nter@24882 98 ;;
psychomaniak@18571 99 esac
psychomaniak@18575 100 mc \$@
psychomaniak@18571 101
psychomaniak@18571 102 EOF
Hans-G?nter@21424 103
Hans-G?nter@23168 104 chmod 755 $fs/usr/bin/mc.sh
Hans-G?nter@23168 105 chown -R root:root $fs
erjo@151 106 }