1 |
commit: b303a6babce18c69588b6fa76faf68f0653505c1 |
2 |
Author: Harri Nieminen <moikkis <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Feb 9 10:00:33 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 9 21:52:48 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b303a6ba |
7 |
|
8 |
x11-misc/blockdpy: EAPI bump 0 -> 6 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/3891 |
12 |
|
13 |
.../{blockdpy-1.ebuild => blockdpy-1-r1.ebuild} | 37 +++++++++++++++------- |
14 |
1 file changed, 25 insertions(+), 12 deletions(-) |
15 |
|
16 |
diff --git a/x11-misc/blockdpy/blockdpy-1.ebuild b/x11-misc/blockdpy/blockdpy-1-r1.ebuild |
17 |
similarity index 60% |
18 |
rename from x11-misc/blockdpy/blockdpy-1.ebuild |
19 |
rename to x11-misc/blockdpy/blockdpy-1-r1.ebuild |
20 |
index 252c06355c..f96d837aaa 100644 |
21 |
--- a/x11-misc/blockdpy/blockdpy-1.ebuild |
22 |
+++ b/x11-misc/blockdpy/blockdpy-1-r1.ebuild |
23 |
@@ -1,7 +1,9 @@ |
24 |
-# Copyright 1999-2014 Gentoo Foundation |
25 |
+# Copyright 1999-2017 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
# $Id$ |
28 |
|
29 |
+EAPI=6 |
30 |
+ |
31 |
inherit toolchain-funcs |
32 |
|
33 |
DESCRIPTION="Tool to block access via the physical display while x11vnc is running" |
34 |
@@ -13,37 +15,48 @@ SLOT="0" |
35 |
KEYWORDS="~amd64 ~x86" |
36 |
IUSE="" |
37 |
|
38 |
-DEPEND="x11-libs/libX11 |
39 |
+RDEPEND=" |
40 |
+ x11-libs/libX11 |
41 |
x11-libs/libXext" |
42 |
-RDEPEND="${DEPEND}" |
43 |
+DEPEND="${RDEPEND} |
44 |
+ virtual/pkgconfig" |
45 |
|
46 |
S=${WORKDIR} |
47 |
|
48 |
src_unpack() { |
49 |
- cp "${DISTDIR}"/blockdpy.c blockdpy.c |
50 |
+ cp "${DISTDIR}"/blockdpy.c blockdpy.c || die |
51 |
+} |
52 |
+ |
53 |
+src_prepare() { |
54 |
+ default |
55 |
|
56 |
# Add includes to avoid QA warnings. |
57 |
- sed -i '/#include <stdio.h>/i#include <stdlib.h>' blockdpy.c |
58 |
- sed -i '/#include <stdio.h>/i#include <string.h>' blockdpy.c |
59 |
+ sed -i '/#include <stdio.h>/i#include <stdlib.h>' blockdpy.c || die |
60 |
+ sed -i '/#include <stdio.h>/i#include <string.h>' blockdpy.c || die |
61 |
} |
62 |
|
63 |
src_compile() { |
64 |
- $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o blockdpy blockdpy.c -lX11 -lXext || |
65 |
- die "compile failed" |
66 |
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \ |
67 |
+ $($(tc-getPKG_CONFIG) --cflags x11) \ |
68 |
+ $($(tc-getPKG_CONFIG) --cflags xext) \ |
69 |
+ -o blockdpy blockdpy.c \ |
70 |
+ $($(tc-getPKG_CONFIG) --libs x11) \ |
71 |
+ $($(tc-getPKG_CONFIG) --libs xext) \ |
72 |
+ || die "compile failed" |
73 |
|
74 |
# Create README from head comment in source. |
75 |
- sed -n '1,/^ *\*\//s/^[ -]*\*[ \/]*//p' < blockdpy.c > README |
76 |
+ sed -n '1,/^ *\*\//s/^[ -]*\*[ \/]*//p' < blockdpy.c > README || die |
77 |
} |
78 |
|
79 |
src_install() { |
80 |
- dobin blockdpy || die "install failed" |
81 |
- dodoc README |
82 |
+ dobin blockdpy |
83 |
+ einstalldocs |
84 |
} |
85 |
|
86 |
pkg_postinst() { |
87 |
# Just warn about missing xlock instead of requiring it in case |
88 |
# the user wants to use something else. |
89 |
- if ! [ -x /usr/bin/xlock ]; then |
90 |
+ if [[ ! -x ${EPREFIX}/usr/bin/xlock ]]; then |
91 |
ewarn 'The xlock executable was not found.' |
92 |
ewarn 'blockdpy runs "xlock" as the screen-lock program by default.' |
93 |
ewarn 'You should either install x11-misc/xlockmore or override the' |