Created
August 16, 2011 19:13
-
-
Save danielfone/1149891 to your computer and use it in GitHub Desktop.
homebrew io.rb - snow leopard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Io < Formula | |
head 'https://github.com/stevedekorte/io.git', :tag => 'e3908ce802a5d4fb56713610f5e1d62d6bf1f011' | |
homepage 'http://iolanguage.com/' | |
depends_on 'cmake' => :build | |
depends_on 'libsgml' | |
depends_on 'ossp-uuid' | |
# Either CMake doesn't detect OS X's png include path correctly, | |
# or there's an issue with io's build system; force the path in | |
# so we can build. | |
def patches | |
DATA | |
end | |
def install | |
ENV.j1 | |
mkdir 'io-build' | |
Dir.chdir 'io-build' do | |
system "cmake .. #{std_cmake_parameters}" | |
system "make install" | |
end | |
rm_f Dir['docs/*.pdf'] | |
doc.install Dir['docs/*'] | |
prefix.install 'license/bsd_license.txt' => 'LICENSE' | |
end | |
end | |
__END__ | |
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index a4cd440..e2d05eb 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -140,7 +140,7 @@ IF(WIN32 AND NOT CYGWIN) | |
ELSE(WIN32 AND NOT CYGWIN) | |
execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE IO_GIT_REV) | |
ENDIF(WIN32 AND NOT CYGWIN) | |
-string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV}) | |
+string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV} "" "") | |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | |
SET(CPACK_PACKAGE_VENDOR "iolanguage.com") | |
diff --git a/addons/Image/CMakeLists.txt b/addons/Image/CMakeLists.txt | |
index a65693d..2166f1b 100644 | |
--- a/addons/Image/CMakeLists.txt | |
+++ b/addons/Image/CMakeLists.txt | |
@@ -22,7 +22,7 @@ if(PNG_FOUND AND TIFF_FOUND AND JPEG_FOUND) | |
add_definitions(-DBUILDING_IMAGE_ADDON) | |
# Additional include directories | |
- include_directories(${PNG_INCLUDE_DIR} ${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) | |
+ include_directories("/usr/X11/include" ${PNG_INCLUDE_DIR} ${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) | |
# Generate the IoImageInit.c file. | |
# Argument SHOULD ALWAYS be the exact name of the addon, case is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Formula/io.rb b/Library/Formula/io.rb | |
index d6cd7a4..d7d0b95 100644 | |
--- a/Library/Formula/io.rb | |
+++ b/Library/Formula/io.rb | |
@@ -1,7 +1,7 @@ | |
require 'formula' | |
class Io < Formula | |
- head 'https://github.com/stevedekorte/io.git' | |
+ head 'https://github.com/stevedekorte/io.git', :tag => 'e3908ce802a5d4fb56713610f5e1d62d6bf1f011' | |
homepage 'http://iolanguage.com/' | |
depends_on 'cmake' => :build | |
@@ -32,6 +32,19 @@ class Io < Formula | |
end | |
__END__ | |
+diff --git a/CMakeLists.txt b/CMakeLists.txt | |
+index a4cd440..e2d05eb 100644 | |
+--- a/CMakeLists.txt | |
++++ b/CMakeLists.txt | |
+@@ -140,7 +140,7 @@ IF(WIN32 AND NOT CYGWIN) | |
+ ELSE(WIN32 AND NOT CYGWIN) | |
+ execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE IO_GIT_REV) | |
+ ENDIF(WIN32 AND NOT CYGWIN) | |
+-string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV}) | |
++string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV} "" "") | |
+ | |
+ SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | |
+ SET(CPACK_PACKAGE_VENDOR "iolanguage.com") |
Have you done a brew update?
Yes, I've done a brew update. Thanks for quick reply!
Can you do a brew install -vd io and see if you can checkout that commit yourself?
Should be :commit => 'e3908ce802a5d4fb56713610f5e1d62d6bf1f011'
instead of :tag =>
. However, it still fails when trying to apply the diff:
Sora:build ecin$ brew upgrade io
==> Upgrading io
==> Cloning https://github.com/stevedekorte/io.git
Updating /Users/ecin/Library/Caches/Homebrew/io--git
==> Checking out commit e3908ce802a5d4fb56713610f5e1d62d6bf1f011
==> Patching
patching file CMakeLists.txt
Hunk #1 FAILED at 140.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
patching file addons/Image/CMakeLists.txt
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 22 with fuzz 1.
Error: Failure while executing: /usr/bin/patch -f -p1 -i 001-homebrew.diff
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I applied this gist, but I got the following error when I 'brew install io':
==> Cloning https://github.com/stevedekorte/io.git
Updating /Users/liukotami/Library/Caches/Homebrew/io--git
==> Checking out tag e3908ce802a5d4fb56713610f5e1d62d6bf1f011
fatal: reference is not a tree: e3908ce802a5d4fb56713610f5e1d62d6bf1f011
Error: Failure while executing: git checkout -q e3908ce802a5d4fb56713610f5e1d62d6bf1f011