2009-11-12 18:15:15 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Io < Formula
|
2012-02-22 04:48:36 +00:00
|
|
|
homepage 'http://iolanguage.com/'
|
2011-10-11 19:48:44 +00:00
|
|
|
url 'https://github.com/stevedekorte/io/tarball/2011.09.12'
|
2012-07-19 04:08:25 +00:00
|
|
|
sha1 '56720fe9b2c746ca817c15e48023b256363b3015'
|
2012-02-22 04:48:36 +00:00
|
|
|
|
2011-09-06 20:02:08 +00:00
|
|
|
head 'https://github.com/stevedekorte/io.git'
|
2009-12-05 15:42:26 +00:00
|
|
|
|
2012-08-12 19:45:59 +00:00
|
|
|
option 'without-addons', 'Build without addons'
|
|
|
|
option 'without-python', 'Build without python addon'
|
|
|
|
|
2011-10-11 19:48:44 +00:00
|
|
|
depends_on 'cmake' => :build
|
2011-08-26 12:36:28 +00:00
|
|
|
depends_on 'libevent'
|
2012-07-19 04:08:25 +00:00
|
|
|
depends_on 'libffi'
|
2012-10-15 18:40:55 +00:00
|
|
|
depends_on 'ossp-uuid'
|
2012-07-19 04:08:25 +00:00
|
|
|
depends_on 'pcre'
|
2012-10-15 18:40:55 +00:00
|
|
|
depends_on 'yajl'
|
|
|
|
|
|
|
|
# Used by Bignum add-on
|
|
|
|
depends_on 'gmp' unless build.include? 'without-addons'
|
|
|
|
|
|
|
|
# Used by Fonts add-on
|
|
|
|
depends_on :freetype unless build.include? 'without-addons'
|
2012-07-19 04:08:25 +00:00
|
|
|
|
2012-09-15 01:00:59 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 421
|
|
|
|
cause <<-EOS.undent
|
|
|
|
make never completes. see:
|
|
|
|
https://github.com/stevedekorte/io/issues/223
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2012-07-19 04:08:25 +00:00
|
|
|
# Fix recursive inline. See discussion in:
|
|
|
|
# https://github.com/stevedekorte/io/issues/135
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
2011-09-20 03:45:16 +00:00
|
|
|
|
2009-11-12 18:15:15 +00:00
|
|
|
def install
|
2010-03-01 19:04:42 +00:00
|
|
|
ENV.j1
|
2012-08-12 19:45:59 +00:00
|
|
|
if build.include? 'without-addons'
|
|
|
|
inreplace "CMakeLists.txt",
|
|
|
|
'add_subdirectory(addons)',
|
|
|
|
'#add_subdirectory(addons)'
|
|
|
|
end
|
|
|
|
if build.include? 'without-python'
|
|
|
|
inreplace "addons/CMakeLists.txt",
|
|
|
|
'add_subdirectory(Python)',
|
|
|
|
'#add_subdirectory(Python)'
|
|
|
|
end
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'buildroot' do
|
2012-05-22 21:37:04 +00:00
|
|
|
system "cmake", "..", *std_cmake_args
|
2012-02-21 06:04:21 +00:00
|
|
|
system 'make'
|
|
|
|
output = %x[./_build/binaries/io ../libs/iovm/tests/correctness/run.io]
|
|
|
|
if $?.exitstatus != 0
|
|
|
|
opoo "Test suite not 100% successful:\n#{output}"
|
|
|
|
else
|
|
|
|
ohai "Test suite ran successfully:\n#{output}"
|
|
|
|
end
|
|
|
|
system 'make install'
|
2011-09-20 03:45:16 +00:00
|
|
|
end
|
2009-11-12 18:15:15 +00:00
|
|
|
end
|
2011-11-30 18:56:07 +00:00
|
|
|
end
|
2012-07-19 04:08:25 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/libs/basekit/source/Common_inline.h 2011-09-12 17:14:12.000000000 -0500
|
|
|
|
+++ b/libs/basekit/source/Common_inline.h 2011-12-17 00:46:02.000000000 -0600
|
|
|
|
@@ -52,7 +52,7 @@
|
|
|
|
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
|
|
|
|
- #define NS_INLINE static __inline__ __attribute__((always_inline))
|
|
|
|
+ #define NS_INLINE static inline
|
|
|
|
|
|
|
|
#ifdef IO_IN_C_FILE
|
|
|
|
// in .c
|