[ease/waf] Major waf cleanup
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/waf] Major waf cleanup
- Date: Tue, 14 Dec 2010 14:26:18 +0000 (UTC)
commit 8dd8e41d39a5ef1a63d332f80d9c2c70e071c08e
Author: Robert Carr <racarr gnome org>
Date: Tue Dec 14 09:25:45 2010 -0500
Major waf cleanup
ease-core/wscript | 78 +++++++++++++++++++++++----------------------
ease/wscript | 90 ++++++++++++++++++++++++----------------------------
flutter/wscript | 12 ++-----
wscript | 85 ++++++++++++++++++++++++++-----------------------
4 files changed, 130 insertions(+), 135 deletions(-)
---
diff --git a/ease-core/wscript b/ease-core/wscript
index 63a10b4..b28c891 100644
--- a/ease-core/wscript
+++ b/ease-core/wscript
@@ -1,52 +1,54 @@
#!/usr/bin/env python
-ease_core_files = '''ease-actor.vala ease-animated-zoom-slider.vala ease-archiver.vala
-ease-background.vala ease-background-widget.vala ease-cairo-actor.vala ease-cairo-element.vala
- ease-color.vala ease-dialog-progress.vala ease-dialogs.vala
- ease-document.vala ease-element.vala ease-enums.vala
- ease-gradient.vala ease-html-exporter.vala ease-icon-view.vala
- ease-image-actor.vala ease-image-element.vala ease-image.vala
- ease-iterable-models.vala ease-media-element.vala ease-plugin-import-media.vala
- ease-plugin-import-service.vala ease-pdf-actor.vala ease-pdf-element.vala
- ease-scrolled-embed.vala ease-scrolled-embed-window.vala ease-shape-element.vala
- ease-slide.vala ease-temp.vala ease-text-actor.vala
- ease-text-element.vala ease-theme.vala ease-transformations.vala
- ease-transitions.vala ease-undo-actions-element.vala ease-undo-actions-slide.vala
- ease-undo-action.vala ease-undo-controller.vala ease-undo-item.vala
- ease-undo-source.vala ease-utilities.vala ease-video-actor.vala
- ease-video-element.vala ease-zoom-slider.vala sourcelist/source-base-group.vala
- sourcelist/source-base-view.vala sourcelist/source-expandable-group.vala sourcelist/source-group.vala
- sourcelist/source-item.vala sourcelist/source-list.vala sourcelist/source-number-item.vala
- sourcelist/source-pane-view.vala sourcelist/source-spinner-item.vala sourcelist/source-view.vala'''
-
-ease_core_packages = ''' clutter-gst-1.0 clutter-gtk-0.10 gee-1.0 gmodule-2.0 json-glib-1.0 libarchive poppler-glib rest-extras-0.6 unique-1.0'''
+ease_core_files = ["ease-actor.vala",
+ "ease-animated-zoom-slider.vala", "ease-archiver.vala",
+ "ease-background.vala", "ease-background-widget.vala",
+ "ease-cairo-actor.vala", "ease-cairo-element.vala",
+ "ease-color.vala", "ease-dialog-progress.vala",
+ "ease-dialogs.vala", "ease-document.vala",
+ "ease-element.vala", "ease-enums.vala",
+ "ease-gradient.vala", "ease-html-exporter.vala",
+ "ease-icon-view.vala", "ease-image-actor.vala",
+ "ease-image-element.vala", "ease-image.vala",
+ "ease-iterable-models.vala", "ease-media-element.vala",
+ "ease-plugin-import-media.vala", "ease-plugin-import-service.vala",
+ "ease-pdf-actor.vala", "ease-pdf-element.vala",
+ "ease-scrolled-embed.vala", "ease-scrolled-embed-window.vala",
+ "ease-shape-element.vala", "ease-slide.vala",
+ "ease-temp.vala", "ease-text-actor.vala",
+ "ease-text-element.vala", "ease-theme.vala",
+ "ease-transformations.vala", "ease-transitions.vala",
+ "ease-undo-actions-element.vala", "ease-undo-actions-slide.vala",
+ "ease-undo-action.vala", "ease-undo-controller.vala",
+ "ease-undo-item.vala", "ease-undo-source.vala",
+ "ease-utilities.vala", "ease-video-actor.vala",
+ "ease-video-element.vala", "ease-zoom-slider.vala",
+ "sourcelist/source-base-group.vala", "sourcelist/source-base-view.vala",
+ "sourcelist/source-expandable-group.vala", "sourcelist/source-group.vala",
+ "sourcelist/source-item.vala", "sourcelist/source-list.vala",
+ "sourcelist/source-number-item.vala", "sourcelist/source-pane-view.vala",
+ "sourcelist/source-spinner-item.vala", "sourcelist/source-view.vala"]
+
+ease_core_packages = ["clutter-gst-1.0", "clutter-gtk-0.10", "gee-1.0", "gmodule-2.0", "json-glib-1.0", "libarchive", "poppler-glib", "rest-extras-0.6", "unique-1.0"]
def build(bld):
- version = bld.EASE_CORE_VERSION
- library_name = 'ease-core-%s' % (version,)
- prog = bld(features='cc cshlib', after='flutter')
- # symbolic name used to reference this object
+ version = bld.env["EASE_CORE_VERSION"][0]
+ print version
+ library_name = 'ease-core-' + version
+
+ prog = bld(features='c cshlib', after='flutter')
+
prog.name = "ease-core"
- # name of the resulting program
prog.target = library_name
- prog.includes = '..'
- prog.source = ease_core_files
+ prog.source = " ".join(ease_core_files)
- prog.ccflags = ['-include', 'config.h']
-
- # libraries to link against
+ prog.cflags = ['-include', 'config.h']
prog.uselib = 'GOBJECT CLUTTER GEE CLUTTERGST GMODULE LIBARCHIVE POPPLERGLIB RESTEXTRAS CLUTTERGTK JSONGLIB'
- # Vala packages to usexo
- prog.packages = 'flutter-%s ' % (bld.FLUTTER_VERSION,)
- prog.packages += ease_core_packages
+ prog.packages = 'flutter-' + bld.env["FLUTTER_VERSION"][0]
+ prog.packages += " ".join(ease_core_packages)
- # Extra vapi dirs
- #prog.vapi_dirs = '../my_lib ../my_other_lib'
- # Enable threading
- #prog.threading = True
-# bld.install_files('%{PREFIX}/include/ease', ["ease-core-%s.h" % (bld.EASE_CORE_VERSION,)])
diff --git a/ease/wscript b/ease/wscript
index 79959a6..3a4f6f5 100644
--- a/ease/wscript
+++ b/ease/wscript
@@ -1,61 +1,55 @@
-from waflib.TaskGen import after
#!/usr/bin/env python
-ease_files =''' ease-about-dialog.vala
- ease-close-confirm-dialog.vala
- ease-editor-embed.vala
- ease-editor-window.vala
- ease-handle.vala
- ease-import-dialog.vala
- ease-import-flickr-media.vala
- ease-import-flickr-service.vala
- ease-import-oca-media.vala
- ease-import-oca-service.vala
- ease-import-widget.vala
- ease-inspector-element-pane.vala
- ease-inspector-pane.vala
- ease-inspector-slide-pane.vala
- ease-inspector-transition-pane.vala
- ease-inspector.vala
- ease-main.vala
- ease-player.vala
- ease-selection-rectangle.vala
- ease-slide-actor.vala
- ease-slide-button-panel.vala
- ease-slide-sorter.vala
- ease-welcome-actor.vala
- ease-welcome-window.vala '''
-
-ease_packages = '''clutter-gst-1.0 clutter-gtk-0.10 gee-1.0 gmodule-2.0 json-glib-1.0 libarchive poppler-glib rest-extras-0.6 unique-1.0'''
-
- after('ease-core')
+
+ease_files = [ "ease-about-dialog.vala",
+ "ease-close-confirm-dialog.vala",
+ "ease-editor-embed.vala",
+ "ease-editor-window.vala",
+ "ease-handle.vala",
+ "ease-import-dialog.vala",
+ "ease-import-flickr-media.vala",
+ "ease-import-flickr-service.vala",
+ "ease-import-oca-media.vala",
+ "ease-import-oca-service.vala",
+ "ease-import-widget.vala",
+ "ease-inspector-element-pane.vala",
+ "ease-inspector-pane.vala",
+ "ease-inspector-slide-pane.vala",
+ "ease-inspector-transition-pane.vala",
+ "ease-inspector.vala",
+ "ease-main.vala",
+ "ease-player.vala",
+ "ease-selection-rectangle.vala",
+ "ease-slide-actor.vala",
+ "ease-slide-button-panel.vala",
+ "ease-slide-sorter.vala",
+ "ease-welcome-actor.vala",
+ "ease-welcome-window.vala"]
+
+ease_packages = [ "clutter-gst-1.0", "clutter-gtk-0.10", "gee-1.0",
+ "gmodule-2.0", "json-glib-1.0", "libarchive", "poppler-glib",
+ "rest-extras-0.6", "unique-1.0"]
+
+
def build(bld):
- prog = bld(features='cc cprogram', after='ease-core')
+ prog = bld(features='cc cprogram')
- # symbolic name used to reference this object
- prog.name = 'ease.program'
- prog.depends_on = 'ease-core'
- # name of the resulting program
+ prog.name = 'ease'
prog.target = 'ease'
- prog.source = ease_files
+
+ prog.source = " ".join(ease_files)
- prog.includes = "../ease-core ../flutter"
+# prog.includes = "../ease-core ../flutter"
- prog.after = "ease-core"
-
- prog.ccflags = ['-include', 'config.h']
-
- # libraries to link against
+ prog.cflags = ['-include', 'config.h']
prog.uselib = 'GTK+ GOBJECT CLUTTER GEE CLUTTERGST GMODULE LIBARCHIVE POPPLERGLIB RESTEXTRAS CLUTTERGTK JSONGLIB UNIQUE'
- # Vala packages to use
- prog.packages = 'flutter-%s ' % (bld.FLUTTER_VERSION,)
- prog.packages += 'ease-core-%s ' % (bld.EASE_CORE_VERSION, )
- prog.packages += ease_packages
- # Extra vapi dirs
- #prog.vapi_dirs = '../my_lib'
+ prog.packages = 'flutter-' + bld.env["FLUTTER_VERSION"][0] + " "
+ prog.packages += 'ease-core-' + bld.env["EASE_CORE_VERSION"][0] + " "
+ prog.packages += " ".join(ease_packages)
+
prog.vapi_dirs = '../ease-core ../flutter'
- prog.uselib_local = 'ease-core flutter'
+ prog.use = 'ease-core flutter'
# Enable threading
#prog.threading = True
diff --git a/flutter/wscript b/flutter/wscript
index cea0eb6..edaf2a0 100644
--- a/flutter/wscript
+++ b/flutter/wscript
@@ -3,21 +3,15 @@
def build(bld):
version = bld.FLUTTER_VERSION
library_name = 'flutter-%s' % (version, )
- vapi_name = 'flutter-%s.vapi' % (version, )
- prog = bld(features='cc cshlib')
- # symbolic name used to reference this object
+ prog = bld(features='c cshlib')
prog.name = 'flutter'
- # name of the resulting program
prog.target = library_name
prog.source = 'flutter.vala'
prog.includes = '..'
- # libraries to link against
prog.uselib = 'GOBJECT CLUTTER'
+
# Vala packages to use
prog.packages = 'clutter-1.0'
- # Extra vapi dirs
- #prog.vapi_dirs = '../my_lib ../my_other_lib'
- # Enable threading
- #prog.threading = True
+
diff --git a/wscript b/wscript
index e1e177f..aef3718 100644
--- a/wscript
+++ b/wscript
@@ -2,52 +2,40 @@
from waflib import TaskGen
-VERSION = PACKAGE_VERSION = "0.5"
+PACKAGE_VERSION = "ease-0.5"
+VERSION = "0.5"
EASE_VERSION = "0.5"
EASE_CORE_VERSION = "0.5"
FLUTTER_VERSION = "0.5"
APPNAME = "ease"
top = '.'
-out = '_build_'
+out = ''
def options(opt):
opt.tool_options('compiler_c')
opt.tool_options('gnu_dirs')
-def configure(conf):
- conf.load('intltool')
- conf.check_tool('compiler_c vala gnu_dirs')
-
- conf.env.append_value('FLUTTER_VERSION', FLUTTER_VERSION)
- conf.env.append_value('EASE_CORE_VERSION', EASE_CORE_VERSION)
- conf.env.append_value('EASE_VERSION', EASE_VERSION)
- conf.env.append_value('PACKAGE_VERSION', PACKAGE_VERSION)
-
- conf.check_cfg(package='clutter-1.0', uselib_store='CLUTTER',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='clutter-gst-1.0', uselib_store='CLUTTERGST',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='gee-1.0', uselib_store='GEE',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='gmodule-2.0', uselib_store='GMODULE',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='libarchive', uselib_store='LIBARCHIVE',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='poppler-glib', uselib_store='POPPLERGLIB',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='rest-0.6', uselib_store='REST',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='rest-extras-0.6', uselib_store='RESTEXTRAS',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='unique-1.0', uselib_store='UNIQUE',
- mandatory=True, args='--cflags --libs')
- conf.check_cfg(package='clutter-gtk-0.10', uselib_store='CLUTTERGTK',
- atleast_version='0.10', mandatory=True, args='--cflags --libs')
-
- conf.check_cfg(package='json-glib-1.0', uselib_store='JSONGLIB',
- atleast_version='0.7.6', mandatory=True, args='--cflags --libs')
-
+def library_check(conf):
+ libraries = (
+ ("clutter-1.0", "CLUTTER", None),
+ ("clutter-gst-1.0", "CLUTTERGST", None),
+ ("gee-1.0", "GEE", None),
+ ("gmodule-2.0", "GMODULE", None),
+ ("libarchive", "LIBARCHIVE", None),
+ ("poppler-glib", "POPPLERGLIB", None),
+ ("rest-0.6", "REST", None),
+ ("rest-extras-0.6", "RESTEXTRAS",None),
+ ("unique-1.0", "UNIQUE", None),
+ ("clutter-gtk-0.10", "CLUTTERGTK", "0.10"),
+ ("json-glib-1.0", "JSONGLIB", "0.7.6")
+ )
+ for (package, uselib, version) in libraries:
+ conf.check_cfg(package=package, uselib_store=uselib,
+ mandatory=True, version=version,
+ args='--cflags --libs')
+
+def write_config_header(conf):
conf.define('PACKAGE', APPNAME)
conf.define('PACKAGE_NAME', APPNAME)
conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
@@ -57,13 +45,30 @@ def configure(conf):
conf.define('FLUTTER_VERSION', FLUTTER_VERSION)
conf.define('EASE_CORE_VERSION', EASE_CORE_VERSION)
- conf.define('EASE_DATA_DIR', '%{PREFIX}/share')
+ conf.define('EASE_DATA_DIR', '%{DATADIR}')
conf.define('GETTEXT_PACKAGE', 'ease')
conf.write_config_header('config.h')
-def build_pkgconfig(bld, name):
+def configure(conf):
+ conf.load('intltool')
+ conf.check_tool('compiler_c vala gnu_dirs')
+
+
+ # For pkgconfig substitution.
+ conf.env.append_value('FLUTTER_VERSION', FLUTTER_VERSION)
+ conf.env.append_value('EASE_CORE_VERSION', EASE_CORE_VERSION)
+ conf.env.append_value('EASE_VERSION', EASE_VERSION)
+ conf.env.append_value('PACKAGE_VERSION', PACKAGE_VERSION)
+
+ write_config_header(conf)
+
+ library_check(conf)
+
+
+
+def build_pkgconfig_file(bld, name):
obj = bld(features = "subst_pc",
source = name,
install_path = "${LIBDIR}/pkgconfig")
@@ -90,10 +95,10 @@ def build(bld):
bld.add_subdirs('ease')
bld.add_group()
- build_pkgconfig(bld, "pkgconfig/ease-core-0.5.pc.in")
- build_pkgconfig(bld, "pkgconfig/flutter-0.5.pc.in")
+ build_pkgconfig_file(bld, "pkgconfig/ease-core-0.5.pc.in")
+ build_pkgconfig_file(bld, "pkgconfig/flutter-0.5.pc.in")
- build_po
+ build_po(bld)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]