Overview

Request 6101 (accepted)

reenable build on ARM by using a newer compiler

Submit package Staging / x265 to package Essentials / x265

x265.spec Changed
x
 
1
@@ -30,11 +30,20 @@
2
 URL:            https://bitbucket.org/multicoreware/x265_git
3
 Source0:        https://bitbucket.org/multicoreware/x265_git/downloads/%{name}_%{version}.tar.gz
4
 Patch1:         x265.pkgconfig.patch
5
-Patch2:         x265-fix_enable512.patch
6
 Patch3:         0001-Fix-arm-flags.patch
7
 Patch4:         0004-Do-not-build-with-assembly-support-on-arm.patch
8
-BuildRequires:  cmake >= 2.8.8
9
+BuildRequires:  cmake
10
+%if 0%{?suse_version} > 1500
11
 BuildRequires:  gcc-c++
12
+%else
13
+%if 0%{?sle_version} > 150500
14
+BuildRequires:  gcc13
15
+BuildRequires:  gcc13-c++
16
+%else
17
+BuildRequires:  gcc10
18
+BuildRequires:  gcc10-c++
19
+%endif
20
+%endif
21
 BuildRequires:  nasm >= 2.13
22
 BuildRequires:  pkgconfig
23
 %ifarch x86_64
24
@@ -73,16 +82,27 @@
25
 streams.
26
 
27
 %prep
28
-%setup -q -n %{name}_%{version}
29
-%autopatch -p1
30
+%autosetup -p1 -n %{name}_%{version}
31
 
32
+%build
33
+test -x "$(type -p gcc)"    && CC="$_"
34
+test -x "$(type -p g++)"    && CXX="$_"
35
+test -x "$(type -p gcc-10)" && CC="$_"
36
+test -x "$(type -p g++-10)" && CXX="$_"
37
+test -x "$(type -p gcc-13)" && CC="$_"
38
+test -x "$(type -p g++-13)" && CXX="$_"
39
+export CC="$(readlink -f ${CC})"
40
+export CXX="$(readlink -f ${CXX})"
41
+CFLAGS='%optflags -Wno-misleading-indentation -Wno-unused-parameter -Wno-unused-variable'
42
+CXXFLAGS='%optflags -Wno-misleading-indentation -Wno-unused-parameter -Wno-unused-variable'
43
 # set the version by hand
44
-sed -i "/^include(Version)/d" source/CMakeLists.txt
45
+sed -i~ "/^include(Version)/d" source/CMakeLists.txt
46
+diff -u "$_"~ "$_" && exit 1
47
 # force version number in the soname
48
-sed -i 's/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus-%{version}/' \
49
+sed -i~ 's/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus-%{version}/' \
50
        source/CMakeLists.txt
51
+diff -u "$_"~ "$_" && exit 1
52
 
53
-%build
54
 SOURCE_DIR="$PWD"/source
55
 COMMON_FLAGS="-DENABLE_TESTS=OFF -DENABLE_PIC=ON -Wno-dev"
56
 HIGH_BIT_DEPTH_FLAGS="-DENABLE_CLI=OFF -DENABLE_SHARED=OFF -DEXPORT_C_API=OFF -DHIGH_BIT_DEPTH=ON"
57
x265-fix_enable512.patch Deleted
28
 
1
@@ -1,26 +0,0 @@
2
---- a/source/common/cpu.cpp
3
-+++ b/source/common/cpu.cpp
4
-@@ -110,6 +110,11 @@ const cpu_name_t cpu_names =
5
-     { "", 0 },
6
- };
7
- 
8
-+bool detect512()
9
-+{
10
-+    return(enable512);
11
-+}
12
-+
13
- #if X265_ARCH_X86
14
- 
15
- extern "C" {
16
-@@ -123,11 +128,6 @@ uint64_t PFX(cpu_xgetbv)(int xcr);
17
- #pragma warning(disable: 4309) // truncation of constant value
18
- #endif
19
- 
20
--bool detect512()
21
--{
22
--    return(enable512);
23
--}
24
--
25
- uint32_t cpu_detect(bool benableavx512 )
26
- {
27
- 
28
Refresh
Refresh
Request History
Olaf Hering's avatar

olh created request 6 months ago

reenable build on ARM by using a newer compiler


Olaf Hering's avatar

olh accepted request 6 months ago