Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #8 from boxen/fix-gcc48-formula
Browse files Browse the repository at this point in the history
Restore homebrew-versions for gcc
  • Loading branch information
tarebyte committed Jul 21, 2014
2 parents 0d91cbb + 3ded2c9 commit 8013d0b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ script: "./script/cibuild"
gemfile: "this/does/not/exist"
rvm:
- "1.8.7"
- "2.0.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GCC Puppet Module for Boxen

[![Build Status](https://travis-ci.org/boxen/puppet-gcc.png?branch=master)](https://travis-ci.org/boxen/puppet-gcc)
[![Build Status](https://travis-ci.org/boxen/puppet-gcc.svg?branch=master)](https://travis-ci.org/boxen/puppet-gcc)

## Usage

Expand Down
22 changes: 12 additions & 10 deletions files/brews/gcc48.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def osmajor
sha1 'da0a2b9ec074f2bf624a34f3507f812ebb6e4dce'
version '4.8.3-boxen1'

head 'svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch'

bottle do
sha1 '97867c4e70e4eeaf98d42ad06a23a189abec3cc7' => :tiger_g3
sha1 'ddda3f3dae94812ef263a57fd2abe85bf97c3ca0' => :tiger_altivec
Expand Down Expand Up @@ -204,7 +206,7 @@ def add_suffix file, suffix
@@ -35,6 +35,14 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "unwind.h"
#include "backtrace.h"

+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand All @@ -214,7 +216,7 @@ def add_suffix file, suffix
+#endif
+
/* The main backtrace_full routine. */

/* Data passed through _Unwind_Backtrace. */
diff --git a/libbacktrace/simple.c b/libbacktrace/simple.c
index b03f039..9f3a945 100644
Expand All @@ -223,7 +225,7 @@ def add_suffix file, suffix
@@ -35,6 +35,14 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "unwind.h"
#include "backtrace.h"

+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand All @@ -233,7 +235,7 @@ def add_suffix file, suffix
+#endif
+
/* The simple_backtrace routine. */

/* Data passed through _Unwind_Backtrace. */
diff --git a/libgcc/unwind-c.c b/libgcc/unwind-c.c
index b937d9d..1121dce 100644
Expand All @@ -242,7 +244,7 @@ def add_suffix file, suffix
@@ -30,6 +30,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define NO_SIZE_OF_ENCODED_VALUE
#include "unwind-pe.h"

+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand All @@ -260,8 +262,8 @@ def add_suffix file, suffix
+++ b/libgfortran/runtime/backtrace.c
@@ -40,6 +40,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "unwind.h"


+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand All @@ -280,7 +282,7 @@ def add_suffix file, suffix
@@ -18,6 +18,14 @@
#include "go-defer.h"
#include "go-panic.h"

+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand All @@ -290,7 +292,7 @@ def add_suffix file, suffix
+#endif
+
/* The code for a Go exception. */

#ifdef __ARM_EABI_UNWINDER__
diff --git a/libobjc/exception.c b/libobjc/exception.c
index 4b05611..8ff70f9 100644
Expand All @@ -299,7 +301,7 @@ def add_suffix file, suffix
@@ -31,6 +31,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "unwind-pe.h"
#include <string.h> /* For memcpy */

+#ifdef __APPLE__
+/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo. */
+#undef HAVE_GETIPINFO
Expand Down
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
}

'10.9': {
ensure_resource('homebrew::tap',
'homebrew/versions', { 'ensure' => 'present' })

homebrew::formula { 'gcc48': }

package { 'boxen/brews/gcc48':
ensure => '4.8.3-boxen1',
ensure => '4.8.3-boxen1',
require => Homebrew::Tap['homebrew/versions']
}
}

Expand Down
6 changes: 5 additions & 1 deletion spec/classes/gcc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
let(:facts) { default_test_facts.merge(:macosx_productversion_major => 10.9) }

it do
should contain_homebrew__tap('homebrew/versions').
with_ensure('present')

should contain_package('boxen/brews/gcc48').with({
:ensure => '4.8.3-boxen1'
:ensure => '4.8.3-boxen1',
:require => 'Homebrew::Tap[homebrew/versions]'
})
end
end

0 comments on commit 8013d0b

Please sign in to comment.