commit:     182bb7a92d0e6fc1f0bc32546d53d12f40d86215
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 15 07:25:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 15 07:25:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=182bb7a9

media-video/mplayer: add 1.5_p20230215 (snapshot for >=ffmpeg-5, unkw'd for now)

Unkeyworded until had some more testing (please let us know in a comment
on one of the linked bugs if it works/doesn't).

Bug: https://bugs.gentoo.org/876760
Bug: https://bugs.gentoo.org/888821
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/mplayer/Manifest                       |  1 +
 media-video/mplayer/files/prepare_mplayer.sh       | 42 +++++++++++++---------
 ...er-9999.ebuild => mplayer-1.5_p20230215.ebuild} | 16 +++++----
 media-video/mplayer/mplayer-9999.ebuild            | 10 ++++--
 4 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index a97a4832bde1..9fb82b326254 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -2,3 +2,4 @@ DIST MPlayer-1.5.tar.xz 15379972 BLAKE2B 
33c09025a9c521e1bc09a50fabb04e89493cbc4
 DIST font-arial-cp1250.tar.bz2 249705 BLAKE2B 
eb4366a110d917dc975b8add168ab43b1e8a0db7342647f69f5421fc1170719015c97ffa770e89892cbb4cee8e5b2fb74a4772c8f6cbef9606ee12c3746d78c9
 SHA512 
4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340
 DIST font-arial-iso-8859-1.tar.bz2 234242 BLAKE2B 
0671854e1a257d27b502affb59de681942a93990d3ac2575bbf1a6dd9eef026969f2f9ce4e9c11a68ea3d8aed48063f826a1e153f7468437a39791672c92a5d0
 SHA512 
a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029
 DIST font-arial-iso-8859-2.tar.bz2 222208 BLAKE2B 
94b1a04672bf9b4b20a0e6981591e761f751bd637deddcb801855296c525bf3b5e8feb1cb11cef282c0269f2c963ded22846089076e7e6763f258b8a932af454
 SHA512 
5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d
+DIST mplayer-1.5_p20230215.tar.xz 15454028 BLAKE2B 
08012f9b955921d832ab268a6e52e22e018b669787ff5e1c1ac734bd85083138551ad1065d5e4f5f9c977b804f8135ee89d2fd0590fb7228d4916b458cc58efa
 SHA512 
f93d222817ff59ac7708956d6e8d5e9ee2084b4e724f66ea9fe4ffd477b864c2d0546d8df97511d499495ee446239645216a1e027d70eed434a3c64331f5ac73

diff --git a/media-video/mplayer/files/prepare_mplayer.sh 
b/media-video/mplayer/files/prepare_mplayer.sh
index 57d47425689f..88ae8773cea8 100644
--- a/media-video/mplayer/files/prepare_mplayer.sh
+++ b/media-video/mplayer/files/prepare_mplayer.sh
@@ -1,25 +1,35 @@
-#!/bin/sh
+#!/usr/bin/env bash
+. /lib/gentoo/functions.sh || { echo "Failed to source gentoo-functions!" ; 
exit 1 ; }
 VERSION=$(date +%Y%m%d)
-PACKAGE="mplayer-1.2_pre${VERSION}"
-DUMP_FFMPEG="$(dirname $0)/dump_ffmpeg.sh"
+PACKAGE="mplayer-1.5_p${VERSION}"
+DUMP_FFMPEG="$(realpath $(dirname $0)/dump_ffmpeg.sh)"
 
+ebegin "Fetching mplayer from svn"
 svn checkout svn://svn.mplayerhq.hu/mplayer/trunk ${PACKAGE}
+eend $?
 
-pushd ${PACKAGE} > /dev/null
-       # ffmpeg is in git now so no svn external anymore
-       rm -rf ffmpeg
-       git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg/
-        sh "$DUMP_FFMPEG"
-       STORE_VERSION=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut 
-d' ' -f2)
-       printf "$STORE_VERSION" > snapshot_version
-popd > /dev/null
+pushd ${PACKAGE} > /dev/null || { eerror "Moving to ${PACKAGE} dir failed!" ; 
exit 1 ; }
+        # ffmpeg is in git now so no svn external anymore
+        rm -rf ffmpeg
+
+        ebegin "Cloning ffmpeg from git"
+        git clone https://git.ffmpeg.org/ffmpeg.git
+        eend $?
+
+        einfo "Extracting version"
+        # This should be fatal but it hasn't been fatal in the live ebuild
+        # for years and it needs fixing, so...
+        bash "${DUMP_FFMPEG}" || ewarn "Dumping ffmpeg failed!"
+        STORE_VERSION=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut 
-d' ' -f2)
+       printf "${STORE_VERSION}" > snapshot_version
+        einfo "Got version ${STORE_VERSION}"
+popd > /dev/null || { eerror "Returning to previous dir failed!" ; exit 1 ; }
 
 find "${PACKAGE}" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf
 find "${PACKAGE}" -type d -name '.git' -prune -print0 | xargs -0 rm -rf
 
-tar cJf ${PACKAGE}.tar.xz ${PACKAGE}
-rm -rf ${PACKAGE}/
-
-echo "Tarball: \"${PACKAGE}.tar.xz\""
+tar --exclude-vcs -cJf ${PACKAGE}.tar.xz ${PACKAGE} || { eerror "Tar creation 
failed! Error: $?" ; exit 1 ; }
+rm -rf ${PACKAGE}/ || { eerror "Removal of ${PACKAGE}? failed! Error: $?" ; 
exit 1 ; }
 
-echo "** all done **"
+einfo "Tarball: \"${PACKAGE}.tar.xz\""
+einfo "** all done **"

diff --git a/media-video/mplayer/mplayer-9999.ebuild 
b/media-video/mplayer/mplayer-1.5_p20230215.ebuild
similarity index 96%
copy from media-video/mplayer/mplayer-9999.ebuild
copy to media-video/mplayer/mplayer-1.5_p20230215.ebuild
index c938cefbf668..b74a6e409f8e 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-1.5_p20230215.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,12 +11,16 @@ if [[ ${PV} == *9999* ]]; then
        RELEASE_URI=""
 
        inherit subversion git-r3
-elif [[ "${PV%_rc*}" == "${PV}" && "${PV%_pre*}" == "${PV}" ]]; then
+elif [[ "${PV%_rc*}" == "${PV}" && "${PV%_pre*}" == "${PV}" && "${PV%_p*}" == 
"${PV}" ]]; then
        MY_P="MPlayer-${PV}"
        S="${WORKDIR}/${MY_P}"
        RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
 else
-       RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+       # If necessary, don't be afraid to make a snapshot.
+       # http://www.mplayerhq.hu/design7/dload.html says:
+       # "We recommend to always use the latest SVN to get the all the new
+       # features and bugfixes, especially if the release date above looks 
old."
+       
RELEASE_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz";
 fi
 
 FONT_URI="
@@ -161,9 +165,9 @@ RDEPEND+="selinux? ( sec-policy/selinux-mplayer )"
 
 LICENSE="GPL-2"
 SLOT="0"
-if [[ ${PV} != *9999* ]]; then
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv 
~sparc ~x86"
-fi
+#if [[ ${PV} != *9999* ]]; then
+#      KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv 
~sparc ~x86"
+#fi
 
 # faac codecs are nonfree
 # libcdio support: prefer libcdio over cdparanoia and don't check for cddb 
w/cdio

diff --git a/media-video/mplayer/mplayer-9999.ebuild 
b/media-video/mplayer/mplayer-9999.ebuild
index c938cefbf668..31de25e10b42 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,12 +11,16 @@ if [[ ${PV} == *9999* ]]; then
        RELEASE_URI=""
 
        inherit subversion git-r3
-elif [[ "${PV%_rc*}" == "${PV}" && "${PV%_pre*}" == "${PV}" ]]; then
+elif [[ "${PV%_rc*}" == "${PV}" && "${PV%_pre*}" == "${PV}" && "${PV%_p*}" == 
"${PV}" ]]; then
        MY_P="MPlayer-${PV}"
        S="${WORKDIR}/${MY_P}"
        RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
 else
-       RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+       # If necessary, don't be afraid to make a snapshot.
+       # http://www.mplayerhq.hu/design7/dload.html says:
+       # "We recommend to always use the latest SVN to get the all the new
+       # features and bugfixes, especially if the release date above looks 
old."
+       
RELEASE_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz";
 fi
 
 FONT_URI="

Reply via email to