Commit d0690aba authored by satmandu's avatar satmandu Committed by GitHub

Update libx265.rb

parent 1d1b3bf2
......@@ -3,38 +3,85 @@ require 'package'
class Libx265 < Package
description 'x265 is a H.265 / HEVC video encoder application library.'
homepage 'http://x265.org/'
version '2.6'
compatibility 'all'
source_url 'https://bitbucket.org/multicoreware/x265/downloads/x265_2.6.tar.gz'
source_sha256 '1bf0036415996af841884802161065b9e6be74f5f6808ac04831363e2549cdbf'
@_ver = '3.4'
version @_ver
compatibility 'x86_64 aarch64 armv7l'
source_url "https://github.com/videolan/x265/archive/#{@_ver}.tar.gz"
source_sha256 '544d147bf146f8994a7bf8521ed878c93067ea1c7c6e93ab602389be3117eaaf'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-2.6-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-2.6-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-2.6-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-2.6-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-3.4-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-3.4-chromeos-armv7l.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/libx265-3.4-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
aarch64: '4ffe8a816ecc0350d749579f22278e3e9786cb52279829a1f8753205e1d1a03f',
armv7l: '4ffe8a816ecc0350d749579f22278e3e9786cb52279829a1f8753205e1d1a03f',
i686: '73a02413698d13621385cb9f5bc553bc154622e907ed4aa25a51ae54f0ee90c4',
x86_64: '4bd7fd7b202ab7f59f338e51ea832a5dbef00775af2cf7e7ae6ba6cacee93fac',
binary_sha256({
aarch64: 'cf7548c97fb5774a3fea30a580ba1719f7b4efdfb4e5f6db91fac20d651d8442',
armv7l: 'cf7548c97fb5774a3fea30a580ba1719f7b4efdfb4e5f6db91fac20d651d8442',
x86_64: 'fc7647ea5a73c0fdbc2cea1f2c842de8a4a72db11b1fce5907ed79669e598ab4'
})
depends_on 'cmake' => :build
depends_on 'yasm' => :build
depends_on 'nasm' => :build
def self.build
FileUtils.cd('build') do
system "cmake ../source -DCMAKE_INSTALL_PREFIX=#{CREW_PREFIX}"
system "sed -i 's,{CMAKE_INSTALL_PREFIX}/lib,{CMAKE_INSTALL_PREFIX}/lib64,g' cmake_install.cmake" if ARCH == 'x86_64'
system "make"
Dir.mkdir 'build-12'
Dir.chdir 'build-12' do
system "env CFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
CXXFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
LDFLAGS='-fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
cmake \
-G Ninja \
#{CREW_CMAKE_OPTIONS} \
-DLIB_INSTALL_DIR=lib#{CREW_LIB_SUFFIX} \
-DHIGH_BIT_DEPTH=TRUE \
-DMAIN12=TRUE \
-DEXPORT_C_API=FALSE \
-DENABLE_CLI=FALSE \
-DENABLE_SHARED=FALSE \
-Wno-dev \
../source"
end
system 'ninja -C build-12'
Dir.mkdir 'build-10'
Dir.chdir 'build-10' do
system "env CFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
CXXFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
LDFLAGS='-fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
cmake \
-G Ninja \
#{CREW_CMAKE_OPTIONS} \
-DLIB_INSTALL_DIR=lib#{CREW_LIB_SUFFIX} \
-DHIGH_BIT_DEPTH=TRUE \
-DEXPORT_C_API=FALSE \
-DENABLE_CLI=FALSE \
-DENABLE_SHARED=FALSE \
-Wno-dev \
../source"
end
system 'ninja -C build-10'
Dir.mkdir 'builddir'
Dir.chdir 'builddir' do
system "env CFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
CXXFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
LDFLAGS='-fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
cmake \
-G Ninja \
#{CREW_CMAKE_OPTIONS} \
-DENABLE_SHARED=TRUE \
-DLIB_INSTALL_DIR=lib#{CREW_LIB_SUFFIX} \
-DENABLE_HDR10_PLUS=TRUE \
-DEXTRA_LIB='x265_main10.a;x265_main12.a' \
-DEXTRA_LINK_FLAGS='-L .' \
-DLINKED_10BIT=TRUE \
-DLINKED_12BIT=TRUE \
-Wno-dev \
../source"
end
FileUtils.ln_s '../build-10/libx265.a', 'builddir/libx265_main10.a'
FileUtils.ln_s '../build-12/libx265.a', 'builddir/libx265_main12.a'
system 'ninja -C builddir'
end
def self.install
FileUtils.cd('build') do
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment