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
qpid-proton 0.17.0 (new formula) #10111
Conversation
New formula for Apache Qpid Proton AMQP library. Provides C and Go language bindings.
Formula/qpid-proton.rb
Outdated
-DBUILD_RUBY=OFF | ||
] | ||
|
||
# qpid-proton require build in a subdirectory |
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.
Can remove this comment.
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.
Comment removed as requested.
Formula/qpid-proton.rb
Outdated
|
||
# qpid-proton require build in a subdirectory | ||
Dir.mkdir("build") | ||
Dir.chdir("build") |
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.
Can instead do mkdir "build" do
of the above two.
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.
Changed as requested.
Formula/qpid-proton.rb
Outdated
def install | ||
# Javascript bindings switched off - leads to build errors | ||
# Perl, Python, Ruby bindings switched off - leads to linking errors | ||
cmake_args = %w[ |
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.
Name this args
for consistency with other 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.
Renamed to args as requested.
Formula/qpid-proton.rb
Outdated
|
||
test do | ||
(testpath/"test.c").write <<-EOS.undent | ||
#include "proton/message.h" |
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.
Indent this two characters right of the (
on the preceding line.
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.
Indented as requested.
Formula/qpid-proton.rb
Outdated
messenger = pn_messenger(NULL); | ||
return 0; | ||
} | ||
EOS |
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.
Ident this with system
below.
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.
Indented as requested.
Formula/qpid-proton.rb
Outdated
return 0; | ||
} | ||
EOS | ||
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}64", "-lqpid-proton", "-o", "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.
This should install libraries to lib
not lib64
.
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.
Changed as requested.
Test failing on 10.10: https://bot.brew.sh/job/Homebrew%20Core/16695/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/test_qpid_proton/ Will need some |
|
- Indentation - Installation to lib/ instead of lib64/ (fixing perl/python/ruby bindings issues in the process) - mkdir do - Attempted fix for El Capitan issue
As suggested by ilovezfs
Still doesn't work. Will need to take some time to review this in detail. |
@crenz Your last commit seems to have built fine on the CI, including El Capitan. Is there some other issue besides the |
@JCount When I checked last night, the build failed - that was what I was referring to. Maybe I looked at the wrong build. In any case, I did find one more issue: The build works with the system perl, but does not work with the Homebrew perl package. The underlying issue is that Homebrew needs to be made aware I'm using the perl package. I addressed this with a 'depends' statement. |
depends_on "cmake" => :build | ||
depends_on "libuv" | ||
depends_on "openssl" | ||
depends_on "perl" if Formula["perl"].installed? |
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.
depends_on :perl
without the if
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.
@MikeMcQuaid – I'd prefer to not depend on perl and python. The thing is, this library works very well with the system perl and python. But IF the homebrew packages are installed, I need to reference them for the compilation to work correctly. It would be a nuisance to force people to install the perl and python packages for no good reason. Some people prefer to work with the system packages (for example since they want to develop software that should run on plain-vanilla macOs), so we should give them a choice.
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.
Sorry, we don't support that use-case. depends_on :perl
does what you suggest if they are building from source and uses the Homebrew perl
when using a binary package.
depends_on "libuv" | ||
depends_on "openssl" | ||
depends_on "perl" if Formula["perl"].installed? | ||
depends_on "python" if Formula["python"].installed? |
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.
depends_on :python
without the if
The modules for the perl and python bindings can be found in | ||
#{Formula["qpid-proton"].opt_prefix}/lib/proton/bindings | ||
EOS | ||
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.
Can omit these caveats as this is the default location.
"CHECK_SYMBOL_EXISTS(undefined_gibberish \"time.h\" CLOCK_GETTIME_IN_LIBC)" | ||
end | ||
|
||
inreplace "proton-c/bindings/perl/CMakeLists.txt", |
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.
Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!
] | ||
|
||
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" | ||
inreplace "proton-c/CMakeLists.txt", |
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.
Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!
ENV["OPENSSL_ROOT_DIR"] = Formula["openssl"].opt_prefix | ||
|
||
# Enforce installation into lib/ instead of lib64/ | ||
system "sed", "-i.orig", "1s/^/set(LIB_SUFFIX \"\") /", "CMakeLists.txt" |
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.
Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!
Also, use inreplace
here instead.
@@ -0,0 +1,64 @@ | |||
class QpidProton < Formula | |||
desc "is a high-performance, lightweight AMQP 1.0 messaging library." |
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.
Remove is a
Sorry, I was rather busy with another project. Will attempt to get to this soon. |
Closing this as stalled because there has been essentially no activity since Mar 2. |
@crenz Thanks for the recipe. Playing with it and seeing what I can fix |
@gberginc see the referenced PR from Fryguy |
New formula for Apache Qpid Proton AMQP library.
Provides C and Go language bindings.
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?