Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 741400
Collapse All | Expand All

(-)a/dev-libs/libbpf/files/libbpf-0.0.5-paths.patch (-38 lines)
Lines 1-38 Link Here
1
diff --git a/Makefile b/Makefile
2
index 6992fbf..cefc77a 100644
3
--- a/Makefile
4
+++ b/Makefile
5
@@ -64,7 +64,7 @@ endif
6
 PREFIX ?= /usr
7
 LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
8
 INCLUDEDIR ?= $(PREFIX)/include
9
-UAPIDIR ?= $(PREFIX)/include
10
+UAPIDIR ?= $(PREFIX)/include/bpf/uapi
11
 
12
 all: $(STATIC_LIBS) $(SHARED_LIBS) $(PC_FILE)
13
 
14
@@ -85,6 +85,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
15
 $(OBJDIR)/libbpf.pc:
16
 	sed -e "s|@PREFIX@|$(PREFIX)|" \
17
 		-e "s|@LIBDIR@|$(LIBDIR)|" \
18
+		-e "s|@UAPIDIR@|$(UAPIDIR)|" \
19
 		-e "s|@VERSION@|$(LIBBPF_VERSION)|" \
20
 		< libbpf.pc.template > $@
21
 
22
diff --git a/libbpf.pc.template b/libbpf.pc.template
23
index ac17fce..6d385d9 100644
24
--- a/libbpf.pc.template
25
+++ b/libbpf.pc.template
26
@@ -3,10 +3,11 @@
27
 prefix=@PREFIX@
28
 libdir=@LIBDIR@
29
 includedir=${prefix}/include
30
+uapidir=@UAPIDIR@
31
 
32
 Name: libbpf
33
 Description: BPF library
34
 Version: @VERSION@
35
 Libs: -L${libdir} -lbpf
36
 Requires.private: libelf
37
-Cflags: -I${includedir}
38
+Cflags: -I${includedir} -I${uapidir}
(-)a/dev-libs/libbpf/files/libbpf-9999-paths.patch (-38 lines)
Lines 1-38 Link Here
1
diff --git a/Makefile b/Makefile
2
index bc25aba..e1db3d6 100644
3
--- a/Makefile
4
+++ b/Makefile
5
@@ -66,7 +66,7 @@ endif
6
 PREFIX ?= /usr
7
 LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
8
 INCLUDEDIR ?= $(PREFIX)/include
9
-UAPIDIR ?= $(PREFIX)/include
10
+UAPIDIR ?= $(PREFIX)/include/bpf/uapi
11
 
12
 TAGS_PROG := $(if $(shell which etags 2>/dev/null),etags,ctags)
13
 
14
@@ -89,6 +89,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
15
 $(OBJDIR)/libbpf.pc:
16
 	sed -e "s|@PREFIX@|$(PREFIX)|" \
17
 		-e "s|@LIBDIR@|$(LIBDIR)|" \
18
+		-e "s|@UAPIDIR@|$(UAPIDIR)|" \
19
 		-e "s|@VERSION@|$(LIBBPF_VERSION)|" \
20
 		< libbpf.pc.template > $@
21
 
22
diff --git a/libbpf.pc.template b/libbpf.pc.template
23
index b45ed53..5ec63c2 100644
24
--- a/libbpf.pc.template
25
+++ b/libbpf.pc.template
26
@@ -3,10 +3,11 @@
27
 prefix=@PREFIX@
28
 libdir=@LIBDIR@
29
 includedir=${prefix}/include
30
+uapidir=@UAPIDIR@
31
 
32
 Name: libbpf
33
 Description: BPF library
34
 Version: @VERSION@
35
 Libs: -L${libdir} -lbpf
36
 Requires.private: libelf zlib
37
-Cflags: -I${includedir}
38
+Cflags: -I${includedir} -I${uapidir}
(-)a/dev-libs/libbpf/libbpf-0.0.9-r1.ebuild (-19 / +4 lines)
Lines 23-48 RDEPEND="${COMMON_DEPEND}" Link Here
23
S="${WORKDIR}/${P}/src"
23
S="${WORKDIR}/${P}/src"
24
24
25
PATCHES=(
25
PATCHES=(
26
	"${FILESDIR}/libbpf-0.0.7-paths.patch"
27
	"${FILESDIR}/libbpf-0.0.9-fix-hashmap-on-lp32.patch"
26
	"${FILESDIR}/libbpf-0.0.9-fix-hashmap-on-lp32.patch"
28
)
27
)
29
28
30
src_compile() {
29
src_configure() {
31
	emake \
30
	tc-export CC
32
		BUILD_SHARED=y \
31
	export PREFIX="${EPREFIX}/usr"
33
		LIBSUBDIR="$(get_libdir)" \
32
	export LIBSUBDIR="$(get_libdir)"
34
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
35
		CC="$(tc-getCC)"
36
}
37
38
src_install() {
39
	emake \
40
		BUILD_SHARED=y \
41
		LIBSUBDIR="$(get_libdir)" \
42
		DESTDIR="${D}" \
43
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
44
		install install_uapi_headers
45
46
	insinto /usr/$(get_libdir)/pkgconfig
47
	doins ${PN}.pc
48
}
33
}
(-)a/dev-libs/libbpf/libbpf-0.1.0-r1.ebuild (-23 / +4 lines)
Lines 19-25 DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" Link Here
19
19
20
LICENSE="GPL-2 LGPL-2.1 BSD-2"
20
LICENSE="GPL-2 LGPL-2.1 BSD-2"
21
SLOT="0/${PV}"
21
SLOT="0/${PV}"
22
IUSE="+static-libs"
23
22
24
COMMON_DEPEND="virtual/libelf
23
COMMON_DEPEND="virtual/libelf
25
	!<=dev-util/bcc-0.7.0"
24
	!<=dev-util/bcc-0.7.0"
Lines 27-53 DEPEND="${COMMON_DEPEND} Link Here
27
	sys-kernel/linux-headers"
26
	sys-kernel/linux-headers"
28
RDEPEND="${COMMON_DEPEND}"
27
RDEPEND="${COMMON_DEPEND}"
29
28
30
PATCHES=(
29
src_configure() {
31
	"${FILESDIR}/libbpf-0.0.7-paths.patch"
32
)
33
34
src_compile() {
35
	append-cflags -fPIC
30
	append-cflags -fPIC
36
	emake \
31
	tc-export CC
37
		BUILD_SHARED=y \
32
	export PREFIX="${EPREFIX}/usr"
38
		LIBSUBDIR="$(get_libdir)" \
33
	export LIBSUBDIR="$(get_libdir)"
39
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
40
		CC="$(tc-getCC)"
41
}
42
43
src_install() {
44
	emake \
45
		BUILD_SHARED=y \
46
		LIBSUBDIR="$(get_libdir)" \
47
		DESTDIR="${D}" \
48
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
49
		install install_uapi_headers
50
51
	insinto /usr/$(get_libdir)/pkgconfig
52
	doins ${PN}.pc
53
}
34
}
(-)a/dev-libs/libbpf/libbpf-9999.ebuild (-24 / +4 lines)
Lines 19-25 DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" Link Here
19
19
20
LICENSE="GPL-2 LGPL-2.1 BSD-2"
20
LICENSE="GPL-2 LGPL-2.1 BSD-2"
21
SLOT="0/${PV}"
21
SLOT="0/${PV}"
22
IUSE="+static-libs"
23
22
24
COMMON_DEPEND="virtual/libelf
23
COMMON_DEPEND="virtual/libelf
25
	!<=dev-util/bcc-0.7.0"
24
	!<=dev-util/bcc-0.7.0"
Lines 27-53 DEPEND="${COMMON_DEPEND} Link Here
27
	sys-kernel/linux-headers"
26
	sys-kernel/linux-headers"
28
RDEPEND="${COMMON_DEPEND}"
27
RDEPEND="${COMMON_DEPEND}"
29
28
30
PATCHES=(
29
src_configure() {
31
	"${FILESDIR}/libbpf-9999-paths.patch"
32
)
33
34
src_compile() {
35
	append-cflags -fPIC
30
	append-cflags -fPIC
36
	emake \
31
	tc-export CC
37
		BUILD_SHARED=y \
32
	export PREFIX="${EPREFIX}/usr"
38
		LIBSUBDIR="$(get_libdir)" \
33
	export LIBSUBDIR="$(get_libdir)"
39
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
40
		CC="$(tc-getCC)"
41
}
42
43
src_install() {
44
	emake \
45
		BUILD_SHARED=y \
46
		LIBSUBDIR="$(get_libdir)" \
47
		DESTDIR="${D}" \
48
		$(usex static-libs 'BUILD_STATIC=y' '' '' '') \
49
		install install_uapi_headers
50
51
	insinto /usr/$(get_libdir)/pkgconfig
52
	doins ${PN}.pc
53
}
34
}
54
- 

Return to bug 741400