x11-misc/gromit: Fix build issues (#369453 by kensington, #552574)
authorPacho Ramos <pacho@gentoo.org>
Thu, 18 Feb 2016 20:04:28 +0000 (21:04 +0100)
committerPacho Ramos <pacho@gentoo.org>
Thu, 18 Feb 2016 20:05:35 +0000 (21:05 +0100)
Package-Manager: portage-2.2.27

x11-misc/gromit/files/gromit-20041213-build.patch [new file with mode: 0644]
x11-misc/gromit/gromit-20041213-r1.ebuild

diff --git a/x11-misc/gromit/files/gromit-20041213-build.patch b/x11-misc/gromit/files/gromit-20041213-build.patch
new file mode 100644 (file)
index 0000000..f61a13b
--- /dev/null
@@ -0,0 +1,19 @@
+Respect CC, CFLAGS, & LDFLAGS.
+Drop DEPRECATED flags for bug #387833.
+Fix underlinking for bug #369453.
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,10 @@
+ all: gromit
+ proptest: proptest.c
+-      gcc -o proptest proptest.c `gtk-config --libs --cflags`
++      $(CC) -o proptest proptest.c `gtk-config --libs --cflags`
+ propertywatch: propertywatch.c
+-      gcc -o propertywatch propertywatch.c `gtk-config --libs --cflags`
++      $(CC) -o propertywatch propertywatch.c `gtk-config --libs --cflags`
+ gromit: gromit.c Makefile
+-      gcc -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -o gromit gromit.c -Wall `pkg-config --libs --cflags gtk+-2.0`
++      $(CC) -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -o gromit gromit.c -Wall $(CFLAGS) $(LDFLAGS) `pkg-config --libs --cflags gtk+-2.0` -lX11 -lm
index aa995ee80f94663defe7d7119659b1bea397987c..faa285f9292b44afde21df491987f8637d771c58 100644 (file)
@@ -2,9 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="2"
-
-inherit toolchain-funcs
+EAPI=6
+inherit autotools toolchain-funcs
 
 DESCRIPTION="GRaphics Over MIscellaneous Things, a presentation helper"
 HOMEPAGE="http://www.home.unix-ag.org/simon/gromit"
@@ -17,25 +16,17 @@ IUSE=""
 
 RDEPEND="x11-libs/gtk+:2"
 DEPEND="${RDEPEND}
-       virtual/pkgconfig"
-
-src_prepare() {
-       sed -i Makefile \
-               -e 's:-Wall:-Wall $(CFLAGS) $(LDFLAGS):' \
-               -e 's:gcc:$(CC):g' \
-               || die "sed Makefile failed"
+       virtual/pkgconfig
+"
 
-       # Drop DEPRECATED flags, bug #387833
-       sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED ::g' \
-               Makefile || die
-}
+PATCHES=( "${FILESDIR}"/${P}-build.patch )
 
 src_compile() {
-       emake CC=$(tc-getCC) || die
+       emake CC=$(tc-getCC)
 }
 
 src_install() {
        dobin ${PN}
        newdoc ${PN}rc ${PN}rc.example
-       dodoc AUTHORS ChangeLog README
+       einstalldocs
 }