diff options
author | B. Watson <urchlay@slackware.uk> | 2023-07-07 05:32:21 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-08 16:42:10 +0700 |
commit | cfccced7cfb106f65b40df3593817c42114d36db (patch) | |
tree | bfc732b80dffb806dac2e37e5f41da4067e2e669 /network/irssi-python | |
parent | 42c0df690d87a7fd10e6ac4ffbcaccc020eab531 (diff) |
network/irssi-python: Updated for version 20230512_9ab753d_1.4.4.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/irssi-python')
-rw-r--r-- | network/irssi-python/README | 16 | ||||
-rw-r--r-- | network/irssi-python/abi18.diff | 59 | ||||
-rw-r--r-- | network/irssi-python/irssi-python.SlackBuild | 25 | ||||
-rw-r--r-- | network/irssi-python/irssi-python.info | 10 | ||||
-rw-r--r-- | network/irssi-python/slack-desc | 2 |
5 files changed, 34 insertions, 78 deletions
diff --git a/network/irssi-python/README b/network/irssi-python/README index 852bb488aa28e..efe5a65fb2052 100644 --- a/network/irssi-python/README +++ b/network/irssi-python/README @@ -1,4 +1,4 @@ -irssi-python (Python 2.x scripting support for irssi) +irssi-python (Python 3 scripting support for irssi) irssi-python embeds Python into an Irssi module, providing most of the functionality of the Perl wrapper to Python scripts using a similar @@ -10,9 +10,15 @@ always load the module with a command like: $ echo 'load python' >> ~/.irssi/startup +Example python scripts can be found in /usr/share/irssi/scripts/*.py + +Note that previous versions of irssi-python used Python 2. If you've +written any scripts, they may have to be modified for Python 3. + Beware of upgrades: if Slackware's irssi or python packages are ever upgraded, you'll almost certainly have to rebuild & reinstall this. -Symptoms may include irssi ABI version mismatch errors or segfaults. +Symptoms may include irssi ABI version mismatch errors, undefined +symbols, or segfaults. If you get a warning about an irssi version mismatch when building irssi-python, first update your irssi package to the latest one for @@ -22,10 +28,10 @@ your Slackware version: # slackpkg upgrade irssi If you still get the warning, set the environment variable VERSION. -The first part of VERSION (before the _) should not change, but the -part after the _ is the irssi version. Example: +The first part of VERSION (before the last _) should not change, but +the part after the last _ is the irssi version. Example: -# VERSION="test4_1.2.5" sh irssi-python.SlackBuild +# VERSION="20230512_9ab753d_1.4.5" sh irssi-python.SlackBuild You'll also have to have the irssi .tar.xz source tarball in the SlackBuild directory. It should be available from: diff --git a/network/irssi-python/abi18.diff b/network/irssi-python/abi18.diff deleted file mode 100644 index 6248382771174..0000000000000 --- a/network/irssi-python/abi18.diff +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index e2b630d..c962091 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2,7 +2,7 @@ - # Process this file with autoconf to produce a configure script. - - #AC_PREREQ(2.59) --AC_INIT([irssi-python], [test3], [loafier@gmail.com]) -+AC_INIT([irssi-python], [test5], [loafier@gmail.com]) - AC_CONFIG_SRCDIR([src/pycore.c]) - AC_CONFIG_HEADER([pyirssi-config.h]) - AC_CONFIG_MACRO_DIR([m4]) -diff --git a/src/objects/rawlog-object.c b/src/objects/rawlog-object.c -index c872850..c5fa869 100644 ---- a/src/objects/rawlog-object.c -+++ b/src/objects/rawlog-object.c -@@ -24,6 +24,10 @@ - #include "rawlog-object.h" - #include "pycore.h" - -+#if defined(IRSSI_ABI_VERSION) && IRSSI_ABI_VERSION >= 18 -+#define RAWLOG18 -+#endif -+ - /* monitor "????" signal */ - static void rawlog_cleanup(RAWLOG_REC *ban) - { -@@ -64,7 +68,13 @@ PyDoc_STRVAR(PyRawlog_nlines_doc, - static PyObject *PyRawlog_nlines_get(PyRawlog *self, void *closure) - { - RET_NULL_IF_INVALID(self->data); -- return PyInt_FromLong(self->data->nlines); -+ return PyInt_FromLong( -+#ifdef RAWLOG18 -+ self->data->lines->length -+#else -+ self->data->nlines -+#endif -+ ); - } - - /* specialized getters/setters */ -@@ -93,7 +103,14 @@ static PyObject *PyRawlog_get_lines(PyRawlog *self, PyObject *args) - if (!lines) - return NULL; - -- for (node = self->data->lines; node; node = node->next) -+ for (node = -+#ifdef RAWLOG18 -+ self->data->lines->head -+#else -+ self->data->lines -+#endif -+ ; -+ node; node = node->next) - { - int ret; - PyObject *line = PyString_FromString(node->data); diff --git a/network/irssi-python/irssi-python.SlackBuild b/network/irssi-python/irssi-python.SlackBuild index 3a99498c1324e..3c92b9519c355 100644 --- a/network/irssi-python/irssi-python.SlackBuild +++ b/network/irssi-python/irssi-python.SlackBuild @@ -18,12 +18,18 @@ # them). This build will have to be updated any time Pat does an irssi # version update. +# 20230707 bkw: update for 20230512_9ab753d_1.4.4 (latest git that +# works with python-3.9; later commits break it). needed because +# Slackware 15.0's patches/ has irssi-1.4.4, which is too new for the +# irssi-python-test4 release. Source tarball made with: +# sh git2tarxz.sh 9ab753db9a + # 20211208 bkw: update for vtest4_1.2.3. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=irssi-python -VERSION=${VERSION:-test4_1.2.3} +VERSION=${VERSION:-20230512_9ab753d_1.4.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -41,8 +47,8 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -PYIRSSI_VER="$( echo $VERSION | cut -d_ -f1 )" -IRSSI_VER="$( echo $VERSION | cut -d_ -f2 )" +PYIRSSI_VER="$( echo $VERSION | cut -d_ -f1,2 )" +IRSSI_VER="$( echo $VERSION | cut -d_ -f3 )" # Alert the user (but don't stop the build) if $IRSSI_VER doesn't match # the installed version of irssi. @@ -83,7 +89,7 @@ cd $TMP rm -rf $PRGNAM mkdir -p $PRGNAM cd $PRGNAM -tar xvf $CWD/$PRGNAM-$PYIRSSI_VER.tar.gz +tar xvf $CWD/$PRGNAM-$PYIRSSI_VER.tar.xz tar xvf $CWD/irssi-$IRSSI_VER.tar.xz chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ @@ -110,11 +116,15 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ cd $PRGNAM-$PYIRSSI_VER -# patch comes from upstream git, commit 84e90f7d. -patch -p1 < $CWD/abi18.diff - autoreconf -ivf -I. +# configure script expects to read this info via pkg-config, but our +# irssi-1.pc file doesn't have the variables for it. not sure why not, +# but this is what it would have read anyway. +sed -i -e "/IRSSI_SIGNALSFILE/s,=.*,=/usr/doc/irssi-$IRSSI_VER/signals.txt," \ + -e "/IRSSI_MODULEDIR/s,=.*,=/usr/lib$LIBDIRSUFFIX/irssi/modules," \ + configure + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -127,7 +137,6 @@ CXXFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux -make -C src constants make make install-strip DESTDIR=$PKG diff --git a/network/irssi-python/irssi-python.info b/network/irssi-python/irssi-python.info index a90c0becba407..3e0c36ec28454 100644 --- a/network/irssi-python/irssi-python.info +++ b/network/irssi-python/irssi-python.info @@ -1,10 +1,10 @@ PRGNAM="irssi-python" -VERSION="test4_1.2.3" +VERSION="20230512_9ab753d_1.4.4" HOMEPAGE="https://github.com/irssi-import/irssi-python" -DOWNLOAD="https://github.com/irssi-import/irssi-python/archive/test4/irssi-python-test4.tar.gz \ - https://github.com/irssi/irssi/releases/download/1.2.3/irssi-1.2.3.tar.xz" -MD5SUM="efd8c4b284cb2b2b3313e9109cbb324a \ - 381d3af259ad15d658be50c0a01f0c28" +DOWNLOAD="https://slackware.uk/~urchlay/src/irssi-python-20230512_9ab753d.tar.xz \ + https://github.com/irssi/irssi/releases/download/1.4.4/irssi-1.4.4.tar.xz" +MD5SUM="8b28b4911eeb7aec97a05292e612e513 \ + c1787858ede8d875be5e2ddb8c2bc95e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/network/irssi-python/slack-desc b/network/irssi-python/slack-desc index a3607849ee1c6..22f7a43ef1f6a 100644 --- a/network/irssi-python/slack-desc +++ b/network/irssi-python/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -irssi-python: irssi-python (Python2 scripting support for irssi) +irssi-python: irssi-python (Python3 scripting support for irssi) irssi-python: irssi-python: irssi-python embeds Python into an Irssi module, providing most irssi-python: of the functionality of the Perl wrapper to Python scripts using a |