Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Formula for SFML #20765

Closed
wants to merge 7 commits into from
Closed

Formula for SFML #20765

wants to merge 7 commits into from

Conversation

lheckemann
Copy link

Based on juniorz's gist: https://gist.github.com/juniorz/4440291
Uses release version of SFML.

require 'formula'

# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!!!

@petere
Copy link
Contributor

petere commented Jun 25, 2013

Check your formula with brew audit.

@lheckemann
Copy link
Author

Right, sorry... >.<

class Sfml < Formula
homepage 'http://www.sfml-dev.org'

version '2.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version goes under url, remove blank line above here.

@adamv
Copy link
Contributor

adamv commented Jun 30, 2013

Ping

@lheckemann
Copy link
Author

Fixed.

@lheckemann
Copy link
Author

I'm sorry I didn't read the formula guidelines and as a result didn't follow them in the slightest. I will read them for future formulae I might make.

(note to self: read guidelines even if I'm adapting someone else's code)

@mantognini
Copy link

Was reading the cookbook to do the same thing. Nice to see other people also caring about SFML & Homebrew! :-)

A few things though.

First, I'd like to emphasis that I haven't written any formula yet so I don't know all the tricks.

That's probably not the most relevant thing, but isn't it better to use directly git for the head? I see here that it looks like its possible.

You added a static option. However, I strongly discourage people from using it with SFML (generally speaking: don't use it on Unixes). In the past, SFML was not even compatible with that kind of build and I cannot guarantee that SFML will always be compilable as static libraries. So it would be better to remove this option. Moreover, it will create a compilation error if both static and framework options are selected: the CMake script won't allow it.

Regarding the dependencies, SFML provides both freetype and sndfile as frameworks and statically link against specific version of GLEW and jpeg that are also shipped with the source code (see the extlibs folder). When compiling SFML, CMake might be confused if multiple version of the libraries exist on the system. It would be safer to somehow explicitly specify which version CMake should use, no?

You specify -DINSTALL_EXTERNAL_LIBS=FALSE but this will lead to issues if the Xcode templates are used later on by the user since they rely on the presence of freetype and libsndfile in /Library/Frameworks (in order to run SFML on any computer, those frameworks and SFML libraries are copied to the user's application bundle). Currently I don't know how to workaround this limitation. Maybe patching SFML's templates for Homebrew installation? What's the usual policy on such issue?

You're speaking of SFML.framework in framework_caveats. The use is not require to link against this framework to use SFML since it contains only header files. sfml-*.frameworks are the libraries that should be linked against.

@lheckemann
Copy link
Author

I broke everything I think. I'm going to delete my forked repo, fork it anew, and do everything right this time.

@lheckemann lheckemann closed this Jul 2, 2013
@mantognini
Copy link

@Anonymooseable Ok, let me know when you publish your new one with an @mantognini.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants