--- /dev/null
+--- x265_1.8/source/cmake/CMakeASM_YASMInformation.cmake.orig 2015-09-22 10:10:07.000000000 +0200
++++ x265_1.8/source/cmake/CMakeASM_YASMInformation.cmake 2015-10-15 19:39:50.517926648 +0200
+@@ -9,7 +9,11 @@
+ if(APPLE)
+ set(ARGS -f macho64 -m amd64 -DPREFIX)
+ elseif(UNIX AND NOT CYGWIN)
++ if("${LIB_SUFFIX}" STREQUAL "x32")
++ set(ARGS -f elfx32)
++ else()
+ set(ARGS -f elf64 -m amd64)
++ endif()
+ else()
+ set(ARGS -f win64 -m amd64)
+ endif()
+@@ -18,7 +22,11 @@
+ if(APPLE)
+ set(ARGS -f macho -DPREFIX)
+ elseif(UNIX AND NOT CYGWIN)
++ if("${LIB_SUFFIX}" STREQUAL "x32")
++ set(ARGS -f elfx32)
++ else()
+ set(ARGS -f elf32)
++ endif()
+ else()
+ set(ARGS -f win32 -DPREFIX)
+ endif()
+--- x265_1.8/source/CMakeLists.txt.orig 2015-10-15 19:40:25.743090176 +0200
++++ x265_1.8/source/CMakeLists.txt 2015-10-15 19:49:47.715621913 +0200
+@@ -48,7 +48,7 @@
+ message(STATUS "Detected x86 target processor")
+ set(X86 1)
+ add_definitions(-DX265_ARCH_X86=1)
+- if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
++ if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8 OR "${LIB_SUFFIX}" STREQUAL "x32")
+ set(X64 1)
+ add_definitions(-DX86_64=1)
+ endif()
# Conditional build:
%bcond_without asm # x86 assembler
-%ifnarch %{ix86} %{x8664}
+%ifnarch %{ix86} %{x8664} x32
%undefine with_asm
%endif
Source0: http://ftp.videolan.org/pub/videolan/x265/%{name}_%{version}.tar.gz
# Source0-md5: 72005f2c0acda56913c0eae4562dc5ad
Patch0: %{name}-opt.patch
+Patch1: %{name}-x32.patch
URL: http://x265.org/
BuildRequires: cmake >= 2.8.8
BuildRequires: libstdc++-devel
%prep
%setup -q -n %{name}_%{version}
%patch0 -p1
+%patch1 -p1
%build
install -d source/build