aboutsummaryrefslogtreecommitdiff
path: root/irc/weechat
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-11-21 11:27:21 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-11-21 11:27:21 +0000
commitabd465fc53774d534f6791f69b9a3a707c356b3b (patch)
treeb7388add9f7f65f4ce18253bec863d079e69d566 /irc/weechat
parent26faeb58009642210358118ba0a114df09176f8b (diff)
downloadports-abd465fc53774d534f6791f69b9a3a707c356b3b.tar.gz
ports-abd465fc53774d534f6791f69b9a3a707c356b3b.zip
* Add TCL plugin option.
* Add build documentation option. * Fix incorrect logic for charset option. * Remove broken tag from Ruby option. * Update option conditionals to be more readable * Remove mandatory dependancies on Ruby, Perl and gettext, add them to corresponding options as optional dependancies instead. * Add missing .pl NLS message catalog to plist. PR: 140603 Submitted by: Jase Thew <freebsd@beardz.net>
Notes
Notes: svn path=/head/; revision=244592
Diffstat (limited to 'irc/weechat')
-rw-r--r--irc/weechat/Makefile74
-rw-r--r--irc/weechat/files/patch-configure.in29
-rw-r--r--irc/weechat/files/patch-src-plugins-scripts-script_c168
-rw-r--r--irc/weechat/pkg-plist46
4 files changed, 284 insertions, 33 deletions
diff --git a/irc/weechat/Makefile b/irc/weechat/Makefile
index 3effd29f33c7..b9ea52d9fcd5 100644
--- a/irc/weechat/Makefile
+++ b/irc/weechat/Makefile
@@ -7,6 +7,7 @@
PORTNAME= weechat
PORTVERSION= 0.3.0
+PORTREVISION= 1
CATEGORIES= irc
MASTER_SITES= http://weechat.org/files/src/
@@ -18,47 +19,50 @@ USE_ICONV= yes
USE_AUTOTOOLS= autoconf:262
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-lua --disable-doc
+CONFIGURE_ARGS= --disable-lua
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS} -I${LOCALBASE}/include"\
LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS} -L${LOCALBASE}/lib"
-USE_PYTHON= yes
-USE_RUBY= yes
-USE_GETTEXT= yes
WANT_GNOME= yes
USE_GNOME= gnomehack
+WANT_PERL= yes
-OPTIONS= RUBY "Ruby scripting support." off \
- PYTHON "Python scripting support." off \
- PERL "Perl scripting support." off \
- CHARSET "Charset support." on \
- DEBUG "Debugging." off \
- ASPELL "Spell checking." off \
- GNUTLS "GNU TLS." off \
- NLS "NLS support" on
+OPTIONS= RUBY "Ruby scripting support." Off \
+ PYTHON "Python scripting support." Off \
+ PERL "Perl scripting support." Off \
+ TCL "TCL scripting support." Off \
+ CHARSET "Charset support." On \
+ DEBUG "Debugging." Off \
+ ASPELL "Spell checking." Off \
+ GNUTLS "GNU TLS." Off \
+ NLS "NLS support." On \
+ DOCUMENTATION "Build documentation." Off
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if !defined(WITHOUT_DEBUG)
+.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --with-debug=2
.else
CONFIGURE_ARGS+= --with-debug=0
.endif
-.if !defined(WITHOUT_CHARSET)
+.if defined(WITHOUT_CHARSET)
CONFIGURE_ARGS+= --disable-charset
PLIST_SUB+= CHARSET="@comment "
.else
+CONFIGURE_ARGS+= --enable-charset
PLIST_SUB+= CHARSET=""
.endif
-.if !defined(WITHOUT_NLS)
+.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.else
+CONFIGURE_ARGS+= --enable-nls
+USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
-.if !defined(WITHOUT_ASPELL)
+.if defined(WITH_ASPELL)
CONFIGURE_ARGS+= --enable-aspell
BUILD_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell
PLIST_SUB+= ASPELL=""
@@ -67,31 +71,33 @@ CONFIGURE_ARGS+= --disable-aspell
PLIST_SUB+= ASPELL="@comment "
.endif
-.if !defined(WITHOUT_PYTHON)
+.if defined(WITH_PYTHON)
CONFIGURE_ARGS+= --enable-python
+USE_PYTHON= yes
PLIST_SUB+= PYTHON=""
.else
CONFIGURE_ARGS+= --disable-python
PLIST_SUB+= PYTHON="@comment "
.endif
-.if !defined(WITHOUT_RUBY)
-BROKEN= Ruby support is broken
+.if defined(WITH_RUBY)
+.include "${PORTSDIR}/Mk/bsd.ruby.mk"
CONFIGURE_ARGS+= --enable-ruby
+USE_RUBY= yes
PLIST_SUB+= RUBY=""
.else
CONFIGURE_ARGS+= --disable-ruby
PLIST_SUB+= RUBY="@comment "
.endif
-.if !defined(WITHOUT_GNUTLS)
+.if defined(WITH_GNUTLS)
CONFIGURE_ARGS+= --enable-gnutls
LIB_DEPENDS+= gnutls.40:${PORTSDIR}/security/gnutls
.else
CONFIGURE_ARGS+= --disable-gnutls
.endif
-.if !defined(WITHOUT_PERL)
+.if defined(WITH_PERL)
CONFIGURE_ARGS+= --enable-perl
USE_PERL5= yes
PLIST_SUB+= PERL=""
@@ -100,7 +106,29 @@ CONFIGURE_ARGS+= --disable-perl
PLIST_SUB+= PERL="@comment "
.endif
+.if defined(WITH_TCL)
+USE_TCL= 83+
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+CONFIGURE_ARGS+= --enable-tcl
+CONFIGURE_ARGS+= --with-tclconfig=${LOCALBASE}/lib/tcl${TCL_VER}
+PLIST_SUB+= TCL=""
+.else
+CONFIGURE_ARGS+= --disable-tcl
+PLIST_SUB+= TCL="@comment "
+.endif
+
+.if defined(WITH_DOCUMENTATION)
+CONFIGURE_ARGS+= --enable-doc
+BUILD_DEPENDS+= asciidoc:${PORTSDIR}/textproc/asciidoc
+BUILD_DEPENDS+= source-highlight:${PORTSDIR}/textproc/source-highlight
+PLIST_SUB+= DOCUMENTATION=""
+MAN1= weechat-curses.1
+.else
+CONFIGURE_ARGS+= --disable-doc
+PLIST_SUB+= DOCUMENTATION="@comment "
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|2.61|2.62|g' ${WRKSRC}/aclocal.m4
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/irc/weechat/files/patch-configure.in b/irc/weechat/files/patch-configure.in
new file mode 100644
index 000000000000..5510d034332d
--- /dev/null
+++ b/irc/weechat/files/patch-configure.in
@@ -0,0 +1,29 @@
+--- configure.in.orig 2009-09-06 08:01:26.000000000 +0000
++++ configure.in 2009-11-12 14:46:30.000000000 +0000
+@@ -137,6 +137,7 @@
+ AC_ARG_WITH(lua-inc, [ --with-lua-inc=DIR, lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
+ AC_ARG_WITH(lua-lib, [ --with-lua-lib=DIR, lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
+ AC_ARG_WITH(lua-suffix, [ --with-lua-suffix=ARG lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
++AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tcl configuration (tclConfig.sh)],tclconfig=$withval,tclconfig='')
+ AC_ARG_ENABLE(doc, [ --disable-doc turn off documentation (default=built)],enable_doc=$enableval,enable_doc=yes)
+ AC_ARG_WITH(debug, [ --with-debug debugging: 0=no debug, 1=debug compilation (default=1)],debug=$withval,debug=1)
+
+@@ -682,6 +683,9 @@
+ AC_MSG_CHECKING(for tclConfig.sh)
+ tcl_found="no"
+ tcl_dirs="/lib /usr/lib /usr/tcl/lib /usr/lib/tcl8.5 /usr/lib/tcl8.4 /usr/lib/tcl8.3 /usr/local/lib /usr/local/tcl-8.5/lib /usr/local/tcl-8.4/lib /usr/local/tcl-8.3/lib /usr/local/tcl/lib /opt/lib"
++ if test "x$tclconfig" != "x" ; then
++ tcl_dirs="$tclconfig $tcl_dirs"
++ fi
+ for tcl_dir in $tcl_dirs ; do
+ if test -f ${tcl_dir}/tclConfig.sh ; then
+ . ${tcl_dir}/tclConfig.sh
+@@ -870,7 +874,7 @@
+ AC_MSG_RESULT(no)
+ fi
+
+-CFLAGS=`echo $CFLAGS | sed 's/ -g //g'`
++CFLAGS=`echo $CFLAGS | sed 's/ -g / /g'`
+ CFLAGS=`echo $CFLAGS | sed 's/^-g //g'`
+ CFLAGS=`echo $CFLAGS | sed 's/ -g$//g'`
+ CFLAGS=`echo $CFLAGS | sed 's/^-g$//g'`
diff --git a/irc/weechat/files/patch-src-plugins-scripts-script_c b/irc/weechat/files/patch-src-plugins-scripts-script_c
new file mode 100644
index 000000000000..1c935827582e
--- /dev/null
+++ b/irc/weechat/files/patch-src-plugins-scripts-script_c
@@ -0,0 +1,168 @@
+--- src/plugins/scripts/script.c.orig 2009-09-04 08:25:47.000000000 +0000
++++ src/plugins/scripts/script.c 2009-11-16 12:08:54.000000000 +0000
+@@ -439,24 +439,15 @@
+ script_search_by_full_name (struct t_plugin_script *scripts,
+ const char *full_name)
+ {
+- char *full_name_copy, *base_name;
++ char *base_name;
+ struct t_plugin_script *ptr_script;
+
+- full_name_copy = strdup (full_name);
+-
+- if (full_name_copy)
++ for (ptr_script = scripts; ptr_script;
++ ptr_script = ptr_script->next_script)
+ {
+- for (ptr_script = scripts; ptr_script;
+- ptr_script = ptr_script->next_script)
+- {
+- base_name = basename (ptr_script->filename);
+- if (strcmp (base_name, full_name) == 0)
+- {
+- free (full_name_copy);
+- return ptr_script;
+- }
+- }
+- free (full_name_copy);
++ base_name = basename (ptr_script->filename);
++ if (strcmp (base_name, full_name) == 0)
++ return ptr_script;
+ }
+
+ /* script not found */
+@@ -915,7 +906,8 @@
+ int (*script_load)(const char *filename),
+ char **list)
+ {
+- char **argv, *name, *base_name, *new_path, *autoload_path, *symlink_path;
++ char **argv, *name, *ptr_base_name, *base_name, *new_path, *autoload_path;
++ char *symlink_path;
+ const char *dir_home, *dir_separator;
+ int argc, i, length;
+ struct t_plugin_script *ptr_script;
+@@ -930,67 +922,71 @@
+ name = strdup (argv[i]);
+ if (name)
+ {
+- base_name = basename (name);
+-
+- /* unload script, if script is loaded */
+- ptr_script = script_search_by_full_name (scripts, base_name);
+- if (ptr_script)
+- (*script_unload) (ptr_script);
++ ptr_base_name = basename (name);
++ base_name = strdup (ptr_base_name);
++ if (base_name)
++ {
++ /* unload script, if script is loaded */
++ ptr_script = script_search_by_full_name (scripts, base_name);
++ if (ptr_script)
++ (*script_unload) (ptr_script);
+
+- /* remove script file(s) */
+- script_remove_file (weechat_plugin, base_name, 0);
++ /* remove script file(s) */
++ script_remove_file (weechat_plugin, base_name, 0);
+
+- /* move file from install dir to language dir */
+- dir_home = weechat_info_get ("weechat_dir", "");
+- length = strlen (dir_home) + strlen (weechat_plugin->name) +
+- strlen (base_name) + 16;
+- new_path = malloc (length);
+- if (new_path)
+- {
+- snprintf (new_path, length, "%s/%s/%s",
+- dir_home, weechat_plugin->name, base_name);
+- if (rename (name, new_path) == 0)
++ /* move file from install dir to language dir */
++ dir_home = weechat_info_get ("weechat_dir", "");
++ length = strlen (dir_home) + strlen (weechat_plugin->name) +
++ strlen (base_name) + 16;
++ new_path = malloc (length);
++ if (new_path)
+ {
+- /* make link in autoload dir */
+- length = strlen (dir_home) +
+- strlen (weechat_plugin->name) + 8 +
+- strlen (base_name) + 16;
+- autoload_path = malloc (length);
+- if (autoload_path)
++ snprintf (new_path, length, "%s/%s/%s",
++ dir_home, weechat_plugin->name, base_name);
++ if (rename (name, new_path) == 0)
+ {
+- snprintf (autoload_path, length,
+- "%s/%s/autoload/%s",
+- dir_home, weechat_plugin->name,
+- base_name);
+- dir_separator = weechat_info_get ("dir_separator", "");
+- length = 2 + strlen (dir_separator) +
+- strlen (base_name) + 1;
+- symlink_path = malloc (length);
+- if (symlink_path)
++ /* make link in autoload dir */
++ length = strlen (dir_home) +
++ strlen (weechat_plugin->name) + 8 +
++ strlen (base_name) + 16;
++ autoload_path = malloc (length);
++ if (autoload_path)
+ {
+- snprintf (symlink_path, length, "..%s%s",
+- dir_separator, base_name);
+- symlink (symlink_path, autoload_path);
+- free (symlink_path);
+- }
++ snprintf (autoload_path, length,
++ "%s/%s/autoload/%s",
++ dir_home, weechat_plugin->name,
++ base_name);
++ dir_separator = weechat_info_get ("dir_separator", "");
++ length = 2 + strlen (dir_separator) +
++ strlen (base_name) + 1;
++ symlink_path = malloc (length);
++ if (symlink_path)
++ {
++ snprintf (symlink_path, length, "..%s%s",
++ dir_separator, base_name);
++ symlink (symlink_path, autoload_path);
++ free (symlink_path);
++ }
+ free (autoload_path);
+- }
++ }
+
+- /* load script */
+- (*script_load) (new_path);
+- }
+- else
+- {
+- weechat_printf (NULL,
+- _("%s%s: failed to move script %s "
+- "to %s (%s)"),
+- weechat_prefix ("error"),
+- weechat_plugin->name,
+- name,
+- new_path,
+- strerror (errno));
++ /* load script */
++ (*script_load) (new_path);
++ }
++ else
++ {
++ weechat_printf (NULL,
++ _("%s%s: failed to move script %s "
++ "to %s (%s)"),
++ weechat_prefix ("error"),
++ weechat_plugin->name,
++ name,
++ new_path,
++ strerror (errno));
++ }
++ free (new_path);
+ }
+- free (new_path);
++ free (base_name);
+ }
+ free (name);
+ }
diff --git a/irc/weechat/pkg-plist b/irc/weechat/pkg-plist
index 10804d5912fe..6fbe2879634f 100644
--- a/irc/weechat/pkg-plist
+++ b/irc/weechat/pkg-plist
@@ -24,25 +24,51 @@ lib/weechat/plugins/logger.a
lib/weechat/plugins/logger.la
lib/weechat/plugins/logger.so
lib/weechat/plugins/logger.so.0
-%%NLS%%share/locale/de/LC_MESSAGES/weechat.mo
-%%NLS%%share/locale/es/LC_MESSAGES/weechat.mo
-%%NLS%%share/locale/fr/LC_MESSAGES/weechat.mo
-%%NLS%%share/locale/hu/LC_MESSAGES/weechat.mo
-%%NLS%%share/locale/ru/LC_MESSAGES/weechat.mo
-%%NLS%%share/locale/cs/LC_MESSAGES/weechat.mo
-%%PYTHON%%lib/weechat/plugins/python.a
-%%PYTHON%%lib/weechat/plugins/python.la
-%%PYTHON%%lib/weechat/plugins/python.so
-%%PYTHON%%lib/weechat/plugins/python.so.0
%%PERL%%lib/weechat/plugins/perl.a
%%PERL%%lib/weechat/plugins/perl.la
%%PERL%%lib/weechat/plugins/perl.so
%%PERL%%lib/weechat/plugins/perl.so.0
+%%PYTHON%%lib/weechat/plugins/python.a
+%%PYTHON%%lib/weechat/plugins/python.la
+%%PYTHON%%lib/weechat/plugins/python.so
+%%PYTHON%%lib/weechat/plugins/python.so.0
+%%RUBY%%lib/weechat/plugins/ruby.a
+%%RUBY%%lib/weechat/plugins/ruby.la
+%%RUBY%%lib/weechat/plugins/ruby.so
+%%RUBY%%lib/weechat/plugins/ruby.so.0
+%%TCL%%lib/weechat/plugins/tcl.so.0
+%%TCL%%lib/weechat/plugins/tcl.so
+%%TCL%%lib/weechat/plugins/tcl.la
+%%TCL%%lib/weechat/plugins/tcl.a
lib/weechat/plugins/xfer.a
lib/weechat/plugins/xfer.la
lib/weechat/plugins/xfer.so
lib/weechat/plugins/xfer.so.0
libdata/pkgconfig/weechat.pc
+%%DOCUMENTATION%%share/doc/weechat/weechat_faq.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_plugin_api.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_quickstart.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_scripting.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_tester.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_user.en.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_faq.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_plugin_api.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_quickstart.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_scripting.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_tester.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_user.fr.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_faq.pl.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_quickstart.pl.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_tester.pl.html
+%%DOCUMENTATION%%share/doc/weechat/weechat_quickstart.de.html
+%%NLS%%share/locale/de/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/es/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/weechat.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/weechat.mo
@dirrmtry lib/weechat/plugins
@dirrmtry lib/weechat
+@dirrmtry share/doc/weechat
@dirrm include/weechat