aboutsummaryrefslogtreecommitdiff
path: root/net/silc-client
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2010-08-19 21:51:28 +0000
committerWesley Shields <wxs@FreeBSD.org>2010-08-19 21:51:28 +0000
commitcbc7e212b22fb46cd191d5117c445e5af0c5ee4a (patch)
tree03091a70c51455e78e0cb3712b2bf5e8e15ba597 /net/silc-client
parentd9881a20ab2d23d3f0ee11653f916f845066b351 (diff)
downloadports-cbc7e212b22fb46cd191d5117c445e5af0c5ee4a.tar.gz
ports-cbc7e212b22fb46cd191d5117c445e5af0c5ee4a.zip
Make net/silc-irssi-plugin work with the newer versions of irssi. The fixes
were taken from Debian bug report #522080 and #577501. The work to fix this was done by Murad Khan (mraoul.freebsd@gmail.com) and sent to me privately. PR: ports/140073 Submitted by: Nathaniel Filardo <nwf@cs.jhu.edu>
Notes
Notes: svn path=/head/; revision=259593
Diffstat (limited to 'net/silc-client')
-rw-r--r--net/silc-client/Makefile14
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__fe-common__silc__Makefile.in48
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__perl__silc__Makefile.PL.in10
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__silc__core__Makefile.in48
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__silc__core__client_ops.c27
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-core.c10
-rw-r--r--net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-expandos.c10
7 files changed, 165 insertions, 2 deletions
diff --git a/net/silc-client/Makefile b/net/silc-client/Makefile
index 54553ccdcf41..173110bd1529 100644
--- a/net/silc-client/Makefile
+++ b/net/silc-client/Makefile
@@ -32,7 +32,7 @@ CONFLICTS= silc-toolkit-1.1.* silc-irssi-plugin-1.1.*
MAKE_JOBS_SAFE= yes
USE_BZIP2= yes
GNU_CONFIGURE= yes
-USE_GNOME= glib12
+USE_GNOME= glib20
USE_GMAKE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --docdir=${DOCSDIR} \
@@ -49,12 +49,22 @@ OPTIONS= PTHREADS "Enable pthreads support" off \
CONFIGURE_ARGS+= --with-silc-plugin=${PREFIX}/lib/irssi \
--without-silc-includes
CFLAGS+= -fPIC
-RUN_DEPENDS= irssi:${PORTSDIR}/irc/irssi
+BUILD_DEPENDS= irssi:${PORTSDIR}/irc/irssi
# We don't want to install the man page and configuration file for this case
# Also, the port makes an extra symlink which causes IRSSI to load the plugin
# twice. This causes weird behavior such as /me output showing up twice.
EXTRA_PATCHES= ${FILESDIR}/extra-patch-apps__irssi__Makefile.in \
${FILESDIR}/extra-patch-apps__irssi__src__fe-common__Makefile.in
+
+# Following is to fix plugin errors. Fixes taken from debian bug report #522080
+# and #577501 modified to work with port build process
+EXTRA_PATCHES += \
+ ${FILESDIR}/extra-patch-apps__irssi__src__perl__silc__Makefile.PL.in \
+ ${FILESDIR}/extra-patch-apps__irssi__src__fe-common__silc__Makefile.in \
+ ${FILESDIR}/extra-patch-apps__irssi__src__silc__core__Makefile.in \
+ ${FILESDIR}/extra-patch-apps__irssi__src__silc__core__silc-core.c \
+ ${FILESDIR}/extra-patch-apps__irssi__src__silc__core__silc-expandos.c \
+ ${FILESDIR}/extra-patch-apps__irssi__src__silc__core__client_ops.c
.else
MAN1= silc.1
.endif
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__fe-common__silc__Makefile.in b/net/silc-client/files/extra-patch-apps__irssi__src__fe-common__silc__Makefile.in
new file mode 100644
index 000000000000..415691f405be
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__fe-common__silc__Makefile.in
@@ -0,0 +1,48 @@
+--- ./apps/irssi/src/fe-common/silc/Makefile.in.orig 2010-08-17 17:35:57.000000000 -0400
++++ ./apps/irssi/src/fe-common/silc/Makefile.in 2010-08-17 17:51:45.000000000 -0400
+@@ -269,11 +269,32 @@
+ #
+ # INCLUDE defines
+ #
+-INCLUDES = $(ADD_INCLUDES) $(SILC_CFLAGS) -DHAVE_SILCDEFS_H \
+- -I$(srcdir) -I$(top_srcdir) \
+- -I$(silc_top_srcdir) $(SILC_LIB_INCLUDES) \
++INCLUDES = \
++ -g \
++ -W -ggdb -Wall \
++ -I${LOCALBASE}/include/irssi \
++ -I${LOCALBASE}/include/irssi/src \
++ -I${LOCALBASE}/include/irssi/src/core \
++ -I${LOCALBASE}/include/irssi/src/fe-common/core \
++ -I$(silc_top_srcdir)/apps/irssi/src \
++ -I$(silc_top_srcdir)/apps/irssi/src/silc/core \
+ -I$(silc_top_srcdir)/includes \
+- -I$(silc_top_srcdir)/doc
++ -I$(silc_top_srcdir) \
++ -I$(silc_top_srcdir)/lib/silcvcard \
++ -I$(silc_top_srcdir)/lib/silccrypt \
++ -I$(silc_top_srcdir)/lib/silcclient \
++ -I$(silc_top_srcdir)/lib/silcmath \
++ -I$(silc_top_srcdir)/lib/silcapputil \
++ -I$(silc_top_srcdir)/lib/silcskr \
++ -I$(silc_top_srcdir)/lib/silcasn1 \
++ -I$(silc_top_srcdir)/lib/silcske \
++ -I$(silc_top_srcdir)/lib/silcsftp \
++ -I$(silc_top_srcdir)/lib/silccore \
++ -I$(silc_top_srcdir)/lib/silcutil \
++ -DHAVE_CONFIG_H=1 -DSILC_PLUGIN=1 \
++ -DPACKAGE=\"silc-client\" -DVERSION=\"$(VERSION)\" \
++ -I${LOCALBASE}/include/glib-2.0 \
++ -I${LOCALBASE}/lib/glib-2.0/include
+
+ moduledir = @SILC_IRSSIDIR@
+ IRSSI_INCLUDE = ../../..
+@@ -317,7 +338,7 @@
+ noinst_LTLIBRARIES = $(NILB)
+ module_LTLIBRARIES = $(LTLB)
+ libfe_common_silc_la_LDFLAGS = \
+- $(LDFLGS)
++ -L$(silc_top_srcdir)/lib/.libs
+
+ libfe_common_silc_la_SOURCES = \
+ fe-silc-channels.c \
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__perl__silc__Makefile.PL.in b/net/silc-client/files/extra-patch-apps__irssi__src__perl__silc__Makefile.PL.in
new file mode 100644
index 000000000000..6e507e97b3a7
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__perl__silc__Makefile.PL.in
@@ -0,0 +1,10 @@
+--- ./apps/irssi/src/perl/silc/Makefile.PL.in.orig 2010-08-17 18:17:17.000000000 -0400
++++ ./apps/irssi/src/perl/silc/Makefile.PL.in 2010-08-17 18:17:21.000000000 -0400
+@@ -8,5 +8,6 @@
+ 'LIBS' => '',
+ 'OBJECT' => '$(O_FILES)',
+ 'TYPEMAPS' => ['../common/typemap'],
+- 'INC' => '-I../../.. -I@top_srcdir@/src -I@top_srcdir@/src/core -I@top_srcdir@/src/silc/core -I@top_srcdir@/src/silc -I$(silc_top_srcdir) -I$(silc_top_srcdir)/lib/silccore -I$(silc_top_srcdir)/lib/silccrypt -I$(silc_top_srcdir)/lib/silcmath -DHAVE_SILCDEFS_H -I$(silc_top_srcdir)/lib/silcske -I$(silc_top_srcdir)/lib/silcsim -I$(silc_top_srcdir)/lib/silcskr -I$(silc_top_srcdir)/lib/silchttp -I$(silc_top_srcdir)/lib/silcasn1 -I$(silc_top_srcdir)/lib/silcapputil -I$(silc_top_srcdir)/lib/silcvcard -I$(silc_top_srcdir)/lib/silcutil -I$(silc_top_srcdir)/lib/silcsftp -I$(silc_top_srcdir)/lib/silcclient -I$(silc_top_srcdir)/lib/contrib -I$(silc_top_srcdir)/includes -I$(silc_top_srcdir)/doc @GLIB_CFLAGS@',
++ 'INC' => '-I${LOCALBASE}/include/irssi -I${LOCALBASE}/include/irssi/src -I${LOCALBASE}/include/irssi/src/core -I${LOCALBASE}/include/src/fe-common/core -I$(silc_top_srcdir)/includes -I$(silc_top_srcdir)/lib/silcvcard -I$(silc_top_srcdir)/lib/silccrypt -I$(silc_top_srcdir)/lib/silcclient -I$(silc_top_srcdir)/lib/silcmath -I$(silc_top_srcdir)/lib/silcapputil -I$(silc_top_srcdir)/lib/silcskr -I$(silc_top_srcdir)/lib/silcasn1 -I$(silc_top_srcdir)/lib/silcske -I$(silc_top_srcdir)/lib/silcsftp -I$(silc_top_srcdir)/lib/silccore -I$(silc_top_srcdir)/lib/silcutil -I$(silc_top_srcdir)/apps/irssi/src -I$(silc_top_srcdir)/apps/irssi/src/silc/core -DUOFF_T_LONG -DSILC_PLUGIN=1 -DHAVE_PL_PERL -I${LOCALBASE}/include/glib-2.0 -I${LOCALBASE}/lib/glib-2.0/include ',
++ 'INSTALLDIRS' => vendor,
+ 'VERSION_FROM' => '@srcdir@/Silc.pm');
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__Makefile.in b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__Makefile.in
new file mode 100644
index 000000000000..3fe1ce762538
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__Makefile.in
@@ -0,0 +1,48 @@
+--- ./apps/irssi/src/silc/core/Makefile.in.orig 2010-08-17 17:52:39.000000000 -0400
++++ ./apps/irssi/src/silc/core/Makefile.in 2010-08-17 17:55:35.000000000 -0400
+@@ -273,11 +273,32 @@
+ #
+ # INCLUDE defines
+ #
+-INCLUDES = $(ADD_INCLUDES) $(SILC_CFLAGS) -DHAVE_SILCDEFS_H \
+- -I$(srcdir) -I$(top_srcdir) \
+- -I$(silc_top_srcdir) $(SILC_LIB_INCLUDES) \
++INCLUDES = \
++ -g \
++ -W -ggdb -Wall \
++ -I${LOCALBASE}/include/irssi \
++ -I${LOCALBASE}/include/irssi/src \
++ -I${LOCALBASE}/include/irssi/src/core \
++ -I${LOCALBASE}/include/irssi/src/fe-common/core \
++ -I$(silc_top_srcdir)/apps/irssi/src \
++ -I$(silc_top_srcdir)/apps/irssi/src/silc/core \
+ -I$(silc_top_srcdir)/includes \
+- -I$(silc_top_srcdir)/doc
++ -I$(silc_top_srcdir) \
++ -I$(silc_top_srcdir)/lib/silcvcard \
++ -I$(silc_top_srcdir)/lib/silccrypt \
++ -I$(silc_top_srcdir)/lib/silcclient \
++ -I$(silc_top_srcdir)/lib/silcmath \
++ -I$(silc_top_srcdir)/lib/silcapputil \
++ -I$(silc_top_srcdir)/lib/silcskr \
++ -I$(silc_top_srcdir)/lib/silcasn1 \
++ -I$(silc_top_srcdir)/lib/silcske \
++ -I$(silc_top_srcdir)/lib/silcsftp \
++ -I$(silc_top_srcdir)/lib/silccore \
++ -I$(silc_top_srcdir)/lib/silcutil \
++ -DHAVE_CONFIG_H=1 -DSILC_PLUGIN=1 \
++ -DPACKAGE=\"silc-client\" -DVERSION=\"$(VERSION)\" \
++ -I${LOCALBASE}/include/glib-2.0 \
++ -I${LOCALBASE}/lib/glib-2.0/include
+
+ moduledir = @SILC_IRSSIDIR@
+ IRSSI_INCLUDE = ../../..
+@@ -327,7 +348,7 @@
+ $(LBDD)
+
+ libsilc_core_la_LDFLAGS = \
+- $(LBDFLGS)
++ -L$(silc_top_srcdir)/lib/.libs
+
+ noinst_HEADERS = \
+ module.h \
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__client_ops.c b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__client_ops.c
new file mode 100644
index 000000000000..634b737ed8bb
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__client_ops.c
@@ -0,0 +1,27 @@
+--- ./apps/irssi/src/silc/core/client_ops.c.orig 2008-12-13 15:30:25.000000000 -0500
++++ ./apps/irssi/src/silc/core/client_ops.c 2010-08-16 08:16:57.000000000 -0400
+@@ -2790,6 +2790,15 @@
+ silc_free(a);
+ }
+
++/* helper function to emulate server_setup_find_port */
++static SERVER_SETUP_REC *silc_server_setup_find_port(const char *address,
++ int port) {
++ SERVER_SETUP_REC *rec;
++
++ rec = server_setup_find(address, port, NULL);
++ return (rec == NULL || rec->port != port) ? NULL : rec;
++}
++
+ /* Find authentication data by hostname and port. The hostname may be IP
+ address as well.*/
+
+@@ -2811,7 +2820,7 @@
+
+ /* Check whether we find the password for this server in our
+ configuration. If it's set, always send it server. */
+- setup = server_setup_find_port(hostname, port);
++ setup = silc_server_setup_find_port(hostname, port);
+ if (setup && setup->password) {
+ completion(SILC_AUTH_PASSWORD, setup->password, strlen(setup->password),
+ context);
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-core.c b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-core.c
new file mode 100644
index 000000000000..be83f6a29268
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-core.c
@@ -0,0 +1,10 @@
+--- ./apps/irssi/src/silc/core/silc-core.c.orig 2010-08-16 09:37:58.000000000 -0400
++++ ./apps/irssi/src/silc/core/silc-core.c 2010-08-16 09:38:17.000000000 -0400
+@@ -41,6 +41,7 @@
+ #include "fe-common/core/fe-channels.h"
+ #include "fe-common/core/keyboard.h"
+ #include "fe-common/silc/module-formats.h"
++#include "glib/goption.h"
+
+ #ifndef SILC_PLUGIN
+ /* Command line option variables */
diff --git a/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-expandos.c b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-expandos.c
new file mode 100644
index 000000000000..9d43a22b4d27
--- /dev/null
+++ b/net/silc-client/files/extra-patch-apps__irssi__src__silc__core__silc-expandos.c
@@ -0,0 +1,10 @@
+--- ./apps/irssi/src/silc/core/silc-expandos.c.orig 2010-08-16 09:37:26.000000000 -0400
++++ ./apps/irssi/src/silc/core/silc-expandos.c 2010-08-16 09:37:45.000000000 -0400
+@@ -29,6 +29,7 @@
+ #include "silc-channels.h"
+ #include "silc-queries.h"
+ #include "silc-nicklist.h"
++#include "silcdefs.h"
+
+ EXPANDO_FUNC old_expando_usermode,
+ old_expando_cumode,