mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-19 15:58:56 -04:00
media-plugins/gimp-gap: try fix #1392
update EAPI 7 -> 8 Signed-off-by: liuyujielol <2073201758GD@gmail.com>
This commit is contained in:
parent
228abcc3f4
commit
b689fb1f54
@ -1 +1 @@
|
||||
DIST gap-2-8.zip 13844038 BLAKE2B 8eb19178da9ce96567ddd272ad27dc8edc922970c58ea58ad089255612cc558b907dba60360179af83e5360c33ad20e22b2f09b80327feb16410a8570605ea8f SHA512 69cf173773ceba29bcc089da791c09d7e33deac6aa2a15d9a63762376eda336d0f8831cba39dddc6b87fa05e37654ab1641e0123da84ce617c9096717281f7f0
|
||||
DIST gimp-gap-gap-2-8.tar.bz2 11642215 BLAKE2B e08264da325506c2ee246fc6cc3f1e1c2308fba2bd0ed2aca0534f7700f973142b73ad88fe35a01fa8da4958559f6ed85dc0527e736e125430869a0669559c8e SHA512 9ed7f81cc6ee69a83b6dbaf80e6afdd22a9646a2be6006497bd81d297de1ce3af0bc6496ed5f2ab5ada99f1a4ff7ca642d3182dcc61ed0cd8bffbb45c7ba4052
|
||||
|
@ -0,0 +1,76 @@
|
||||
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
|
||||
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Sun, 16 Jul 2023 18:18:02 +0300
|
||||
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
|
||||
instructions within inline assembly
|
||||
|
||||
Fixes assembling with binutil as >= 2.41
|
||||
|
||||
Signed-off-by: James Almer <jamrial@gmail.com>
|
||||
---
|
||||
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
|
||||
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
|
||||
index 6298f5ed19..ca7e2dffc1 100644
|
||||
--- a/libavcodec/x86/mathops.h
|
||||
+++ b/libavcodec/x86/mathops.h
|
||||
@@ -35,12 +35,20 @@
|
||||
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
|
||||
{
|
||||
int rt, dummy;
|
||||
+ if (__builtin_constant_p(shift))
|
||||
__asm__ (
|
||||
"imull %3 \n\t"
|
||||
"shrdl %4, %%edx, %%eax \n\t"
|
||||
:"=a"(rt), "=d"(dummy)
|
||||
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
|
||||
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ (
|
||||
+ "imull %3 \n\t"
|
||||
+ "shrdl %4, %%edx, %%eax \n\t"
|
||||
+ :"=a"(rt), "=d"(dummy)
|
||||
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
|
||||
+ );
|
||||
return rt;
|
||||
}
|
||||
|
||||
@@ -113,19 +121,31 @@ __asm__ volatile(\
|
||||
// avoid +32 for shift optimization (gcc should do that ...)
|
||||
#define NEG_SSR32 NEG_SSR32
|
||||
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
|
||||
+ if (__builtin_constant_p(s))
|
||||
__asm__ ("sarl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
- : "ic" ((uint8_t)(-s))
|
||||
+ : "i" (-s & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ ("sarl %1, %0\n\t"
|
||||
+ : "+r" (a)
|
||||
+ : "c" ((uint8_t)(-s))
|
||||
+ );
|
||||
return a;
|
||||
}
|
||||
|
||||
#define NEG_USR32 NEG_USR32
|
||||
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
|
||||
+ if (__builtin_constant_p(s))
|
||||
__asm__ ("shrl %1, %0\n\t"
|
||||
: "+r" (a)
|
||||
- : "ic" ((uint8_t)(-s))
|
||||
+ : "i" (-s & 0x1F)
|
||||
);
|
||||
+ else
|
||||
+ __asm__ ("shrl %1, %0\n\t"
|
||||
+ : "+r" (a)
|
||||
+ : "c" ((uint8_t)(-s))
|
||||
+ );
|
||||
return a;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,37 +1,68 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
|
||||
MY_PV=$(ver_cut 1)-$(ver_cut 2)
|
||||
DESCRIPTION="Gimp Animation Package"
|
||||
SRC_URI="https://github.com/GNOME/gimp-gap/archive/refs/heads/gap-${MY_PV}.zip"
|
||||
SRC_URI="https://gitlab.gnome.org/Archive/gimp-gap/-/archive/gap-${MY_PV}/gimp-gap-gap-${MY_PV}.tar.bz2"
|
||||
HOMEPAGE="http://www.gimp.org/"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
IUSE="mpeg xanim wavplay sox mp3 mplayer"
|
||||
IUSE="mpeg mp3"
|
||||
|
||||
S=${WORKDIR}/${PN}-gap-${MY_PV}
|
||||
S="${WORKDIR}/${PN}-gap-${MY_PV}"
|
||||
|
||||
DEPEND=">=media-gfx/gimp-2.8
|
||||
mpeg? ( media-libs/xvid )"
|
||||
RDEPEND="${DEPEND}
|
||||
wavplay? ( >=media-sound/wavplay-1.4 )
|
||||
mplayer? ( media-video/mplayer )
|
||||
xanim? ( >=media-video/xanim-2.80.1 )
|
||||
sox? ( >=media-sound/sox-12.17 )
|
||||
mp3? ( >=media-sound/lame-3.9 )"
|
||||
DEPEND="
|
||||
>=media-gfx/gimp-2.8
|
||||
mpeg? ( media-libs/xvid )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
app-arch/lbzip2
|
||||
media-libs/faac
|
||||
media-libs/faad2
|
||||
media-libs/x264
|
||||
mp3? ( >=media-sound/lame-3.9 )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
eaclocal
|
||||
eautoheader
|
||||
eautomake
|
||||
eautoconf
|
||||
einfo "Running glib-gettextize --force"
|
||||
glib-gettextize --force || die
|
||||
einfo "intltoolize --force --automake"
|
||||
intltoolize --force --automake || die
|
||||
|
||||
default
|
||||
|
||||
bsdtar -xf extern_libs/ffmpeg.tar.gz -C extern_libs || die
|
||||
# fix building with binutil >= 2.41
|
||||
# https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb
|
||||
patch -Np1 -i "${FILESDIR}/gimp-gap-2.8-fix-build-for-bundled-ffmpeg.patch" -d extern_libs/ffmpeg || die
|
||||
mv -v "${S}"/configure.{ac,in} || die
|
||||
# fix library linking order
|
||||
sed -i 's/$FFMPEG_LIBAVUTIL_A $FFMPEG_LIBSWSCALE_A/$FFMPEG_LIBSWSCALE_A $FFMPEG_LIBAVUTIL_A/' configure.in || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# anything other than -j1 might fail
|
||||
emake -j1
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
./autogen.sh --prefix=/usr --disable-libmpeg3 --disable-gui-thread-support || die "autogen.sh failed"
|
||||
export LIBS='-lm'
|
||||
econf --with-ffmpegsrcdir="${S}"/extern_libs/ffmpeg
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make DESTDIR="${D}" install || die "install failed"
|
||||
make DESTDIR="${ED}" install || die "install failed"
|
||||
dodoc AUTHORS ChangeLog* NEWS README
|
||||
docinto howto
|
||||
dodoc docs/howto/txt/*.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user