Created
July 31, 2010 05:47
-
-
Save kfdm/501803 to your computer and use it in GitHub Desktop.
Compiling irssi-python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From http://sector-5.net/archives/irssi-python-for-irssi-0-8-15/ | |
cd irssi-python && | |
svn revert -R . && | |
patch -p0 -i ../irssi-python-for-0.8.14.patch | |
sed -i 's/ docs//' Makefile.am && | |
sed -i 's|docs/Makefile||' 'configure.in' && | |
sed -i 's/pyconstants.c/pycore.c/' 'configure.in' && | |
cp /usr/share/autoconf-archive/ac_python_devel.m4 . && | |
libtoolize -f -c && | |
aclocal --force -I. && | |
autoheader -f && | |
autoconf -f && | |
automake -a -c --gnu --foreign && | |
./configure --with-irssi=~/src/irssi-0.8.15 && | |
make -C src constants && | |
make && | |
echo -e "\n\n***\nAll done!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: configure.in | |
=================================================================== | |
--- configure.in (revision 5123) | |
+++ configure.in (working copy) | |
@@ -3,7 +3,7 @@ | |
#AC_PREREQ(2.59) | |
AC_INIT(irssi-python, test3, [email protected]) | |
-AC_CONFIG_SRCDIR([src/pyconstants.c]) | |
+AC_CONFIG_SRCDIR([src/pycore.c]) | |
AC_CONFIG_HEADER([pyirssi-config.h]) | |
AM_INIT_AUTOMAKE([irssi-python], [test3]) | |
AM_DISABLE_STATIC | |
@@ -63,5 +63,5 @@ | |
#AC_CONFIG_FILES([src/Makefile src/objects/Makefile]) | |
#AC_OUTPUT([Makefile src/Makefile src/objects/Makefile]) | |
#AC_OUTPUT([Makefile src/Makefile src/objects/Makefile]) | |
-AC_CONFIG_FILES([Makefile scripts/Makefile docs/Makefile src/Makefile src/objects/Makefile]) | |
+AC_CONFIG_FILES([Makefile scripts/Makefile src/Makefile src/objects/Makefile]) | |
AC_OUTPUT | |
Index: src/pymodule.c | |
=================================================================== | |
--- src/pymodule.c (revision 5123) | |
+++ src/pymodule.c (working copy) | |
@@ -807,18 +807,17 @@ | |
); | |
static PyObject *py_notifylist_add(PyObject *self, PyObject *args, PyObject *kwds) | |
{ | |
- static char *kwlist[] = {"mask", "ircnets", "away_check", "idle_check_time", NULL}; | |
+ static char *kwlist[] = {"mask", "ircnets", "away_check", NULL}; | |
char *mask = ""; | |
char *ircnets = NULL; | |
int away_check = 0; | |
- int idle_check_time = 0; | |
NOTIFYLIST_REC *rec; | |
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|zii", kwlist, | |
- &mask, &ircnets, &away_check, &idle_check_time)) | |
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|zi", kwlist, | |
+ &mask, &ircnets, &away_check)) | |
return NULL; | |
- rec = notifylist_add(mask, ircnets, away_check, idle_check_time); | |
+ rec = notifylist_add(mask, ircnets, away_check); | |
if (rec) | |
return pynotifylist_new(rec); | |
@@ -905,12 +904,13 @@ | |
{ | |
static char *kwlist[] = {"level", NULL}; | |
char *level = ""; | |
+ int error = 0; | |
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, | |
&level)) | |
return NULL; | |
- return PyLong_FromUnsignedLong(level2bits(level)); | |
+ return PyLong_FromUnsignedLong(level2bits(level, &error)); | |
} | |
PyDoc_STRVAR(py_bits2level_doc, | |
Index: src/pyirssi.h | |
=================================================================== | |
--- src/pyirssi.h (revision 5123) | |
+++ src/pyirssi.h (working copy) | |
@@ -2,7 +2,6 @@ | |
#define _PYIRSSI_H_ | |
#define MODULE_NAME "python" | |
-#include "config.h" | |
#include "core.h" | |
#include "common.h" | |
#include "modules.h" | |
Index: src/objects/netsplit-channel-object.c | |
=================================================================== | |
--- src/objects/netsplit-channel-object.c (revision 5123) | |
+++ src/objects/netsplit-channel-object.c (working copy) | |
@@ -171,7 +171,7 @@ | |
pynetsplit->name = name; | |
pynetsplit->op = rec->op; | |
pynetsplit->halfop = rec->halfop; | |
- pynetsplit->other = rec->other; | |
+ pynetsplit->other = 0; | |
return (PyObject *)pynetsplit; | |
} | |
Index: src/objects/notifylist-object.c | |
=================================================================== | |
--- src/objects/notifylist-object.c (revision 5123) | |
+++ src/objects/notifylist-object.c (working copy) | |
@@ -77,23 +77,12 @@ | |
return PyBool_FromLong(NOTIFYLIST(self->data)->away_check); | |
} | |
-PyDoc_STRVAR(PyNotifylist_idle_check_time_doc, | |
- "Notify when idle time is reset and idle was bigger than this (seconds)" | |
-); | |
-static PyObject *PyNotifylist_idle_check_time_get(PyNotifylist *self, void *closure) | |
-{ | |
- RET_NULL_IF_INVALID(self->data); | |
- return PyLong_FromUnsignedLong(NOTIFYLIST(self->data)->idle_check_time); | |
-} | |
- | |
/* specialized getters/setters */ | |
static PyGetSetDef PyNotifylist_getseters[] = { | |
{"mask", (getter)PyNotifylist_mask_get, NULL, | |
PyNotifylist_mask_doc, NULL}, | |
{"away_check", (getter)PyNotifylist_away_check_get, NULL, | |
PyNotifylist_away_check_doc, NULL}, | |
- {"idle_check_time", (getter)PyNotifylist_idle_check_time_get, NULL, | |
- PyNotifylist_idle_check_time_doc, NULL}, | |
{NULL} | |
}; | |
Index: src/objects/irc-server-object.c | |
=================================================================== | |
--- src/objects/irc-server-object.c (revision 5123) | |
+++ src/objects/irc-server-object.c (working copy) | |
@@ -389,17 +389,18 @@ | |
); | |
static PyObject *PyIrcServer_redirect_get_signal(PyIrcServer *self, PyObject *args, PyObject *kwds) | |
{ | |
- static char *kwlist[] = {"event", "args", NULL}; | |
+ static char *kwlist[] = {"prefix", "event", "args", NULL}; | |
+ char *prefix = ""; | |
char *event = ""; | |
char *pargs = ""; | |
RET_NULL_IF_INVALID(self->data); | |
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ss", kwlist, | |
- &event, &pargs)) | |
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sss", kwlist, | |
+ &prefix, &event, &pargs)) | |
return NULL; | |
- RET_AS_STRING_OR_NONE(server_redirect_get_signal(self->data, event, pargs)); | |
+ RET_AS_STRING_OR_NONE(server_redirect_get_signal(self->data, prefix, event, pargs)); | |
} | |
PyDoc_STRVAR(PyIrcServer_redirect_peek_signal_doc, | |
@@ -407,18 +408,19 @@ | |
); | |
static PyObject *PyIrcServer_redirect_peek_signal(PyIrcServer *self, PyObject *args, PyObject *kwds) | |
{ | |
- static char *kwlist[] = {"event", "args", NULL}; | |
+ static char *kwlist[] = {"prefix", "event", "args", NULL}; | |
+ char *prefix = ""; | |
char *event = ""; | |
char *pargs = ""; | |
int redirection; | |
RET_NULL_IF_INVALID(self->data); | |
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ss", kwlist, | |
- &event, &pargs)) | |
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sss", kwlist, | |
+ &prefix, &event, &pargs)) | |
return NULL; | |
- RET_AS_STRING_OR_NONE(server_redirect_peek_signal(self->data, event, pargs, &redirection)); | |
+ RET_AS_STRING_OR_NONE(server_redirect_peek_signal(self->data, prefix, event, pargs, &redirection)); | |
} | |
/* Methods for object */ | |
Index: Makefile.am | |
=================================================================== | |
--- Makefile.am (revision 5123) | |
+++ Makefile.am (working copy) | |
@@ -1,4 +1,4 @@ | |
-SUBDIRS = src scripts docs | |
+SUBDIRS = src scripts | |
variables: | |
echo @PYTHON_CPPFLAGS@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment