Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LudVichzme

Pages: [1]
1
General discussions / Re: SFML 2.2 - OSX Install script
« on: January 02, 2015, 10:18:05 pm »
I just pushed my CMakeLists.txt on my branch :
https://github.com/ludvichzme/SFML/blob/brew/CMakeLists.txt

It just adds a new option : SFML_INSTALL_EXTLIBS (default TRUE), which allow to skip the extlibs installation.

And my custom brew formula (actually use my local git branch) :
Quote
require "formula"

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

  head "/Users/ludovic/Development/projects/SFML-B", :using => :git, :branch => 'brew'

  depends_on "cmake" => :build
  depends_on "freetype"
  depends_on "glew"
  depends_on "jpeg"
  depends_on "libsndfile"

  def install
    system "cmake", ".", "-DSFML_INSTALL_EXTLIBS=FALSE", *std_cmake_args
    system "make", "install"
  end
end

I'm gonna update the XCode template in my branch soon :)
So the only thing that will be missing in the brew formula will be installing them.

But there might be a little problem : if we want the brew formula to build stable sources (from a static zip file), you'll need to upload a new archive with the updated CMakeLists.

And also, since this change the CMakeLists, I think Laurent should review this (don't know if he will accept this new option :))


2
General discussions / Re: SFML 2.2 - OSX Install script
« on: January 02, 2015, 07:35:33 pm »
Thanks for the answer :)

I've made a little test, with a custom CMakeLists, in which I removed the extlibs lines (just to test).

Compilation works fine, and I'm able to create a SFML App with the template within XCode, compile and run it (the music and the font are working, so I think it's good :) ).

I've made the following changes to the project:
 
  • Use dylibs instead of frameworks
  • Disable i386 compilation
  • Edit the post-build script to disable sndfile.framework  and freetype.framework copy to the app package.

And an otool -L /usr/local/Cellar/sfml/HEAD/lib/libsfml-audio.dylib indicates that the lib use /usr/local/lib/libsndfile.1.dylib...Which is a symlink created via brew for libsndfile (/usr/local/Cellar/libsndfile/1.0.25/lib/libsndfile.1.dylib).

So I think that since there are no Frameworks, the system fallback to /usr/local/lib, and found the most recent available lib, which is the brewed one.

I will now try to add a simple if statement to the CMakeLists, in order to be able to disable extlibs usage :)

3
General discussions / Re: SFML 2.2 - OSX Install script
« on: January 02, 2015, 03:17:18 pm »
I've read this looooong discussion :).

Btw, I think that there are two distinct problems, which don't directly concern brew :
  • XCode templates, which must have a specific configuration to copy dylibs which have been generated via brew
  • Cmake configuration, to allow build to skip extlibs
(in fact, that's just what you written on the original issue (620))

Well, I don't want to "pollute" the Github discussions, so I'm gonna write here for the moment :)

In the CMakeLists.txt, there are the following lines :
Quote
install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})

Since I never used cmake, maybe I'm wrong but can't we "just" make those paths dynamic, and set them passing a parameter to cmake inside the brew formula ?

EDIT : Or maybe we can use brew's patch feature, to apply a diff to the files when using the formula.

If you thinks it can be enough, I may try to do it.

(Oh and sorry if my English is bad, it's not my native language :D)

4
General discussions / Re: SFML 2.2 - OSX Install script
« on: January 02, 2015, 01:21:45 pm »
Never made brew formula, but i'll take a look :)

5
General discussions / Re: SFML 2.2 - OSX Install script
« on: December 31, 2014, 02:34:16 pm »
Thanks for the answer :)

Let me know if I can help you making a new installation script.

6
General discussions / SFML 2.2 - OSX Install script
« on: December 31, 2014, 10:46:53 am »
Hi everyone,

I just wanted to know why installation script is no longer included in SFML 2.2 package for OSX ?
In version 2.1, there was an install.sh script, but nothing in the 2.2.

The 2.1 installation script seems to work fine with version 2.2 (so I used it).

Thanks :)

Pages: [1]
anything