-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Break circular dependency between gstreamer
and libnice
#171902
base: master
Are you sure you want to change the base?
Conversation
cc60a20
to
b692485
Compare
Formula/lib/libnice-gstreamer.rb
Outdated
test do | ||
# Based on https://github.com/libnice/libnice/blob/HEAD/examples/simple-example.c | ||
(testpath/"test.c").write <<~EOS | ||
#include <agent.h> | ||
int main(int argc, char *argv[]) { | ||
NiceAgent *agent; | ||
GMainLoop *gloop; | ||
gloop = g_main_loop_new(NULL, FALSE); | ||
// Create the nice agent | ||
agent = nice_agent_new(g_main_loop_get_context (gloop), | ||
NICE_COMPATIBILITY_RFC5245); | ||
if (agent == NULL) | ||
g_error("Failed to create agent"); | ||
|
||
g_main_loop_unref(gloop); | ||
g_object_unref(agent); | ||
return 0; | ||
} | ||
EOS | ||
|
||
pkg_config_cflags = shell_output("pkg-config --cflags --libs nice").chomp.split | ||
system ENV.cc, "test.c", *pkg_config_cflags, "-o", "test" | ||
system "./test" | ||
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.
Probably need a new 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.
Checking whether gst-inspect-1.0 --exists nicesrc
returns 0
is probably a good 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.
Presumably I would need to set some environment variables for this to work, since GStreamer wants to find all the plugins in its own prefix?
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.
Hm, so this should actually be built as part of the gstreamer monorepo then. Let me cook up a patch to do that.
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.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6871
So, instead of creating a new libnice-gstreamer.rb
formula, you'd patch gstreamer.rb
b692485
to
5aa831f
Compare
2f8ee2a
to
d81b906
Compare
d81b906
to
493b545
Compare
493b545
to
c031af2
Compare
Also, add dependencies that are linked indirectly.
This will allow us to build `gstreamer` with `libnice` as a dependency. Also, add `gettext` dependency on macOS, since this has indirect linkage to it.
c031af2
to
788928e
Compare
This installs only the GStreamer plugin for libnice.
788928e
to
547e259
Compare
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?See Homebrew/discussions#3740, in particular, https://github.com/orgs/Homebrew/discussions/3740#discussioncomment-8566223.
gstreamer
plugin