('Web Site', ''),
('Source Code', ''),
('Issue Tracker', ''),
+ ('Changelog', ''),
('Donate', None),
('FlattrID', None),
('Bitcoin', None),
('scandelete', []),
('build', ''),
('buildjni', []),
- ('ndk', 'r9b'), # defaults to oldest
+ ('ndk', 'r10e'), # defaults to latest
('preassemble', []),
('antcommands', None),
('novcheck', False),
FieldValidator("HTTP link",
r'^http[s]?://', None,
- ["Web Site", "Source Code", "Issue Tracker", "Donate"], []),
+ ["Web Site", "Source Code", "Issue Tracker", "Changelog", "Donate"], []),
FieldValidator("Bitcoin address",
r'^[a-zA-Z0-9]{27,34}$', None,
else:
urltxt = url[index2 + 1:]
url = url[:index2]
- if ':' not in url:
- raise MetaDataException("'%s' doesn't look like an URL" % url)
linkified_html += '<a href="' + url + '">' + cgi.escape(urltxt) + '</a>'
linkified_plain += urltxt
if urltxt != url:
thisinfo['Repo'] = ''
thisinfo['Subdir'] = None
thisinfo['Prepare'] = None
- thisinfo['Srclibs'] = None
if metafile is None:
return thisinfo
build['ndk_path'] = common.get_ndk_path(build['ndk'])
+def split_list_values(s):
+ # Port legacy ';' separators
+ l = [v.strip() for v in s.replace(';', ',').split(',')]
+ return [v for v in l if v]
+
+
# Parse metadata for a single application.
#
# 'metafile' - the filename to read. The package id for the application comes
linedesc = None
def add_buildflag(p, thisbuild):
+ if not p.strip():
+ raise MetaDataException("Empty build flag at {1}"
+ .format(buildlines[0], linedesc))
bv = p.split('=', 1)
if len(bv) != 2:
raise MetaDataException("Invalid build flag at {0} in {1}"
.format(p, linedesc))
t = flagtype(pk)
if t == 'list':
- # Port legacy ';' separators
- pv = [v.strip() for v in pv.replace(';', ',').split(',')]
+ pv = split_list_values(pv)
if pk == 'gradle':
if len(pv) == 1 and pv[0] in ['main', 'yes']:
pv = ['yes']
elif fieldtype == 'string':
thisinfo[field] = value
elif fieldtype == 'list':
- thisinfo[field] = [v.strip() for v in value.replace(';', ',').split(',')]
+ thisinfo[field] = split_list_values(value)
elif fieldtype == 'build':
if value.endswith("\\"):
mode = 2
writefield('Web Site')
writefield('Source Code')
writefield('Issue Tracker')
+ writefield_nonempty('Changelog')
writefield_nonempty('Donate')
writefield_nonempty('FlattrID')
writefield_nonempty('Bitcoin')