summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-04-29 22:56:41 +0100
committerSam James <sam@gentoo.org>2021-05-04 22:17:15 +0000
commit5a2f8e82e4e907ae1c431a89b424fe5c84fda867 (patch)
tree23a8aa6bc2221155f11f0459483cbe1fac012ad6
parentsys-fs/archivemount: Respect CFLAGS (diff)
downloadgentoo-5a2f8e82e4e907ae1c431a89b424fe5c84fda867.tar.gz
gentoo-5a2f8e82e4e907ae1c431a89b424fe5c84fda867.tar.bz2
gentoo-5a2f8e82e4e907ae1c431a89b424fe5c84fda867.zip
x11-misc/xbattbar: Respect CFLAGS
Closes: https://bugs.gentoo.org/726278 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch (renamed from x11-misc/xbattbar/files/xbattbar-1.4.5.patch)22
-rw-r--r--x11-misc/xbattbar/xbattbar-1.4.9.ebuild23
2 files changed, 24 insertions, 21 deletions
diff --git a/x11-misc/xbattbar/files/xbattbar-1.4.5.patch b/x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch
index 2602bb91187a..0cd1ca00b44c 100644
--- a/x11-misc/xbattbar/files/xbattbar-1.4.5.patch
+++ b/x11-misc/xbattbar/files/xbattbar-1.4.5-Makefile.patch
@@ -1,27 +1,37 @@
--- a/Makefile
+++ b/Makefile
-@@ -11,16 +11,16 @@
+@@ -4,23 +4,23 @@ DESTDIR ?= /
+
+ TARGET = xbattbar
+ APM_CHECK = xbattbar-check-apm
+-CPPFLAGS = -D_FORTIFY_SOURCE=2
+-CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security $(CPPFLAGS)
+-LDFLAGS = -Wl,-z,relro
++CPPFLAGS ?= -D_FORTIFY_SOURCE=2
++CFLAGS ?= -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
++LDFLAGS ?= -Wl,-z,relro
+
all: $(TARGET) $(APM_CHECK)
$(TARGET): obj/xbattbar.o
- gcc -o $@ $< -lX11 $(LDFLAGS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(PKG_CONFIG) --libs x11)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(shell $(PKG_CONFIG) --libs x11)
obj/xbattbar.o: xbattbar.c obj/stamp
- gcc -MMD -o $@ -c $< $(CFLAGS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -o $@ -c $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -MMD -o $@ -c $<
$(APM_CHECK): obj/xbattbar-check-apm.o
- gcc -o $@ $< $(LDFLAGS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
obj/xbattbar-check-apm.o: xbattbar-check-apm.c obj/stamp
- gcc -MMD -D$(OS_TYPE) -o $@ -c $< $(CFLAGS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -D$(OS_TYPE) -o $@ -c $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -MMD -D$(OS_TYPE) -o $@ -c $<
obj/stamp:
mkdir obj
-@@ -32,12 +32,12 @@
+@@ -32,12 +32,12 @@ clean:
install: $(TARGET) $(APM_CHECK)
diff --git a/x11-misc/xbattbar/xbattbar-1.4.9.ebuild b/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
index 8d25691b09ab..660160d40073 100644
--- a/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
+++ b/x11-misc/xbattbar/xbattbar-1.4.9.ebuild
@@ -2,7 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic multilib toolchain-funcs
+
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Advanced Power Management battery status display for X"
HOMEPAGE="https://packages.qa.debian.org/x/xbattbar.html"
@@ -14,16 +15,14 @@ KEYWORDS="amd64 ppc x86"
DEPEND="
dev-lang/perl
- x11-libs/libX11
-"
+ x11-libs/libX11"
RDEPEND="
${DEPEND}
- !ppc? ( >=sys-power/acpi-1.5 )
-"
+ !ppc? ( >=sys-power/acpi-1.5 )"
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}"/${PN}-1.4.5.patch
+ "${FILESDIR}"/${PN}-1.4.5-Makefile.patch
"${FILESDIR}"/${PN}-1.4.8-const.patch
)
@@ -33,17 +32,11 @@ src_prepare() {
sed -i \
-e "s:usr/lib:usr/$(get_libdir):" \
xbattbar.c || die
-
- tc-export PKG_CONFIG
}
-src_compile() {
- use kernel_linux && append-flags -Dlinux
-
- emake \
- CC=$(tc-getCC) \
- LIBDIR="$(get_libdir)" \
- LDFLAGS="${LDFLAGS}"
+src_configure() {
+ tc-export CC PKG_CONFIG
+ use kernel_linux && append-cppflags -Dlinux
}
src_install() {