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

Commit

Permalink
gmediaserver: fix build
Browse files Browse the repository at this point in the history
Closes #41269.
  • Loading branch information
DomT4 committed Mar 26, 2016
1 parent ea6cc8e commit 28b879b
Showing 1 changed file with 19 additions and 29 deletions.
48 changes: 19 additions & 29 deletions Library/Formula/gmediaserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,30 @@ class Gmediaserver < Formula
depends_on "id3lib" => :optional
depends_on "taglib" => :optional

# patching gmediaserver because sigwaitinfo is not available on
# mac os x snow leopard, using sigwait instead
patch :DATA
# Patching gmediaserver because sigwaitinfo is not available on
# OS X Snow Leopard, using sigwait instead.
patch do
url "https://raw.githubusercontent.com/Homebrew/patches/c68985023c/gmediaserver/sigwait.diff"
sha256 "28078d44158f3750462d529d26148c80fe45879ba679ad02839fd652c9af1a42"
end

# Adds support for recent libupnp releases.
# https://github.com/Homebrew/homebrew/issues/41269
# Reported upstream 26/03/2016 to mailing list but not published yet:
# https://lists.gnu.org/archive/html/gmediaserver-devel/
patch do
url "https://raw.githubusercontent.com/Homebrew/patches/893042fbfb/gmediaserver/libupnp_1.6.19_support.diff"
sha256 "ca18709e79f667cf9ce049aeca62c97afd1d0a9d34bef50446e1ca4e95f44b61"
end

def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make"
system "make", "install"
end
end

__END__
--- gmediaserver-0.13.0 CHANGED/src/metadata.c 2007-10-20 11:41:32.000000000 +0200
+++ gmediaserver-0.13.0/src/metadata.c 2009-12-20 23:06:57.000000000 +0100
@@ -1018,7 +1018,7 @@
bool
init_metadata(void)
{
- magic_cookie = magic_open(MAGIC_SYMLINK|MAGIC_MIME|MAGIC_ERROR);
+ magic_cookie = magic_open(MAGIC_SYMLINK|MAGIC_MIME_TYPE|MAGIC_ERROR);
if (magic_cookie == NULL) {
warn(_("cannot initialize magic library\n"));
return false;
--- a/src/main.c 2007-10-20 11:41:37.000000000 +0200
+++ b/src/main.c 2009-12-20 20:39:58.000000000 +0100
@@ -447,8 +447,8 @@
int sig;
char signame[SIG2STR_MAX];

- if ((sig = TEMP_FAILURE_RETRY(sigwaitinfo(&signalset, NULL))) < 0)
- die(_("sigwaitinfo failed - %s\n"), errstr);
+ if (TEMP_FAILURE_RETRY(sigwait(&signalset, &sig)) < 0)
+ die(_("sigwait failed - %s\n"), errstr);
if (sig2str(sig, signame) == 0)
say(2, _("Received %s signal\n"), signame);
else
test do
assert_match version.to_s, shell_output("#{bin}/gmediaserver --version")
end
end

0 comments on commit 28b879b

Please sign in to comment.