2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-17 18:41:05 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Weechat < Formula
|
2010-02-08 12:18:02 +00:00
|
|
|
homepage 'http://www.weechat.org'
|
2012-11-20 01:05:26 +00:00
|
|
|
url 'http://www.weechat.org/files/src/weechat-0.3.9.2.tar.bz2'
|
|
|
|
sha1 '64147c88426c240d5d33c65755c729ed2c435aeb'
|
2012-01-22 22:43:32 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'cmake' => :build
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
depends_on 'gettext'
|
2009-09-18 13:38:43 +00:00
|
|
|
depends_on 'gnutls'
|
2012-11-11 04:16:03 +00:00
|
|
|
depends_on 'libgcrypt'
|
2013-02-02 03:56:34 +00:00
|
|
|
depends_on 'guile' if build.include? 'guile'
|
|
|
|
depends_on 'aspell' if build.include? 'aspell'
|
|
|
|
depends_on 'lua' if build.include? 'lua'
|
2012-05-23 18:25:43 +00:00
|
|
|
|
2012-08-23 22:28:02 +00:00
|
|
|
option 'lua', 'Build the lua module'
|
|
|
|
option 'perl', 'Build the perl module'
|
|
|
|
option 'ruby', 'Build the ruby module'
|
|
|
|
option 'guile', 'Build the guile module'
|
|
|
|
option 'python', 'Build the python module (requires framework Python)'
|
|
|
|
option 'aspell', 'Build the aspell module that checks your spelling'
|
2009-09-17 18:41:05 +00:00
|
|
|
|
|
|
|
def install
|
2010-08-08 20:51:00 +00:00
|
|
|
# Remove all arch flags from the PERL_*FLAGS as we specify them ourselves.
|
2012-01-22 22:43:32 +00:00
|
|
|
# This messes up because the system perl is a fat binary with 32, 64 and PPC
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
# compiles, but our deps don't have that. Remove at v0.3.8, fixed in HEAD.
|
2012-08-23 22:28:02 +00:00
|
|
|
archs = %W[-arch ppc -arch i386 -arch x86_64].join('|')
|
2012-10-02 11:05:20 +00:00
|
|
|
inreplace "src/plugins/perl/CMakeLists.txt",
|
2010-08-08 20:51:00 +00:00
|
|
|
'IF(PERL_FOUND)',
|
|
|
|
'IF(PERL_FOUND)' +
|
2012-01-22 22:43:32 +00:00
|
|
|
%Q{\n STRING(REGEX REPLACE "#{archs}" "" PERL_CFLAGS "${PERL_CFLAGS}")} +
|
|
|
|
%Q{\n STRING(REGEX REPLACE "#{archs}" "" PERL_LFLAGS "${PERL_LFLAGS}")}
|
2010-08-08 20:51:00 +00:00
|
|
|
|
weechat: switch back to cmake, support aspell
The weechat devs have informed us that configure is deprecated.
Switch back to cmake.
Add a user option to enable the aspell module.
Add a user option to enable the lua module.
Add an inreplace to fix the bad path in HB framework Python's
LINKFORSHARED variable and an explanation for it.
Add deps for lua and apsell if the user options those.
Add a caveat suggesting the user install aspell manually before
installing weechat, otherwise they won't have any dictionaries.
Remove the code that deleted the extra module symlinks.
The Aspell dep could be made into a requirement, but it would be
nice if Aspell installed at least the en dictionary by default.
All bindings work except the Ruby bindings when built against
rbenv and ruby-1.9. This has been reported upstream and is the
main reason for switching back to cmake, so we can get support.
Tested on Lion using clang and llvm from XCode-4.3.3 against
system Python, HB framework and non-framework python, the current
Aspell, Lua, and Guile, system Ruby, and system Perl.
Fixes Homebrew/homebrew#12377
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-12 06:23:07 +00:00
|
|
|
# FindPython.cmake queries the Python variable LINKFORSHARED which contains
|
|
|
|
# a path that only exists during Python install when using HB framework
|
|
|
|
# Python. So remove that and use what's common in every install of Python,
|
|
|
|
# namely -u _PyMac_Error. Without the invalid path, it links okay.
|
|
|
|
# Because Macports and Apple change LINKFORSHARED but HB does not, this
|
|
|
|
# will have to persist, and it's not reported upstream. Fixes the error
|
|
|
|
# no such file or directory: 'Python.framework/Versions/2.7/Python'
|
2012-10-02 11:05:20 +00:00
|
|
|
inreplace 'src/plugins/python/CMakeLists.txt',
|
weechat: switch back to cmake, support aspell
The weechat devs have informed us that configure is deprecated.
Switch back to cmake.
Add a user option to enable the aspell module.
Add a user option to enable the lua module.
Add an inreplace to fix the bad path in HB framework Python's
LINKFORSHARED variable and an explanation for it.
Add deps for lua and apsell if the user options those.
Add a caveat suggesting the user install aspell manually before
installing weechat, otherwise they won't have any dictionaries.
Remove the code that deleted the extra module symlinks.
The Aspell dep could be made into a requirement, but it would be
nice if Aspell installed at least the en dictionary by default.
All bindings work except the Ruby bindings when built against
rbenv and ruby-1.9. This has been reported upstream and is the
main reason for switching back to cmake, so we can get support.
Tested on Lion using clang and llvm from XCode-4.3.3 against
system Python, HB framework and non-framework python, the current
Aspell, Lua, and Guile, system Ruby, and system Perl.
Fixes Homebrew/homebrew#12377
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-12 06:23:07 +00:00
|
|
|
'${PYTHON_LFLAGS}', '-u _PyMac_Error'
|
|
|
|
|
|
|
|
args = std_cmake_args + %W[
|
|
|
|
-DPREFIX=#{prefix}
|
|
|
|
-DENABLE_GTK=OFF
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
]
|
2012-08-23 22:28:02 +00:00
|
|
|
args << '-DENABLE_LUA=OFF' unless build.include? 'lua'
|
|
|
|
args << '-DENABLE_PERL=OFF' unless build.include? 'perl'
|
|
|
|
args << '-DENABLE_RUBY=OFF' unless build.include? 'ruby'
|
|
|
|
args << '-DENABLE_PYTHON=OFF' unless build.include? 'python'
|
|
|
|
args << '-DENABLE_ASPELL=OFF' unless build.include? 'aspell'
|
|
|
|
args << '-DENABLE_GUILE=OFF' unless build.include? 'guile' and \
|
weechat: switch back to cmake, support aspell
The weechat devs have informed us that configure is deprecated.
Switch back to cmake.
Add a user option to enable the aspell module.
Add a user option to enable the lua module.
Add an inreplace to fix the bad path in HB framework Python's
LINKFORSHARED variable and an explanation for it.
Add deps for lua and apsell if the user options those.
Add a caveat suggesting the user install aspell manually before
installing weechat, otherwise they won't have any dictionaries.
Remove the code that deleted the extra module symlinks.
The Aspell dep could be made into a requirement, but it would be
nice if Aspell installed at least the en dictionary by default.
All bindings work except the Ruby bindings when built against
rbenv and ruby-1.9. This has been reported upstream and is the
main reason for switching back to cmake, so we can get support.
Tested on Lion using clang and llvm from XCode-4.3.3 against
system Python, HB framework and non-framework python, the current
Aspell, Lua, and Guile, system Ruby, and system Perl.
Fixes Homebrew/homebrew#12377
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-12 06:23:07 +00:00
|
|
|
Formula.factory('guile').linked_keg.exist?
|
2012-11-20 01:05:26 +00:00
|
|
|
args << '..'
|
2012-02-29 01:58:59 +00:00
|
|
|
|
2012-11-20 01:05:26 +00:00
|
|
|
mkdir 'build' do
|
|
|
|
system 'cmake', *args
|
|
|
|
system 'make install'
|
|
|
|
end
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
end
|
2012-02-29 01:58:59 +00:00
|
|
|
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
def caveats; <<-EOS.undent
|
weechat: switch back to cmake, support aspell
The weechat devs have informed us that configure is deprecated.
Switch back to cmake.
Add a user option to enable the aspell module.
Add a user option to enable the lua module.
Add an inreplace to fix the bad path in HB framework Python's
LINKFORSHARED variable and an explanation for it.
Add deps for lua and apsell if the user options those.
Add a caveat suggesting the user install aspell manually before
installing weechat, otherwise they won't have any dictionaries.
Remove the code that deleted the extra module symlinks.
The Aspell dep could be made into a requirement, but it would be
nice if Aspell installed at least the en dictionary by default.
All bindings work except the Ruby bindings when built against
rbenv and ruby-1.9. This has been reported upstream and is the
main reason for switching back to cmake, so we can get support.
Tested on Lion using clang and llvm from XCode-4.3.3 against
system Python, HB framework and non-framework python, the current
Aspell, Lua, and Guile, system Ruby, and system Perl.
Fixes Homebrew/homebrew#12377
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-06-12 06:23:07 +00:00
|
|
|
Weechat can depend on Aspell if you choose the --aspell option, but
|
|
|
|
Aspell should be installed manually before installing Weechat so that
|
|
|
|
you can choose the dictionaries you want. If Aspell was installed
|
|
|
|
automatically as part of weechat, there won't be any dictionaries.
|
weechat: switch from cmake to configure
* Switch to using `configure`
* Remove `head` because it requires gtk.
* Add a build time dep on gettext, otherwise link errors.
* Add `--disable-perl` to stop segfault on program exit.
* Add `--disable-aspell` which is still being reviewed.
* Add `--disable-static` to stop building duplicate plugins.
* Add `--disable-python` unless Python is a framework.
* Note that the one `inreplace` is fixed in HEAD.
* Delete the plugin symlinks to stop runtime warnings.
Weechat-0.3.7 can be built using cmake or configure, but their
cmake build scripts are prone to errors when building the ruby
bindings. By switching to `configure` the formula is greatly
simplified, and all the plugins it creates get neatly installed
into lib+'weechat/plugins' automatically.
Weechat `head` builds require `gtk` even if the `gtk` gui is
not enabled, which it isn't because it's b0rked. So remove head.
Weechat comes with an internal gettext and libintl that cause
errors when linking. So add a dep on Homebrew's gettext.
As reported by another user and confirmed through gdb, the perl
plugin causes a segfault on exit. So disable building that.
Aspell is still under construction in Homebrew, and weechat will
compile that plug by default. So disable aspell for now.
Disable the static plugins and delete the plugin symlinks. That
leaves only one `.so` for each plugin and stops a dozen warnings
when running weechat about _can't load duplicate plugins._
Disable building the Python plugin unless Python is a framework
because it will build but fail to load the plugin with an error
that it can't dlopen a module expected in flat namespace.
Even if we add a dep on Homebrew/dupes/ncurses to get the wide
variety of it, that formula doesn't actually create `-lnursesw`.
So that is not added, because it can't be found.
The gtk interface to weechat is not added as a user option because
it runs but doesn't make a useable gui. It's blank & unresponsive.
Weechat compiles, runs, and connects to freenode without error
using clang and llvm on Lion, tested against system Ruby, system
Python, and Homebrew Python frameworks.
Fixes Homebrew/homebrew#11289.
Fixes Homebrew/homebrew#11835.
Fixes Homebrew/homebrew#12066.
Closes Homebrew/homebrew#12193.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-10 19:38:26 +00:00
|
|
|
EOS
|
2009-09-17 18:41:05 +00:00
|
|
|
end
|
|
|
|
end
|