[jhbuild] remove obsolete mesa module type
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] remove obsolete mesa module type
- Date: Sun, 3 May 2009 08:22:28 -0400 (EDT)
commit 6dc67d6b647dcda4b3baf67fb16d2c0031029bad
Author: Frederic Peters <fpeters 0d be>
Date: Sun May 3 14:19:52 2009 +0200
remove obsolete mesa module type
---
jhbuild/modtypes/mesa.py | 156 ----------------------------------------------
1 files changed, 0 insertions(+), 156 deletions(-)
diff --git a/jhbuild/modtypes/mesa.py b/jhbuild/modtypes/mesa.py
deleted file mode 100644
index 329f0bb..0000000
--- a/jhbuild/modtypes/mesa.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# jhbuild - a build script for GNOME 1.x and 2.x
-# Copyright (C) 2001-2006 James Henstridge
-# Copyright (C) 2006-2007 Eric Anholt
-#
-# perl.py: perl module type definitions.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-__metaclass__ = type
-
-import os
-import glob
-import platform
-
-from jhbuild.errors import BuildStateError
-from jhbuild.modtypes import \
- Package, get_dependencies, get_branch, register_module_type
-
-__all__ = [ 'MesaModule' ]
-
-class MesaModule(Package):
- """Base type for building Mesa."""
- type = 'mesa'
-
- STATE_CHECKOUT = 'checkout'
- STATE_FORCE_CHECKOUT = 'force_checkout'
- STATE_BUILD = 'build'
- STATE_INSTALL = 'install'
-
- def __init__(self, name, branch, makeargs='',
- dependencies=[], after=[], suggests=[], extra_env = None):
- Package.__init__(self, name, dependencies, after, suggests, extra_env)
- self.branch = branch
- self.makeargs = makeargs
-
- def get_srcdir(self, buildscript):
- return self.branch.srcdir
-
- def get_builddir(self, buildscript):
- return self.get_srcdir(buildscript)
-
- def get_revision(self):
- return self.branch.branchname
-
- def get_mesa_config(self):
- uname = platform.uname();
- if uname[0] == 'FreeBSD':
- if uname[4] == 'i386':
- config = 'freebsd-dri-x86'
- elif uname[4] == 'amd64':
- config = 'freebsd-dri-amd64'
- else:
- config = 'freebsd-dri'
- if uname[0] == 'Linux':
- if uname[4] == 'i386':
- config = 'linux-dri-x86'
- elif uname[4] == 'x86_64':
- config = 'linux-dri-x86-64'
- else:
- config = 'linux-dri'
- return config
-
- def do_start(self, buildscript):
- pass
- do_start.next_state = STATE_CHECKOUT
- do_start.error_states = []
-
- def do_checkout(self, buildscript):
- self.checkout(buildscript)
- do_checkout.next_state = STATE_BUILD
- do_checkout.error_states = [STATE_FORCE_CHECKOUT]
-
- def skip_force_checkout(self, buildscript, last_state):
- return False
-
- def do_force_checkout(self, buildscript):
- buildscript.set_action(_('Checking out'), self)
- self.branch.force_checkout(buildscript)
- do_force_checkout.next_state = STATE_BUILD
- do_force_checkout.error_states = [STATE_FORCE_CHECKOUT]
-
- def skip_build(self, buildscript, last_state):
- return buildscript.config.nobuild
-
- def do_build(self, buildscript):
- buildscript.set_action(_('Building'), self)
- builddir = self.get_builddir(buildscript)
- make = os.environ.get('MAKE', 'make')
- if (os.path.exists(builddir + '/configs/current')):
- buildscript.execute([make], cwd = builddir,
- extra_env = self.extra_env)
- else:
- buildscript.execute([make, self.get_mesa_config()], cwd = builddir,
- extra_env = self.extra_env)
- do_build.next_state = STATE_INSTALL
- do_build.error_states = [STATE_FORCE_CHECKOUT]
-
- def skip_install(self, buildscript, last_state):
- return buildscript.config.nobuild
-
- def do_install(self, buildscript):
- buildscript.set_action(_('Installing'), self)
- builddir = self.get_builddir(buildscript)
- prefix = buildscript.config.prefix
-
- buildscript.execute(
- ['mkdir', '-p', prefix + '/lib/dri'], cwd = builddir)
- for x in glob.glob(builddir + '/lib/libGL*'):
- buildscript.execute(
- ['cp', x, prefix + '/lib'], cwd = builddir)
- for x in glob.glob(builddir + '/lib/*_dri.so'):
- buildscript.execute(
- ['cp', x, prefix + '/lib/dri'], cwd = builddir)
- for x in glob.glob(builddir + '/include/GL/*.h'):
- buildscript.execute(
- ['cp', x, prefix + '/include/GL'], cwd = builddir)
- buildscript.packagedb.add(self.name, self.get_revision() or '')
- do_install.next_state = Package.STATE_DONE
- do_install.error_states = []
-
- def xml_tag_and_attrs(self):
- return 'mesa', [('id', 'name', None),
- ('makeargs', 'makeargs', '')]
-
-
-def parse_mesa(node, config, uri, repositories, default_repo):
- id = node.getAttribute('id')
- makeargs = ''
- if node.hasAttribute('makeargs'):
- makeargs = node.getAttribute('makeargs')
-
- # override revision tag if requested.
- makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
-
- dependencies, after, suggests = get_dependencies(node)
- extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
-
- return MesaModule(id, branch, makeargs,
- dependencies = dependencies, after = after,
- suggests = suggests, extra_env = extra_env)
-register_module_type('mesa', parse_mesa)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]