Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/mapserver: ChangeLog mapserver-5.6.6.ebuild mapserver-6.0.0_rc1.ebuild mapserver-5.4.2-r1.ebuild
Date: Mon, 02 May 2011 10:16:28
Message-Id: 20110502101617.83D2020057@flycatcher.gentoo.org
1 scarabeus 11/05/02 10:16:17
2
3 Modified: ChangeLog
4 Added: mapserver-5.6.6.ebuild mapserver-6.0.0_rc1.ebuild
5 Removed: mapserver-5.4.2-r1.ebuild
6 Log:
7 Version bump to 5.6.6 and 6.0.0_rc1 releases. (did not test all options so some might fail)
8
9 (Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.28 sci-geosciences/mapserver/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/ChangeLog?rev=1.28&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/ChangeLog?rev=1.28&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/ChangeLog?r1=1.27&r2=1.28
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v
21 retrieving revision 1.27
22 retrieving revision 1.28
23 diff -u -r1.27 -r1.28
24 --- ChangeLog 2 Mar 2011 20:36:03 -0000 1.27
25 +++ ChangeLog 2 May 2011 10:16:17 -0000 1.28
26 @@ -1,6 +1,15 @@
27 # ChangeLog for sci-geosciences/mapserver
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.27 2011/03/02 20:36:03 jlec Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.28 2011/05/02 10:16:17 scarabeus Exp $
31 +
32 +*mapserver-6.0.0_rc1 (02 May 2011)
33 +*mapserver-5.6.6 (02 May 2011)
34 +
35 + 02 May 2011; Tomáš Chvátal <scarabeus@g.o>
36 + +files/6.0.0_rc1-ldflags.patch, -mapserver-5.4.2-r1.ebuild,
37 + +mapserver-5.6.6.ebuild, +mapserver-6.0.0_rc1.ebuild:
38 + Version bump to 5.6.6 and 6.0.0_rc1 releases. (did not test all options so
39 + some might fail)
40
41 02 Mar 2011; Justin Lecher <jlec@g.o> mapserver-5.4.2.ebuild,
42 mapserver-5.4.2-r1.ebuild:
43
44
45
46 1.1 sci-geosciences/mapserver/mapserver-5.6.6.ebuild
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/mapserver-5.6.6.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/mapserver-5.6.6.ebuild?rev=1.1&content-type=text/plain
50
51 Index: mapserver-5.6.6.ebuild
52 ===================================================================
53 # Copyright 1999-2011 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-5.6.6.ebuild,v 1.1 2011/05/02 10:16:17 scarabeus Exp $
56
57 EAPI=3
58
59 PHP_EXT_NAME="php_mapscript php_proj"
60 RUBY_OPTIONAL="yes"
61
62 PYTHON_DEPEND="2"
63 SUPPORT_PYTHON_ABIS="1"
64 RESTRICT_PYTHON_ABIS="3.*"
65 PYTHON_MODNAME="mapscript.py"
66
67 inherit eutils autotools confutils multilib distutils depend.php perl-module php-ext-source-r1 depend.apache webapp ruby java-pkg-opt-2
68
69 WEBAPP_MANUAL_SLOT=yes
70
71 DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications."
72 HOMEPAGE="http://mapserver.org"
73 SRC_URI="http://download.osgeo.org/mapserver/${P}.tar.gz"
74
75 LICENSE="MIT"
76 KEYWORDS="~amd64 ~x86"
77
78 # I must check for mygis use flag availability
79 IUSE="agg doc flash gdal geos java perl php postgis proj python ruby tcl threads tiff unicode xml xpm" # mono
80
81 # compilation fails with jdk > 1.4 on some native part probably
82 RDEPEND="
83 media-libs/libpng
84 virtual/jpeg
85 media-libs/freetype
86 >=media-libs/gd-2.0.12[truetype,jpeg,png]
87 sys-libs/zlib
88 agg? ( x11-libs/agg )
89 flash? ( media-libs/ming )
90 gdal? ( >sci-libs/gdal-1.2.6 )
91 geos? ( sci-libs/geos )
92 java? ( >=virtual/jdk-1.4 )
93 perl? ( dev-perl/DBI )
94 php? ( dev-lang/php )
95 postgis? ( dev-db/postgis )
96 proj? ( sci-libs/proj net-misc/curl )
97 ruby? ( dev-lang/ruby )
98 tcl? ( dev-lang/tcl )
99 tiff? ( media-libs/tiff sci-libs/libgeotiff )
100 unicode? ( virtual/libiconv )
101 xml? ( dev-libs/libxml2:2 )
102 xpm? ( x11-libs/libXpm )"
103
104 DEPEND="${RDEPEND}
105 java? ( dev-lang/swig )
106 perl? ( dev-lang/swig )
107 ruby? ( dev-lang/swig )
108 python? ( dev-lang/swig )
109 php? ( dev-lang/swig )
110 tcl? ( dev-lang/swig )"
111 want_apache2
112
113 cd_script() {
114 einfo "$2 the mapserver $1-mapscript"
115 cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir"
116 }
117
118 pkg_setup() {
119 #webapp_pkg_setup
120 use java && java-pkg-opt-2_pkg_setup
121 use perl && perl-module_pkg_setup
122 use php && has_php
123 use python && python_pkg_setup
124
125 confutils_use_conflict gdal tiff
126 confutils_use_depend_all java threads
127 }
128
129 src_prepare() {
130 epatch "${FILESDIR}"/5.4.2-ldflags.patch
131
132 if use tcl ; then
133 epatch "${FILESDIR}"/${PN}_tcl.patch-r1
134 sed -i -e "s:@libdir@:$(get_libdir):g" mapscript/tcl/Makefile.in \
135 || die "failed to fix libdir in Makefile.in"
136 fi
137 eautoreconf
138 }
139
140 src_configure() {
141 local step="Configuration"
142
143 local myconf="--with-png --with-jpeg --with-zlib --with-freetype"
144 use apache2 && myconf="${myconf} --with-httpd=${APACHE_BIN}"
145 use geos && myconf="${myconf} --with-geos=$(type -P geos-config)"
146
147 local MYGPUSE="wfs wcs wfsclient"
148 if use gdal && use proj ; then
149 myconf="--with-ogr ${myconf}";
150 for i in ${MYGPUSE}; do
151 myconf="${myconf} --with-${i}"
152 done
153 use xml && myconf="${myconf} --with-sos"
154 fi
155
156 use proj && myconf="${myconf} --with-wmsclient"
157 use php && myconf="${myconf} --with-php=${PHPPREFIX}/include/php"
158
159 if use perl || use python || use ruby || use tcl || use php ; then
160 myconf="${myconf} --with-mapscript"
161 fi
162
163 cd "${S}"
164 econf \
165 --without-pdf \
166 $(use_with gdal) \
167 $(use_with agg) \
168 $(use_with perl) \
169 $(use_with python) \
170 $(use_with ruby) \
171 $(use_with tcl) \
172 $(use_with proj) \
173 $(use_with postgis) \
174 $(use_with tiff) \
175 $(use_with flash ming) \
176 $(use_with java) \
177 $(use_with unicode iconv) \
178 $(use_with threads) \
179 ${myconf}
180
181 if use ruby; then
182 cd_script ruby ${step}
183 RUBY_ECONF="-I${D}"
184 ruby_econf
185 cp ../mapscript.i . || die "Unable to find mapscript.i"
186 sed -e "s:ruby.h defines.h::g" -i ./Makefile
187 fi
188
189 if use tcl; then
190 cd_script tcl ${step}
191 sed "s:perlvars:mapscriptvars:" -i configure
192 sed -e "s:tail -:tail -n :g" -e "s:head -:head -n :g" -i configure ||\
193 die "Unable to modify the configure file"
194 econf --with-tcl=/usr
195 touch tclmodule.i
196 # do not comment this sed out again because it will plain break build otherwise
197 # thanks in advance
198 sed -e "s:-DTCL_WIDE_INT_TYPE=long long:-DTCL_WIDE_INT_TYPE=long\\\ long:g" \
199 -i Makefile || die "Unable to modify Makefile"
200 fi
201 }
202
203 src_compile() {
204 local step="Building"
205
206 # bug #279627
207 emake -j1 || die "make failed"
208
209 if use perl; then
210 cd_script perl ${step}
211 perl-module_src_compile
212 fi
213
214 if use php && use proj; then
215 cd_script php3 ${step}
216 emake php_proj.so || die "unable to built php_proj.so"
217 fi
218
219 if use python; then
220 cd_script python ${step}
221 distutils_src_compile
222 fi
223
224 if use ruby; then
225 cd_script ruby ${step}
226 ruby_emake
227 fi
228
229 if use tcl; then
230 cd_script tcl ${step}
231 emake || die "Unable to build tcl mapscript"
232 fi
233
234 if use java; then
235 cd_script java ${step}
236 emake interface || die "Unable to build java mapscript"
237 emake all || die "Unable to build java mapscript"
238 fi
239
240 }
241
242 src_test(){
243 local step="Testing"
244
245 if use java ; then
246 cd_script java test
247 emake test || die "Test failed"
248 # We need to fix the tests to make them pass
249 sed -i -e "s:setTransparency:setOpacity:g" \
250 "${S}"/mapscript/java/tests/threadtest/MapThread.java \
251 || die "fixing of tests failed"
252 emake threadtests || die "Threadtests failed"
253 fi
254 }
255
256 mapscript_install_examples() {
257 elog "$1-mapscript examples could be found in the following directory"
258 elog "/usr/share/doc/${PF}/mapscript/examples/$1"
259 insinto /usr/share/doc/${PF}/mapscript/examples/$1/
260 doins examples/* || die "Unable to install specified sample data"
261 }
262
263 src_install() {
264 local step="Installing"
265
266 local extra_dir="fonts tests tests/vera symbols"
267
268 dodir /usr /usr/bin
269
270 into /usr
271
272 if use php ; then
273 cd_script php3 ${step}
274 for i in *.so ; do
275 cp ${i} "${WORKDIR}"/${i/.so}-default.so || die "failed to copy php extension"
276 PHP_EXT_NAME="${i/.so}"
277 php-ext-source-r1_src_install
278 done
279
280 mapscript_install_examples php
281 fi
282
283 if use ruby ; then
284 cd_script ruby ${step}
285 ruby_einstall
286 mapscript_install_examples ruby
287 fi
288
289 if use perl ; then
290 cd_script perl ${step}
291 perl-module_src_install
292 mapscript_install_examples perl
293 fi
294
295 if use tcl ; then
296 cd_script tcl ${step}
297 sed "s:\$(TCL_EXEC_PREFIX):\$(DESTDIR)\$(TCL_EXEC_PREFIX):g" -i Makefile
298 emake -j1 DESTDIR="${D}" install || \
299 die "Unable to setup tcl mapscript support"
300 mapscript_install_examples tcl
301 fi
302
303 if use python ; then
304 cd_script python ${step}
305 distutils_src_install
306 mapscript_install_examples python
307 fi
308
309 if use java ; then
310 cd_script java ${step}
311 java-pkg_dojar mapscript.jar
312 java-pkg_doso libmapscript.so
313 mapscript_install_examples java
314 fi
315
316 cd "${S}"
317 into /usr
318
319 dobin shp2img legend shptree shptreevis shp2img legend shptreetst scalebar \
320 sortshp tile4ms msencrypt mapserver-config \
321 || die "Unable to setup mapserver tools"
322
323 dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation"
324
325 for i in ${extra_dir}; do
326 insinto /usr/share/doc/${PF}/${i}
327 doins ${i}/* || die "Unable to add extra_dir to document tree"
328 done
329
330 if use doc; then
331 insinto /usr/share/doc/${PF}/rfc
332 doins rfc/*
333 fi
334
335 webapp_src_preinst
336 chmod +x "${S}"/mapserv || die "Unable to find mapserv"
337 cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv"
338 webapp_src_install
339 }
340
341 pkg_postinst() {
342 webapp_pkg_postinst
343 use python && distutils_pkg_postinst
344 }
345
346 pkg_prerm() {
347 webapp_pkg_prerm
348 }
349
350 pkg_postrm() {
351 use python && distutils_pkg_postrm
352 }
353
354
355
356 1.1 sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild
357
358 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild?rev=1.1&view=markup
359 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild?rev=1.1&content-type=text/plain
360
361 Index: mapserver-6.0.0_rc1.ebuild
362 ===================================================================
363 # Copyright 1999-2011 Gentoo Foundation
364 # Distributed under the terms of the GNU General Public License v2
365 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild,v 1.1 2011/05/02 10:16:17 scarabeus Exp $
366
367 EAPI=3
368
369 PHP_EXT_NAME="php_mapscript php_proj"
370 RUBY_OPTIONAL="yes"
371
372 PYTHON_DEPEND="2"
373 SUPPORT_PYTHON_ABIS="1"
374 RESTRICT_PYTHON_ABIS="3.*"
375 PYTHON_MODNAME="mapscript.py"
376
377 inherit eutils autotools confutils multilib distutils depend.php perl-module php-ext-source-r1 depend.apache webapp ruby java-pkg-opt-2
378
379 MY_P="${PN}-${PV/_/-}"
380
381 WEBAPP_MANUAL_SLOT=yes
382
383 DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications."
384 HOMEPAGE="http://mapserver.org"
385 SRC_URI="http://download.osgeo.org/mapserver/${MY_P}.tar.gz"
386
387 LICENSE="MIT"
388 KEYWORDS="~amd64 ~x86"
389
390 # I must check for mygis use flag availability
391 IUSE="agg doc flash gdal geos java perl php postgis proj python ruby tcl threads tiff unicode xml xpm" # mono
392
393 # compilation fails with jdk > 1.4 on some native part probably
394 RDEPEND="
395 media-libs/libpng
396 virtual/jpeg
397 media-libs/freetype
398 >=media-libs/gd-2.0.12[truetype,jpeg,png]
399 sys-libs/zlib
400 agg? ( x11-libs/agg )
401 flash? ( media-libs/ming )
402 gdal? ( >sci-libs/gdal-1.2.6 )
403 geos? ( sci-libs/geos )
404 java? ( >=virtual/jdk-1.4 )
405 perl? ( dev-perl/DBI )
406 php? ( dev-lang/php )
407 postgis? ( dev-db/postgis )
408 proj? ( sci-libs/proj net-misc/curl )
409 ruby? ( dev-lang/ruby )
410 tcl? ( dev-lang/tcl )
411 tiff? ( media-libs/tiff sci-libs/libgeotiff )
412 unicode? ( virtual/libiconv )
413 xml? ( dev-libs/libxml2:2 )
414 xpm? ( x11-libs/libXpm )"
415
416 DEPEND="${RDEPEND}
417 java? ( dev-lang/swig )
418 perl? ( dev-lang/swig )
419 ruby? ( dev-lang/swig )
420 python? ( dev-lang/swig )
421 php? ( dev-lang/swig )
422 tcl? ( dev-lang/swig )"
423 want_apache2
424
425 S="${WORKDIR}/${MY_P}"
426
427 cd_script() {
428 einfo "$2 the mapserver $1-mapscript"
429 cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir"
430 }
431
432 pkg_setup() {
433 #webapp_pkg_setup
434 use java && java-pkg-opt-2_pkg_setup
435 use perl && perl-module_pkg_setup
436 use php && has_php
437 use python && python_pkg_setup
438
439 confutils_use_conflict gdal tiff
440 confutils_use_depend_all java threads
441 }
442
443 src_prepare() {
444 epatch "${FILESDIR}/6.0.0_rc1-ldflags.patch"
445 if use tcl ; then
446 epatch "${FILESDIR}"/${PN}_tcl.patch-r1
447 sed -i -e "s:@libdir@:$(get_libdir):g" mapscript/tcl/Makefile.in \
448 || die "failed to fix libdir in Makefile.in"
449 fi
450 eautoreconf
451 }
452
453 src_configure() {
454 local step="Configuration"
455
456 local myconf="--with-png --with-jpeg --with-zlib --with-freetype"
457 use apache2 && myconf="${myconf} --with-httpd=${APACHE_BIN}"
458 use geos && myconf="${myconf} --with-geos=$(type -P geos-config)"
459
460 local MYGPUSE="wfs wcs wfsclient"
461 if use gdal && use proj ; then
462 myconf="--with-ogr ${myconf}";
463 for i in ${MYGPUSE}; do
464 myconf="${myconf} --with-${i}"
465 done
466 use xml && myconf="${myconf} --with-sos"
467 fi
468
469 use proj && myconf="${myconf} --with-wmsclient"
470 use php && myconf="${myconf} --with-php=${PHPPREFIX}/include/php"
471
472 if use perl || use python || use ruby || use tcl || use php ; then
473 myconf="${myconf} --with-mapscript"
474 fi
475
476 cd "${S}"
477 econf \
478 --without-pdf \
479 $(use_with gdal) \
480 $(use_with agg) \
481 $(use_with perl) \
482 $(use_with python) \
483 $(use_with ruby) \
484 $(use_with tcl) \
485 $(use_with proj) \
486 $(use_with postgis) \
487 $(use_with tiff) \
488 $(use_with flash ming) \
489 $(use_with java) \
490 $(use_with unicode iconv) \
491 $(use_with threads) \
492 ${myconf}
493
494 if use ruby; then
495 cd_script ruby ${step}
496 RUBY_ECONF="-I${D}"
497 ruby_econf
498 cp ../mapscript.i . || die "Unable to find mapscript.i"
499 sed -e "s:ruby.h defines.h::g" -i ./Makefile
500 fi
501
502 if use tcl; then
503 cd_script tcl ${step}
504 sed "s:perlvars:mapscriptvars:" -i configure
505 sed -e "s:tail -:tail -n :g" -e "s:head -:head -n :g" -i configure ||\
506 die "Unable to modify the configure file"
507 econf --with-tcl=/usr
508 touch tclmodule.i
509 # do not comment this sed out again because it will plain break build otherwise
510 # thanks in advance
511 sed -e "s:-DTCL_WIDE_INT_TYPE=long long:-DTCL_WIDE_INT_TYPE=long\\\ long:g" \
512 -i Makefile || die "Unable to modify Makefile"
513 fi
514 }
515
516 src_compile() {
517 local step="Building"
518
519 # bug #279627
520 emake -j1 || die "make failed"
521
522 if use perl; then
523 cd_script perl ${step}
524 perl-module_src_compile
525 fi
526
527 if use php && use proj; then
528 cd_script php3 ${step}
529 emake php_proj.so || die "unable to built php_proj.so"
530 fi
531
532 if use python; then
533 cd_script python ${step}
534 distutils_src_compile
535 fi
536
537 if use ruby; then
538 cd_script ruby ${step}
539 ruby_emake
540 fi
541
542 if use tcl; then
543 cd_script tcl ${step}
544 emake || die "Unable to build tcl mapscript"
545 fi
546
547 if use java; then
548 cd_script java ${step}
549 emake interface || die "Unable to build java mapscript"
550 emake all || die "Unable to build java mapscript"
551 fi
552
553 }
554
555 src_test(){
556 local step="Testing"
557
558 if use java ; then
559 cd_script java test
560 emake test || die "Test failed"
561 # We need to fix the tests to make them pass
562 sed -i -e "s:setTransparency:setOpacity:g" \
563 "${S}"/mapscript/java/tests/threadtest/MapThread.java \
564 || die "fixing of tests failed"
565 emake threadtests || die "Threadtests failed"
566 fi
567 }
568
569 mapscript_install_examples() {
570 elog "$1-mapscript examples could be found in the following directory"
571 elog "/usr/share/doc/${PF}/mapscript/examples/$1"
572 insinto /usr/share/doc/${PF}/mapscript/examples/$1/
573 doins examples/* || die "Unable to install specified sample data"
574 }
575
576 src_install() {
577 local step="Installing"
578
579 local extra_dir="fonts tests tests/vera symbols"
580
581 dodir /usr /usr/bin
582
583 into /usr
584
585 if use php ; then
586 cd_script php3 ${step}
587 for i in *.so ; do
588 cp ${i} "${WORKDIR}"/${i/.so}-default.so || die "failed to copy php extension"
589 PHP_EXT_NAME="${i/.so}"
590 php-ext-source-r1_src_install
591 done
592
593 mapscript_install_examples php
594 fi
595
596 if use ruby ; then
597 cd_script ruby ${step}
598 ruby_einstall
599 mapscript_install_examples ruby
600 fi
601
602 if use perl ; then
603 cd_script perl ${step}
604 perl-module_src_install
605 mapscript_install_examples perl
606 fi
607
608 if use tcl ; then
609 cd_script tcl ${step}
610 sed "s:\$(TCL_EXEC_PREFIX):\$(DESTDIR)\$(TCL_EXEC_PREFIX):g" -i Makefile
611 emake -j1 DESTDIR="${D}" install || \
612 die "Unable to setup tcl mapscript support"
613 mapscript_install_examples tcl
614 fi
615
616 if use python ; then
617 cd_script python ${step}
618 distutils_src_install
619 mapscript_install_examples python
620 fi
621
622 if use java ; then
623 cd_script java ${step}
624 java-pkg_dojar mapscript.jar
625 java-pkg_doso libmapscript.so
626 mapscript_install_examples java
627 fi
628
629 cd "${S}"
630 into /usr
631
632 dobin shp2img legend shptree shptreevis shp2img legend shptreetst scalebar \
633 sortshp tile4ms msencrypt mapserver-config \
634 || die "Unable to setup mapserver tools"
635
636 dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation"
637
638 for i in ${extra_dir}; do
639 insinto /usr/share/doc/${PF}/${i}
640 doins ${i}/* || die "Unable to add extra_dir to document tree"
641 done
642
643 if use doc; then
644 insinto /usr/share/doc/${PF}/rfc
645 doins rfc/*
646 fi
647
648 webapp_src_preinst
649 chmod +x "${S}"/mapserv || die "Unable to find mapserv"
650 cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv"
651 webapp_src_install
652 }
653
654 pkg_postinst() {
655 webapp_pkg_postinst
656 use python && distutils_pkg_postinst
657 }
658
659 pkg_prerm() {
660 webapp_pkg_prerm
661 }
662
663 pkg_postrm() {
664 use python && distutils_pkg_postrm
665 }