summaryrefslogtreecommitdiff
path: root/cerbero
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-07 12:12:16 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-07 12:12:16 +0200
commit8e14af2117cea65ec9639784bafcfe2495ef50e8 (patch)
treec2aafe0bc263e40b5d7d42061c9fceb600fe7acc /cerbero
parent4a6b2824cc5e51057632834714895613838acf92 (diff)
parent7e073c94fac5a67c247a5e2404a1db84725d3794 (diff)
Merge branch 'gcc-4.7.2'
Diffstat (limited to 'cerbero')
-rw-r--r--cerbero/bootstrap/windows.py22
-rw-r--r--cerbero/build/build.py6
-rw-r--r--cerbero/config.py6
3 files changed, 14 insertions, 20 deletions
diff --git a/cerbero/bootstrap/windows.py b/cerbero/bootstrap/windows.py
index 97a0538..fb66ad2 100644
--- a/cerbero/bootstrap/windows.py
+++ b/cerbero/bootstrap/windows.py
@@ -28,17 +28,15 @@ from cerbero.utils import shell, _, fix_winpath, to_unixpath, git
from cerbero.utils import messages as m
# Toolchain
+GCC_VERSION = '4.7.2'
MINGW_DOWNLOAD_SOURCE = 'http://www.freedesktop.org/software/gstreamer-sdk/'\
'data/packages/2012.5/windows/toolchain'
-MINGW_TARBALL_TPL = "mingw-%s-%s-%s.tar.xz"
+MINGW_TARBALL_TPL = "mingw-%s-gcc-%s-%s-%s.tar.xz"
# Extra dependencies
MINGWGET_DEPS = ['msys-wget']
GNOME_FTP = 'http://ftp.gnome.org/pub/gnome/binaries/win32/'
WINDOWS_BIN_DEPS = ['intltool/0.40/intltool_0.40.4-1_win32.zip']
-PTHREADS_URL = \
- 'http://downloads.sourceforge.net/project/mingw-w64/External%20binary%20'\
- 'packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip'
class WindowsBootstraper(BootstraperBase):
@@ -73,7 +71,6 @@ class WindowsBootstraper(BootstraperBase):
# After mingw is beeing installed
self.install_bin_deps()
self.install_python_sdk()
- self.install_pthreads()
def check_dirs(self):
if not os.path.exists(self.prefix):
@@ -83,8 +80,8 @@ class WindowsBootstraper(BootstraperBase):
os.makedirs(etc_path)
def install_mingw(self):
- tarball = MINGW_TARBALL_TPL % (self.version, self.platform,
- self.arch)
+ tarball = MINGW_TARBALL_TPL % (self.version, GCC_VERSION,
+ self.platform, self.arch)
tarfile = os.path.join(self.prefix, tarball)
tarfile = to_unixpath(os.path.abspath(tarfile))
@@ -100,17 +97,6 @@ class WindowsBootstraper(BootstraperBase):
except Exception:
pass
- def install_pthreads(self):
- pthreadszip = os.path.join(self.prefix, 'pthreads.zip')
- shell.download(PTHREADS_URL, pthreadszip)
- temp = fix_winpath(os.path.abspath(tempfile.mkdtemp()))
- # real pthreads stuff is in a zip file inside the previous zip file
- # under mingwxx/pthreads-xx.zip
- shell.unpack(pthreadszip, temp)
- shell.unpack(os.path.join(temp, 'pthreads-20100604',
- 'ming%s' % self.version, 'pthreads-%s.zip' % self.version),
- self.prefix)
-
def install_python_sdk(self):
m.action(_("Installing Python headers"))
temp = tempfile.mkdtemp()
diff --git a/cerbero/build/build.py b/cerbero/build/build.py
index 615778f..c911ef8 100644
--- a/cerbero/build/build.py
+++ b/cerbero/build/build.py
@@ -167,7 +167,8 @@ class MakefilesBase (Build):
for var, val in new_env.iteritems():
if val is None:
- del os.environ[var]
+ if var in os.environ:
+ del os.environ[var]
else:
os.environ[var] = val
return self._old_env
@@ -179,7 +180,8 @@ class MakefilesBase (Build):
for var, val in old_env.iteritems():
if val is None:
- del os.environ[var]
+ if var in os.environ:
+ del os.environ[var]
else:
os.environ[var] = val
self._old_env = None
diff --git a/cerbero/config.py b/cerbero/config.py
index eb3ab7e..eb5f6c2 100644
--- a/cerbero/config.py
+++ b/cerbero/config.py
@@ -213,6 +213,12 @@ class Config (object):
ld_library_path = libdir
else:
ld_library_path = ""
+ if self.toolchain_prefix is not None:
+ ld_library_path = self._join_path(ld_library_path,
+ os.path.join(self.toolchain_prefix, 'lib'))
+ includedir = self._join_path(includedir,
+ os.path.join(self.toolchain_prefix, 'include'))
+
# Most of these variables are extracted from jhbuild
env = {'LD_LIBRARY_PATH': ld_library_path,