Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdl2_mixer: make libmodplug required instead of optional #21036

Closed
wants to merge 1 commit into from
Closed

sdl2_mixer: make libmodplug required instead of optional #21036

wants to merge 1 commit into from

Conversation

frranck
Copy link
Contributor

@frranck frranck commented Nov 25, 2017

ref #20746

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

@frranck
Copy link
Contributor Author

frranck commented Nov 25, 2017

ref #20746

@@ -18,7 +18,7 @@ class Sdl2Mixer < Formula
depends_on "flac" => :optional
depends_on "fluid-synth" => :optional
depends_on "libmikmod" => :optional
depends_on "libmodplug" => :optional
depends_on "libmodplug"
Copy link
Contributor

Choose a reason for hiding this comment

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

needs to go above libvorbis

@ilovezfs
Copy link
Contributor

also please bump the revision

@ilovezfs
Copy link
Contributor

rebuild is not the same as revision. you shouldn't modify the bottle block manually. revision goes at formula global scope.

@frranck
Copy link
Contributor Author

frranck commented Nov 26, 2017

@ilovezfs you mean :revision ?

@ilovezfs
Copy link
Contributor

nope that's a component of urls

revision 1

@@ -2,12 +2,12 @@ class Sdl2Mixer < Formula
desc "Sample multi-channel audio mixer library"
homepage "https://www.libsdl.org/projects/SDL_mixer/"
url "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.tar.gz"
revision 1
Copy link
Contributor

Choose a reason for hiding this comment

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

goes under sha256

@ilovezfs
Copy link
Contributor

ilovezfs commented Nov 26, 2017

Thanks. Please squash this down to one commit with the commit subject

sdl2_mixer: make libmodplug required instead of optional

@ilovezfs ilovezfs changed the title add modplug dependency by default sdl2_mixer: make libmodplug required instead of optional Nov 26, 2017
@ilovezfs
Copy link
Contributor

@BrewTestBot test this please

@@ -30,14 +31,13 @@ def install
--disable-music-flac-shared
--disable-music-midi-fluidsynth-shared
--disable-music-mod-mikmod-shared
--disable-music-mod-modplug-shared
Copy link
Contributor

Choose a reason for hiding this comment

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

actually we want to keep this disabled so that the linkage is explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I understand, this defines the -DMODPLUG_DYNAMIC, without this we need to compile libmodplug statically with mrboom, but we don't have a libmodplug.a to do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

The difference is not whether it's static or dynamic but whether the path to the dylib is explicit or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

With --disable-music-mod-modplug-shared, here's what you get:

iMac-TMP:~ joe$ brew linkage sdl2_mixer
System libraries:
  /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
  /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
  /usr/lib/libSystem.B.dylib
Homebrew libraries:
  /usr/local/opt/libmodplug/lib/libmodplug.1.dylib (libmodplug)
  /usr/local/opt/libvorbis/lib/libvorbis.0.dylib (libvorbis)
  /usr/local/opt/libvorbis/lib/libvorbisfile.3.dylib (libvorbis)
  /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib (sdl2)
iMac-TMP:~ joe$ 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it does compile sdl2_mixer differently if you look at music_modplug.c, is this OK?

Copy link
Contributor

Choose a reason for hiding this comment

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

And I assume you tested it without the --with-libmodplug?

Copy link
Contributor

Choose a reason for hiding this comment

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

By which I mean, are you sure the new dependency is actually required?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@ilovezfs
Copy link
Contributor

@frranck Thanks for your first contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

@ilovezfs ilovezfs closed this in 141c7e2 Nov 26, 2017
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
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.

2 participants