[packages/openHEVC] - initial

qboosh qboosh at pld-linux.org
Tue Apr 16 18:05:40 CEST 2024


commit 50443f5e220f74cd8c538522245500b7a6adefc8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 16 17:36:35 2024 +0200

    - initial

 openHEVC-asm.patch    | 20 ++++++++++++++
 openHEVC-sysctl.patch | 10 +++++++
 openHEVC.spec         | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 105 insertions(+)
---
diff --git a/openHEVC.spec b/openHEVC.spec
new file mode 100644
index 0000000..c68456e
--- /dev/null
+++ b/openHEVC.spec
@@ -0,0 +1,75 @@
+Summary:	HEVC decoder
+Summary(pl.UTF-8):	Dekoder HEVC
+Name:		openHEVC
+Version:	2.0
+Release:	1
+License:	LGPL v2.1+
+Group:		Libraries
+#Source0Download: https://github.com/OpenHEVC/openHEVC/tags
+Source0:	https://github.com/OpenHEVC/openHEVC/archive/openhevc-%{version}/%{name}-openhevc-%{version}.tar.gz
+# Source0-md5:	efc4e49ef9b0ba87ff6eb60d2ea3e1d8
+Patch0:		%{name}-sysctl.patch
+Patch1:		%{name}-asm.patch
+URL:		https://github.com/OpenHEVC/openHEVC
+BuildRequires:	SDL2-devel >= 2.0
+BuildRequires:	cmake >= 2.8
+BuildRequires:	yasm
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+openHEVC is a fork of Libav with only the files needed to decode HEVC
+content, it was created for research purposes.
+
+%description -l pl.UTF-8
+openHEVC do odgałęzienie Libav zawierające tylko pliki potrzebne do
+dekodowania treści HEVC, stworzone do celów badawczych.
+
+%package devel
+Summary:	Header files for openHEVC library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki openHEVC
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for openHEVC library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki openHEVC.
+
+%prep
+%setup -q -n %{name}-openhevc-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+install -d build
+cd build
+%ifarch %{ix86}
+CFLAGS="%{rpmcflags} -DX86_32"
+%endif
+%cmake ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_libdir}/libLibOpenHevcWrapper.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/hevcdsp.h
+%{_includedir}/hevcpred.h
+%{_includedir}/openHevcWrapper.h
diff --git a/openHEVC-asm.patch b/openHEVC-asm.patch
new file mode 100644
index 0000000..0c3f085
--- /dev/null
+++ b/openHEVC-asm.patch
@@ -0,0 +1,20 @@
+--- openHEVC-openhevc-2.0/./libavcodec/x86/mathops.h.orig	2017-10-04 15:08:10.000000000 +0200
++++ openHEVC-openhevc-2.0/./libavcodec/x86/mathops.h	2024-04-15 20:37:15.821632022 +0200
+@@ -122,10 +122,16 @@ static inline  int32_t NEG_SSR32( int32_
+ 
+ #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;
+ }
+ 
diff --git a/openHEVC-sysctl.patch b/openHEVC-sysctl.patch
new file mode 100644
index 0000000..69b41f6
--- /dev/null
+++ b/openHEVC-sysctl.patch
@@ -0,0 +1,10 @@
+--- openHEVC-openhevc-2.0/libavutil/cpu.c.orig	2017-10-04 15:08:10.000000000 +0200
++++ openHEVC-openhevc-2.0/libavutil/cpu.c	2024-04-15 20:33:33.846167899 +0200
+@@ -39,7 +39,6 @@
+ #include <sys/param.h>
+ #endif
+ #include <sys/types.h>
+-#include <sys/sysctl.h>
+ #endif
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openHEVC.git/commitdiff/50443f5e220f74cd8c538522245500b7a6adefc8



More information about the pld-cvs-commit mailing list