diff options
author | B. Watson <urchlay@slackware.uk> | 2024-10-10 02:48:53 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-10-12 11:34:46 +0700 |
commit | a3f533d156e08d8e550bf7db754e935d5c25a898 (patch) | |
tree | 8101c936f71401866ac8f97708bccd904746a5da /system | |
parent | b4af169b14ff7b81c16d5fabf96c79fd4305723c (diff) |
system/aterm: New maintainer, fix build.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/aterm/README | 7 | ||||
-rw-r--r-- | system/aterm/aterm.SlackBuild | 56 | ||||
-rw-r--r-- | system/aterm/aterm.info | 4 | ||||
-rw-r--r-- | system/aterm/patches/01-display-security-issue.diff | 24 | ||||
-rw-r--r-- | system/aterm/patches/02-deadkeys.diff | 35 | ||||
-rw-r--r-- | system/aterm/patches/03-dpy.diff | 28 | ||||
-rw-r--r-- | system/aterm/patches/05-configure-clang16.diff | 23 | ||||
-rw-r--r-- | system/aterm/slack-desc | 4 |
8 files changed, 154 insertions, 27 deletions
diff --git a/system/aterm/README b/system/aterm/README index 448f8c0d9d71..a0724cf1eb05 100644 --- a/system/aterm/README +++ b/system/aterm/README @@ -1,3 +1,10 @@ +aterm (old-school terminal emulator with nice visual effects) + aterm is designed to provide pleasing visual effects while performing such a mundane function as terminal emulation under X. It is largely based on rxvt code. + +Note: aterm hasn't been maintained by its developers in decades. This +build is provided for completeness' sake (for someone trying to +recreate the late 90s AfterStep experience) but you'd be better off +using something like Slackware's rxvt-unicode, or even xterm. diff --git a/system/aterm/aterm.SlackBuild b/system/aterm/aterm.SlackBuild index 9fd5b39a59df..cff2f883f1e7 100644 --- a/system/aterm/aterm.SlackBuild +++ b/system/aterm/aterm.SlackBuild @@ -22,13 +22,24 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by the SlackBuilds.org project +# 20241010 bkw: v1.0.1, BUILD=2 +# - take over maintenance. +# - fix build on 64-bit. +# - make the script actually exit if the binary doesn't get built. +# - add some patches: compile fix, security, and functionality. +# - don't install docs/menu with +x files. + +# Note: in Slackware 15.0, it compiles and runs, but we get this warning: +# command.c:1187:13: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations] +# At some point, XKeycodeToKeysym may get removed from Xlib, in which +# case aterm will be removed from SBo, unless *you* send a patch to +# fix it (I don't love it enough to do the job myself, sorry). cd $(dirname $0) ; CWD=$(pwd) PRGNAM=aterm VERSION=${VERSION:-1.0.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,9 +51,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -66,6 +74,10 @@ else LIBDIRSUFFIX="" fi +# 20240713 bkw: this was missing before 1.0.1 build 2. build was +# failing on x86_64 and nobody ever noticed... +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -73,14 +85,17 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + sed -i 's%<sys/stropts.h>%<sys/ioctl.h>%;s%I_PUSH,%TIOCPKT,%' src/command.c +# patches from https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-terms/aterm +for i in $CWD/patches/*.diff; do + echo "===> applying: $( basename $i )" + patch -p1 < $i +done + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -94,19 +109,14 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ChangeLog INSTALL doc/* $PKG/usr/doc/$PRGNAM-$VERSION -for i in Makefile Makefile.in aterm.1 ; - do rm $PKG/usr/doc/$PRGNAM-$VERSION/$i ; -done -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +strip $PKG/usr/bin/$PRGNAM +gzip $PKG/usr/man/man1/$PRGNAM.1 + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +chmod 644 doc/menu/* +cp -a ChangeLog doc/{Change*,FAQ,README*,menu} $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/system/aterm/aterm.info b/system/aterm/aterm.info index 2245f7988189..b3fa13072043 100644 --- a/system/aterm/aterm.info +++ b/system/aterm/aterm.info @@ -6,5 +6,5 @@ MD5SUM="c2eede028e1011e0ec7035cf319c9b5a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Martin Lefebvre" -EMAIL="dadexter@gmail.com" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/aterm/patches/01-display-security-issue.diff b/system/aterm/patches/01-display-security-issue.diff new file mode 100644 index 000000000000..e44c0b360d21 --- /dev/null +++ b/system/aterm/patches/01-display-security-issue.diff @@ -0,0 +1,24 @@ +--- aterm-1.0.1/src/main.c 2007-08-01 16:08:29.000000000 +0200 ++++ aterm-1.0.1.new/src/main.c 2008-05-03 14:06:52.000000000 +0200 +@@ -2057,10 +2057,6 @@ + */ + get_options(argc, argv); + +- if( display_name == NULL ) +- if ((display_name = getenv("DISPLAY")) == NULL) +- display_name = ":0"; +- + #ifdef HAVE_AFTERSTEP + #ifdef MyArgs_IS_MACRO + MyArgsPtr = safecalloc(1, sizeof(ASProgArgs) ); +@@ -2102,7 +2098,9 @@ + Xdisplay = XOpenDisplay(display_name); + + if (!Xdisplay) { +- print_error("can't open display %s", display_name); ++ print_error("can't open display %s", display_name?display_name: ++ getenv("DISPLAY")?getenv("DISPLAY"): ++ "as no -d given and DISPLAY not set"); + exit(EXIT_FAILURE); + } + /* changed from _MOTIF_WM_INFO - Vaevictus - gentoo bug #139554 */ diff --git a/system/aterm/patches/02-deadkeys.diff b/system/aterm/patches/02-deadkeys.diff new file mode 100644 index 000000000000..958f40900bcd --- /dev/null +++ b/system/aterm/patches/02-deadkeys.diff @@ -0,0 +1,35 @@ +--- aterm-1.0.1~/src/command.c 2006-06-26 20:01:20.000000000 +0200 ++++ aterm-1.0.1/src/command.c 2007-09-26 15:03:19.000000000 +0200 +@@ -1486,19 +1486,21 @@ + numlock_state = (ev->xkey.state & ModNumLockMask); /* numlock toggle */ + PrivMode((!numlock_state), PrivMode_aplKP); + } +-#ifdef USE_XIM ++#if defined(USE_XIM) || !defined(NO_XLOCALE) + len = 0; +- if (Input_Context != NULL) { +- Status status_return; ++ if (!XFilterEvent(ev, *(&ev->xkey.window))) { ++ if (Input_Context != NULL) { ++ Status status_return; + +- kbuf[0] = '\0'; +- len = XmbLookupString(Input_Context, &ev->xkey, kbuf, +- sizeof(kbuf), &keysym, +- &status_return); +- } else { +- len = XLookupString(&ev->xkey, kbuf, +- sizeof(kbuf), &keysym, +- &compose); ++ kbuf[0] = '\0'; ++ len = XmbLookupString(Input_Context, &ev->xkey, kbuf, ++ sizeof(kbuf), &keysym, ++ &status_return); ++ } else { ++ len = XLookupString(&ev->xkey, kbuf, ++ sizeof(kbuf), &keysym, ++ &compose); ++ } + } + #else /* USE_XIM */ + len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, &compose); diff --git a/system/aterm/patches/03-dpy.diff b/system/aterm/patches/03-dpy.diff new file mode 100644 index 000000000000..fbe9800d2189 --- /dev/null +++ b/system/aterm/patches/03-dpy.diff @@ -0,0 +1,28 @@ +Resolve build failure. Patch from Fedora. + +Bug: https://bugs.gentoo.org/615836 + +diff -up aterm-1.0.1/src/main.c.orig aterm-1.0.1/src/main.c +--- aterm-1.0.1/src/main.c.orig 2011-02-19 09:12:01.000000000 +0200 ++++ aterm-1.0.1/src/main.c 2011-02-19 09:25:02.000000000 +0200 +@@ -2087,10 +2087,10 @@ main(int argc, char *argv[]) + #endif + + ConnectX ( &Scr, 0 ); +- Xdisplay = dpy ; +- Xscreen = Scr.screen ; ++ Xscreen = Scr.screen ; + asv = Scr.asv ; + ++ Xdisplay = asv->dpy; + Xcmap = asv->colormap; + Xdepth = asv->visual_info.depth; + Xvisual = asv->visual_info.visual; +@@ -2125,7 +2125,6 @@ main(int argc, char *argv[]) + XdisplayHeight = DisplayHeight (Xdisplay, Xscreen); + + #ifdef HAVE_AFTERIMAGE +- dpy = Xdisplay ; + asv = create_asvisual (Xdisplay, Xscreen, Xdepth, NULL); + Xcmap = asv->colormap; + Xdepth = asv->visual_info.depth; diff --git a/system/aterm/patches/05-configure-clang16.diff b/system/aterm/patches/05-configure-clang16.diff new file mode 100644 index 000000000000..9faf68837d4e --- /dev/null +++ b/system/aterm/patches/05-configure-clang16.diff @@ -0,0 +1,23 @@ +Add missing int tpye, and avoid calling the undeclared exit function. +Implicit ints and function declarations are language features removed +in C99 and are likely to become unsupported (by default) in future +compilers. + +--- a/autoconf/configure.in ++++ b/autoconf/configure.in +@@ -615,12 +615,12 @@ + [#define X_LOCALE 1 + #include <X11/Xlocale.h> + #include <X11/Xlib.h> +-main() { ++int main() { + char *p; + if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) +-exit (XSupportsLocale() ? 0 : 1); ++return XSupportsLocale() ? 0 : 1; + else +-exit (1);} ++return 1;} + ],rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no, + AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))]) + diff --git a/system/aterm/slack-desc b/system/aterm/slack-desc index 60e8c133695a..719c99bb757a 100644 --- a/system/aterm/slack-desc +++ b/system/aterm/slack-desc @@ -6,10 +6,10 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -aterm: aterm (Terminal emulator with nice visual effects) +aterm: aterm (old-school terminal emulator with nice visual effects) aterm: aterm: aterm is designed to provide pleasing visual effects while performing -aterm: such a mundane function as terminal emulation under X. It is largely +aterm: such a mundane function as terminal emulation under X. It is largely aterm: based on rxvt code. aterm: aterm: Several points set it apart from similar apps: |