diff options
author | pingz <zpsigma@gmail.com> | 2011-02-13 15:12:31 +0000 |
---|---|---|
committer | pingz <zpsigma@gmail.com> | 2011-02-13 15:12:31 +0000 |
commit | e81f4dce5dfc5756ff9dca85969c9be49a9e015a (patch) | |
tree | 64487a792bc70994712014cbf2b8eed8d4ac7739 /sci-libs | |
parent | Added media-sound/guayadeque-0.2.7 (bug #273450). (diff) | |
download | sunrise-reviewed-e81f4dce5dfc5756ff9dca85969c9be49a9e015a.tar.gz sunrise-reviewed-e81f4dce5dfc5756ff9dca85969c9be49a9e015a.tar.bz2 sunrise-reviewed-e81f4dce5dfc5756ff9dca85969c9be49a9e015a.zip |
sci-libs/pygrib: New Ebuild for bug 350027 thanks to Tommy, chithead, floppym, bapa, and mgorny
svn path=/sunrise/; revision=11765
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/pygrib/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/pygrib/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/pygrib/files/pygrib-1.8.1-fix_duplicate_name.patch | 155 | ||||
-rw-r--r-- | sci-libs/pygrib/metadata.xml | 9 | ||||
-rw-r--r-- | sci-libs/pygrib/pygrib-1.8.1.ebuild | 43 |
5 files changed, 220 insertions, 0 deletions
diff --git a/sci-libs/pygrib/ChangeLog b/sci-libs/pygrib/ChangeLog new file mode 100644 index 000000000..a5a9a3a5a --- /dev/null +++ b/sci-libs/pygrib/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for sci-libs/pygrib +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 13 Feb 2011; pingz<zpsigma@gmail.com> +pygrib-1.8.1.ebuild, + +files/pygrib-1.8.1-fix_duplicate_name.patch, +metadata.xml: + New Ebuild for bug 350027 thanks to Tommy, chithead, floppym, bapa, and mgorny + diff --git a/sci-libs/pygrib/Manifest b/sci-libs/pygrib/Manifest new file mode 100644 index 000000000..fa466bb25 --- /dev/null +++ b/sci-libs/pygrib/Manifest @@ -0,0 +1,5 @@ +AUX pygrib-1.8.1-fix_duplicate_name.patch 4828 RMD160 e23362610174e3df7aefadb307f92868173a9e58 SHA1 d7a66d4a23bf21b2be85fdc55d5bf5478730af29 SHA256 b5bbbb6adb8692f406ad7228b5bed0c0eceb96b9a070902c1b94c0d3f39d9ad0 +DIST pygrib-1.8.1.tar.gz 17030116 RMD160 396254cf34963f70ea66f12feb6579d1810da2d7 SHA1 47a36c3c87c8e7669b5592064c44df5d49fa697d SHA256 162b5de2c972f4baecab80d9e4258ff07e728070c1aa1de00a57c220ac5cc456 +EBUILD pygrib-1.8.1.ebuild 1008 RMD160 ac435c8506923e9db7cdbbd540794f1052908250 SHA1 47eb7fe76387165355368eeca32875c011979401 SHA256 ab714383a32dbf134b6790c3a6ec5e8d616a6f7a21d12831e5191ff6a104f15f +MISC ChangeLog 323 RMD160 dc1f0b2da6777bd2d0b05239dfd4fb95092cb2fb SHA1 0540b94c0c099c193309fefea98545190f2867d8 SHA256 3f90243e36b01303efc77310a32f60620ebd203e195009d0480ce35e5faecc09 +MISC metadata.xml 242 RMD160 c598aac9fbf2264ee9c10cc63d93263065ba29e9 SHA1 70600d17d70532f0f78934f0b6e75c205567fccf SHA256 2ac3691a506d77fbba49cba487ec7ca369b31421886b628847e15f500f694e65 diff --git a/sci-libs/pygrib/files/pygrib-1.8.1-fix_duplicate_name.patch b/sci-libs/pygrib/files/pygrib-1.8.1-fix_duplicate_name.patch new file mode 100644 index 000000000..63da1710a --- /dev/null +++ b/sci-libs/pygrib/files/pygrib-1.8.1-fix_duplicate_name.patch @@ -0,0 +1,155 @@ +diff -rupN pygrib-1.8.1.orgin/MANIFEST.in pygrib-1.8.1/MANIFEST.in +--- pygrib-1.8.1.orgin/MANIFEST.in 2011-02-12 03:11:51.766307559 +0800 ++++ pygrib-1.8.1/MANIFEST.in 2011-02-12 03:13:04.766773095 +0800 +@@ -5,8 +5,7 @@ intluce pygrib.c + include setup.py + include test.py + include README +-include utils/grib_list +-include utils/grib_repack ++include utils/*grib* + recursive-include docs * + include sampledata/*.grb + include sampledata/*.grib* +diff -rupN pygrib-1.8.1.orgin/setup.py pygrib-1.8.1/setup.py +--- pygrib-1.8.1.orgin/setup.py 2011-02-12 03:11:51.764307684 +0800 ++++ pygrib-1.8.1/setup.py 2011-02-12 04:07:25.967567747 +0800 +@@ -69,7 +69,7 @@ setup(name = "pygrib", + url = "http://code.google.com/p/pygrib", + download_url = "http://code.google.com/p/pygrib/downloads/list", + scripts = +- ['utils/grib_list','utils/grib_repack','utils/grib1to2','utils/grib2to1'], ++ ['utils/grib_list','utils/grib_repack','utils/cnvgrib1to2','utils/cnvgrib2to1'], + ext_modules = [Extension( + "pygrib", + ["pygrib.c"], +diff -rupN pygrib-1.8.1.orgin/utils/cnvgrib1to2 pygrib-1.8.1/utils/cnvgrib1to2 +--- pygrib-1.8.1.orgin/utils/cnvgrib1to2 1970-01-01 08:00:00.000000000 +0800 ++++ pygrib-1.8.1/utils/cnvgrib1to2 2011-01-22 05:31:19.000000000 +0800 +@@ -0,0 +1,33 @@ ++#!/usr/bin/env python ++import pygrib, sys ++ ++if len(sys.argv) < 3: ++ print """ ++ grib1to2 <grib1 filename> <grib2 filename> <packing scheme> ++ <packing_scheme> is optional - can be 'grid_simple', 'grid_complex', ++ 'grid_complex_spatial_differencing', 'grid_jpeg', or 'grid_png'. ++ Default is 'grid_jpeg' ++ """ ++ raise SystemExit ++ ++grbs = pygrib.open(sys.argv[1]) ++f = open(sys.argv[2],'wb') ++ ++if len(sys.argv) > 3: ++ grb2packing = sys.argv[3] ++else: ++ grb2packing = 'grid_jpeg' # default is jpeg2000 ++ ++print 'converting %s from grib1 to grib2 (%s) with %s packing ...' % (sys.argv[1],sys.argv[2],grb2packing) ++ ++for grb in grbs: ++ try: ++ grb.editionNumber=2 ++ grb.packingType = grb2packing ++ except: ++ print 'cannot convert message %s' % grb.messagenumber ++ continue ++ f.write(grb.tostring()) ++ ++grbs.close() ++f.close() +diff -rupN pygrib-1.8.1.orgin/utils/cnvgrib2to1 pygrib-1.8.1/utils/cnvgrib2to1 +--- pygrib-1.8.1.orgin/utils/cnvgrib2to1 1970-01-01 08:00:00.000000000 +0800 ++++ pygrib-1.8.1/utils/cnvgrib2to1 2011-01-22 05:31:19.000000000 +0800 +@@ -0,0 +1,24 @@ ++#!/usr/bin/env python ++import pygrib, sys ++ ++if len(sys.argv) < 3: ++ print """ ++ grib2to1 <grib2 filename> <grib1 filename> ++ """ ++ raise SystemExit ++ ++grbs = pygrib.open(sys.argv[1]) ++f = open(sys.argv[2],'wb') ++ ++print 'converting %s from grib2 to grib1 (%s) ...' % (sys.argv[1],sys.argv[2]) ++ ++for grb in grbs: ++ try: ++ grb.editionNumber=1 ++ except: ++ print 'cannot convert message %s' % grb.messagenumber ++ continue ++ f.write(grb.tostring()) ++ ++grbs.close() ++f.close() +diff -rupN pygrib-1.8.1.orgin/utils/grib1to2 pygrib-1.8.1/utils/grib1to2 +--- pygrib-1.8.1.orgin/utils/grib1to2 2011-02-12 03:11:51.766307559 +0800 ++++ pygrib-1.8.1/utils/grib1to2 1970-01-01 08:00:00.000000000 +0800 +@@ -1,33 +0,0 @@ +-#!/usr/bin/env python +-import pygrib, sys +- +-if len(sys.argv) < 3: +- print """ +- grib1to2 <grib1 filename> <grib2 filename> <packing scheme> +- <packing_scheme> is optional - can be 'grid_simple', 'grid_complex', +- 'grid_complex_spatial_differencing', 'grid_jpeg', or 'grid_png'. +- Default is 'grid_jpeg' +- """ +- raise SystemExit +- +-grbs = pygrib.open(sys.argv[1]) +-f = open(sys.argv[2],'wb') +- +-if len(sys.argv) > 3: +- grb2packing = sys.argv[3] +-else: +- grb2packing = 'grid_jpeg' # default is jpeg2000 +- +-print 'converting %s from grib1 to grib2 (%s) with %s packing ...' % (sys.argv[1],sys.argv[2],grb2packing) +- +-for grb in grbs: +- try: +- grb.editionNumber=2 +- grb.packingType = grb2packing +- except: +- print 'cannot convert message %s' % grb.messagenumber +- continue +- f.write(grb.tostring()) +- +-grbs.close() +-f.close() +diff -rupN pygrib-1.8.1.orgin/utils/grib2to1 pygrib-1.8.1/utils/grib2to1 +--- pygrib-1.8.1.orgin/utils/grib2to1 2011-02-12 03:11:51.766307559 +0800 ++++ pygrib-1.8.1/utils/grib2to1 1970-01-01 08:00:00.000000000 +0800 +@@ -1,24 +0,0 @@ +-#!/usr/bin/env python +-import pygrib, sys +- +-if len(sys.argv) < 3: +- print """ +- grib2to1 <grib2 filename> <grib1 filename> +- """ +- raise SystemExit +- +-grbs = pygrib.open(sys.argv[1]) +-f = open(sys.argv[2],'wb') +- +-print 'converting %s from grib2 to grib1 (%s) ...' % (sys.argv[1],sys.argv[2]) +- +-for grb in grbs: +- try: +- grb.editionNumber=1 +- except: +- print 'cannot convert message %s' % grb.messagenumber +- continue +- f.write(grb.tostring()) +- +-grbs.close() +-f.close() diff --git a/sci-libs/pygrib/metadata.xml b/sci-libs/pygrib/metadata.xml new file mode 100644 index 000000000..9450475d9 --- /dev/null +++ b/sci-libs/pygrib/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>maintainer-wanted@gentoo.org</email> + </maintainer> +</pkgmetadata> + diff --git a/sci-libs/pygrib/pygrib-1.8.1.ebuild b/sci-libs/pygrib/pygrib-1.8.1.ebuild new file mode 100644 index 000000000..9c1b481cf --- /dev/null +++ b/sci-libs/pygrib/pygrib-1.8.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit eutils distutils + +DESCRIPTION="Python module for reading and writing GRIB files (edition 1 and edition 2)" +HOMEPAGE="http://code.google.com/p/pygrib/ http://pypi.python.org/pypi/pygrib/" +SRC_URI="http://pygrib.googlecode.com/files/${P}.tar.gz" + +LICENSE="pygrib" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +RDEPEND="dev-python/numpy + sci-libs/proj + dev-python/matplotlib + dev-python/basemap + sci-libs/grib_api + || ( media-libs/jasper media-libs/openjpeg ) + media-libs/libpng + sys-libs/zlib" +DEPEND="${RDEPEND}" + +src_prepare() { +# patch already be applied by upstream, avoid conflict with grib_api's script +# ref http://code.google.com/p/pygrib/issues/detail?id=22 + epatch "${FILESDIR}"/${P}-fix_duplicate_name.patch +} + +src_install() { + distutils_src_install + + if use doc; then + dohtml docs/* || die + fi +} |