Skip to content

Commit

Permalink
Merge pull request #9 from Ace17/master
Browse files Browse the repository at this point in the history
Merge updates from Ace17
  • Loading branch information
rbouqueau committed Mar 21, 2015
2 parents 1e8ee37 + 4eb52b1 commit a42febe
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 59 deletions.
16 changes: 8 additions & 8 deletions patches/jack_01_OptionalPortAudio.diff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/common/wscript b/common/wscript
index 4302b1e..53d453d 100644
index 4302b1e..c39aec1 100644
--- a/common/wscript
+++ b/common/wscript
@@ -380,7 +381,7 @@ def build(bld):
@@ -380,7 +380,7 @@ def build(bld):
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.use = 'SAMPLERATE'

Expand All @@ -12,15 +12,15 @@ index 4302b1e..53d453d 100644
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.use += ['SAMPLERATE', 'PORTAUDIO']
diff --git a/windows/wscript b/windows/wscript
index fdae9bb..069fd53 100644
index ea4dd3d..f00d66e 100644
--- a/windows/wscript
+++ b/windows/wscript
@@ -6,7 +6,7 @@ import re
import os
@@ -2,7 +2,7 @@
# encoding: utf-8

def configure(conf):
- conf.check_cc(function_name='Pa_GetVersion', header_name='portaudio.h', lib='portaudio', uselib_store="PORTAUDIO", define_name='HAVE_PORTAUDIO')
+ conf.check_cc(function_name='Pa_GetVersion', header_name='portaudio.h', lib='portaudio', uselib_store="PORTAUDIO", define_name='HAVE_PORTAUDIO', mandatory=False)
- conf.check_cfg(package='portaudio-2.0', uselib_store='PORTAUDIO', atleast_version='19', args='--cflags --libs')
+ conf.check_cfg(package='portaudio-2.0', uselib_store='PORTAUDIO', atleast_version='19', args='--cflags --libs', mandatory=False)
conf.env['BUILD_DRIVER_PORTAUDIO'] = conf.is_defined('HAVE_PORTAUDIO')

def build(bld):
def create_jack_driver_obj(bld, target, sources, uselib = None):
12 changes: 6 additions & 6 deletions zen-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function all_build {
}

function all_get_deps {
# echo "dbus"
echo "dbus"
echo "expat"
# echo "faad2" # error: "two or more data types in declaration specifiers"
# echo "ffmpeg"
Expand All @@ -27,8 +27,8 @@ function all_get_deps {
echo "fribidi"
echo "gmplib"
# echo "gnutls"
# #echo "gpac" requires ffmpeg -fPIC
# echo "jack"
echo "gpac"
echo "jack"
echo "liba52"
# echo "libalsa"
echo "libass"
Expand All @@ -43,7 +43,7 @@ function all_get_deps {
echo "libopenjpeg"
echo "libpng"
# echo "libpthread"
# echo "librtmp" # link errors: "undefined reference to `__imp_htons'"
echo "librtmp"
echo "libsamplerate"
echo "libsdl"
echo "libsndfile"
Expand All @@ -54,7 +54,7 @@ function all_get_deps {
# echo "libxcb"
# echo "libxvidcore"
echo "opencore-amr"
# echo "openh264"
echo "openh264"
# echo "openhevc"
echo "opus"
echo "portaudio"
Expand All @@ -69,7 +69,7 @@ function all_get_deps {
# echo "xcb-proto"
# echo "xcbproto"
# echo "xcbpthreadstubs"
# echo "xproto"
echo "xproto"
echo "zlib"
}

44 changes: 44 additions & 0 deletions zen-dbus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# Copyright (C) 2014 - Sebastien Alaiwan
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

function dbus_build {
host=$1
pushDir $WORK/src

lazy_download "dbus.tar.gz" "http://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz"
lazy_extract "dbus.tar.gz"

mkdir -p dbus/build/$host
pushDir dbus/build/$host
CFLAGS+=" -I$PREFIX/$host/include " \
LDFLAGS+=" -L$PREFIX/$host/lib " \
../../configure \
--host=$host \
--enable-static \
--enable-abstract-sockets \
--disable-shared \
--prefix=$PREFIX/$host
$MAKE
$MAKE install
popDir

popDir
}

function dbus_get_deps {
echo "expat"
}

11 changes: 3 additions & 8 deletions zen-expat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@ function expat_build {
lazy_extract "expat.tar.xz"
mkgit "expat"

mkdir -p expat/build/$host
pushDir expat/build/$host
CFLAGS+=" -I$PREFIX/$host/include " \
LDFLAGS+=" -L$PREFIX/$host/lib " \
../../configure \
--host=$host \
--prefix=$PREFIX/$host
$MAKE
$MAKE install
autoconf_build $host "expat" \
--enable-static \
--disable-shared

popDir
popDir
}

function expat_get_deps {
Expand Down
11 changes: 8 additions & 3 deletions zen-gpac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,20 @@ function gpac_build {
pushDir gpac/build/$host
../../configure \
--target-os=$OS \
--prefix=$PREFIX/$host \
--cross-prefix="$crossPrefix" \
--extra-cflags="-I$PREFIX/$host/include -w -fPIC" \
--extra-ldflags="-L$PREFIX/$host/lib" \
--disable-jack \
--enable-amr \
--cross-prefix="$crossPrefix"
--prefix=$PREFIX/$host

$MAKE
$MAKE install

# 'make install' is broken, ignore the following error.
# install: cannot stat ‘bin/gcc/libgpac.dll.a’: No such file or directory
# Makefile:174: recipe for target 'installdylib' failed
$MAKE install-lib -k || true

popDir

popDir
Expand Down
16 changes: 13 additions & 3 deletions zen-jack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,31 @@ function jack_build {
host=$1
pushDir $WORK/src

lazy_git_clone "git://github.com/jackaudio/jack2.git" jack2_$host f90f76f
lazy_git_clone "git://github.com/jackaudio/jack2.git" jack2_$host 9159e9f85f1b85df525c3bc95260e51c72ef9d65 --depth=100

CFLAGS="-I$PREFIX/$host/include -L$PREFIX/$host/lib"
CFLAGS+=" -I$PREFIX/$host/include/tre"

pushDir jack2_$host

applyPatch $scriptDir/patches/jack_01_OptionalPortAudio.diff
applyPatch $scriptDir/patches/jack_03_NoExamples.diff
applyPatch $scriptDir/patches/jack_04_OptionalSampleRate.diff
sed -i "s/.*tests.*//" wscript
sed -i "s/.*example-clients.*//" wscript

local options=""

case $host in
*mingw*)
CFLAGS+=" -I$PREFIX/$host/include/tre"
options+=" --winmme --dist-target mingw"
;;
esac

CC="$host-gcc $CFLAGS" \
CXX="$host-g++ $CFLAGS" \
PREFIX=$PREFIX/$host \
python2 ./waf configure --winmme --dist-target mingw
python2 ./waf configure $options
python2 ./waf build
python2 ./waf install
popDir
Expand Down
7 changes: 7 additions & 0 deletions zen-librtmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ function librtmp_build {

pushDir rtmpdump/librtmp

case $host in
*mingw*)
sed -i "s/^SYS=posix/SYS=mingw/" Makefile
echo "# YO" >> Makefile
;;
esac

sed -i "s@^prefix=.*@prefix=$PREFIX/$host@" Makefile
sed -i "s@^CRYPTO=.*@@" Makefile

Expand Down
3 changes: 2 additions & 1 deletion zen-libvpx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function libvpx_build {
lazy_git_clone https://chromium.googlesource.com/webm/libvpx libvpx c5718a7aa3b5490fbfbc47d6f82e7cb3eed46a1e

local host2=$(echo $host | sed "s/x86_64-w64-mingw32/x86_64-win64-gcc/")
host2=$(echo $host2 | sed "s/i686-w64-mingw32/i686-win32-gcc/")
host2=$(echo $host2 | sed "s/i686-w64-mingw32/x86-win32-gcc/")
host2=$(echo $host2 | sed "s/x86_64-linux-gnu/x86_64-linux-gcc/")
mkdir -p libvpx/build/$host
pushDir libvpx/build/$host
Expand All @@ -30,6 +30,7 @@ function libvpx_build {
../../configure \
--target=$host2 \
--disable-examples \
--disable-unit-tests \
--disable-docs \
--prefix=$PREFIX/$host
$MAKE
Expand Down
21 changes: 12 additions & 9 deletions zen-openh264.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,19 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

function openh264_get_deps {
local a=0
}

function openh264_build {

host=$1
pushDir $WORK/src
local ARCH=$(get_arch $host)
local OS=$(get_os $host)

lazy_git_clone "https://github.com/cisco/openh264" "openh264" 7f967f6fc46290794da02319470afe27e7ed7a6e


lazy_download "openh264.tar.gz" "https://github.com/cisco/openh264/archive/v1.3.1.tar.gz"
lazy_extract "openh264.tar.gz"
mkgit "openh264"

pushDir openh264

sed -i "s@^PREFIX=.*@PREFIX=$PREFIX/$host@" Makefile
sed -i "s@^ARCH=.*@ARCH=$ARCH@" Makefile
sed -i "s@^OS=.*@OS=$OS@" Makefile
Expand All @@ -38,7 +36,12 @@ function openh264_build {

$MAKE
$MAKE install

popDir
popDir
}

function openh264_get_deps {
local a=0
}

33 changes: 14 additions & 19 deletions zen-xproto.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
#!/bin/bash

# Copyright (C) 2014 - Badr BADRI
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
# Copyright (C) 2014 - Sebastien Alaiwan
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

function xproto-get_deps {
local a=0
}
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

function xproto_build {

local host=$1
host=$1
pushDir $WORK/src

lazy_download "xproto.tar.gz" "http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.27.tar.gz"

lazy_extract "xproto.tar.gz"
lazy_git_clone "git://anongit.freedesktop.org/xorg/proto/xproto" xproto

autoconf_build $host "xproto"

popDir
}

function xproto_get_deps {
local a=0
}

8 changes: 6 additions & 2 deletions zenbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function lazy_download
local url="$2"

if [ ! -e "$CACHE/$file" ]; then
wget "$url" -c -O "$CACHE/${file}.tmp"
echo "Downloading: $file"
wget "$url" -c -O "$CACHE/${file}.tmp" --no-verbose
mv "$CACHE/${file}.tmp" "$CACHE/$file"
fi
}
Expand Down Expand Up @@ -196,8 +197,10 @@ function initCflags {
export CXXFLAGS
export LDFLAGS

local cores=$(nproc)

if [ -z "$MAKE" ]; then
MAKE="make"
MAKE="make -j$cores"
fi

export MAKE
Expand Down Expand Up @@ -275,6 +278,7 @@ function autoconf_build {
popDir
fi

rm -rf $name/build/$host
mkdir -p $name/build/$host
pushDir $name/build/$host
../../configure \
Expand Down

0 comments on commit a42febe

Please sign in to comment.