1 |
commit: e36cc21373627399a512717a80b9f4b6296acce3 |
2 |
Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 16 18:39:16 2015 +0000 |
4 |
Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 16 18:39:16 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e36cc213 |
7 |
|
8 |
fix building with gcc5 (bug #568406) |
9 |
|
10 |
Package-Manager: portage-2.2.24 |
11 |
|
12 |
.../lincity/files/lincity-1.13.1-build.patch | 74 ++++++++++++++++++++++ |
13 |
games-simulation/lincity/lincity-1.13.1.ebuild | 10 +-- |
14 |
2 files changed, 77 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/games-simulation/lincity/files/lincity-1.13.1-build.patch b/games-simulation/lincity/files/lincity-1.13.1-build.patch |
17 |
new file mode 100644 |
18 |
index 0000000..f7f41f9 |
19 |
--- /dev/null |
20 |
+++ b/games-simulation/lincity/files/lincity-1.13.1-build.patch |
21 |
@@ -0,0 +1,74 @@ |
22 |
+--- lincity-1.13.1.orig/intl/Makefile.in |
23 |
++++ lincity-1.13.1/intl/Makefile.in |
24 |
+@@ -32,7 +32,7 @@ |
25 |
+ libdir = @libdir@ |
26 |
+ includedir = @includedir@ |
27 |
+ datadir = @datadir@ |
28 |
+-localedir = $(datadir)/locale |
29 |
++localedir = /usr/share/locale |
30 |
+ gettextsrcdir = $(datadir)/gettext/intl |
31 |
+ aliaspath = $(localedir) |
32 |
+ subdir = intl |
33 |
+--- lincity-1.13.1.orig/mouse.c |
34 |
++++ lincity-1.13.1/mouse.c |
35 |
+@@ -1057,7 +1057,7 @@ |
36 |
+ and set to 1 if the existing transport if the more expensive sort |
37 |
+ (e.g. GROUP_RAIL when overwriting GROUP_ROAD). |
38 |
+ */ |
39 |
+-inline int |
40 |
++int |
41 |
+ mt_erase(int x, int y) |
42 |
+ { |
43 |
+ if (x < 0 || y < 0 || x >= WORLD_SIDE_LEN || y >= WORLD_SIDE_LEN) |
44 |
+--- lincity-1.13.1.orig/pixmap.c |
45 |
++++ lincity-1.13.1/pixmap.c |
46 |
+@@ -390,7 +390,7 @@ |
47 |
+ likes it in the file. Still need to fix this in autoconf, |
48 |
+ but for now this will do. */ |
49 |
+ #if !defined (WIN32) |
50 |
+-inline int |
51 |
++int |
52 |
+ pixmap_index (int x, int y) |
53 |
+ { |
54 |
+ return y*pixmap_width + x; |
55 |
+--- lincity-1.13.1.orig/pixmap.h |
56 |
++++ lincity-1.13.1/pixmap.h |
57 |
+@@ -19,7 +19,7 @@ |
58 |
+ void initialize_pixmap (void); |
59 |
+ void resize_pixmap (int new_width, int new_height); |
60 |
+ int pixmap_getpixel (int x, int y); |
61 |
+-inline int pixmap_index (int x, int y); |
62 |
++int pixmap_index (int x, int y); |
63 |
+ int pixmap_getpixel (int x, int y); |
64 |
+ void pixmap_setpixel (int x, int y, int col); |
65 |
+ void pixmap_hline (int x1, int y1, int x2, int col); |
66 |
+@@ -33,7 +33,7 @@ |
67 |
+ * Public Inline Functions |
68 |
+ * ---------------------------------------------------------------------- */ |
69 |
+ #if defined (WIN32) |
70 |
+-inline int |
71 |
++int |
72 |
+ pixmap_index (int x, int y) { |
73 |
+ return y*pixmap_width + x; |
74 |
+ } |
75 |
+--- lincity-1.13.1.orig/po/Makefile.in.in |
76 |
++++ lincity-1.13.1/po/Makefile.in.in |
77 |
+@@ -21,7 +21,7 @@ |
78 |
+ prefix = @prefix@ |
79 |
+ exec_prefix = @exec_prefix@ |
80 |
+ datadir = @datadir@ |
81 |
+-localedir = $(datadir)/locale |
82 |
++localedir = /usr/share/locale |
83 |
+ gettextsrcdir = $(datadir)/gettext/po |
84 |
+ |
85 |
+ INSTALL = @INSTALL@ |
86 |
+--- lincity-1.13.1.orig/readpng.c |
87 |
++++ lincity-1.13.1/readpng.c |
88 |
+@@ -3,6 +3,7 @@ |
89 |
+ * This file is part of lincity (see COPYRIGHT for copyright information). |
90 |
+ * ---------------------------------------------------------------------- */ |
91 |
+ #include <stdlib.h> |
92 |
++#include <string.h> |
93 |
+ #include "png.h" |
94 |
+ #include "malloc.h" |
95 |
+ #include "lin-city.h" |
96 |
|
97 |
diff --git a/games-simulation/lincity/lincity-1.13.1.ebuild b/games-simulation/lincity/lincity-1.13.1.ebuild |
98 |
index 81e0bf2..cbbe57f 100644 |
99 |
--- a/games-simulation/lincity/lincity-1.13.1.ebuild |
100 |
+++ b/games-simulation/lincity/lincity-1.13.1.ebuild |
101 |
@@ -23,17 +23,13 @@ DEPEND="${RDEPEND} |
102 |
nls? ( sys-devel/gettext )" |
103 |
|
104 |
src_prepare() { |
105 |
- sed -i \ |
106 |
- -e '/^localedir/s:$(datadir):/usr/share:' \ |
107 |
- po/Makefile.in.in \ |
108 |
- intl/Makefile.in \ |
109 |
- || die 'sed failed' |
110 |
+ epatch "${FILESDIR}"/${P}-build.patch |
111 |
} |
112 |
|
113 |
src_configure() { |
114 |
egamesconf \ |
115 |
- --with-gzip \ |
116 |
$(use_enable nls) \ |
117 |
+ --with-gzip \ |
118 |
--with-x |
119 |
} |
120 |
|
121 |
@@ -44,7 +40,7 @@ src_compile() { |
122 |
} |
123 |
|
124 |
src_install() { |
125 |
- emake DESTDIR="${D}" install |
126 |
+ default |
127 |
dodoc Acknowledgements CHANGES README* TODO |
128 |
make_desktop_entry xlincity Lincity |
129 |
dogamesbin xlincity |