# ChangeLog for media-video/ogmrip
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ogmrip/ChangeLog,v 1.10 2006/10/08 13:03:48 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ogmrip/ChangeLog,v 1.11 2006/10/23 04:56:19 beandog Exp $
+
+*ogmrip-0.10.0_rc4 (23 Oct 2006)
+
+ 23 Oct 2006; Steve Dibb <beandog@gentoo.org>
+ -files/ogmrip-0.9.0-gcc4.patch, -files/ogmrip-0.9.0-lang.patch,
+ -files/ogmrip-0.9.0-mplayercvs.patch, -files/ogmrip-0.9.0-types.patch,
+ +files/ogmrip-0.10.0_rc4-amd64.patch, +ogmrip-0.10.0_rc4.ebuild:
+ Version bump, remove old patches
08 Oct 2006; Markus Rothe <corsair@gentoo.org> ogmrip-0.10.0_rc3.ebuild:
Added ~ppc64
--- /dev/null
+Index: libogmrip/ogmrip-backend.c
+===================================================================
+--- libogmrip/ogmrip-backend.c (révision 843)
++++ libogmrip/ogmrip-backend.c (copie de travail)
+@@ -406,8 +406,7 @@
+ gdouble
+ ogmrip_backend_dvdcpy_watch (OGMJobExec *exec, const gchar *buffer, OGMRipVideo *video)
+ {
+- size_t bytes, total;
+- guint percent;
++ guint bytes, total, percent;
+
+ if (sscanf (buffer, "%u/%u blocks written (%u%%)", &bytes, &total, &percent) == 3)
+ return percent / 100.;
+@@ -1378,8 +1377,12 @@
+ GPtrArray *argv;
+
+ const gchar *device;
+- gint vid, sstep;
++ gint vid;
+
++#if MPLAYER_PRE >= 8
++ gint sstep;
++#endif
++
+ g_return_val_if_fail (OGMRIP_IS_VIDEO (video), NULL);
+
+ title = ogmrip_codec_get_input (OGMRIP_CODEC (video));
+Index: libogmrip/ogmrip-container.c
+===================================================================
+--- libogmrip/ogmrip-container.c (révision 843)
++++ libogmrip/ogmrip-container.c (copie de travail)
+@@ -563,12 +563,15 @@
+ ogmrip_container_get_audio_overhead (OGMRipContainer *container, OGMRipContainerChild *child)
+ {
+ glong length;
+- gint samples_per_frame, bitrate = 0;
++ gint samples_per_frame, sample_rate;
++ guint numerator, denominator;
+
+ length = ogmrip_codec_get_length (child->codec, NULL);
++ sample_rate = ogmrip_audio_get_sample_rate (OGMRIP_AUDIO (child->codec));
+ samples_per_frame = ogmrip_audio_get_samples_per_frame (OGMRIP_AUDIO (child->codec));
++ ogmrip_codec_get_framerate (OGMRIP_CODEC (child->codec), &numerator, &denominator);
+
+- return (gint64) length * bitrate * container->priv->overhead / (gdouble) samples_per_frame;
++ return (gint64) length * sample_rate * denominator * container->priv->overhead / (gdouble) (samples_per_frame * numerator);
+ }
+
+ static gint64
+Index: src/ogmrip-main.c
+===================================================================
+--- src/ogmrip-main.c (révision 843)
++++ src/ogmrip-main.c (copie de travail)
+@@ -690,8 +690,10 @@
+ * The mp4 container's implementation in mencoder does not support b frames
+ * This should be automated in libogmrip
+ */
++#ifdef HAVE_LAVF_SUPPORT
+ if (encode->container == OGMRIP_TYPE_MP4)
+ ogmrip_video_set_max_b_frames (OGMRIP_VIDEO (spawn), 0);
++#endif
+
+ if (encode->passes == 0)
+ result = ogmrip_main_extract_video_stream_pass (data, spawn, encode->title, 0, error);
+Index: ChangeLog
+===================================================================
+--- ChangeLog (révision 843)
++++ ChangeLog (copie de travail)
+@@ -1,3 +1,28 @@
++09 Oct 2006 Olivier Rolland <billl@users.sf.net>
++
++ * libogmrip/ogmrip-backend.c
++ * dvdcpy/dvdcpy.c
++
++ Fixed compilation on amd64
++
++ * libogmrip/ogmrip-backend.c
++
++ Fixed compilation with mplayer < 1.0pre8
++
++ * libogmrip/ogmrip-container.c
++
++ Fixed audio overhead
++
++ * src/ogmrip-main.c
++
++ Fixed compilation when mp4 is not available
++
++08 Oct 2006 Olivier Rolland <billl@users.sf.net>
++
++ * configure.in
++
++ Released OGMRip-0.10.0-rc4
++
+ 05 Oct 2006 Olivier Rolland <billl@users.sf.net>
+
+ * configure.in
+Index: dvdcpy/dvdcpy.c
+===================================================================
+--- dvdcpy/dvdcpy.c (révision 843)
++++ dvdcpy/dvdcpy.c (copie de travail)
+@@ -286,11 +286,11 @@
+ }
+
+ current_size += count;
+- fprintf (stdout, "\r%d/%d blocks written (%d%%)", current_size, total_size, current_size * 100 / total_size);
++ fprintf (stdout, "\r%zd/%zd blocks written (%zd%%)", current_size, total_size, current_size * 100 / total_size);
+ fflush (stdout);
+ }
+
+- fprintf (stdout, "\r%d/%d blocks written (%d%%)", current_size, total_size, current_size * 100 / total_size);
++ fprintf (stdout, "\r%zd/%zd blocks written (%zd%%)", current_size, total_size, current_size * 100 / total_size);
+ fflush (stdout);
+
+ return size;
+@@ -801,7 +801,7 @@
+
+ if (total_size > get_space_left (output))
+ {
+- fprintf (stderr, "Error: Not enough space left on device (%d bytes needed)\n", total_size);
++ fprintf (stderr, "Error: Not enough space left on device (%zd bytes needed)\n", total_size);
+ ifoClose (vmg_file);
+ DVDClose (reader);
+ return EXIT_FAILURE;
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ogmrip/ogmrip-0.10.0_rc4.ebuild,v 1.1 2006/10/23 04:56:19 beandog Exp $
+
+inherit gnome2 eutils
+
+MY_P=${P/_rc/-rc}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="Application and libraries for encoding DVDs into AVI/OGM/MKV files"
+HOMEPAGE="http://ogmrip.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+LICENSE="LGPL-2.1"
+
+SLOT="0"
+IUSE="aac debug gtk hal matroska spell srt theora"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND=">=dev-libs/glib-2.6
+ >=dev-libs/libxml2-2
+ >=media-libs/libdvdread-0.9.4
+ >=media-sound/lame-3.96
+ >=media-sound/ogmtools-1.4
+ >=media-sound/vorbis-tools-1.0
+ >=media-video/mplayer-1.0_pre4
+ aac? ( >=media-libs/faac-1.24 )
+ gtk? ( >=x11-libs/gtk+-2.6
+ >=gnome-base/gconf-2.6
+ >=gnome-base/libglade-2.5 )
+ hal? ( >=sys-apps/hal-0.4.2 )
+ matroska? ( >=media-video/mkvtoolnix-0.9 )
+ spell? ( >=app-text/enchant-1.1 )
+ srt? ( >=app-text/gocr-0.39 )
+ theora? ( >=media-libs/libtheora-1.0_alpha6 )"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.29
+ >=dev-util/pkgconfig-0.12.0"
+
+G2CONF="${G2CONF} \
+ $(use_enable aac aac-support) \
+ $(use_enable debug maintainer-mode) \
+ $(use_enable gtk gtk-support) \
+ $(use_enable hal hal-support) \
+ $(use_enable matroska matroska-support) \
+ $(use_enable spell enchant-support) \
+ $(use_enable srt srt-support) \
+ $(use_enable theora theora-support)"
+
+DOCS="AUTHORS ChangeLog README NEWS TODO"
+
+pkg_setup() {
+ if ! built_with_use -a media-video/mplayer dvd encode xvid; then
+ eerror "Please, check that your USE flags contain 'dvd', 'encode' and"
+ eerror "'xvid' and emerge mplayer again."
+ die "MPlayer is not built with dvd, encoding or xvid support. OGMRip" \
+ "requires dvd, encoding and xvid support in mplayer."
+ fi
+
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-amd64.patch"
+}