viq [2006-04-07, 14:07:54]:
> On Thursday 06 April 2006 15:39, viq wrote:
> 
> [...]
> > Now you also made me think, and I wanted to make irssi also
> > use /etc/irssi/scripts/ as the default dir for the scripts, but didn't find
> > the setting yet...
> 
> Ok, here's an attempt at that. It should first look for script in 
> ~/irssi/scripts/ then in /etc/irssi/scripts/ and last 
> in /usr/local/share/doc/irssi/scripts/
> I also corrected the man page to reflect that.

The paths are wrong, e.g. you have /usr/share/irssi/...
it's probably better to also use something like !!SYSCONFDIR!! and
!!LOCALBASE!! in there, and then substitute that for the actual
values (look at other ports for examples).

> Should the default set of scripts be copied as well to /etc/irssi/scripts/, 
> or 
> should I leave them where they are?

I think you can leave them where they are...

> Also, please test and review, there is one instance of SCRIPTDIR in 
> w-irssi-0.8.10/irssi-0.8.10/src/perl/perl-common.c I didn't know what to do 
> about - so I'm not yet sure everything will work as it should.
> 
> Hah, with the amount of time I am spending poking things here I may muster 
> enough courage to take maintainership of this ;) Not quite yet, though, I 
> don't feel confident enough in the quality of what I'm doing.

I played with the theme. This seems to work okay, it reads first from
~/.irssi/default.theme (you could argue to put a themes subdir in there
as well, but the current location works fine), then
/etc/irssi/themes/default.theme.

You also need to clean up MASTER_SITES, a bunch of mirrors are broken.

> +     rm -rf ${PREFIX}/include

Instead of this, you can also patch away the install-pkgincludeHEADERS
dependency in irssi's Makefile.in. Whatever works best is fine.

> Index: patches/patch-src_perl_perl-core_c
> ===================================================================
> RCS file: patches/patch-src_perl_perl-core_c
> diff -N patches/patch-src_perl_perl-core_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_perl_perl-core_c        7 Apr 2006 12:01:04 -0000
> @@ -0,0 +1,24 @@
> +$OpenBSD$
> +--- src/perl/perl-core.c.orig        Fri Apr  7 12:56:00 2006
> ++++ src/perl/perl-core.c     Fri Apr  7 13:06:09 2006
> +@@ -370,12 +370,17 @@ char *perl_script_get_path(const char *n
> +     /* check from ~/.irssi/scripts/ */
> +     path = g_strdup_printf("%s/scripts/%s", get_irssi_dir(), file);
> +     if (stat(path, &statbuf) != 0) {
> +-            /* check from SCRIPTDIR */
> ++            /* check from SYSCONFDIR and SCRIPTDIR */
> +             g_free(path);
> +-            path = g_strdup_printf(SCRIPTDIR"/%s", file);
> ++            //path = g_strdup_printf(SCRIPTDIR"/%s", file);
> ++            path = g_strdup_printf(SYSCONFDIR"/irssi/scripts/%s", file);
> +             if (stat(path, &statbuf) != 0) {
> +                     g_free(path);
> +-                    path = NULL;
> ++                    path = g_strdup_printf(SCRIPTDIR"/%s", file);
> ++                    if (stat(path, &statbuf) != 0) {
> ++                            g_free(path);
> ++                            path = NULL;
> ++                    }
> +             }
> +     }
> +     g_free(file);
> Index: patches/patch-src_perl_perl-fe_c
> ===================================================================
> RCS file: patches/patch-src_perl_perl-fe_c
> diff -N patches/patch-src_perl_perl-fe_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_perl_perl-fe_c  7 Apr 2006 12:01:04 -0000
> @@ -0,0 +1,11 @@
> +$OpenBSD$
> +--- src/perl/perl-fe.c.orig  Wed Oct 19 04:13:21 2005
> ++++ src/perl/perl-fe.c       Fri Apr  7 13:43:29 2006
> +@@ -199,6 +199,7 @@ static void sig_complete_load(GList **li
> +     /* completing filename parameter for /SCRIPT LOAD */
> +     user_dir = g_strdup_printf("%s/scripts", get_irssi_dir());
> +     *list = filename_complete(word, user_dir);
> ++    *list = g_list_concat(*list, filename_complete(word, 
> SYSCONFDIR"/irssi/scripts"));
> +     *list = g_list_concat(*list, filename_complete(word, SCRIPTDIR));
> +         g_free(user_dir);
> + 

looks basically okay, but i didn't test it...

steven

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Reply via email to