Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
m---------build-scripts/jhbuild0
-rw-r--r--snapshot.py200
-rwxr-xr-xsugar-jhbuild12
-rw-r--r--xulrunner-beta2.patch56
5 files changed, 12 insertions, 259 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..5d47a68
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "build-scripts/jhbuild"]
+ path = build-scripts/jhbuild
+ url = git://dev.laptop.org/users/marco/jhbuild
diff --git a/build-scripts/jhbuild b/build-scripts/jhbuild
new file mode 160000
+Subproject e81d136f265dd65c0f21f2735b03250d6437fd4
diff --git a/snapshot.py b/snapshot.py
deleted file mode 100644
index 9b9c9be..0000000
--- a/snapshot.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# jhbuild - a build script for GNOME 1.x and 2.x
-# Copyright (C) 2001-2006 James Henstridge
-#
-# base.py: the most common jhbuild commands
-#
-# 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
-
-import os
-import re
-import subprocess
-import time
-
-import jhbuild.moduleset
-import jhbuild.frontends
-from jhbuild.commands import Command, register_command
-
-class PackageInfo(object):
- def __init__(self, tarball, name, version, commitid, news):
- self.tarball = tarball
- self.name = name
- self.version = version
- self.commitid = commitid
- self.news = news
-
- def get_package_dir(self):
- return os.path.join(os.environ['FEDORA_CVS_ROOT'],
- self.name, 'OLPC-2')
-
-def get_name_and_version():
- f = open('configure.ac', 'r')
- config = f.read()
- f.close()
-
- exp = 'AC_INIT\(\[[^\]]+\],\[([^\]]+)\],\[\],\[([^\]]+)\]'
- match = re.search(exp, config)
- if not match:
- print 'Cannot find the package name and version.'
- sys.exit(0)
-
- return [ match.group(2), match.group(1) ]
-
-def build_rpm(info):
- alphatag = time.strftime('%Y%m%dgit', time.gmtime())
- spec_filename = '%s.spec' % info.name
-
- f = open(spec_filename, 'r')
- spec = f.read()
- f.close()
-
- spec = re.sub('define\salphatag.*', 'define alphatag %s' % alphatag, spec)
- spec = re.sub('define\scommitid.*',
- 'define commitid %s' % info.commitid, spec)
-
- match = re.search('Release\:\s[0-9]+\.([0-9]*)', spec)
- release = int(match.group(1)) + 1
-
- spec_release = '0.%d.%%{alphatag}.%%{commitid}' % release
- spec = re.sub('Release:\s.*', 'Release: ' + spec_release, spec)
-
- date = time.strftime('%a %b %d %Y', time.localtime())
- name = os.environ['FEDORA_FULL_NAME'] + ' <%s>' % os.environ['FEDORA_EMAIL']
- clog_release = '0.%d.%s%s' % (release, alphatag, info.commitid)
- header = '* %s %s - %s-%s' % (date, name, info.version, clog_release)
- news = info.news.replace('*', '-')
-
- before, sep, after = spec.partition('%changelog')
- spec = before + sep + '\n%s\n%s' % (header, news) + after
-
- f = open(spec_filename, 'w')
- f.write(spec)
- f.close()
-
- if subprocess.call(['make', 'new-sources', 'FILES=%s' % info.tarball]) != 0:
- return
-
- if subprocess.call(['make', 'clog']) != 0:
- return
-
- if subprocess.call(['cvs', 'commit', '-F', './clog']) != 0:
- return
-
- if subprocess.call(['make', 'tag']) != 0:
- return
-
- if subprocess.call(['make', 'build']) != 0:
- return
-
- return True
-
-def build_tarball():
- [ name, version ] = get_name_and_version()
-
- for env in ['FEDORA_CVS_ROOT', 'FEDORA_FULL_NAME', 'FEDORA_EMAIL']:
- if env not in os.environ:
- print 'Please set the %s environment variable.' % env
- return None
-
- print 'Update git...'
-
- retcode = subprocess.call(['git', 'pull'])
- if retcode:
- print 'ERROR - cannot pull from git'
- return None
-
- cmd = 'git-show-ref --hash=10 refs/heads/master'
- commitid = os.popen(cmd).readline().strip()
-
- tarball = '%s-%s-git%s.tar.bz2' % (name, version, commitid)
-
- print 'Build %s...' % tarball
-
- retcode = subprocess.call(['make', 'distcheck'])
- if retcode:
- return None
-
- os.rename('%s-%s.tar.bz2' % (name, version), tarball)
-
- print 'Update NEWS...'
-
- f = open('NEWS', 'r')
- news = f.read()
-
- f.seek(0)
- snapshot_news = ''
- for line in f.readlines():
- if len(line.strip()) > 0:
- snapshot_news += line
- else:
- break
-
- f.close()
-
- news = 'Snapshot %s\n\n' % commitid + news
-
- f = open('NEWS', 'w')
- f.write(news)
- f.close()
-
- print 'Committing to git...'
-
- changelog = 'Snapshot %s.' % commitid
- retcode = subprocess.call(['git', 'commit', '-a', '-m % s' % changelog])
- if retcode:
- print 'ERROR - cannot commit to git'
- return None
-
- retcode = subprocess.call(['git', 'push'])
- if retcode:
- print 'ERROR - cannot push to git'
- return None
-
- return PackageInfo(os.path.abspath(tarball), name,
- version, commitid, snapshot_news)
-
-class cmd_snapshot(Command):
- """Build a snapshot """
-
- name = 'snapshot'
- usage_args = '[ options ... ] [ modules ... ]'
-
- def __init__(self):
- Command.__init__(self)
-
- def run(self, config, options, args):
- module_set = jhbuild.moduleset.load(config)
- try:
- module_list = [module_set.modules[modname] for modname in args]
- except KeyError, e:
- raise FatalError("A module called '%s' could not be found."
- % str(e))
-
- build = jhbuild.frontends.get_buildscript(config, module_list)
-
- for module in module_list:
- old_cwd = os.getcwd()
-
- os.chdir(module.get_srcdir(build))
-
- package_info = build_tarball()
- if package_info:
- package_dir = package_info.get_package_dir()
- if package_dir:
- os.chdir(package_dir)
- build_rpm(package_info)
-
- os.chdir(old_cwd)
-
-register_command(cmd_snapshot)
diff --git a/sugar-jhbuild b/sugar-jhbuild
index 5cd450c..5f964fa 100755
--- a/sugar-jhbuild
+++ b/sugar-jhbuild
@@ -5,13 +5,19 @@ import sys
import subprocess
base_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.join(base_dir, 'build-scripts', 'jhbuild'))
+jhbuild_dir = os.path.join(base_dir, 'build-scripts', 'jhbuild')
+sys.path.append(jhbuild_dir)
# The update needs to be very early, before we load any module
if len(sys.argv) == 1 or (len(sys.argv) > 1 and sys.argv[1] == 'build'):
print 'Updating sugar-jhbuild...'
- retcode = subprocess.call(['git', 'pull'])
- if retcode:
+
+ try:
+ subprocess.check_call(['git', 'pull'])
+ if not os.path.exists(os.path.join(jhbuild_dir, '.git')):
+ subprocess.check_call(['git', 'submodule', 'init'])
+ subprocess.check_call(['git', 'submodule', 'update'])
+ except subprocess.CalledProcessError:
print 'sugar-jhbuild update failed.'
import main
diff --git a/xulrunner-beta2.patch b/xulrunner-beta2.patch
deleted file mode 100644
index 0e07519..0000000
--- a/xulrunner-beta2.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff --git a/build-scripts/patches/xulrunner-no-native-theme.patch b/build-scripts/patches/xulrunner-no-native-theme.patch
-index 2c1f263..268f861 100644
---- a/build-scripts/patches/xulrunner-no-native-theme.patch
-+++ b/build-scripts/patches/xulrunner-no-native-theme.patch
-@@ -1,6 +1,6 @@
----- /tmp/nsNativeThemeGTK.cpp 2007-12-13 20:18:32.000000000 +0100
--+++ widget/src/gtk2/nsNativeThemeGTK.cpp 2007-12-13 20:19:01.000000000 +0100
--@@ -983,48 +983,6 @@
-+--- /tmp/nsNativeThemeGTK.cpp 2008-01-09 10:51:55.000000000 +0100
-++++ widget/src/gtk2/nsNativeThemeGTK.cpp 2008-01-09 11:29:02.000000000 +0100
-+@@ -1070,48 +1070,6 @@
- return PR_FALSE;
-
- switch (aWidgetType) {
-@@ -15,7 +15,7 @@
- - case NS_THEME_TOOLBAR_BUTTON:
- - case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
- - // case NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN:
--- // case NS_THEME_TOOLBAR_SEPARATOR:
-+- case NS_THEME_TOOLBAR_SEPARATOR:
- - case NS_THEME_TOOLBAR_GRIPPER:
- - case NS_THEME_STATUSBAR:
- - case NS_THEME_STATUSBAR_PANEL:
-@@ -49,7 +49,7 @@
- case NS_THEME_SCROLLBAR_BUTTON_UP:
- case NS_THEME_SCROLLBAR_BUTTON_DOWN:
- case NS_THEME_SCROLLBAR_BUTTON_LEFT:
--@@ -1033,40 +991,7 @@
-+@@ -1120,42 +1078,7 @@
- case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
- case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
- case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
-@@ -73,6 +73,8 @@
- - case NS_THEME_MENUBAR:
- - case NS_THEME_MENUPOPUP:
- - case NS_THEME_MENUITEM:
-+- case NS_THEME_MENUARROW:
-+- case NS_THEME_MENUSEPARATOR:
- - case NS_THEME_CHECKMENUITEM:
- - case NS_THEME_RADIOMENUITEM:
- - case NS_THEME_WINDOW:
-diff --git a/build-scripts/sugar-platform.modules b/build-scripts/sugar-platform.modules
-index 6a911ec..e0ad606 100644
---- a/build-scripts/sugar-platform.modules
-+++ b/build-scripts/sugar-platform.modules
-@@ -58,8 +58,8 @@
- </dependencies>
- </tarball>
- <tarball id="xulrunner" autogenargs="--disable-accessibility --with-pthreads --disable-strip --disable-tests --disable-debug --disable-installer --enable-optimize --enable-xinerama --enable-default-toolkit=cairo-gtk2 --disable-xprint --enable-pango --enable-svg --enable-canvas --enable-application=xulrunner --disable-javaxpcom --disable-gnomeui --disable-gnomevfs --disable-airbag --enable-extensions=default,cookie,python/xpcom --disable-crashreporter" version="1.9.20071120cvs">
-- <source href="http://dev.laptop.org/pub/sugar/xulrunner/xulrunner-1.9.20071120cvs.tar.bz2"
-- size="32517234" md5sum="6308ffcb08fa88ac14761a2acf622f6f"/>
-+ <source href="http://dev.laptop.org/pub/sugar/xulrunner/xulrunner-1.9.beta2.20071212cvs.tar.bz2"
-+ size="32444484" md5sum="23d1f8252770992723652398a8c67d2b"/>
- <dependencies>
- </dependencies>
- <patches>