Skip to content

Commit

Permalink
Fixed gst compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 18, 2017
1 parent c9ce8bb commit 00d9065
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 26 deletions.
2 changes: 1 addition & 1 deletion fetch.sh
Expand Up @@ -8,7 +8,7 @@ fi
WGET=`which wget`
if [ ! -z "$WGET" ]; then
echo $WGET -O $2 $1
$WGET -O $2 $1
$WGET -O $2 $1 || rm $2
else
CURL=`which curl`
if [ ! -z "$CURL" ]; then
Expand Down
13 changes: 11 additions & 2 deletions gstbundle/Makefile
Expand Up @@ -82,6 +82,10 @@ packages/$(gstgood_file):
mkdir -p packages
../fetch.sh $(gstgood_url) packages/$(gstgood_file)

packages/$(pcre_file):
mkdir -p packages
../fetch.sh $(pcre_url) packages/$(pcre_file)

build/i386/libiconv/ok: packages/$(libiconv_file)
mkdir -p build
./build_package.sh libiconv i386 $(PREFIX) $(PWD)/install
Expand Down Expand Up @@ -112,12 +116,17 @@ build/x86_64/gettext/ok: packages/$(gettext_file)
./build_package.sh gettext x86_64 $(PREFIX) $(PWD)/install
touch build/x86_64/gettext/ok

build/i386/glib/ok: packages/$(glib_file)
build/x86_64/pcre/ok: packages/$(pcre_file)
mkdir -p build
./build_package.sh pcre x86_64 $(PREFIX) $(PWD)/install
touch build/x86_64/pcre/ok

build/i386/glib/ok: packages/$(glib_file) build/i386/pkgconfig/ok build/i386/pcre/ok
mkdir -p build
./build_package.sh glib i386 $(PREFIX) $(PWD)/install
touch build/i386/glib/ok

build/x86_64/glib/ok: packages/$(glib_file)
build/x86_64/glib/ok: packages/$(glib_file) build/x86_64/pkgconfig/ok build/x86_64/pcre/ok build/x86_64/libffi/ok
mkdir -p build
./build_package.sh glib x86_64 $(PREFIX) $(PWD)/install
touch build/x86_64/glib/ok
Expand Down
24 changes: 20 additions & 4 deletions gstbundle/build_package.sh
Expand Up @@ -72,6 +72,7 @@ build_package_libffi() {
cp x86_64-pc-mingw32/libtool x86_64-pc-mingw32/libtool.orig
sed -e "s/allow_undefined_flag=\"unsupported\"/allow_undefined_flag=/g" x86_64-pc-mingw32/libtool.orig > x86_64-pc-mingw32/libtool
else
sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' include/Makefile.in > include/Makefile.in.new && mv include/Makefile.in.new include/Makefile.in
./configure --prefix=$arch_prefix
fi
check_race_cond
Expand Down Expand Up @@ -104,6 +105,20 @@ build_package_gettext() {
make install
}

build_package_pcre() {
tar xvf $pkgdir/$pcre_file
cd pcre-*
if [ "$platform" == "mac" ]; then
CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --host=$target_platform --prefix=$arch_prefix --with-internal-glib --enable-cxx --enable-jit --enable-shared --enable-pcre8 --enable-pcre16 --enable-utf --enable-unicode-properties
else
./configure --prefix=$arch_prefix --enable-cxx --enable-jit --enable-shared --enable-pcre8 --enable-pcre16 --enable-utf --enable-unicode-properties
fi
check_race_cond
make
make install

}

build_package_glib() {
tar jxvf $pkgdir/$glib_file
cd glib-*
Expand All @@ -128,10 +143,10 @@ build_package_pkgconfig() {
tar zxvf $pkgdir/$pkgconfig_file
cd pkg-config-*
if [ "$platform" == "mac" ]; then
GLIB_CFLAGS="-I$arch_prefix/lib/glib-2.0/include -I$arch_prefix/include/glib-2.0" GLIB_LIBS="-L$arch_prefix/lib -lglib-2.0" CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --host=$target_platform --prefix=$arch_prefix
GLIB_CFLAGS="-I$arch_prefix/lib/glib-2.0/include -I$arch_prefix/include/glib-2.0" GLIB_LIBS="-L$arch_prefix/lib -lglib-2.0" CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --host=$target_platform --prefix=$arch_prefix --with-internal-glib
else
patch -p1 < $patchdir/pkgconfig_latest_glib.diff
GLIB_CFLAGS="-I$arch_prefix/lib/glib-2.0/include -I$arch_prefix/include/glib-2.0" GLIB_LIBS="-L$arch_prefix/lib -lglib-2.0" ./configure --prefix=$arch_prefix
GLIB_CFLAGS="-I$arch_prefix/lib/glib-2.0/include -I$arch_prefix/include/glib-2.0" GLIB_LIBS="-L$arch_prefix/lib -lglib-2.0" ./configure --prefix=$arch_prefix --with-internal-glib
fi
check_race_cond
make
Expand Down Expand Up @@ -166,7 +181,7 @@ build_package_libogg() {
}

build_package_libvorbis() {
tar jxvf $pkgdir/$libvorbis_file
tar xvf $pkgdir/$libvorbis_file
cd libvorbis-*
if [ "$platform" == "mac" ]; then
CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --host=$target_platform --prefix=$arch_prefix
Expand Down Expand Up @@ -206,7 +221,7 @@ build_package_libspeex() {
}

build_package_orc() {
tar zxvf $pkgdir/$orc_file
tar xvf $pkgdir/$orc_file
cd orc-*
if [ "$platform" == "mac" ]; then
CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --prefix=$arch_prefix
Expand All @@ -225,6 +240,7 @@ build_package_orc() {
build_package_gstreamer() {
tar jxvf $pkgdir/$gstreamer_file
cd gstreamer-*
patch -p0 < $patchdir/gstreamer-check-flex.patch
if [ "$platform" == "mac" ]; then
CC="gcc -arch $target_arch" CXX="g++ -arch $target_arch" ./configure --host=$target_platform --prefix=$arch_prefix --disable-loadsave
else
Expand Down
18 changes: 10 additions & 8 deletions gstbundle/package_info
Expand Up @@ -3,36 +3,38 @@ PACKAGES="libiconv libffi gettext glib pkgconfig libjpeg libogg libvorbis libthe
libiconv_file=libiconv-1.14.tar.gz
libiconv_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz

libffi_file=libffi-3.0.13.tar.gz
libffi_url=ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz
libffi_file=libffi-3.2.1.tar.gz
libffi_url=ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz

gettext_file=gettext-0.19.8.1.tar.gz
gettext_url=http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.gz

# repackaged as bz2 and hosted on psi-im.org, so you don't need xzdec
glib_file=glib-2.50.3.tar.xz
glib_url=https://download.gnome.org/sources/glib/2.50/glib-2.50.3.tar.xz

pcre_file=pcre-8.40.tar.bz2
pcre_url=http://download.sourceforge.net/pcre/pcre-8.40.tar.bz2

pkgconfig_file=pkg-config-0.29.2.tar.gz
pkgconfig_url=http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
pkgconfig_url=https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz

libjpeg_file=jpegsrc.v6b.tar.gz
libjpeg_url=http://www.ijg.org/files/jpegsrc.v6b.tar.gz

libogg_file=libogg-1.3.2.tar.gz
libogg_url=http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz

libvorbis_file=libvorbis-1.3.5.tar.bz2
libvorbis_url=http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.bz2
libvorbis_file=libvorbis-1.3.5.tar.xz
libvorbis_url=http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz

libtheora_file=libtheora-1.1.1.tar.bz2
libtheora_url=http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2

libspeex_file=speex-1.2.0.tar.gz
libspeex_url=http://downloads.xiph.org/releases/speex/speex-1.2.0.tar.gz

orc_file=orc-0.4.26.tar.gz
orc_url=https://gstreamer.freedesktop.org/src/orc/orc-0.4.26.tar.gz
orc_file=orc-0.4.26.tar.xz
orc_url=https://gstreamer.freedesktop.org/src/orc/orc-0.4.26.tar.xz

gstreamer_file=gstreamer-0.10.36.tar.bz2
gstreamer_url=http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.bz2
Expand Down
22 changes: 22 additions & 0 deletions gstbundle/patches/gstreamer-check-flex.patch
@@ -0,0 +1,22 @@
--- common/m4/gst-parser.m4 2017-06-18 16:32:04.000000000 +0500
+++ common/m4/gst-parser.m4 2017-06-18 16:33:36.000000000 +0500
@@ -34,7 +34,7 @@
dnl we need version >= 2.5.31 for the reentrancy support
dnl in the parser.
flex_min_version=2.5.31
- flex_version=`$FLEX_PATH --version | head -n 1 | sed 's/^.* //' | sed 's/[[a-zA-Z]]*$//' | cut -d' ' -f1`
+ flex_version=`$FLEX_PATH --version | grep -oE '\d+\.\d+\.(\d+)?'`
AC_MSG_CHECKING([flex version $flex_version >= $flex_min_version])
if perl -w <<EOF
(\$min_version_major, \$min_version_minor, \$min_version_micro ) = "$flex_min_version" =~ /(\d+)\.(\d+)\.(\d+)/;
--- configure 2017-06-18 16:35:05.000000000 +0500
+++ configure 2017-06-18 16:36:40.000000000 +0500
@@ -21304,7 +21304,7 @@
fi

flex_min_version=2.5.31
- flex_version=`$FLEX_PATH --version | head -n 1 | sed 's/^.* //' | sed 's/[a-zA-Z]*$//' | cut -d' ' -f1`
+ flex_version=`$FLEX_PATH --version | grep -oE '\d+\.\d+\.(\d+)?'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flex version $flex_version >= $flex_min_version" >&5
$as_echo_n "checking flex version $flex_version >= $flex_min_version... " >&6; }
if perl -w <<EOF
12 changes: 2 additions & 10 deletions gstbundle/prep_dist.sh
Expand Up @@ -6,15 +6,7 @@ if [ $# != 3 ]; then
exit 1
fi

platform=`uname -s`
if [ "$platform" == "Darwin" ]; then
platform=mac
elif [ "$platform" == "MINGW32_NT-6.1" ]; then
platform=win
else
echo "error: unsupported platform $platform"
exit 1
fi
. ../detect_platform.sh

#destdir=$1
destdir=
Expand All @@ -25,7 +17,7 @@ mkdir -p $dist_base

if [ "$platform" == "mac" ]; then

TARGET_ARCHES="i386 x86_64"
TARGET_ARCHES="x86_64"

for target_arch in $TARGET_ARCHES; do
target_base=$destdir$base_prefix/$target_arch
Expand Down
2 changes: 1 addition & 1 deletion qca/Makefile
@@ -1,6 +1,6 @@
UNAME := $(shell uname)
PREFIX = /psidepsbase/qca
VERSION = 2.1.4_rc1
VERSION = 2.1.3

include package_info

Expand Down

0 comments on commit 00d9065

Please sign in to comment.