Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-simulation/openttd/files: menu_name.patch install.patch libiconv.patch
Date: Thu, 23 Oct 2008 04:29:59
Message-Id: E1Ksrpc-0003q0-EX@stork.gentoo.org
1 robbat2 08/10/23 04:29:56
2
3 Added: menu_name.patch install.patch libiconv.patch
4 Log:
5 Version bump per bug 233929.
6 (Portage version: 2.2_rc12/cvs/Linux 2.6.27-rc6-00521-gcdbf87e x86_64)
7
8 Revision Changes Path
9 1.1 games-simulation/openttd/files/menu_name.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/menu_name.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/menu_name.patch?rev=1.1&content-type=text/plain
13
14 Index: menu_name.patch
15 ===================================================================
16 Index: media/openttd.desktop.in
17 ===================================================================
18 --- media/openttd.desktop.in (revision 14471)
19 +++ media/openttd.desktop.in (working copy)
20 @@ -4,9 +4,8 @@
21 Encoding=UTF-8
22 Type=Application
23 Version=1.1
24 Name=OpenTTD
25 -GenericName=A clone of Transport Tycoon Deluxe
26 -Comment=A business simulation game
27 +Comment=A clone of Transport Tycoon Deluxe
28 Icon=openttd
29 Exec=!!TTD!!
30 Terminal=false
31
32
33
34 1.1 games-simulation/openttd/files/install.patch
35
36 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/install.patch?rev=1.1&view=markup
37 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/install.patch?rev=1.1&content-type=text/plain
38
39 Index: install.patch
40 ===================================================================
41 Index: Makefile.in
42 ===================================================================
43 --- Makefile.in (revision 14474)
44 +++ Makefile.in (working copy)
45 @@ -28,6 +28,7 @@
46 INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
47 INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
48 INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!!
49 +BINARY_NAME = !!BINARY_NAME!!
50 TTD = !!TTD!!
51 TTDS = $(SRC_DIRS:%=%/$(TTD))
52 OS = !!OS!!
53 Index: Makefile.bundle.in
54 ===================================================================
55 --- Makefile.bundle.in (revision 14474)
56 +++ Makefile.bundle.in (working copy)
57 @@ -139,35 +140,41 @@
58 $(Q)install -d "$(INSTALL_DATA_DIR)/data"
59 $(Q)install -d "$(INSTALL_DATA_DIR)/lang"
60 $(Q)install -d "$(INSTALL_DOC_DIR)"
61 - $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)"
62 +ifeq ($(TTD), openttd.exe)
63 + $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}.exe"
64 +else
65 + $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}"
66 +endif
67 $(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
68 $(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data"
69 $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(INSTALL_DOC_DIR)"
70 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)"
71 + $(Q)install -m 644 "$(BUNDLE_DIR)/"*.txt "$(INSTALL_DOC_DIR)"
72 + $(Q)install -m 644 "$(BUNDLE_DIR)/COPYING" "$(INSTALL_DOC_DIR)"
73 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm"
74 ifdef ICON_THEME_DIR
75 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)"
76 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
77 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
78 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps/${BINARY_NAME}.png"
79 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
80 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
81 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps/${BINARY_NAME}.png"
82 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
83 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
84 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps/${BINARY_NAME}.png"
85 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
86 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
87 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps/${BINARY_NAME}.png"
88 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
89 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
90 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps/${BINARY_NAME}.png"
91 $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
92 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
93 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps/${BINARY_NAME}.png"
94 else
95 $(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)"
96 endif
97 ifdef MAN_DIR
98 $(Q)install -d "$(INSTALL_MAN_DIR)"
99 - $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)"
100 + $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz"
101 endif
102 ifdef MENU_DIR
103 $(Q)install -d "$(INSTALL_MENU_DIR)"
104 - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)"
105 + $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.desktop" "$(INSTALL_MENU_DIR)/${BINARY_NAME}.desktop"
106 endif
107 $(Q)cp -R "$(BUNDLE_DIR)/scenario" "$(INSTALL_DATA_DIR)"
108 endif # OSXAPP
109 Index: config.lib
110 ===================================================================
111 --- config.lib (revision 14474)
112 +++ config.lib (working copy)
113 @@ -37,6 +37,7 @@
114 man_dir="1"
115 menu_dir="1"
116 menu_group="Game;"
117 + binary_name="openttd"
118 enable_debug="0"
119 enable_desync_debug="0"
120 enable_profiling="0"
121 @@ -100,6 +101,7 @@
122 shared_dir
123 install_dir
124 menu_group
125 + binary_name
126 enable_debug
127 enable_desync_debug
128 enable_profiling
129 @@ -213,6 +215,9 @@
130 --menu-dir=*) menu_dir="$optarg";;
131 --without-menu-entry) menu_dir="";;
132
133 + --binary-name) prevp_p="binary_name";;
134 + --binary-name=*) binary_name="$optarg";;
135 +
136 --man-dir) prevp_p="man_dir";;
137 --man-dir=*) man_dir="$optarg";;
138
139 @@ -2298,6 +2303,7 @@
140 s#!!PERSONAL_DIR!!#$personal_dir#g;
141 s#!!SHARED_DIR!!#$shared_dir#g;
142 s#!!INSTALL_DIR!!#$install_dir#g;
143 + s#!!BINARY_NAME!!#$binary_name#g;
144 s#!!STRGEN!!#$STRGEN#g;
145 s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g;
146 s#!!ENDIAN_FORCE!!#$endian#g;
147 @@ -2507,6 +2513,8 @@
148 echo " [$shared_dir]"
149 echo " --install-dir=dir specifies the root to install to."
150 echo " Useful to install into jails [$install_dir]"
151 + echo " --binary-name the name used for the binary, icons,"
152 + echo " desktop file, etc. when installing [openttd]"
153 echo ""
154 echo "Features and packages:"
155 echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)"
156
157
158
159 1.1 games-simulation/openttd/files/libiconv.patch
160
161 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/libiconv.patch?rev=1.1&view=markup
162 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/openttd/files/libiconv.patch?rev=1.1&content-type=text/plain
163
164 Index: libiconv.patch
165 ===================================================================
166 Index: config.lib
167 ===================================================================
168 --- config.lib (revision 14474)
169 +++ config.lib (working copy)
170 @@ -1225,10 +1225,12 @@
171
172 if [ "$with_iconv" != "0" ]; then
173 CFLAGS="$CFLAGS -DWITH_ICONV"
174 - LIBS="$LIBS -liconv"
175 - if [ "$with_iconv" != "2" ]; then
176 - CFLAGS="$CFLAGS -I$with_iconv/include"
177 - LIBS="$LIBS -L$with_iconv/lib"
178 + if [ "$link_to_iconv" = "yes" ]; then
179 + LIBS="$LIBS -liconv"
180 + if [ "$with_iconv" != "2" ]; then
181 + CFLAGS="$CFLAGS -I$with_iconv/include"
182 + LIBS="$LIBS -L$with_iconv/lib"
183 + fi
184 fi
185
186 if [ "$have_broken_iconv" != "no" ]; then
187 @@ -2161,6 +2163,27 @@
188 log 2 " exit code $ret"
189 if [ "$ret" = "0" ]; then have_broken_iconv="no"; else have_broken_iconv="yes"; fi
190 log 1 "checking if iconv has non-const inbuf... $have_broken_iconv"
191 +
192 + cat > tmp.iconv.cpp << EOF
193 +#include "src/stdafx.h"
194 +#include <iconv.h>
195 +int main() {
196 + static char buf[1024];
197 + iconv_t convd = 0;
198 + char *inbuf = "";
199 + char *outbuf = buf;
200 + size_t outlen = 1023;
201 + size_t inlen = 0;
202 + return iconv(convd, &inbuf, &inlen, &outbuf, &outlen);
203 +}
204 +EOF
205 + execute="$cxx_host $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1"
206 + eval $execute >&/dev/null
207 + ret=$?
208 + log 2 "executing $execute"
209 + log 2 " exit code $ret"
210 + if [ "$ret" = "0" ]; then link_to_iconv="no"; else link_to_iconv="yes"; fi
211 + log 1 "checking whether to link to iconv... $link_to_iconv"
212 rm -f tmp.iconv tmp.iconv.cpp
213 }