summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-01-20 23:13:25 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-01-20 23:13:25 +0100
commit10f5b5be91e52017b2264e10cb2a300589635be1 (patch)
tree9d5204e571c11d1d1b592acec7d6f925e6c0a2f2 /scripts
parenta7f49cce115de9ff8a35e94af7ef9c05bb0d7bc3 (diff)
i686 cross-compile fixes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/portable_package_static.sh13
-rwxr-xr-xscripts/portable_postbuild.sh11
-rwxr-xr-xscripts/static_build.sh7
3 files changed, 22 insertions, 9 deletions
diff --git a/scripts/portable_package_static.sh b/scripts/portable_package_static.sh
index b1066ec6..fa7f852f 100755
--- a/scripts/portable_package_static.sh
+++ b/scripts/portable_package_static.sh
@@ -1,11 +1,18 @@
-#!/bin/sh
+#!/bin/bash
./scripts/portable_postbuild.sh
# package for distribution
VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'`
BUILD=`cat PORTABLE_BUILD | perl -ne 'chomp and print'`
-ARCH=`uname -m | perl -ne 'chomp and print'`
+if [[ "$ARCH" == "i686" ]]; then
+ echo arch: $ARCH
+elif [[ "$ARCH" == "x86_64" ]]; then
+ echo arch: $ARCH
+else
+ echo unknown arch $ARCH
+ exit -1
+fi
# main distro
SRCDIR=deadbeef-$VERSION
@@ -14,8 +21,6 @@ DOCDIR=$SRCDIR/doc
PIXMAPDIR=$SRCDIR/pixmaps
OUTNAME=deadbeef-static_${VERSION}-${BUILD}_${ARCH}.tar.bz2
-ARCH=`uname -m | perl -ne 'chomp and print'`
-
rm portable_out/build/$OUTNAME
cd portable/$ARCH
diff --git a/scripts/portable_postbuild.sh b/scripts/portable_postbuild.sh
index 09937bf9..d0ecde41 100755
--- a/scripts/portable_postbuild.sh
+++ b/scripts/portable_postbuild.sh
@@ -1,7 +1,14 @@
-#!/bin/sh
+#!/bin/bash
VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'`
OSTYPE=`uname -s`
-ARCH=`uname -m | perl -ne 'chomp and print'`
+if [[ "$ARCH" == "i686" ]]; then
+ echo arch: $ARCH
+elif [[ "$ARCH" == "x86_64" ]]; then
+ echo arch: $ARCH
+else
+ echo unknown arch $ARCH
+ exit -1
+fi
OUTDIR=portable/$ARCH/deadbeef-$VERSION
PLUGDIR=$OUTDIR/plugins
DOCDIR=$OUTDIR/doc
diff --git a/scripts/static_build.sh b/scripts/static_build.sh
index b1cdfe0e..eecfd16c 100755
--- a/scripts/static_build.sh
+++ b/scripts/static_build.sh
@@ -4,8 +4,9 @@ ORIGIN=`pwd | perl -ne 'chomp and print'`
AP=$ORIGIN/tools/apbuild
#ARCH=`uname -m | perl -ne 'chomp and print'`
if [[ "$ARCH" == "i686" ]]; then
- export CFLAGS='-m32'
- export LDFLAGS='-m32'
+ export CFLAGS="-m32 -I$ORIGIN/../deadbeef-deps/lib-x86-32/include/i386-linux-gnu"
+ export CXXFLAGS=$CFLAGS
+ export LDFLAGS="-m32 -L$ORIGIN/../deadbeef-deps/lib-x86-32/lib"
export CONFIGURE_FLAGS="--build=i686-unknown-linux-gnu"
export LD_LIBRARY_PATH="$ORIGIN/../deadbeef-deps/lib-x86-32/lib"
export PKG_CONFIG_PATH="$ORIGIN/../deadbeef-deps/lib-x86-32/lib/pkgconfig"
@@ -31,7 +32,7 @@ export CXX=$AP/apgcc
./autogen.sh || exit -1
-./configure CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS $CONFIGURE_FLAGS --enable-staticlink --disable-artwork-imlib2 --prefix=/opt/deadbeef || exit -1
+./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $CONFIGURE_FLAGS --enable-staticlink --disable-artwork-imlib2 --prefix=/opt/deadbeef || exit -1
sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool
sed -i 's/hardcode_into_libs=yes/hardcode_into_libs=no/g' libtool
make clean