Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Updates weechat to 0.4.1 and fixes python support #20025

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions Library/Formula/weechat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class Weechat < Formula
homepage 'http://www.weechat.org'
url 'http://www.weechat.net/files/src/weechat-0.4.0.tar.bz2'
sha1 'e4b891d9d3d68196f97d226f487c4a2382d59d99'
url 'http://www.weechat.net/files/src/weechat-0.4.1.tar.bz2'
sha1 'a5185d6b8a2b330713ea354f06601a205270e3a2'

depends_on 'cmake' => :build
depends_on 'gnutls'
Expand All @@ -19,6 +19,14 @@ class Weechat < Formula
option 'python', 'Build the python module (requires framework Python)'
option 'aspell', 'Build the aspell module that checks your spelling'

# cmake finds brewed python when installed, but when searching for the
# libraries it searches for system libraries first. This patch disables
# default search paths and ensures that brewed python is found first, if not
# it falls back to system python.
def patches
DATA
end

def install
# Remove all arch flags from the PERL_*FLAGS as we specify them ourselves.
# This messes up because the system perl is a fat binary with 32, 64 and PPC
Expand Down Expand Up @@ -70,3 +78,25 @@ def caveats; <<-EOS.undent
EOS
end
end

__END__
--- weechat-0.4.1-original/cmake/FindPython.cmake 2013-05-20 03:06:14.000000000 -0500
+++ weechat-0.4.1/cmake/FindPython.cmake 2013-05-23 14:24:33.000000000 -0500
@@ -41,7 +41,8 @@
ELSE(ENABLE_PYTHON3)
FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python2.7 python2.6 python2.5 python
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
+ PATHS HOMEBREW_PREFIX/bin /usr/bin
+ NO_DEFAULT_PATH
)
ENDIF(ENABLE_PYTHON3)

@@ -74,6 +75,7 @@
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python2.7 python2.6 python2.5 python
PATHS ${PYTHON_POSSIBLE_LIB_PATH}
+ NO_DEFAULT_PATH
)
ENDIF(ENABLE_PYTHON3)