diff options
author | Mike Frysinger <vapier@gentoo.org> | 2003-09-30 03:20:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2003-09-30 03:20:16 +0000 |
commit | b8c755dbff5e862fb5a0841d48890b2447b023e6 (patch) | |
tree | 5d56f998ca654e7d43b29f3e6708a85968eb2a9a /sys-libs/libcap/files | |
parent | old (diff) | |
download | gentoo-2-b8c755dbff5e862fb5a0841d48890b2447b023e6.tar.gz gentoo-2-b8c755dbff5e862fb5a0841d48890b2447b023e6.tar.bz2 gentoo-2-b8c755dbff5e862fb5a0841d48890b2447b023e6.zip |
pic fixes #29958
Diffstat (limited to 'sys-libs/libcap/files')
-rw-r--r-- | sys-libs/libcap/files/1.10-python.patch | 108 | ||||
-rw-r--r-- | sys-libs/libcap/files/digest-libcap-1.10-r3 | 2 |
2 files changed, 110 insertions, 0 deletions
diff --git a/sys-libs/libcap/files/1.10-python.patch b/sys-libs/libcap/files/1.10-python.patch new file mode 100644 index 000000000000..7e1e77fb3881 --- /dev/null +++ b/sys-libs/libcap/files/1.10-python.patch @@ -0,0 +1,108 @@ +diff -ur libcap-1.10.orig/libcap/Makefile libcap-1.10/libcap/Makefile +--- libcap-1.10.orig/libcap/Makefile 2003-09-29 22:26:56.856116136 -0400 ++++ libcap-1.10/libcap/Makefile 2003-09-29 22:31:06.204209464 -0400 +@@ -33,6 +33,7 @@ + # Library version + # + LIBNAME=libcap ++PYTHONMODNAME=libcapmodule.so + # + + FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys +@@ -46,7 +47,11 @@ + MAJLIBNAME=$(LIBNAME).so.$(VERSION) + MINLIBNAME=$(MAJLIBNAME).$(MINOR) + ++ifdef PYTHON ++all: $(MINLIBNAME) $(LIBNAME).a $(PYTHONMODNAME) ++else + all: $(MINLIBNAME) $(LIBNAME).a ++endif + + _makenames: _makenames.c cap_names.sed + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ +@@ -66,6 +71,12 @@ + ln -sf $(MINLIBNAME) $(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBNAME).so + ++libcap_wrap.c: include/sys/capability.h ++ swig -python -o libcap_wrap.c include/sys/capability.h ++ ++$(PYTHONMODNAME): $(OBJS) libcap_wrap.o ++ $(LD) -x -shared -o $@ libcap_wrap.o $(OBJS) ++ + %.o: %.c $(INCLS) + $(CC) $(CFLAGS) -c $< -o $@ + +@@ -82,10 +93,14 @@ + ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME).so + -/sbin/ldconfig ++ifdef PYTHON ++ mkdir -p $(PYTHONMODDIR) ++ install -m 0644 $(PYTHONMODNAME) $(PYTHONMODDIR)/$(PYTHONMODNAME) ++endif + + clean: + $(LOCALCLEAN) + rm -f $(OBJS) $(LOBJS) $(LIBNAME).a $(LIBNAME).so* +- rm -f cap_names.h cap_names.sed _makenames ++ rm -f cap_names.h cap_names.sed _makenames libcap_wrap.c + cd include/sys && $(LOCALCLEAN) + +diff -ur libcap-1.10.orig/libcap/include/sys/capability.h libcap-1.10/libcap/include/sys/capability.h +--- libcap-1.10.orig/libcap/include/sys/capability.h 2003-09-29 22:26:56.856116136 -0400 ++++ libcap-1.10/libcap/include/sys/capability.h 2003-09-29 22:29:07.457261744 -0400 +@@ -15,12 +15,23 @@ + extern "C" { + #endif + ++#ifdef SWIG ++%module libcap ++#endif ++ + /* + * This file complements the kernel file by providing prototype + * information for the user library. + */ + ++#ifdef SWIG ++%{ ++#include <sys/types.h> ++#include "libcap.h" ++%} ++#else + #include <sys/types.h> ++#endif + /* + * This is <linux/capability.h> + * +@@ -354,10 +365,12 @@ + int cap_clear(cap_t); + + /* libcap/cap_file.c */ ++#ifndef SWIG + cap_t cap_get_fd(int); + cap_t cap_get_file(const char *); + int cap_set_fd(int, cap_t); + int cap_set_file(const char *, cap_t); ++#endif + + /* libcap/cap_proc.c */ + cap_t cap_get_proc(void); +@@ -377,6 +390,7 @@ + * if the following _POSIX_SOURCE is _undefined_ + */ + ++#ifndef SWIG + #if !defined(_POSIX_SOURCE) + + extern int capset(cap_user_header_t header, cap_user_data_t data); +@@ -386,6 +400,7 @@ + extern char const *_cap_names[]; + + #endif /* !defined(_POSIX_SOURCE) */ ++#endif + + #ifdef __cplusplus + } diff --git a/sys-libs/libcap/files/digest-libcap-1.10-r3 b/sys-libs/libcap/files/digest-libcap-1.10-r3 new file mode 100644 index 000000000000..bfa2cfa6d166 --- /dev/null +++ b/sys-libs/libcap/files/digest-libcap-1.10-r3 @@ -0,0 +1,2 @@ +MD5 4426a413128142cab89eb2e6f13d8571 libcap-1.10.tar.bz2 26686 +MD5 39c85e7e04a50c7f1e6d4da256788536 libcap_1.10-12.diff.gz 12762 |