From 38f3e9ad619fed79add63c03adc1071394765cde Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Wed, 15 Apr 2015 12:08:48 +0000 Subject: [PATCH] update to 1.6 (ABI bump, rfbz#3593) - release tarballs are now hosted on videolan.org - drop obsolete patches --- .gitignore | 2 +- sources | 2 +- x265-detect_cpu_armhfp.patch | 12 ++++++------ x265-fix-soname.patch | 30 ----------------------------- x265-pc-path.patch | 12 ------------ x265-pic.patch | 16 ---------------- x265-test-shared.patch | 15 +++++++-------- x265.spec | 37 ++++++++++++------------------------ 8 files changed, 27 insertions(+), 99 deletions(-) delete mode 100644 x265-fix-soname.patch delete mode 100644 x265-pc-path.patch delete mode 100644 x265-pic.patch diff --git a/.gitignore b/.gitignore index e33e033..c4166af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -1.2.tar.bz2 +x265_1.6.tar.gz diff --git a/sources b/sources index e02cd0d..a7c6431 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -57a4b8300918c5412ceaa26bb8e0a0bb 1.2.tar.bz2 +32e4151f8b6a32b466b1055562ebfb4f x265_1.6.tar.gz diff --git a/x265-detect_cpu_armhfp.patch b/x265-detect_cpu_armhfp.patch index 8b99dca..0eceb4d 100644 --- a/x265-detect_cpu_armhfp.patch +++ b/x265-detect_cpu_armhfp.patch @@ -1,12 +1,12 @@ -diff -up multicoreware-x265-d6257335c537/source/CMakeLists.txt.armhfp multicoreware-x265-d6257335c537/source/CMakeLists.txt ---- multicoreware-x265-d6257335c537/source/CMakeLists.txt.armhfp 2014-09-28 11:09:31.472787489 -0400 -+++ multicoreware-x265-d6257335c537/source/CMakeLists.txt 2014-09-28 11:14:12.970136458 -0400 -@@ -45,9 +45,13 @@ if("${SYSPROC}" STREQUAL "" OR X86MATCH +diff -up x265_1.6/source/CMakeLists.txt.armhfp x265_1.6/source/CMakeLists.txt +--- x265_1.6/source/CMakeLists.txt.armhfp 2015-04-15 13:26:46.995287699 +0200 ++++ x265_1.6/source/CMakeLists.txt 2015-04-15 13:27:29.015472793 +0200 +@@ -51,9 +51,13 @@ if("${SYSPROC}" STREQUAL "" OR X86MATCH add_definitions(-DX86_64=1) endif() elseif(${SYSPROC} STREQUAL "armv6l") -- message(STATUS "Detected ARM system processor") -+ message(STATUS "Detected ARMv6 system processor") +- message(STATUS "Detected ARM target processor") ++ message(STATUS "Detected ARMv6 target processor") set(ARM 1) add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) +elseif(${SYSPROC} STREQUAL "armv7l") diff --git a/x265-fix-soname.patch b/x265-fix-soname.patch deleted file mode 100644 index c328e9d..0000000 --- a/x265-fix-soname.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up multicoreware-x265-d6257335c537/source/CMakeLists.txt.soname multicoreware-x265-d6257335c537/source/CMakeLists.txt ---- multicoreware-x265-d6257335c537/source/CMakeLists.txt.soname 2014-08-08 11:55:36.315572972 +0200 -+++ multicoreware-x265-d6257335c537/source/CMakeLists.txt 2014-08-08 11:55:36.316572975 +0200 -@@ -276,15 +276,22 @@ if(ENABLE_SHARED) - else() - set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265) - endif() -- if(UNIX AND NOT APPLE) -- set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic,-znoexecstack") -+ if(UNIX) -+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_BUILD}) -+ if(NOT APPLE) -+ set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic,-znoexecstack") -+ endif() - endif() -+ set_target_properties(x265-shared PROPERTIES SOVERSION ${X265_BUILD}) - if(X265_LATEST_TAG) -+ if(WINDOWS) -+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG}) -+ endif() - # shared library is not installed if a tag is not found -- set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG} SOVERSION ${X265_BUILD}) - install(TARGETS x265-shared - LIBRARY DESTINATION ${LIB_INSTALL_DIR} -- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) -+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} -+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}) - endif() - endif() - diff --git a/x265-pc-path.patch b/x265-pc-path.patch deleted file mode 100644 index 7f53e4b..0000000 --- a/x265-pc-path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up multicoreware-x265-d6257335c537/source/CMakeLists.txt.r multicoreware-x265-d6257335c537/source/CMakeLists.txt ---- multicoreware-x265-d6257335c537/source/CMakeLists.txt.r 2014-07-09 10:25:15.000000000 +0200 -+++ multicoreware-x265-d6257335c537/source/CMakeLists.txt 2014-07-10 12:03:21.459088376 +0200 -@@ -308,7 +308,7 @@ if(X265_LATEST_TAG) - # Produce a pkg-config file - configure_file("x265.pc.in" "x265.pc" @ONLY) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/x265.pc" -- DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/pkgconfig") -+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig") - endif() - - if(NOT WIN32) diff --git a/x265-pic.patch b/x265-pic.patch deleted file mode 100644 index 984a6fc..0000000 --- a/x265-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up multicoreware-x265-d6257335c537/source/CMakeLists.txt.pic multicoreware-x265-d6257335c537/source/CMakeLists.txt ---- multicoreware-x265-d6257335c537/source/CMakeLists.txt.pic 2014-07-17 09:37:41.176441279 +0200 -+++ multicoreware-x265-d6257335c537/source/CMakeLists.txt 2014-07-17 10:18:03.001014597 +0200 -@@ -122,10 +122,10 @@ if(GCC) - add_definitions(-fPIC) - endif(X64 AND NOT WIN32) - if(X86 AND NOT X64) -- add_definitions(-march=i686) -+ add_definitions(-march=i686 -fPIC) - endif() - if(ARM) -- add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp) -+ add_definitions(-fPIC) - endif() - check_cxx_compiler_flag(-Wno-narrowing CC_HAS_NO_NARROWING) - check_cxx_compiler_flag(-ffast-math CC_HAS_FAST_MATH) diff --git a/x265-test-shared.patch b/x265-test-shared.patch index b53b51f..4ce8d3a 100644 --- a/x265-test-shared.patch +++ b/x265-test-shared.patch @@ -1,13 +1,12 @@ -diff -up multicoreware-x265-d6257335c537/source/test/CMakeLists.txt.r multicoreware-x265-d6257335c537/source/test/CMakeLists.txt ---- multicoreware-x265-d6257335c537/source/test/CMakeLists.txt.r 2014-07-09 10:25:15.000000000 +0200 -+++ multicoreware-x265-d6257335c537/source/test/CMakeLists.txt 2014-07-10 12:10:15.171798782 +0200 -@@ -17,7 +17,7 @@ add_executable(TestBench ${YASM_SRC} +diff -up x265_1.6/source/test/CMakeLists.txt.ts x265_1.6/source/test/CMakeLists.txt +--- x265_1.6/source/test/CMakeLists.txt.ts 2015-04-15 12:50:14.244622449 +0200 ++++ x265_1.6/source/test/CMakeLists.txt 2015-04-15 12:50:32.534702116 +0200 +@@ -22,7 +22,7 @@ add_executable(TestBench ${YASM_SRC} mbdstharness.cpp mbdstharness.h ipfilterharness.cpp ipfilterharness.h intrapredharness.cpp intrapredharness.h) -target_link_libraries(TestBench x265-static ${PLATFORM_LIBS}) +target_link_libraries(TestBench x265-shared ${PLATFORM_LIBS}) - - add_executable(PoolTest testpool.cpp) --target_link_libraries(PoolTest x265-static ${PLATFORM_LIBS}) -+target_link_libraries(PoolTest x265-shared ${PLATFORM_LIBS}) + if(LINKER_OPTIONS) + set_target_properties(TestBench PROPERTIES LINK_FLAGS ${LINKER_OPTIONS}) + endif() diff --git a/x265.spec b/x265.spec index 5c46b13..8fc816b 100644 --- a/x265.spec +++ b/x265.spec @@ -1,19 +1,11 @@ -%global commit d6257335c537 - Summary: H.265/HEVC encoder Name: x265 -Version: 1.2 -Release: 6%{?dist} +Version: 1.6 +Release: 1%{?dist} URL: http://x265.org/ -Source0: https://bitbucket.org/multicoreware/x265/get/%{version}.tar.bz2 -# fix pkgconfig file installation path -Patch0: x265-pc-path.patch +Source0: http://ftp.videolan.org/pub/videolan/x265/x265_%{version}.tar.gz # link test binaries with shared library Patch1: x265-test-shared.patch -# build with -fPIC on arm and i686, too -Patch2: x265-pic.patch -# don't create bogus soname (https://bitbucket.org/multicoreware/x265/issue/62/linux-incorrect-symbolic-links-to-shared) -Patch3: x265-fix-soname.patch Patch4: x265-detect_cpu_armhfp.patch # source/Lib/TLibCommon - BSD # source/Lib/TLibEncoder - BSD @@ -51,23 +43,14 @@ highest performance on a wide variety of hardware platforms. This package contains the shared library development files. %prep -%setup -q -n multicoreware-%{name}-%{commit} -%patch0 -p1 -b .p -# tests are crashing on x86 if linked against shared libx265 -%ifnarch i686 +%setup -q -n x265_%{version} %patch1 -p1 -b .ts -%endif -%patch2 -p1 -b .pic -%patch3 -p1 -b .soname %patch4 -p1 -b .armhfp -f=doc/uncrustify/drag-uncrustify.bat -tr -d '\r' < ${f} > ${f}.unix && \ -touch -r ${f} ${f}.unix && \ -mv ${f}.unix ${f} %build %cmake -G "Unix Makefiles" \ -DCMAKE_SKIP_RPATH:BOOL=YES \ + -DENABLE_PIC:BOOL=ON \ -DENABLE_TESTS:BOOL=ON \ source make %{?_smp_mflags} @@ -79,8 +62,7 @@ install -Dpm644 COPYING %{buildroot}%{_pkgdocdir}/COPYING %ifnarch %{arm} %check -LD_LIBRARY_PATH=$(pwd) test/PoolTest -LD_LIBRARY_PATH=$(pwd) test/TestBench +LD_LIBRARY_PATH=%{buildroot}%{_libdir} test/TestBench %endif %post libs -p /sbin/ldconfig @@ -93,7 +75,7 @@ LD_LIBRARY_PATH=$(pwd) test/TestBench %files libs %dir %{_pkgdocdir} %{_pkgdocdir}/COPYING -%{_libdir}/libx265.so.25 +%{_libdir}/libx265.so.51 %files devel %doc doc/* @@ -103,6 +85,11 @@ LD_LIBRARY_PATH=$(pwd) test/TestBench %{_libdir}/pkgconfig/x265.pc %changelog +* Wed Apr 15 2015 Dominik Mierzejewski 1.6-1 +- update to 1.6 (ABI bump, rfbz#3593) +- release tarballs are now hosted on videolan.org +- drop obsolete patches + * Thu Dec 18 2014 Dominik Mierzejewski 1.2-6 - fix build on armv7l arch (partially fix rfbz#3361, patch by Nicolas Chauvet) - don't run tests on ARM for now (rfbz#3361)