commit:     e36cc21373627399a512717a80b9f4b6296acce3
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 16 18:39:16 2015 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Wed Dec 16 18:39:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e36cc213

fix building with gcc5 (bug #568406)

Package-Manager: portage-2.2.24

 .../lincity/files/lincity-1.13.1-build.patch       | 74 ++++++++++++++++++++++
 games-simulation/lincity/lincity-1.13.1.ebuild     | 10 +--
 2 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/games-simulation/lincity/files/lincity-1.13.1-build.patch 
b/games-simulation/lincity/files/lincity-1.13.1-build.patch
new file mode 100644
index 0000000..f7f41f9
--- /dev/null
+++ b/games-simulation/lincity/files/lincity-1.13.1-build.patch
@@ -0,0 +1,74 @@
+--- lincity-1.13.1.orig/intl/Makefile.in
++++ lincity-1.13.1/intl/Makefile.in
+@@ -32,7 +32,7 @@
+ libdir = @libdir@
+ includedir = @includedir@
+ datadir = @datadir@
+-localedir = $(datadir)/locale
++localedir = /usr/share/locale
+ gettextsrcdir = $(datadir)/gettext/intl
+ aliaspath = $(localedir)
+ subdir = intl
+--- lincity-1.13.1.orig/mouse.c
++++ lincity-1.13.1/mouse.c
+@@ -1057,7 +1057,7 @@
+    and set to 1 if the existing transport if the more expensive sort
+    (e.g. GROUP_RAIL when overwriting GROUP_ROAD).
+ */
+-inline int
++int
+ mt_erase(int x, int y)
+ {
+     if (x < 0 || y < 0 || x >= WORLD_SIDE_LEN || y >= WORLD_SIDE_LEN)
+--- lincity-1.13.1.orig/pixmap.c
++++ lincity-1.13.1/pixmap.c
+@@ -390,7 +390,7 @@
+                 likes it in the file.  Still need to fix this in autoconf,
+                   but for now this will do. */
+ #if !defined (WIN32)
+-inline int 
++int 
+ pixmap_index (int x, int y)
+ {
+     return y*pixmap_width + x;
+--- lincity-1.13.1.orig/pixmap.h
++++ lincity-1.13.1/pixmap.h
+@@ -19,7 +19,7 @@
+ void initialize_pixmap (void);
+ void resize_pixmap (int new_width, int new_height);
+ int pixmap_getpixel (int x, int y);
+-inline int pixmap_index (int x, int y);
++int pixmap_index (int x, int y);
+ int pixmap_getpixel (int x, int y);
+ void pixmap_setpixel (int x, int y, int col);
+ void pixmap_hline (int x1, int y1, int x2, int col);
+@@ -33,7 +33,7 @@
+  * Public Inline Functions
+  * ---------------------------------------------------------------------- */
+ #if defined (WIN32)
+-inline int 
++int 
+ pixmap_index (int x, int y) {
+     return y*pixmap_width + x;
+ }
+--- lincity-1.13.1.orig/po/Makefile.in.in
++++ lincity-1.13.1/po/Makefile.in.in
+@@ -21,7 +21,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ datadir = @datadir@
+-localedir = $(datadir)/locale
++localedir = /usr/share/locale
+ gettextsrcdir = $(datadir)/gettext/po
+ 
+ INSTALL = @INSTALL@
+--- lincity-1.13.1.orig/readpng.c
++++ lincity-1.13.1/readpng.c
+@@ -3,6 +3,7 @@
+  * This file is part of lincity (see COPYRIGHT for copyright information).
+  * ---------------------------------------------------------------------- */
+ #include <stdlib.h>
++#include <string.h>
+ #include "png.h"
+ #include "malloc.h"
+ #include "lin-city.h"

diff --git a/games-simulation/lincity/lincity-1.13.1.ebuild 
b/games-simulation/lincity/lincity-1.13.1.ebuild
index 81e0bf2..cbbe57f 100644
--- a/games-simulation/lincity/lincity-1.13.1.ebuild
+++ b/games-simulation/lincity/lincity-1.13.1.ebuild
@@ -23,17 +23,13 @@ DEPEND="${RDEPEND}
        nls? ( sys-devel/gettext )"
 
 src_prepare() {
-       sed -i \
-               -e '/^localedir/s:$(datadir):/usr/share:' \
-               po/Makefile.in.in \
-               intl/Makefile.in \
-               || die 'sed failed'
+       epatch "${FILESDIR}"/${P}-build.patch
 }
 
 src_configure() {
        egamesconf \
-               --with-gzip \
                $(use_enable nls) \
+               --with-gzip \
                --with-x
 }
 
@@ -44,7 +40,7 @@ src_compile() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" install
+       default
        dodoc Acknowledgements CHANGES README* TODO
        make_desktop_entry xlincity Lincity
        dogamesbin xlincity

Reply via email to