Gentoo Archives: gentoo-commits

From: "Gerald Fenoy (djay)" <djay@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/mapserver: ChangeLog mapserver-5.0.0.ebuild
Date: Fri, 21 Sep 2007 09:21:53
Message-Id: E1IYdlm-0000Xh-Af@stork.gentoo.org
1 djay 07/09/21 08:21:50
2
3 Modified: ChangeLog
4 Added: mapserver-5.0.0.ebuild
5 Log:
6 Adding the mapserver-5.0.0 ebuild for the foss4g 2007.
7 (Portage version: 2.1.2.12)
8
9 Revision Changes Path
10 1.7 sci-geosciences/mapserver/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/mapserver/ChangeLog?rev=1.7&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/mapserver/ChangeLog?rev=1.7&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/mapserver/ChangeLog?r1=1.6&r2=1.7
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v
19 retrieving revision 1.6
20 retrieving revision 1.7
21 diff -u -r1.6 -r1.7
22 --- ChangeLog 1 Sep 2007 16:58:36 -0000 1.6
23 +++ ChangeLog 21 Sep 2007 08:21:49 -0000 1.7
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sci-geosciences/mapserver
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.6 2007/09/01 16:58:36 nerdboy Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.7 2007/09/21 08:21:49 djay Exp $
29 +
30 +*mapserver-5.0.0 (22 Nov 2007)
31 +
32 + 22 Nov 2007; <djay@g.o> +files/mapserver-5.0.0_php.patch,
33 + +mapserver-5.0.0.ebuild:
34 + Version Bump to 5.0.0 : thx to fordfrog for his work
35
36 *mapserver-4.10.3 (01 Sep 2007)
37
38
39
40
41 1.1 sci-geosciences/mapserver/mapserver-5.0.0.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/mapserver/mapserver-5.0.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/mapserver/mapserver-5.0.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mapserver-5.0.0.ebuild
47 ===================================================================
48 # Copyright 1999-2007 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-5.0.0.ebuild,v 1.1 2007/09/21 08:21:49 djay Exp $
51
52 PHP_EXT_NAME="php_mapscript php_proj"
53 RUBY_OPTIONAL="yes"
54
55 inherit eutils autotools distutils depend.php depend.apache webapp ruby java-pkg-opt-2
56
57 DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications."
58 HOMEPAGE="http://mapserver.gis.umn.edu/"
59 SRC_URI="http://download.osgeo.org/mapserver/${P}.tar.gz"
60
61 LICENSE="MIT"
62 KEYWORDS="~amd64 ~x86"
63
64 #I must check for mygis use flag availability
65 #"mono"
66 IUSE="agg xml pdf proj geos tiff gdal xpm postgis flash php python perl ruby tcl threads java doc"
67
68 # compilation fails with jdk > 1.4 on some native part probably
69 DEPEND="media-libs/libpng
70 media-libs/jpeg
71 media-libs/freetype
72 sys-libs/zlib
73 >=media-libs/gd-2.0.12
74 apache2? ( www-servers/apache )
75 unicode? ( virtual/libiconv )
76 agg? ( x11-libs/agg )
77 geos? ( sci-libs/geos )
78 proj? ( sci-libs/proj net-misc/curl )
79 xml? ( dev-libs/libxml2 )
80 gdal? ( >sci-libs/gdal-1.2.6 )
81 postgis? ( dev-db/postgis )
82 tiff? ( media-libs/tiff sci-libs/libgeotiff )
83 xpm? ( x11-libs/libXpm )
84 flash? ( media-libs/ming )
85 pdf? ( media-libs/pdflib )
86 php? ( dev-lang/php dev-lang/swig )
87 ruby? ( dev-lang/ruby dev-lang/swig )
88 perl? ( dev-perl/DBI dev-lang/swig )
89 python? ( dev-lang/python dev-lang/swig )
90 java? ( >=virtual/jdk-1.4 dev-lang/swig )
91 tcl? ( dev-lang/tcl dev-lang/swig )"
92 RDEPEND="${DEPEND}"
93
94 WEBAPP_MANUAL_SLOT=yes
95
96 want_apache
97
98 cd_script() {
99 einfo "$2 the mapserver $1-mapscript"
100 cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir"
101 }
102
103 pkg_setup(){
104 webapp_pkg_setup
105 java-pkg-opt-2_pkg_setup
106 if use php; then
107 # check how many versions of php was installed
108 has_php
109 np=0
110 if has_version '=dev-lang/php-5*'; then
111 np="$(expr ${np} + 1)"
112 fi
113 if has_version '=dev-lang/php-4*' ; then
114 np="$(expr ${np} + 1)"
115 myphp4=true
116 fi
117 toD="$(if [ ${np} -gt 1 ]; then echo s; fi)"
118 einfo "Using ${np} PHP version${toD}"
119 fi
120
121 elog "Checking for gd compiled with truetype support..."
122 if built_with_use media-libs/gd truetype; then
123 elog "Found truetype support; continuing..."
124 else
125 ewarn "media-libs/gd must be compiled with truetype support,"
126 ewarn "and you probably want jpeg and png support also."
127 elog "Please re-emerge gd with the truetype USE flag."
128 die "gd not merged with truetype USE flag"
129 fi
130
131 if use gdal && use tiff; then
132 ewarn "The MapServer tiff support is not compatible"
133 ewarn "with gdal tiff support."
134 elog "Please disable tiff support for mapserver."
135 die "mapserver has tiff USE flag enabled"
136 fi
137
138 if use java && ! use threads; then
139 ewarn "The MapServer Java support needs threads."
140 elog "Please enable thread support for mapserver."
141 die "mapserver has threads USE flag disabled"
142 fi
143
144 }
145
146 src_unpack() {
147 unpack "${A}"
148 cd "${S}"
149
150 if (use tcl); then
151 epatch "${FILESDIR}"/${PN}_tcl.patch
152 fi
153
154
155 if (use php); then
156 if [ ${np} -eq 2 ]; then
157 mkdir ./mapscript/php4
158 cp -r ./mapscript/php3 ./mapscript/php5 ||\
159 die "Unable to copy php mapscript directory"
160 epatch "${FILESDIR}"/${PF}_php.patch
161 fi
162 fi
163 if [ ! -z "${myphp4}" ]; then
164 epatch "${FILESDIR}"/${PN}_php4.patch
165 fi
166
167 }
168
169 src_compile() {
170 local step
171 step="Building"
172 cd "${S}"
173
174 AT_GNUCONF_UPDATE="no" eautoreconf
175
176 local myconf
177 myconf="--with-png --with-jpeg --with-zlib --with-freetype"
178 if use apache2 ; then
179 myconf="${myconf} --with-httpd=${APACHECTL/'ctl'/}"
180 fi
181
182 if use geos; then
183 myconf="${myconf} --with-geos=$(type -P geos-config)"
184 fi
185
186 local MYGPUSE="wfs wcs wfsclient"
187
188 if (use gdal && use proj); then
189 myconf="--with-ogr ${myconf}";
190 for i in ${MYGPUSE}; do
191 myconf="${myconf} --with-${i}"
192 done
193 if (use xml); then
194 myconf="${myconf} --with-sos"
195 fi
196 fi
197
198 if (use proj); then
199 myconf="${myconf} --with-wmsclient"
200 fi
201
202 if (use php); then
203 ewarn "You use ${np} version of php"
204 if [ ${np} -eq 2 ] ; then
205 for i in 4 5; do
206 uses_php${i}
207 myconf="${myconf} --with-php${i}=${PHPPREFIX}"
208 done
209 else
210 myconf="${myconf} --with-php=${PHPPREFIX}/include/php"
211 fi
212 fi
213
214 if (use perl || use python || use ruby || use tcl || use php) ; then
215 myconf="${myconf} --with-mapscript";
216 fi
217
218 cd "${S}"
219 econf $(use_with gdal)\
220 $(use_with agg)\
221 $(use_with perl)\
222 $(use_with python)\
223 $(use_with ruby)\
224 $(use_with tcl)\
225 $(use_with proj)\
226 $(use_with postgis)\
227 $(use_with tiff)\
228 $(use_with pdf)\
229 $(use_with flash ming)\
230 $(use_with java)\
231 $(use_with unicode iconv)\
232 $(use_with threads)\
233 ${myconf}\
234 || die "econf failed"
235
236 make || die "make failed"
237
238 if (use php && use proj); then
239 cd "${S}"/mapscript/php3/
240 if [ ${np} -eq 2 ]; then
241 cp *.so ../php4/ || die "Unable to copy php4 mapscript object files"
242 fi
243 fi
244
245 if use perl; then
246 cd_script perl ${step}
247 perl Makefile.PL || die "Unable to build perl mapscript"
248 emake || die "Unable to build perl mapscript"
249 fi
250
251 if use python; then
252 cd_script python ${step}
253 distutils_src_compile || die "Unable to build python mapscript"
254 fi
255
256 if use ruby; then
257 cd_script ruby ${step}
258 RUBY_ECONF="-I${D}"
259 ruby_econf
260 cp ../mapscript.i . || die "Unable to find mapscript.i"
261 sed -e "s:ruby.h defines.h::g" -i ./Makefile
262 ruby_emake
263 fi
264
265 if use tcl; then
266 cd_script tcl ${step}
267 sed "s:perlvars:mapscriptvars:" -i configure
268 sed -e "s:tail -:tail -n :g" -e "s:head -:head -n :g" -i configure ||\
269 die "Unable to modify the configure file"
270 econf --with-tcl=/usr || die "Unable to configure tcl mapscript"
271 touch tclmodule.i
272 #sed -e "s:-DTCL_WIDE_INT_TYPE=long long:-DTCL_WIDE_INT_TYPE=long\\\ long:g" \
273 # -i Makefile || die "Unable to modify Makefile"
274 emake || die "Unable to build tcl mapscript"
275 fi
276
277 if use java; then
278 cd_script java ${step}
279 emake interface || die "Unable to build java mapscript"
280 emake all || die "Unable to build java mapscript"
281 fi
282
283 }
284
285 src_test(){
286 if use java ; then
287 cd_script java test
288 emake test || die "Test failed"
289 # We need to fix the tests to make them pass
290 sed -i -e "s:setTransparency:setOpacity:g" \
291 ${S}/mapscript/java/tests/threadtest/MapThread.java \
292 || die "fixing of tests failed"
293 emake threadtests || die "Threadtests failed"
294 fi
295 }
296
297 mapscript_install_examples() {
298 einfo "$1-mapscript examples could be found in the following directory"
299 einfo "/usr/share/doc/${PF}/mapscript/examples/$1"
300 insinto /usr/share/doc/${PF}/mapscript/examples/$1/
301 doins examples/* || die "Unable to install specified sample data"
302 }
303
304 src_install() {
305 local step
306 step="Installing"
307 extra_dir="fonts tests tests/vera symbols"
308
309 dodir /usr /usr/bin
310
311 into /usr
312
313 if use php; then
314 if [ 2 -eq "${np}" ] ; then
315 for i in 4 5; do
316 cd_script php$i ${step}
317 uses_php$i
318 EXT_DIR="$(${PHPCONFIG} --extension-dir)"
319 dodir ${EXT_DIR}
320 cp *.so ${D}/${EXT_DIR} || \
321 die "Unable to setup php5 mapscript support"
322 done
323 else
324 cd_script php3 ${step}
325 EXT_DIR="$(${PHPCONFIG} --extension-dir)"
326 dodir ${EXT_DIR}
327 cp *.so ${D}/${EXT_DIR} || \
328 die "Unable to setup php4 mapscript support"
329 fi
330 mapscript_install_examples php
331 fi
332
333 if use ruby; then
334 cd_script ruby ${step}
335 ruby_einstall
336 mapscript_install_examples ruby
337 fi
338
339 if use perl; then
340 cd_script perl ${step}
341 make DESTDIR="${D}" install || \
342 die "Unable to setup perl mapscript support"
343 mapscript_install_examples perl
344 fi
345
346 if use tcl; then
347 cd_script tcl ${step}
348 sed "s:\$(TCL_EXEC_PREFIX):\$(DESTDIR)\$(TCL_EXEC_PREFIX):g" -i Makefile
349 make DESTDIR="${D}" install || \
350 die "Unable to setup tcl mapscript support"
351 mapscript_install_examples tcl
352 fi
353
354 if use python; then
355 cd_script python ${step}
356 distutils_src_install
357 mapscript_install_examples python
358 fi
359
360 if (use java); then
361 cd_script java ${step}
362 java-pkg_dojar mapscript.jar
363 java-pkg_doso libmapscript.so
364 mapscript_install_examples java
365 fi
366
367 cd "${S}"
368 into /usr
369
370 if use pdf; then
371 dobin shp2pdf || die "Unable to setup shp2pdf"
372 fi
373
374 dobin shp2img legend shptree shptreevis shp2img legend shptreetst scalebar\
375 sortshp tile4ms msencrypt mapserver-config \
376 || die "Unable to setup mapserver tools"
377
378 dodoc INSTALL README HISTORY.TXT || \
379 die "Unable to setup documentation"
380
381 for i in ${extra_dir}; do
382 insinto /usr/share/doc/${PF}/$i
383 doins $i/* || die "Unable to add extra_dir to document tree"
384 done
385
386 if use doc; then
387 insinto /usr/share/doc/${PF}/rfc
388 doins rfc/*
389
390 fi
391
392 webapp_src_preinst
393 chmod +x "${S}"/mapserv || die "Unable to find mapserv"
394 cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv"
395 webapp_src_install
396 }
397
398
399
400 --
401 gentoo-commits@g.o mailing list