#!/usr/bin/env python import datetime import glob import os import rdflib import shutil import subprocess import sys from waflib.extras import autowaf as autowaf import waflib.Logs as Logs import waflib.Options as Options # Version of this package (even if built as a child) LV2EXT_VERSION = datetime.date.isoformat(datetime.datetime.now()).replace('-', '.') # Variables for 'waf dist' APPNAME = 'lv2plug.in' VERSION = LV2EXT_VERSION # Mandatory variables top = '.' out = 'build' def options(opt): opt.load('compiler_cc') opt.load('compiler_cxx') autowaf.set_options(opt) opt.add_option('--experimental', action='store_true', default=False, dest='experimental', help='Install unreleased experimental extensions') for i in ['core.lv2']: opt.recurse(i) def configure(conf): conf.load('compiler_cc') conf.load('compiler_cxx') autowaf.configure(conf) conf.env.append_unique('CFLAGS', '-std=c99') subdirs = ['core.lv2'] subdirs += glob.glob('ext/*.lv2/') subdirs += glob.glob('extensions/*.lv2/') for i in subdirs: conf.recurse(i) conf.env['LV2_SUBDIRS'] = subdirs def build(bld): for i in bld.env['LV2_SUBDIRS']: bld.recurse(i) def release(ctx): lv2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#') rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#') doap = rdflib.Namespace('http://usefulinc.com/ns/doap#') manifests = glob.glob('ext/*.lv2/manifest.ttl') manifests += glob.glob('extensions/*.lv2/manifest.ttl') for manifest in manifests: dir = os.path.dirname(manifest) name = os.path.basename(dir).replace('.lv2', '') m = rdflib.ConjunctiveGraph() m.parse(manifest, format='n3') uri = minor = micro = None try: spec = m.value(None, rdf.type, lv2.Specification) uri = str(spec) minor = int(m.value(spec, lv2.minorVersion, None)) micro = int(m.value(spec, lv2.microVersion, None)) except: e = sys.exc_info()[1] Logs.error('error: %s: %s' % (manifest, str(e))) continue if minor != 0 and micro % 2 == 0: try: subprocess.call( ['./waf', 'distclean', 'configure', 'build', 'distcheck', 'distclean'], cwd=dir) except: Logs.error('Error building %s release' % name) def lint(ctx): for i in (['core.lv2/lv2.h'] + glob.glob('ext/*/*.h') + glob.glob('extensions/*/*.h')): subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-whitespace/blank_line,-build/header_guard,-readability/casting,-readability/todo,-build/include ' + i, shell=True) git.cgi/lv2.git/plain/waf?h=static-urids&id=aa63498f846c0a6f783c01c266321aaa0596a4c8'>plain)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|