Skip to content

Commit

Permalink
weechat 0.4.1
Browse files Browse the repository at this point in the history
* fixes CMake Python detection

Fixes Homebrew#19168.
Closes Homebrew#20025.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
chadcatlett authored and adamv committed May 24, 2013
1 parent 10dda13 commit 28f9a22
Showing 1 changed file with 32 additions and 2 deletions.
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)

0 comments on commit 28f9a22

Please # to comment.