aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAlessio Bogon2014-03-20 19:23:01 +0100
committerMike McQuaid2014-03-22 10:51:48 +0000
commit0dd4dbced2a884381238752fd54805290c24c021 (patch)
treea76e791f74b511114f16f9c8a0c572da955721fb /Library/Formula
parent9cda0697cad09ad97fc114150869d8f88222f84f (diff)
downloadhomebrew-0dd4dbced2a884381238752fd54805290c24c021.tar.bz2
pebble-sdk 2.0.2
- added pypng resource - removed the dependency from virtualenv
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pebble-sdk.rb41
1 files changed, 29 insertions, 12 deletions
diff --git a/Library/Formula/pebble-sdk.rb b/Library/Formula/pebble-sdk.rb
index fed31f3ea..7723b550d 100644
--- a/Library/Formula/pebble-sdk.rb
+++ b/Library/Formula/pebble-sdk.rb
@@ -2,17 +2,19 @@ require 'formula'
class PebbleSdk < Formula
homepage 'https://developer.getpebble.com/2/'
- url 'https://s3.amazonaws.com/assets.getpebble.com/sdk2/PebbleSDK-2.0.1.tar.gz'
- sha1 'fc9ee49dd1773e4690488328b05bea3a5cbab88e'
+ url 'https://s3.amazonaws.com/assets.getpebble.com/sdk2/PebbleSDK-2.0.2.tar.gz'
+ sha1 'c6e2cefb638ebcfffae31c6cc3b175d3e62b3c44'
- depends_on 'freetype' => :recommended
- depends_on 'mpfr'
- depends_on 'gmp'
- depends_on 'libmpc'
- depends_on 'libelf'
- depends_on 'texinfo'
+ depends_on :macos => :mountain_lion
depends_on :python
+ depends_on 'freetype' => :recommended
+ depends_on 'mpfr' => :build
+ depends_on 'gmp' => :build
+ depends_on 'libmpc' => :build
+ depends_on 'libelf' => :build
+ depends_on 'texinfo' => :build
+ # List of resources can be obtained from requirements.txt
resource 'pillow' do
url 'https://pypi.python.org/packages/source/P/Pillow/Pillow-2.3.0.zip'
sha1 '0d3fdaa9a8a40a59a66c6057b9f91a3553db852e'
@@ -48,20 +50,33 @@ class PebbleSdk < Formula
sha1 '39e6d9a37b826c48eab6959591a174135fc2873c'
end
+ resource 'pypng' do
+ url 'https://pypi.python.org/packages/source/p/pypng/pypng-0.0.16.tar.gz'
+ sha1 'f90a1f88a7875f019b1fc0addde5410ce6daf2dd'
+ end
+
resource 'pebble-arm-toolchain' do
url 'https://github.com/pebble/arm-eabi-toolchain/archive/v2.0.tar.gz'
sha1 '7085c6ef371213e3e766a1cbd7e6e1951ccf1d87'
end
def install
- # This replacement fixes a path that gets messed up because of the
- # bin.env_script_all_files call (which relocates actual pebble.py script
- # to libexec/, causing problems with the absolute path expected below).
- inreplace 'bin/pebble', /^script_path = .*?$/m, "script_path = '#{libexec}/../tools/pebble.py'"
+ inreplace 'bin/pebble' do |s|
+ # This replacement fixes a path that gets messed up because of the
+ # bin.env_script_all_files call (which relocates actual pebble.py script
+ # to libexec/, causing problems with the absolute path expected below).
+ s.gsub! /^script_path = .*?$/m, "script_path = '#{libexec}/../tools/pebble.py'"
+
+ # This replacement removes environment settings that were needed only
+ # if installation was done with the official script
+ s.gsub! /^local_python_env.*?=.*?\(.*?\)$/m, ""
+ s.gsub! /^process = subprocess\.Popen\(args, shell=False, env=local_python_env\)/, "process = subprocess.Popen(args, shell=False)"
+ end
ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages'
install_args = [ "setup.py", "install", "--prefix=#{libexec}" ]
+ ENV.append_to_cflags '-Qunused-arguments'
resource('pillow').stage { system "python", *install_args }
resource('freetype-py').stage { system "python", *install_args }
resource('sh').stage { system "python", *install_args }
@@ -69,6 +84,8 @@ class PebbleSdk < Formula
resource('autobahn').stage { system "python", *install_args }
resource('websocket-client').stage { system "python", *install_args }
resource('pyserial').stage { system "python", *install_args }
+ resource('pypng').stage { system "python", *install_args }
+ ENV.remove_from_cflags '-Qunused-arguments'
prefix.install %w[Documentation Examples Pebble PebbleKit-Android
PebbleKit-iOS bin tools requirements.txt version.txt]