Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New formula for irrlicht 1.8 #15977

Closed
wants to merge 1 commit into from

4 participants

@neglectedvalue

The Irrlicht Engine is a high performance open source and cross platform 3D engine for creating realtime 3D applications.

Library/Formula/irrlicht.rb
@@ -0,0 +1,17 @@
+require 'formula'
+
+class Irrlicht < Formula
+ homepage 'http://irrlicht.sourceforge.net/'
+ url 'http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.zip'
+ sha1 'a24c2183e3c7dd909f92699c373a68382958b09d'
+ head 'https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk', :using => :svn
+
+ depends_on :xcode
+
+ def install
+ system *%w(xcodebuild -project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a GCC_VERSION=com.apple.compilers.llvmgcc42)

On my system 10.8.2 with Xcode-only, I need to change this line to include the -sdk like so:

    system *%W(xcodebuild -project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a GCC_VERSION=com.apple.compilers.llvmgcc42 -sdk macosx#{MacOS.version} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv
Owner

Maintainers, any concerns about this being an xcode project or the GCC_VERSION=com.apple.compilers.llvmgcc42 bit?

@samueljohn samueljohn commented on the diff
Library/Formula/irrlicht.rb
@@ -0,0 +1,17 @@
+require 'formula'
+
+class Irrlicht < Formula
+ homepage 'http://irrlicht.sourceforge.net/'
+ url 'http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.zip'
+ sha1 'a24c2183e3c7dd909f92699c373a68382958b09d'
+ head 'https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk', :using => :svn
+
+ depends_on :xcode
+
+ def install
+ system *%W(xcodebuild -project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a GCC_VERSION=com.apple.compilers.llvmgcc42 -sdk macosx#{MacOS.version})
+
+ lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a"
+ include.install "include" => "irrlicht"

I don't understand what the => part does here. Can you teach me?

To install headers to include/irrlicht/ instead of include/.

@adamv Owner
adamv added a note

@samueljohn this is "rename syntax", it means intsall this file to the path but rename it to the thing after =>

Nice. Thanks. Never knew this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamv
Owner

Please squash to a single commit for review.

@neglectedvalue

Squashed.

@adamv
Owner

Does this only work with: GCC_VERSION=com.apple.compilers.llvmgcc42?

@neglectedvalue

Yes. Compiling with clang aborts with it:

CompileC build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLParallaxMapRenderer.o ../COpenGLParallaxMapRenderer.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O3 -mdynamic-no-pic -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -I/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Irrlicht.hmap -I/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/Release/include -I../../../include -I/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/DerivedSources/x86_64 -I/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/DerivedSources -F/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/Release -DMACOSX -include /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/MacOSX_Prefix.pch -MMD -MT dependencies -MF /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLParallaxMapRenderer.d --serialize-diagnostics /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLParallaxMapRenderer.dia -c /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLParallaxMapRenderer.cpp -o /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLParallaxMapRenderer.o
In file included from /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLParallaxMapRenderer.cpp:9:
In file included from /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLDriver.h:25:
/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2390:31: error: expected ')'
        glProgramParameteriEXT((long GLuint)program, pname, value);
                                     ^
/tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2390:25: note: to match this '('
        glProgramParameteriEXT((long GLuint)program, pname, value);
                               ^
1 error generated.

** BUILD FAILED **

The following build commands failed:
    CompileC build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLTexture.o ../COpenGLTexture.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLParallaxMapRenderer.o ../COpenGLParallaxMapRenderer.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
==> Configuration
HOMEBREW_VERSION: 0.9.3
HEAD: d49abfb9c8d58ef0555c058fe373dae50f8cd702
CPU: 8-core 64-bit sandybridge
OS X: 10.8.2-x86_64
Xcode: 4.5.2
CLT: 4.5.0.0.1.1249367152
X11: 2.7.4 => /opt/X11
==> ENV
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin

Error: irrlicht did not build

Add a fails_with clause?

@samueljohn

In the class (not in the install method), add:

fails_with :clang do
  build 421
  cause "error: expected ')' glProgramParameteriEXT((long GLuint)program, pname, value);"
end

Feel free to improve the cause.

@neglectedvalue neglectedvalue New formula for irrlicht 1.8
The Irrlicht Engine is a high performance open source and cross platform 3D engine for creating realtime 3D applications.
8138709
@nicholasguyett
  • bump - This worked beautifully for me. Hoping for this to make it into the official repo...
@samueljohn

Testing this again now ...

@samueljohn

Confirmed: It works with llvm-gcc. I can't make it to use clang though (for testing), because it ignores --use-clang. This is because xcodebuild is told to use GCC. But I am fine with that.

Shall the fails_with :clang perhaps be updated to the latest build?

@adamv I don't have objections.

@adamv adamv closed this pull request from a commit
@neglectedvalue neglectedvalue irrlicht 1.8
Closes #15977.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
29efec3
@adamv adamv closed this in 29efec3
@phatblat phatblat referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@jpscharf jpscharf referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@shelhamer shelhamer referenced this pull request from a commit
@neglectedvalue neglectedvalue irrlicht 1.8
Closes #15977.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
32a5a76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2013
  1. @neglectedvalue

    New formula for irrlicht 1.8

    neglectedvalue authored
    The Irrlicht Engine is a high performance open source and cross platform 3D engine for creating realtime 3D applications.
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 0 deletions.
  1. +29 −0 Library/Formula/irrlicht.rb
View
29 Library/Formula/irrlicht.rb
@@ -0,0 +1,29 @@
+require 'formula'
+
+class Irrlicht < Formula
+ homepage 'http://irrlicht.sourceforge.net/'
+ url 'http://downloads.sourceforge.net/irrlicht/irrlicht-1.8.zip'
+ sha1 'a24c2183e3c7dd909f92699c373a68382958b09d'
+ head 'https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk', :using => :svn
+
+ depends_on :xcode
+
+ fails_with :clang do
+ build 421
+ cause <<-EOS.undent
+ /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2390:31: error: expected ')'
+ glProgramParameteriEXT((long GLuint)program, pname, value);
+ ^
+ /tmp/irrlicht-3FKY/irrlicht-1.8/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2390:25: note: to match this '('
+ glProgramParameteriEXT((long GLuint)program, pname, value);
+ ^
+ EOS
+ end
+
+ def install
+ system *%W(xcodebuild -project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a GCC_VERSION=com.apple.compilers.llvmgcc42 -sdk macosx#{MacOS.version})
+
+ lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a"
+ include.install "include" => "irrlicht"

I don't understand what the => part does here. Can you teach me?

To install headers to include/irrlicht/ instead of include/.

@adamv Owner
adamv added a note

@samueljohn this is "rename syntax", it means intsall this file to the path but rename it to the thing after =>

Nice. Thanks. Never knew this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ end
+end
Something went wrong with that request. Please try again.