[61964] trunk/dports/science
takeshi at macports.org
takeshi at macports.org
Sat Dec 26 00:57:31 PST 2009
Revision: 61964
http://trac.macports.org/changeset/61964
Author: takeshi at macports.org
Date: 2009-12-26 00:57:30 -0800 (Sat, 26 Dec 2009)
Log Message:
-----------
magicspp: adding magicspp
Added Paths:
-----------
trunk/dports/science/magicspp/
trunk/dports/science/magicspp/Portfile
trunk/dports/science/magicspp/files/
trunk/dports/science/magicspp/files/patch-configure.diff
trunk/dports/science/magicspp/files/patch-magics-config.in.diff
trunk/dports/science/magicspp/files/patch-src-Makefile.in.diff
Added: trunk/dports/science/magicspp/Portfile
===================================================================
--- trunk/dports/science/magicspp/Portfile (rev 0)
+++ trunk/dports/science/magicspp/Portfile 2009-12-26 08:57:30 UTC (rev 61964)
@@ -0,0 +1,75 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 60628 2009-11-18 03:47:54Z takeshi at macports.org $
+
+PortSystem 1.0
+
+name magicspp
+version 2.8.0
+platforms darwin
+maintainers takeshi
+license Apache v2.0
+categories science
+description ECMWF's Meteorological plotting software
+homepage http://www.ecmwf.int/products/data/software/magics++.html
+master_sites http://www.ecmwf.int/products/data/software/download/software_files/
+distname Magics++-${version}
+checksums md5 cf696eaa5d8075e32cc48b8107c43ffb \
+ sha1 5b09244f6428895c38804402877a9447edf150f5 \
+ rmd160 63ad953c40b469729483817f2525a1999a1753c8
+long_description \
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting \
+ software MAGICS (Meteorological Applications Graphics Integrated Colour System) \
+ redesigned in C++. Magics++ offers interfaces in Fortran, C, and MagML, \
+ a plot description language based on XML. The library supports the plotting of \
+ contours, wind fields, observations, satellite images, symbols, text, axis \
+ and graphs (including boxplots). Input data can be in GRIB 1 and 2, BUFR and NetCDF \
+ or retrieved from an ODB database. The produced meteorological plots can be saved \
+ in various formats, such as PostScript, EPS, PDF, GIF, PNG and SVG.
+
+depends_lib port:grib_api \
+ port:emos \
+ port:mesa \
+ port:xorg-libXau \
+ port:xorg-libXdmcp \
+ port:p5-xml-parser \
+ port:gd2 \
+ port:pango \
+ port:ghostscript
+
+use_parallel_build no
+universal_variant no
+
+patchfiles patch-src-Makefile.in.diff \
+ patch-configure.diff \
+ patch-magics-config.in.diff
+post-patch {
+ foreach f {TeDefines.h TeMappedMemory.h TeMutex.h TeThread.h TeThreadSignal.h TeMappedMemory.cpp TeMutex.cpp TeThread.cpp TeThreadSignal.cpp TeUtils.cpp TeRasterMemManager.cpp} {
+ reinplace "s:== TePLATFORMCODE_AIX:== TePLATFORMCODE_AIX || TePLATFORM == TePLATFORMCODE_APPLE:" ${worksrcpath}/src/terralib/kernel/${f}
+ }
+ reinplace "s:\.so:.dylib:" ${worksrcpath}/magics-config.in
+ reinplace "s:xlf90_r:xlf90_r | g95:" ${worksrcpath}/magics-config.in
+ reinplace "s:CYGWIN\):CYGWIN) || defined(__APPLE_CC__):" ${worksrcpath}/src/magics.h
+ reinplace "s:__unix__:__unix__ || defined __APPLE__:" ${worksrcpath}/src/terralib/kernel/TeUtils.cpp
+ reinplace "s:FreeBSD__ \):FreeBSD__ ) || defined(__APPLE__):" ${worksrcpath}/src/terralib/kernel/TeUtils.cpp
+}
+
+set submatch ""
+set flib ""
+regexp {\+([[:alnum:]]+) \(active\)} [exec port installed emos] match submatch
+if {${submatch}=="gcc43"} {
+ set flib "-L${prefix}/lib/gcc43 -lgfortran"
+ configure.compiler macports-gcc-4.3
+} elseif {${submatch}=="g95"} {
+ set flib -lf95
+ configure.f77 ${prefix}/bin/g95
+}
+configure.env-append LIBS=\"-lgrib_api -lopenjpeg -lpng\"
+configure.ldflags-append "-lgrib_api -lopenjpeg -lpng -lemosR64 $flib -lnetcdf_c++ -lnetcdf"
+configure.cppflags-append -I${prefix}/include/freetype2/
+configure.args-append --disable-dependency-tracking \
+ --enable-cairo \
+ --enable-bufr \
+ --with-grib_api=${prefix} \
+ --with-netcdf=${prefix} \
+ --with-emos-libraries=${prefix}/lib \
+ --with-gs-font-dir=${prefix}/share/ghostscript/fonts
Added: trunk/dports/science/magicspp/files/patch-configure.diff
===================================================================
--- trunk/dports/science/magicspp/files/patch-configure.diff (rev 0)
+++ trunk/dports/science/magicspp/files/patch-configure.diff 2009-12-26 08:57:30 UTC (rev 61964)
@@ -0,0 +1,17 @@
+--- configure.orig 2009-12-10 11:52:06.000000000 -1000
++++ configure 2009-12-10 11:53:40.000000000 -1000
+@@ -20146,8 +20146,12 @@
+ # FLIBS is determined which Fortran compiler was used for Emoslib!!!
+ #
+ case "${F77}" in
+- gfortran )
+- FLIBS="-lgfortran"
++ *gfortran* )
++ FLIBS="-L${exec_prefix}/lib/gcc43 -lgfortran"
++ FFLAGS="${FFLAGS} ${AXX}"
++ ;;
++ *g95 )
++ FLIBS="-lf95"
+ FFLAGS="${FFLAGS} ${AXX}"
+ ;;
+ # Intel compiler 9.x
Added: trunk/dports/science/magicspp/files/patch-magics-config.in.diff
===================================================================
--- trunk/dports/science/magicspp/files/patch-magics-config.in.diff (rev 0)
+++ trunk/dports/science/magicspp/files/patch-magics-config.in.diff 2009-12-26 08:57:30 UTC (rev 61964)
@@ -0,0 +1,73 @@
+--- magics-config.in.orig 2009-12-10 15:45:26.000000000 -1000
++++ magics-config.in 2009-12-10 16:08:07.000000000 -1000
+@@ -6,6 +6,8 @@
+ includedir=@includedir@
+ F77="@F77@"
+ CC="@CC@"
++CXX="@CXX@"
++CXXFLAGS="@CXXFLAGS@"
+ AXX="@AXX@"
+ FFLAGS="@FFLAGS@"
+ CPPLIBS="@CPPLIBS@"
+@@ -154,7 +156,7 @@
+ # Intel compiler
+ # Portland pgf90
+ # IBM fortran compiler
+- ifc | ifort | pgf90 | pgf77 | xlf | xlf90 | xlf_r | xlf90_r )
++ ifc | ifort | pgf90 | pgf77 | xlf | xlf90 | xlf_r | xlf90_r | g95 )
+ FXX="-r8 ${FXX}"
+ ;;
+ esac
+@@ -179,10 +181,10 @@
+
+ case "${CC}" in
+ icc | icpc | gcc | g++ )
+- CXX="-m64 ${CXX}"
++ CXXFLAGS="-m64 ${CXXFLAGS}"
+ ;;
+ pgc | pgcpp )
+- CXX="-tp amd64 ${CXX}"
++ CXXFLAGS="-tp amd64 ${CXXFLAGS}"
+ ;;
+ esac
+ ;;
+@@ -205,7 +207,7 @@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- if test -f ${libdir}/libMagPlus.so ; then
++ if test -f ${libdir}/libMagPlus.dylib ; then
+ my_libs="-L${libdir} -lMagPlus"
+ else
+ my_libs="${libdir}/libMagPlus.a"
+@@ -237,7 +239,7 @@
+ fi
+
+ if test "$echo_shared" = "yes"; then
+- if test -f ${libdir}/libMagPlus.so ; then
++ if test -f ${libdir}/libMagPlus.dylib ; then
+ shared="${precision} -L${libdir} -lMagPlus @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
+ echo ${shared}
+ else
+@@ -252,16 +254,17 @@
+ if test "$compile" = "yes"; then
+ out=""
+ if test "${suffix}x" = "x"; then
+- suffix="f"
++ suffix="o"
+ fi
+
+- name="`basename $f77_file .${suffix}`"
++ name=${f77_file%.*}
+
+ if test ${name} != ${f77_file} ; then
+ out="-o $name " ### avoid overriding source file
+ fi
+- $F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS
+- echo "$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
++ $F77 ${f77_file} -c && \
++ ${CXX} ${CXXFLAGS} ${out}${name}.o ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS
++ echo "$F77 ${f77_file} -c && ${CXX} ${CXXFLAGS} ${out}${name}.o ${FFLAGS} ${precision} -L${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
+ fi
+
+ if test "$compileC" = "yes"; then
Added: trunk/dports/science/magicspp/files/patch-src-Makefile.in.diff
===================================================================
--- trunk/dports/science/magicspp/files/patch-src-Makefile.in.diff (rev 0)
+++ trunk/dports/science/magicspp/files/patch-src-Makefile.in.diff 2009-12-26 08:57:30 UTC (rev 61964)
@@ -0,0 +1,13 @@
+--- src/Makefile.in.orig 2009-12-10 09:57:21.000000000 -1000
++++ src/Makefile.in 2009-12-10 09:58:08.000000000 -1000
+@@ -80,8 +80,8 @@
+ am__objects_1 =
+ am_libMagPlus_la_OBJECTS = $(am__objects_1)
+ libMagPlus_la_OBJECTS = $(am_libMagPlus_la_OBJECTS)
+-libMagPlus_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++libMagPlus_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libMagPlus_la_LDFLAGS) $(LDFLAGS) -o $@
+ DEFAULT_INCLUDES = -I. at am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091226/7cba162b/attachment.html>
More information about the macports-changes
mailing list