Package: easymp3gain
Version: 0.5.0-4
Severity: important
Tags: patch

the package fails to detect the correct architecture to build for when in a
32bit chroot running on a 64 bit kernel.
uname -m reports x86_64 and that is also used by lazbuild. It then fails when
it tries to execute the non-existing ppc64 compiler

attached patch fixes this issue. It uses dpkg-architecture -qDEB_BUILD_ARCH to
get the build arch and passes that one to lazbuild
It may need adapting for powerpc and sparc



-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-8-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Index: easymp3gaindebian/make.sh
===================================================================
--- easymp3gaindebian.orig/make.sh	2011-04-16 21:08:42.523761276 +0200
+++ easymp3gaindebian/make.sh	2011-04-16 21:09:58.653761247 +0200
@@ -9,11 +9,12 @@
 done
 
 # Detects and parses the architecture
-ARCH=$(uname -m)
+ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
 case "$ARCH" in
  "i686") ARCH="i386";;
  "i586") ARCH="i386";;
  "i486") ARCH="i386";;
+ "amd64") ARCH="x86_64";;
 esac
  
 echo "Target architecture: $ARCH"
@@ -30,10 +31,10 @@
 mkdir -p ./bin/qt4
 mkdir -p ./bin/gtk2
 if [ "$WIDGET" == "qt4" ]; then
-lazbuild -B --ws=qt easymp3gain.lpr
+lazbuild -B --ws=qt --cpu=$ARCH easymp3gain.lpr
 mv ./bin/easymp3gain ./bin/qt4/
 else
-lazbuild -B --ws=gtk2 easymp3gain.lpr
+lazbuild -B --ws=gtk2 --cpu=$ARCH easymp3gain.lpr
 mv ./bin/easymp3gain ./bin/gtk2/
 fi
 

Reply via email to