summaryrefslogtreecommitdiffstats
path: root/network/irssi-python
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2021-12-08 14:33:20 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2021-12-10 08:37:38 +0700
commitddbfcd801f40b9379069039159aa2202b4c9a454 (patch)
treecd8446843d785c35245cbfddcd96f354b15f6d8c /network/irssi-python
parentb3023951f9d29bdfcf9564f0ff8323e05bd553f6 (diff)
downloadslackbuilds-ddbfcd801f40b9379069039159aa2202b4c9a454.tar.gz
slackbuilds-ddbfcd801f40b9379069039159aa2202b4c9a454.tar.xz
network/irssi-python: Updated for version test4_1.2.3.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/irssi-python')
-rw-r--r--network/irssi-python/README23
-rw-r--r--network/irssi-python/abi18.diff59
-rw-r--r--network/irssi-python/irssi-python.SlackBuild32
-rw-r--r--network/irssi-python/irssi-python.info6
4 files changed, 98 insertions, 22 deletions
diff --git a/network/irssi-python/README b/network/irssi-python/README
index 221c1f7730..852bb488aa 100644
--- a/network/irssi-python/README
+++ b/network/irssi-python/README
@@ -4,9 +4,9 @@ irssi-python embeds Python into an Irssi module, providing most of the
functionality of the Perl wrapper to Python scripts using a similar
interface.
-After the package is installed, you can test it from within irssi
-by running "/load python". If this works OK, you can configure irssi
-to always load the module with a command like:
+After the package is installed, you can test it from within irssi by
+running "/load python". If this works OK, you can configure irssi to
+always load the module with a command like:
$ echo 'load python' >> ~/.irssi/startup
@@ -15,14 +15,19 @@ upgraded, you'll almost certainly have to rebuild & reinstall this.
Symptoms may include irssi ABI version mismatch errors 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 in
-patches/:
+irssi-python, first update your irssi package to the latest one for
+your Slackware version:
# slackpkg update
# slackpkg upgrade irssi
-If you still get the warning, set the environment variable IRSSI_VER
-to the correct irssi version. You'll also have to have the irssi source
-tarball in the SlackBuild directory. It should be available from:
+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:
-http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/irssi/
+# VERSION="test4_1.2.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:
+
+https://github.com/irssi/irssi/releases/
diff --git a/network/irssi-python/abi18.diff b/network/irssi-python/abi18.diff
new file mode 100644
index 0000000000..6248382771
--- /dev/null
+++ b/network/irssi-python/abi18.diff
@@ -0,0 +1,59 @@
+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 3a20c91884..b4dc699de6 100644
--- a/network/irssi-python/irssi-python.SlackBuild
+++ b/network/irssi-python/irssi-python.SlackBuild
@@ -11,18 +11,25 @@
# tarball. Unfortunately, the release tarball is un-buildable because it's
# missing various files. Also it's missing the entire doc/ directory.
+# VERSION is the irssi-python version, an underscore, and the irssi
+# version we're building it for.
+# Unfortunately we have to pick an irssi version to be the default,
+# because the DOWNLOAD links are static (can't have $VERSION or such in
+# them). This build will have to be updated any time Pat does an irssi
+# version update.
+
+# 20211208 bkw: update for vtest4_1.2.3.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=irssi-python
-VERSION=${VERSION:-test4}
+VERSION=${VERSION:-test4_1.2.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# Unfortunately we have to pick an irssi version to be the default,
-# because the DOWNLOAD links are static (can't have $VERSION or such in
-# them). 1.0.7 is the latest in patches/ at the time of this writing.
-IRSSI_VER="${IRSSI_VER:-1.0.7}"
+PYIRSSI_VER="$( echo $VERSION | cut -d_ -f1 )"
+IRSSI_VER="$( echo $VERSION | cut -d_ -f2 )"
# Alert the user (but don't stop the build) if $IRSSI_VER doesn't match
# the installed version of irssi.
@@ -45,9 +52,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
@@ -79,7 +83,7 @@ cd $TMP
rm -rf $PRGNAM
mkdir -p $PRGNAM
cd $PRGNAM
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$PYIRSSI_VER.tar.gz
tar xvf $CWD/irssi-$IRSSI_VER.tar.xz
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
@@ -104,7 +108,10 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
## --build=$ARCH-slackware-linux
## cd $TMP/$PRGNAM
-cd $PRGNAM-$VERSION
+cd $PRGNAM-$PYIRSSI_VER
+
+# patch comes from upstream git, commit 84e90f7d.
+patch -p1 < $CWD/abi18.diff
autoreconf -ivf -I.
@@ -124,11 +131,16 @@ make -C src constants
make
make install-strip DESTDIR=$PKG
+rm -f $PKG/usr/lib*/irssi/modules/*.la
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README TODO classes.txt docs/*html \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20211208 bkw: it might be redundant to include the irssi version
+# in the slack-desc, since it's now in the actual version number, but
+# belt and suspenders...
mkdir -p $PKG/install
sed "s/@IRSSI_VER@/$IRSSI_VER/" $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/network/irssi-python/irssi-python.info b/network/irssi-python/irssi-python.info
index fea8699379..ba9e039205 100644
--- a/network/irssi-python/irssi-python.info
+++ b/network/irssi-python/irssi-python.info
@@ -1,10 +1,10 @@
PRGNAM="irssi-python"
-VERSION="test4"
+VERSION="test4_1.2.3"
HOMEPAGE="https://github.com/irssi-import/irssi-python"
DOWNLOAD="https://github.com/irssi-import/irssi-python/archive/test4/irssi-python-test4.tar.gz \
- http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/irssi/irssi-1.0.7.tar.xz"
+ https://github.com/irssi/irssi/releases/download/1.2.3/irssi-1.2.3.tar.xz"
MD5SUM="efd8c4b284cb2b2b3313e9109cbb324a \
- 6ebf07a03b58f7af1296cd8fdbb3619f"
+ 381d3af259ad15d658be50c0a01f0c28"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""