Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xbattbar/, x11-misc/xbattbar/files/
Date: Tue, 04 May 2021 22:18:05
Message-Id: 1620166635.5a2f8e82e4e907ae1c431a89b424fe5c84fda867.sam@gentoo
1 commit: 5a2f8e82e4e907ae1c431a89b424fe5c84fda867
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Thu Apr 29 21:56:41 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 22:17:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a2f8e82
7
8 x11-misc/xbattbar: Respect CFLAGS
9
10 Closes: https://bugs.gentoo.org/726278
11 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 ...r-1.4.5.patch => xbattbar-1.4.5-Makefile.patch} | 22 +++++++++++++++------
15 x11-misc/xbattbar/xbattbar-1.4.9.ebuild | 23 ++++++++--------------
16 2 files changed, 24 insertions(+), 21 deletions(-)
17
18 diff --git a/x11-misc/xbattbar/files/xbattbar-1.4.5.patch b/x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch
19 similarity index 62%
20 rename from x11-misc/xbattbar/files/xbattbar-1.4.5.patch
21 rename to x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch
22 index 2602bb91187..0cd1ca00b44 100644
23 --- a/x11-misc/xbattbar/files/xbattbar-1.4.5.patch
24 +++ b/x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch
25 @@ -1,27 +1,37 @@
26 --- a/Makefile
27 +++ b/Makefile
28 -@@ -11,16 +11,16 @@
29 +@@ -4,23 +4,23 @@ DESTDIR ?= /
30 +
31 + TARGET = xbattbar
32 + APM_CHECK = xbattbar-check-apm
33 +-CPPFLAGS = -D_FORTIFY_SOURCE=2
34 +-CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security $(CPPFLAGS)
35 +-LDFLAGS = -Wl,-z,relro
36 ++CPPFLAGS ?= -D_FORTIFY_SOURCE=2
37 ++CFLAGS ?= -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
38 ++LDFLAGS ?= -Wl,-z,relro
39 +
40 all: $(TARGET) $(APM_CHECK)
41
42 $(TARGET): obj/xbattbar.o
43 - gcc -o $@ $< -lX11 $(LDFLAGS)
44 -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(PKG_CONFIG) --libs x11)
45 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(shell $(PKG_CONFIG) --libs x11)
46
47 obj/xbattbar.o: xbattbar.c obj/stamp
48 - gcc -MMD -o $@ -c $< $(CFLAGS)
49 -+ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -o $@ -c $<
50 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -MMD -o $@ -c $<
51
52 $(APM_CHECK): obj/xbattbar-check-apm.o
53 - gcc -o $@ $< $(LDFLAGS)
54 -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
55 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
56
57 obj/xbattbar-check-apm.o: xbattbar-check-apm.c obj/stamp
58 - gcc -MMD -D$(OS_TYPE) -o $@ -c $< $(CFLAGS)
59 -+ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -D$(OS_TYPE) -o $@ -c $<
60 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -MMD -D$(OS_TYPE) -o $@ -c $<
61
62 obj/stamp:
63 mkdir obj
64 -@@ -32,12 +32,12 @@
65 +@@ -32,12 +32,12 @@ clean:
66
67
68 install: $(TARGET) $(APM_CHECK)
69
70 diff --git a/x11-misc/xbattbar/xbattbar-1.4.9.ebuild b/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
71 index 8d25691b09a..660160d4007 100644
72 --- a/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
73 +++ b/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
74 @@ -2,7 +2,8 @@
75 # Distributed under the terms of the GNU General Public License v2
76
77 EAPI=7
78 -inherit flag-o-matic multilib toolchain-funcs
79 +
80 +inherit flag-o-matic toolchain-funcs
81
82 DESCRIPTION="Advanced Power Management battery status display for X"
83 HOMEPAGE="https://packages.qa.debian.org/x/xbattbar.html"
84 @@ -14,16 +15,14 @@ KEYWORDS="amd64 ppc x86"
85
86 DEPEND="
87 dev-lang/perl
88 - x11-libs/libX11
89 -"
90 + x11-libs/libX11"
91 RDEPEND="
92 ${DEPEND}
93 - !ppc? ( >=sys-power/acpi-1.5 )
94 -"
95 + !ppc? ( >=sys-power/acpi-1.5 )"
96 BDEPEND="virtual/pkgconfig"
97
98 PATCHES=(
99 - "${FILESDIR}"/${PN}-1.4.5.patch
100 + "${FILESDIR}"/${PN}-1.4.5-Makefile.patch
101 "${FILESDIR}"/${PN}-1.4.8-const.patch
102 )
103
104 @@ -33,17 +32,11 @@ src_prepare() {
105 sed -i \
106 -e "s:usr/lib:usr/$(get_libdir):" \
107 xbattbar.c || die
108 -
109 - tc-export PKG_CONFIG
110 }
111
112 -src_compile() {
113 - use kernel_linux && append-flags -Dlinux
114 -
115 - emake \
116 - CC=$(tc-getCC) \
117 - LIBDIR="$(get_libdir)" \
118 - LDFLAGS="${LDFLAGS}"
119 +src_configure() {
120 + tc-export CC PKG_CONFIG
121 + use kernel_linux && append-cppflags -Dlinux
122 }
123
124 src_install() {