summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2012-04-21 09:09:00 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2012-04-21 09:09:00 +0000
commit38de53812964a44ae037351defc9f19c8b57e12e (patch)
tree6ddd490d87c82a650bd33893545570f588991cfa /sci-geosciences/grass
parentFix build failure when USE=-geoloc (bug #411955, thanks to Nikolaj Sjujskij a... (diff)
downloadgentoo-2-38de53812964a44ae037351defc9f19c8b57e12e.tar.gz
gentoo-2-38de53812964a44ae037351defc9f19c8b57e12e.tar.bz2
gentoo-2-38de53812964a44ae037351defc9f19c8b57e12e.zip
Add libav-0.8 patch to build with new ffmpeg variants. Remove older and stabilise revision on all archs as only change is rename of one file. Fixes bug#390827 and bug#392371.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences/grass')
-rw-r--r--sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch60
-rw-r--r--sci-geosciences/grass/grass-6.4.1-r1.ebuild5
-rw-r--r--sci-geosciences/grass/grass-6.4.1.ebuild320
3 files changed, 63 insertions, 322 deletions
diff --git a/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch b/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch
new file mode 100644
index 000000000000..4864d88da7c8
--- /dev/null
+++ b/sci-geosciences/grass/files/grass-6.4.1-libav-0.8.patch
@@ -0,0 +1,60 @@
+Adjust Grass 6.4.1 to work with ffmpeg 8.
+
+2011-11-17 Fabio Erculiani
+2011-12-08 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/390827
+https://bugs.gentoo.org/392371
+
+--- grass-6.4.1.orig/lib/ogsf/gsd_img_mpeg.c
++++ grass-6.4.1/lib/ogsf/gsd_img_mpeg.c
+@@ -66,7 +66,7 @@ static AVStream *add_video_stream(AVForm
+
+ c = st->codec;
+ c->codec_id = codec_id;
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ /* put sample parameters */
+ c->bit_rate = 400000;
+@@ -215,7 +215,7 @@ static void write_video_frame(AVFormatCo
+
+ av_init_packet(&pkt);
+
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index = st->index;
+ pkt.data = (uint8_t *) picture;
+ pkt.size = sizeof(AVPicture);
+@@ -236,7 +236,7 @@ static void write_video_frame(AVFormatCo
+ av_rescale_q(c->coded_frame->pts, c->time_base,
+ st->time_base);
+ if (c->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index = st->index;
+ pkt.data = video_outbuf;
+ pkt.size = out_size;
+@@ -301,10 +301,10 @@ int gsd_init_mpeg(const char *filename)
+ av_register_all();
+
+ /* auto detect the output format from the name. default is mpeg. */
+- fmt = guess_format(NULL, filename, NULL);
++ fmt = av_guess_format(NULL, filename, NULL);
+ if (!fmt) {
+ G_warning(_("Unable to deduce output format from file extension: using MPEG"));
+- fmt = guess_format("mpeg", NULL, NULL);
++ fmt = av_guess_format("mpeg", NULL, NULL);
+ }
+ if (!fmt) {
+ G_warning(_("Unable to find suitable output format"));
+@@ -312,7 +312,7 @@ int gsd_init_mpeg(const char *filename)
+ }
+
+ /* allocate the output media context */
+- oc = av_alloc_format_context();
++ oc = av_malloc(sizeof(AVFormatContext));
+ if (!oc) {
+ G_warning(_("Out of memory"));
+ return (-1);
diff --git a/sci-geosciences/grass/grass-6.4.1-r1.ebuild b/sci-geosciences/grass/grass-6.4.1-r1.ebuild
index 4c3e593dfee8..5a2b06a232db 100644
--- a/sci-geosciences/grass/grass-6.4.1-r1.ebuild
+++ b/sci-geosciences/grass/grass-6.4.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.4.1-r1.ebuild,v 1.2 2012/03/04 09:50:16 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.4.1-r1.ebuild,v 1.3 2012/04/21 09:09:00 scarabeus Exp $
EAPI=3
@@ -18,7 +18,7 @@ SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="6"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+KEYWORDS="amd64 ppc ~ppc64 x86"
IUSE="X cairo cxx ffmpeg fftw gmath jpeg motif mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets"
TCL_DEPS="
@@ -92,6 +92,7 @@ PATCHES=(
"${FILESDIR}"/${P}-libpng15.patch
"${FILESDIR}"/${P}-nopycompile.patch
"${FILESDIR}"/${P}-timer_flags.patch
+ "${FILESDIR}"/${P}-libav-0.8.patch
)
pkg_setup() {
diff --git a/sci-geosciences/grass/grass-6.4.1.ebuild b/sci-geosciences/grass/grass-6.4.1.ebuild
deleted file mode 100644
index cbb918caddf6..000000000000
--- a/sci-geosciences/grass/grass-6.4.1.ebuild
+++ /dev/null
@@ -1,320 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/grass/grass-6.4.1.ebuild,v 1.10 2012/03/04 09:50:16 jlec Exp $
-
-EAPI=3
-
-PYTHON_DEPEND="python? 2"
-
-inherit eutils gnome2 multilib python versionator wxwidgets base
-
-MY_PM=${PN}$(get_version_component_range 1-2 ${PV})
-MY_PM=${MY_PM/.}
-MY_P=${P/_rc/RC}
-
-DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D vizualization"
-HOMEPAGE="http://grass.osgeo.org/"
-SRC_URI="http://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="6"
-KEYWORDS="amd64 ppc ~ppc64 x86"
-IUSE="X cairo cxx ffmpeg fftw gmath jpeg motif mysql nls odbc opengl png postgres python readline sqlite tiff truetype wxwidgets"
-
-TCL_DEPS="
- >=dev-lang/tcl-8.5
- >=dev-lang/tk-8.5"
-
-RDEPEND="
- >=app-admin/eselect-1.2
- sci-libs/gdal
- sci-libs/proj
- sys-libs/gdbm
- sys-libs/ncurses
- sys-libs/zlib
- cairo? ( x11-libs/cairo[X?,opengl?] )
- ffmpeg? ( virtual/ffmpeg )
- fftw? ( sci-libs/fftw:3.0 )
- gmath? (
- virtual/blas
- virtual/lapack
- )
- jpeg? ( virtual/jpeg )
- mysql? ( virtual/mysql )
- odbc? ( dev-db/unixODBC )
- png? ( media-libs/libpng )
- postgres? ( >=dev-db/postgresql-base-8.4 )
- readline? ( sys-libs/readline )
- sqlite? ( dev-db/sqlite:3 )
- tiff? ( media-libs/tiff )
- truetype? ( media-libs/freetype:2 )
- X? (
- x11-libs/libICE
- x11-libs/libSM
- x11-libs/libX11
- x11-libs/libXaw
- x11-libs/libXext
- x11-libs/libXmu
- x11-libs/libXp
- x11-libs/libXpm
- x11-libs/libXt
- motif? (
- >=x11-libs/openmotif-2.3:0
- opengl? (
- || (
- media-libs/mesa[motif]
- ( media-libs/mesa x11-libs/libGLw ) ) )
- )
- opengl? (
- virtual/opengl
- ${TCL_DEPS}
- )
- python? ( wxwidgets? ( >=dev-python/wxpython-2.8.10.1[cairo,opengl?] ) )
- !python? ( ${TCL_DEPS} )
- !wxwidgets? ( ${TCL_DEPS} )
- )"
-
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- sys-devel/flex
- sys-devel/gettext
- sys-devel/bison
- X? (
- x11-proto/xextproto
- x11-proto/xproto
- python? ( wxwidgets? ( dev-lang/swig ) )
- )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-pkgconf.patch
- "${FILESDIR}"/${P}-libpng15.patch
- "${FILESDIR}"/${P}-nopycompile.patch
- "${FILESDIR}"/${P}-timer_flags.patch
-)
-
-pkg_setup() {
- local myblas
-
- # check correct gmath profiles (this must sadly die)
- if use gmath; then
- for d in $(eselect lapack show); do myblas=${d}; done
- if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
- ewarn "You need to set lapack to atlas or reference. Do:"
- ewarn " eselect lapack set <impl>"
- ewarn "where <impl> is atlas, threaded-atlas or reference"
- die "setup failed"
- fi
- for d in $(eselect blas show); do myblas=${d}; done
- if [[ -z "${myblas/reference/}" ]] && [[ -z "${myblas/atlas/}" ]]; then
- ewarn "You need to set blas to atlas or reference. Do:"
- ewarn " eselect blas set <impl>"
- ewarn "where <impl> is atlas, threaded-atlas or reference"
- die "setup failed"
- fi
- fi
-
- # check useflag nesting.
- use motif && ! use X && ewarn "For motif support X useflag must be enabled"
- use opengl && ! use X && ewarn "For opengl support X useflag must be enabled"
- use wxwidgets && ! use X && ewarn "For wxwidgets support X useflag must be enabled"
- use wxwidgets && ! use python && ewarn "For wxwidgets support python useflag must be enabled"
-
- if use python; then
- # only py2 is supported
- python_set_active_version 2
- fi
-}
-
-src_prepare() {
- use opengl || epatch "${FILESDIR}"/${PN}-6.4.0-html-nonviz.patch
- base_src_prepare
-}
-
-src_configure() {
- local myconf TCL_LIBDIR
-
- if use X; then
- TCL_LIBDIR="/usr/$(get_libdir)/tcl8.5"
- myconf+="
- --with-tcltk-libs=${TCL_LIBDIR}
- $(use_with motif)
- $(use_with opengl)
- --with-x
- "
-
- if use python && use wxwidgets; then
- WX_BUILD=yes
- WX_GTK_VER=2.8
- need-wxwidgets unicode
- myconf+="
- --without-tcltk
- --with-wxwidgets=${WX_CONFIG}
- "
- else
- WX_BUILD=no
- # use tcl gui if wxwidgets are disabled
- myconf+="
- --with-tcltk
- --without-wxwidgets
- "
- fi
-
- use opengl && myconf+=" --with-tcltk"
- use motif && use opengl && myconf+=" --with-glw"
- use motif || myconf+=" --without-glw"
- else
- myconf+="
- --without-opengl
- --without-glw
- --without-tcltk
- --without-wxwidgets
- --without-x
- "
- fi
-
- econf \
- --with-gdal=$(type -P gdal-config) \
- --with-curses \
- --with-proj \
- --with-proj-share="/usr/share/proj/" \
- --without-glw \
- --enable-shared \
- $(use_enable amd64 64bit) \
- $(use_enable ppc64 64bit) \
- $(use_with cairo) \
- $(use_with cxx) \
- $(use_with fftw) \
- $(use_with ffmpeg) \
- --with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavdevice /usr/include/libavfilter /usr/include/libavformat /usr/include/libavutil /usr/include/libpostproc /usr/include/libswscale" \
- $(use_with gmath blas) \
- $(use_with gmath lapack) \
- $(use_with jpeg) \
- $(use_with mysql) \
- --with-mysql-includes=/usr/include/mysql \
- --with-mysql-libs=/usr/$(get_libdir)/mysql \
- $(use_with nls) \
- $(use_with odbc) \
- $(use_with png) \
- $(use_with postgres) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with sqlite) \
- $(use_with tiff) \
- $(use_with truetype freetype) \
- --with-freetype-includes="/usr/include/freetype2/" \
- --enable-largefile \
- ${myconf}
-}
-
-src_compile() {
- # we don't want to link against embeded mysql lib
- base_src_compile MYSQLDLIB=""
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- INST_DIR="${D}"/usr/${MY_PM} \
- prefix="${D}"/usr BINDIR="${D}"/usr/bin \
- PREFIX="${D}"/usr/ \
- install || die
-
- pushd "${D}"/usr/${MY_PM} &> /dev/null
-
- # fix docs
- dodoc AUTHORS CHANGES || die
- dohtml -r docs/html/* || die
- rm -rf docs/ || die
- rm -rf {AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} || die
-
- # manuals
- dodir /usr/share/man/man1 || die
- mv man/man1/* "${D}"/usr/share/man/man1/ || die
- rm -rf man/ || die
-
- # translations
- if use nls; then
- dodir /usr/share/locale/ || die
- mv locale/* "${D}"/usr/share/locale/ || die
- rm -rf locale/ || die
- # pt_BR is broken
- mv "${D}"/usr/share/locale/pt_br "${D}"/usr/share/locale/pt_BR || die
- fi
-
- popd &> /dev/null
-
- # place libraries where they belong
- mv "${D}"/usr/${MY_PM}/lib/ "${D}"/usr/$(get_libdir)/ || die
-
- # place header files where they belong
- mv "${D}"/usr/${MY_PM}/include/ "${D}"/usr/include/ || die
- # make rules are not required on installed system
- rm -rf "${D}"/usr/include/Make || die
-
- # mv remaining gisbase stuff to libdir
- mv "${D}"/usr/${MY_PM} "${D}"/usr/$(get_libdir) || die
-
- # set proper default window renderer
- if [[ ${WX_BUILD} == yes ]]; then
- sed -i \
- -e "1,\$s:^DEFAULT_GUI.*:DEFAULT_GUI=\"wxpython\":" \
- "${D}"/usr/$(get_libdir)/${MY_PM}/etc/Init.sh || die
- fi
-
- # get proper folder for grass path in script
- sed -i \
- -e "1,\$s:^GISBASE.*:GISBASE=/usr/$(get_libdir)/${MY_PM}:" \
- "${D}"usr/bin/${MY_PM} || die
-
- # get proper fonts path for fontcap
- sed -i \
- -e "s|${D}/usr/${MY_PM}|/usr/$(get_libdir)/${MY_PM}|" \
- "${D}"/usr/$(get_libdir)/${MY_PM}/etc/fontcap || die
-
- if use X; then
- generate_files
- doicon gui/icons/${PN}-48x48.png || die
- domenu ${MY_PM}-grass.desktop || die
- fi
-
- # install .pc file so other apps know where to look for grass
- insinto /usr/$(get_libdir)/pkgconfig/
- doins grass.pc || die
-
- # fix weird +x on tcl scripts
- find "${D}" -name "*.tcl" -exec chmod +r-x '{}' \;
-}
-
-pkg_postinst() {
- if use X; then
- fdo-mime_desktop_database_update
- gnome2_icon_cache_update
- fi
-}
-
-pkg_postrm() {
- if use X; then
- fdo-mime_desktop_database_update
- gnome2_icon_cache_update
- fi
-}
-
-generate_files() {
- local GUI="-gui"
- [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
-
- cat <<-EOF > ${MY_PM}-grass.desktop
- [Desktop Entry]
- Encoding=UTF-8
- Version=1.0
- Name=Grass ${PV}
- Type=Application
- Comment=GRASS (Geographic Resources Analysis Support System), the original GIS.
- Exec=${TERM} -T Grass -e /usr/bin/${MY_PM} ${GUI}
- Path=
- Icon=${PN}-48x48.png
- Categories=Science;Education;
- Terminal=false
-EOF
-}