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

libcap-ng: fix build with latest swig #162479

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions Formula/lib/libcap-ng.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class LibcapNg < Formula
license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"]

bottle do
sha256 cellar: :any_skip_relocation, x86_64_linux: "22a6f560a4595f9a1eb06d80fc979e6de253ad89f7f0bcbe5133e94c3ebd7e0c"
rebuild 1
sha256 cellar: :any_skip_relocation, x86_64_linux: "3762e67587dbdae0a476f3e25a2b7f6274a6328cf8f9ca3304857d995907b9be"
end

head do
Expand All @@ -23,11 +24,14 @@ class LibcapNg < Formula
depends_on "swig" => :build
depends_on :linux

# Compat for latest swig, removing deprecated `%except` directive
# https://github.com/stevegrubb/libcap-ng/commit/30453b6553948cd05c438f9f509013e3bb84f25b
patch :DATA

def install
system "./autogen.sh" if build.head?
system "./configure", *std_configure_args,
"--disable-silent-rules",
"--without-python",
"--with-python3"
system "make", "install"
end
Expand All @@ -48,3 +52,23 @@ def install
system "python3.12", "-c", "import capng"
end
end

__END__
diff --git a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i
index fcdaf18..fa85e13 100644
--- a/bindings/src/capng_swig.i
+++ b/bindings/src/capng_swig.i
@@ -30,13 +30,6 @@

%varargs(16, signed capability = 0) capng_updatev;

-%except(python) {
- $action
- if (result < 0) {
- PyErr_SetFromErrno(PyExc_OSError);
- return NULL;
- }
-}
#endif

%define __signed__
Loading