-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
mrboom 3.9 (new formula) #20746
mrboom 3.9 (new formula) #20746
Conversation
frranck
commented
Nov 17, 2017
why? |
@ilovezfs So how to fix that ? Does that mean we can't use most features of sdl2_mixer ? |
Either libmodplug needs to become a default dependency of the sdl2_mixer formula, or sdl2_mixer needs to be vendored into this formula. |
@ilovezfs What is the best option ? |
@frranck it looks like a tiny dependency so you can make an sdl2_mixer PR :) |
Formula/mrboom.rb
Outdated
|
||
def install | ||
system "make", "mrboom", "LIBSDL2=1" | ||
bin.install "mrboom.out" => "mrboom" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need a make install
target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one in the Makefile, what is missing here exactly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you you need
system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man6}"
Formula/mrboom.rb
Outdated
end | ||
|
||
test do | ||
system "#{bin}/mrboom", "--version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need a test that exercises and verifies the functionality of the software
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, it's checking decrunching the data and modplug when running version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something that loads a config file or similar would work. --version
and --help
tests aren't allowed for new formulae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK then I should simply remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must have a test block. Just not one that does --version
or --help
.
Formula/mrboom.rb
Outdated
@@ -0,0 +1,19 @@ | |||
class Mrboom < Formula | |||
desc "Mr.Boom is an 8 player Bomberman clone" | |||
homepage "http://mrboom.mumblecore.org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ? Any clue whats wrong, it fails on
install -m 555 mrboom.out /usr/local/Cellar/mrboom/3.8/bin/mrboom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ?
should have trailing slash
Any clue whats wrong, it fails on
install -m 555 mrboom.out /usr/local/Cellar/mrboom/3.8/bin/mrboom
It's a Makfile bug. It's assuming BINDIR
already exists, which is not the case.
It needs
diff --git a/Makefile b/Makefile
index 80a8e95..d795d19 100644
--- a/Makefile
+++ b/Makefile
@@ -256,7 +256,9 @@ strip:
$(STRIP) $(TARGET_NAME).out
install: strip
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/$(BINDIR)
$(INSTALL) -m 555 $(TARGET_NAME).out $(DESTDIR)$(PREFIX)/$(BINDIR)/$(TARGET_NAME)
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/$(MANDIR)
$(INSTALL) -m 644 Assets/$(TARGET_NAME).6 $(DESTDIR)$(PREFIX)/$(MANDIR)
.PHONY: clean
and it's actually MANDIR=share/man/man6
that you need because it does it with relative paths, which is quite weird, but 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, do you have an example on how to modify the formula to include that patch ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to commit upstream and then use a patch do
block like this:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/tiger-vnc.rb#L21-L27
or just tag a new release
Formula/mrboom.rb
Outdated
|
||
def install | ||
system "make", "mrboom", "LIBSDL2=1" | ||
system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man6}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be with the relative path MANDIR=share/man/man6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's changed inside the Makefile
you think we should change this to
system "make", "install", "PREFIX=#{prefix}", "MANDIR=share/man/man6" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah your MANDIR is defined as a relative path https://github.com/Javanaise/mrboom-libretro/blob/master/Makefile#L13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's changed there https://github.com/Javanaise/mrboom-libretro/blob/master/Makefile#L99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, then don't set it at all here. just PREFIX
Formula/mrboom.rb
Outdated
@@ -0,0 +1,23 @@ | |||
class Mrboom < Formula | |||
desc "Mr.Boom is an 8 player Bomberman clone" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
desc "Eight player Bomberman clone"
Formula/mrboom.rb
Outdated
def test | ||
mrboom.out -v | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
audit won't like this blank line
Formula/mrboom.rb
Outdated
end | ||
|
||
def test | ||
mrboom.out -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will cause a ruby syntax error
Formula/mrboom.rb
Outdated
test do | ||
system "#{bin}/mrboom", "--version" | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
audit won't like this blank line
Formula/mrboom.rb
Outdated
end | ||
|
||
test do | ||
system "#{bin}/mrboom", "--version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need a non --version test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like what ? --help ?
Looks good. So we just need the non --version test. |
And non --help hehe |
what do you mean ? those are the only the only two options that don't launch the game... |
like
|
Formula/mrboom.rb
Outdated
|
||
depends_on "cmake" => :build | ||
depends_on "libmodplug" | ||
depends_on "lzlib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this dependency is used
@ilovezfs Did we address all the points ? |
Thanks for the 🆕 formula @frranck! 💣 |
@ilovezfs: was the sdl2_mixer merged too ? it doesn't seem to work: $ brew install mrboom |
Could be because of the -disable-music-mod-modplug-shared ? |
@frranck it should now be fixed if you |