[gimp] build/win: Add support for building 64-bit libs in jhbuild.
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] build/win: Add support for building 64-bit libs in jhbuild.
- Date: Wed, 30 Jul 2014 20:36:04 +0000 (UTC)
commit 978f8f2b0cf3e35ab79a3ebabc4e355917f15d81
Author: Michael Henning <drawoc darkrefraction com>
Date: Wed Jul 30 13:47:13 2014 -0400
build/win: Add support for building 64-bit libs in jhbuild.
build/windows/jhbuild/build.jhbuildrc | 11 +++++++--
build/windows/jhbuild/makepkgs.py | 11 +++++++++-
build/windows/jhbuild/mkarchive | 34 ++++++++++++++++++++++----------
build/windows/jhbuild/split-build | 6 +++-
4 files changed, 45 insertions(+), 17 deletions(-)
---
diff --git a/build/windows/jhbuild/build.jhbuildrc b/build/windows/jhbuild/build.jhbuildrc
index 2aaa659..5f312d2 100644
--- a/build/windows/jhbuild/build.jhbuildrc
+++ b/build/windows/jhbuild/build.jhbuildrc
@@ -26,21 +26,26 @@ else:
flavour_opt = "--enable-debug=yes"
flavour_cflags = " -g -O0 "
+buildarch = os.environ.get('BUILD_ARCH', 'i686')
+
+if buildarch != "i686" and buildarch != "x86_64":
+ print ("Warning: BUILD_ARCH not recognized")
+
# checkoutroot: path to download packages elsewhere
# prefix: target path to install the compiled binaries
checkoutroot = os.environ['PWD']+'/checkout/'
-prefix = os.environ['PWD'] + '/targets/' + module + flavour_ext + '/'
+prefix = os.environ['PWD'] + '/targets/' + module + flavour_ext + '-' + buildarch + '/'
tarballdir = None
os.environ['prefix'] = prefix
-searchprefix = os.environ['PWD']+'/targets/gimp-common' + flavour_ext + '/'
+searchprefix = os.environ['PWD']+'/targets/gimp-common' + flavour_ext + '-' + buildarch + '/'
#The host value is obtained with the result of executing
#the config.guess script on any of the packages.
#This value must be valid for most linux/x86 out there
os.environ['HOST'] = 'x86_64-unknown-linux-gnu'
-os.environ['TARGET'] = os.environ.get('MINGW_TARGET', 'i686-w64-mingw32')
+os.environ['TARGET'] = os.environ.get('MINGW_TARGET', buildarch + '-w64-mingw32')
os.environ['PKG_CONFIG_LIBDIR'] = ""
addpath('PKG_CONFIG_LIBDIR', os.path.join(searchprefix, 'lib', 'pkgconfig'))
diff --git a/build/windows/jhbuild/makepkgs.py b/build/windows/jhbuild/makepkgs.py
index 6a27340..c0729dd 100755
--- a/build/windows/jhbuild/makepkgs.py
+++ b/build/windows/jhbuild/makepkgs.py
@@ -45,9 +45,18 @@ def run (targets_loc, packages_loc):
if not os.path.isfile (packagedb_loc):
continue
+ # Build arch
+ build_arch = ""
+ if target_name[-7:] == "-x86_64":
+ build_arch = "x86_64"
+ elif target_name[-5:] == "-i686":
+ build_arch = "i686"
+ else:
+ print ("Warning: BUILD_ARCH suffix not recognized")
+
# Create archives for each package
for package in parse_packagedb (packagedb_loc):
- tar_name = package["package"] + '-' + package["version"] + '.tar.bz2'
+ tar_name = package["package"] + '-' + build_arch + '-' + package["version"] + '.tar.bz2'
tar_loc = os.path.join (packages_loc, tar_name)
manifest_loc = os.path.join (manifests_loc, package["package"])
diff --git a/build/windows/jhbuild/mkarchive b/build/windows/jhbuild/mkarchive
index 91d4688..8b04908 100755
--- a/build/windows/jhbuild/mkarchive
+++ b/build/windows/jhbuild/mkarchive
@@ -1,17 +1,18 @@
#!/bin/bash
-dll_loc=${DLL_LOC:-/usr/lib/gcc/i686-w64-mingw32/4.6}
+dll_loc_32=${DLL_LOC_i686:-/usr/i686-w64-mingw32/bin}
+dll_loc_64=${DLL_LOC_x86_64:-/usr/x86_64-w64-mingw32/bin}
add_dll (){
- cp --reflink=auto $dll_loc/$1 ./bin/
+ cp --reflink=auto $1/$2 ./bin/
}
dostuff (){
- f=$1-i686-`date +%Y-%m-%d`
+ f=$1-$4-`date +%Y-%m-%d`
mkdir -p combined/$f
- cp -R -d -L --reflink=auto ./gimp-common$3/* combined/$f
- cp -R -d -L --reflink=auto ./$1/* combined/$f
+ cp -R -d -L --reflink=auto ./gimp-common$3-$4/* combined/$f
+ cp -R -d -L --reflink=auto ./$1-$4/* combined/$f
pushd combined
pushd $f
@@ -33,8 +34,15 @@ dostuff (){
rm -f `find -name *.exe | sed -e /gimp/d -e /gspawn/d -e /gdb.exe/d`
- add_dll libstdc++-6.dll
- add_dll libgcc_s_sjlj-1.dll
+ if [ "$4" == "i686" ]; then
+ add_dll $dll_loc_32 libstdc++-6.dll
+ add_dll $dll_loc_32 libgcc_s_sjlj-1.dll
+ add_dll $dll_loc_32 libwinpthread-1.dll
+ elif [ "$4" == "x86_64" ]; then
+ add_dll $dll_loc_64 libstdc++-6.dll
+ add_dll $dll_loc_64 libgcc_s_seh-1.dll
+ add_dll $dll_loc_64 libwinpthread-1.dll
+ fi
pushd bin
rm -f `ls | sed -e /.exe/d -e /.dll/d`
@@ -78,7 +86,11 @@ start $2" | unix2dos > run_gimp.bat
}
cd targets
-dostuff gimp-stable gimp-2.8.exe ""
-dostuff gimp-dev gimp-2.9.exe ""
-dostuff gimp-stable-dbg gimp-2.8.exe "-dbg"
-dostuff gimp-dev-dbg gimp-2.9.exe "-dbg"
+dostuff gimp-stable gimp-2.8.exe "" i686
+dostuff gimp-dev gimp-2.9.exe "" i686
+dostuff gimp-stable-dbg gimp-2.8.exe "-dbg" i686
+dostuff gimp-dev-dbg gimp-2.9.exe "-dbg" i686
+dostuff gimp-stable gimp-2.8.exe "" x86_64
+dostuff gimp-dev gimp-2.9.exe "" x86_64
+dostuff gimp-stable-dbg gimp-2.8.exe "-dbg" x86_64
+dostuff gimp-dev-dbg gimp-2.9.exe "-dbg" x86_64
diff --git a/build/windows/jhbuild/split-build b/build/windows/jhbuild/split-build
index a221d0f..23161c0 100755
--- a/build/windows/jhbuild/split-build
+++ b/build/windows/jhbuild/split-build
@@ -1,10 +1,12 @@
#!/bin/sh
set -e
+BUILD_ARCH=${BUILD_ARCH:-i686}
+
if [ "x$BUILD_FLAVOUR" = "xdbg" ]; then
- EXT="-dbg"
+ EXT="-dbg-$BUILD_ARCH"
else
- EXT=""
+ EXT="-$BUILD_ARCH"
fi
init_target (){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]