Merge lp:~romain-bouqueau-pro/zenbuild/zenbuild into lp:zenbuild

Proposed by Romain Bouqueau
Status: Needs review
Proposed branch: lp:~romain-bouqueau-pro/zenbuild/zenbuild
Merge into: lp:zenbuild
Diff against target: 215 lines (+158/-0)
6 files modified
README (+3/-0)
patches/x265_01_version.diff (+79/-0)
zen-ffmpeg.sh (+2/-0)
zen-libav.sh (+2/-0)
zen-x265.sh (+56/-0)
zenbuild.sh (+16/-0)
To merge this branch: bzr merge lp:~romain-bouqueau-pro/zenbuild/zenbuild
Reviewer Review Type Date Requested Status
Sebastien Alaiwan Pending
Review via email: mp+220287@code.launchpad.net

Description of the change

add x265

To post a comment you must log in.

Unmerged revisions

99. By Romain Bouqueau

automatically changed properties...

98. By Romain Bouqueau

remove iconv and bzlib deps

97. By Romain Bouqueau

README about PATH restrictions

96. By Romain Bouqueau

add x265

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2014-05-08 10:48:49 +0000
+++ README 2014-05-20 15:12:00 +0000
@@ -14,3 +14,6 @@
14The environment variable MAKE is influential, you can achieve parallel builds this way:14The environment variable MAKE is influential, you can achieve parallel builds this way:
15MAKE='make -j8' ./zenbuild.sh /tmp/myWorkDirectory x86_64-w64-mingw32 libav15MAKE='make -j8' ./zenbuild.sh /tmp/myWorkDirectory x86_64-w64-mingw32 libav
1616
17If your environment variable PATH also contains other Unix-like environments such as Cygwin,
18you may want to restrict the environment PATH this way:
19PATH='/mingw64/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/opt/bin' ./zenbuild.sh /tmp/myWorkDirectory x86_64-w64-mingw32 libav
1720
=== added file 'patches/x265_01_version.diff'
--- patches/x265_01_version.diff 1970-01-01 00:00:00 +0000
+++ patches/x265_01_version.diff 2014-05-20 15:12:00 +0000
@@ -0,0 +1,79 @@
1diff -r b35a5d8f012b source/cmake/version.cmake
2--- a/source/cmake/version.cmake Sun May 18 15:02:27 2014 +0900
3+++ b/source/cmake/version.cmake Tue May 20 14:41:09 2014 +0200
4@@ -10,75 +10,4 @@
5 set(X265_LATEST_TAG "0.0")
6 set(X265_TAG_DISTANCE "0")
7
8-if(EXISTS ${CMAKE_SOURCE_DIR}/../.hg_archival.txt)
9- # read the lines of the archive summary file to extract the version
10- file(READ ${CMAKE_SOURCE_DIR}/../.hg_archival.txt archive)
11- STRING(REGEX REPLACE "\n" ";" archive "${archive}")
12- foreach(f ${archive})
13- string(FIND "${f}" ": " pos)
14- string(SUBSTRING "${f}" 0 ${pos} key)
15- string(SUBSTRING "${f}" ${pos} -1 value)
16- string(SUBSTRING "${value}" 2 -1 value)
17- set(hg_${key} ${value})
18- endforeach()
19- if(DEFINED hg_tag)
20- set(X265_VERSION ${hg_tag} CACHE STRING "x265 version string.")
21- set(X265_LATEST_TAG ${hg_tag})
22- set(X265_TAG_DISTANCE "0")
23- elseif(DEFINED hg_node)
24- string(SUBSTRING "${hg_node}" 0 16 hg_id)
25- set(X265_VERSION "${hg_latesttag}+${hg_latesttagdistance}-${hg_id}")
26- endif()
27-elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.hg)
28- execute_process(COMMAND
29- ${HG_EXECUTABLE} log -r. --template "{latesttag}"
30- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
31- OUTPUT_VARIABLE X265_LATEST_TAG
32- ERROR_QUIET
33- OUTPUT_STRIP_TRAILING_WHITESPACE
34- )
35- execute_process(COMMAND
36- ${HG_EXECUTABLE} log -r. --template "{latesttagdistance}"
37- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
38- OUTPUT_VARIABLE X265_TAG_DISTANCE
39- ERROR_QUIET
40- OUTPUT_STRIP_TRAILING_WHITESPACE
41- )
42- execute_process(
43- COMMAND
44- ${HG_EXECUTABLE} log -r. --template "{node|short}"
45- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
46- OUTPUT_VARIABLE HG_REVISION_ID
47- ERROR_QUIET
48- OUTPUT_STRIP_TRAILING_WHITESPACE
49- )
50-
51- if(X265_LATEST_TAG MATCHES "^r")
52- string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG)
53- endif()
54- if(X265_TAG_DISTANCE STREQUAL "0")
55- set(X265_VERSION "${X265_LATEST_TAG}")
56- else()
57- set(X265_VERSION "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${HG_REVISION_ID}")
58- endif()
59-elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.git)
60- execute_process(
61- COMMAND
62- ${GIT_EXECUTABLE} describe --tags --abbrev=0
63- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
64- OUTPUT_VARIABLE X265_LATEST_TAG
65- ERROR_QUIET
66- OUTPUT_STRIP_TRAILING_WHITESPACE
67- )
68-
69- execute_process(
70- COMMAND
71- ${GIT_EXECUTABLE} describe --tags
72- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
73- OUTPUT_VARIABLE X265_VERSION
74- ERROR_QUIET
75- OUTPUT_STRIP_TRAILING_WHITESPACE
76- )
77-endif()
78-
79 message(STATUS "x265 version ${X265_VERSION}")
080
=== modified file 'zen-ffmpeg.sh'
--- zen-ffmpeg.sh 2014-05-14 21:22:47 +0000
+++ zen-ffmpeg.sh 2014-05-20 15:12:00 +0000
@@ -47,6 +47,8 @@
47 --enable-libx264 \47 --enable-libx264 \
48 --disable-gnutls \48 --disable-gnutls \
49 --disable-openssl \49 --disable-openssl \
50 --disable-iconv \
51 --disable-bzlib \
50 --enable-avresample \52 --enable-avresample \
51 --pkg-config=pkg-config \53 --pkg-config=pkg-config \
52 --cross-prefix=$host-54 --cross-prefix=$host-
5355
=== modified file 'zen-libav.sh'
--- zen-libav.sh 2014-05-14 21:22:47 +0000
+++ zen-libav.sh 2014-05-20 15:12:00 +0000
@@ -47,6 +47,8 @@
47 --enable-libx264 \47 --enable-libx264 \
48 --disable-gnutls \48 --disable-gnutls \
49 --disable-openssl \49 --disable-openssl \
50 --disable-iconv \
51 --disable-bzlib \
50 --pkg-config=pkg-config \52 --pkg-config=pkg-config \
51 --cross-prefix=$host-53 --cross-prefix=$host-
52 $MAKE54 $MAKE
5355
=== added file 'zen-x265.sh'
--- zen-x265.sh 1970-01-01 00:00:00 +0000
+++ zen-x265.sh 2014-05-20 15:12:00 +0000
@@ -0,0 +1,56 @@
1#!/bin/bash
2
3# Copyright (C) 2014 - Romain Bouqueau
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License
6# as published by the Free Software Foundation; either version 3
7# of the License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18
19function x265_get_deps {
20 local a=0
21}
22
23function build_x265 {
24 local host=$1
25 local crossPrefix=$(get_cross_prefix $BUILD $host)
26
27 pushDir $WORK/src
28 hg clone -r 6879 https://bitbucket.org/multicoreware/x265 x265
29
30 pushDir x265/
31 applyPatch $scriptDir/patches/x265_01_version.diff
32
33 mkdir -p build/$host
34 pushDir build/$host
35
36 echo "SET(CMAKE_C_COMPILER $host-gcc)" > config.cmake
37 echo "SET(CMAKE_CXX_COMPILER $host-g++)" >> config.cmake
38 echo "SET(CMAKE_RC_COMPILER $host-windres)" >> config.cmake
39 echo "SET(CMAKE_RANLIB $host-ranlib)" >> config.cmake
40 echo "SET(CMAKE_ASM_YASM_COMPILER yasm)" >> config.cmake
41 echo "" >> config.cmake
42 echo "SET(CMAKE_CXX_FLAGS \"-static-libgcc -static-libstdc++ -static -O3 -s\")" >> config.cmake
43 echo "SET(CMAKE_C_FLAGS \"-static-libgcc -static-libstdc++ -static -O3 -s\")" >> config.cmake
44 echo "SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS \"-static-libgcc -static-libstdc++ -static -O3 -s\")" >> config.cmake
45 echo "SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS \"-static-libgcc -static-libstdc++ -static -O3 -s\")" >> config.cmake
46 echo "SET(CMAKE_SHARED_LINKER_FLAGS \"-static-libgcc -static-libstdc++ -static -O3 -s\")" >> config.cmake
47
48 cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=config.cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/$host ../../source
49 $MAKE x265-shared
50 $MAKE install
51
52 popDir
53 popDir
54 popDir
55}
56
057
=== modified file 'zenbuild.sh' (properties changed: +x to -x)
--- zenbuild.sh 2014-05-18 08:10:00 +0000
+++ zenbuild.sh 2014-05-20 15:12:00 +0000
@@ -408,6 +408,14 @@
408 exit 1408 exit 1
409 fi409 fi
410410
411 if isMissing "cmake"; then
412 echo "make not installed. Please install with:"
413 echo "pacman -S mingw-cmake"
414 echo "or"
415 echo "apt-get install cmake"
416 exit 1
417 fi
418
411 if isMissing "autopoint"; then419 if isMissing "autopoint"; then
412 echo "autopoint not installed. Please install with:"420 echo "autopoint not installed. Please install with:"
413 echo "pacman -S gettext gettext-devel"421 echo "pacman -S gettext gettext-devel"
@@ -453,6 +461,14 @@
453 echo "apt-get install git"461 echo "apt-get install git"
454 exit 1462 exit 1
455 fi463 fi
464
465 if isMissing "hg" ; then
466 echo "git not installed. Please install with:"
467 echo "pacman -S msys/mercurial"
468 echo "or"
469 echo "apt-get install mercurial"
470 exit 1
471 fi
456}472}
457473
458function get_arch {474function get_arch {

Subscribers

People subscribed via source and target branches