add sqlitebrowser (#8418)
* add sqlitebrowser Change-Id: I20cac709509e82d348cebc11b0d584b53b2ad3d4 * add message and clean up unnecessary code Change-Id: Ib9d2229ee25d751274680d06824891ee78fa5970 * and make flake8 happy Change-Id: I814eb89eefe1767af4d8043b08b61991750516df * make gcc-independence great again Change-Id: I75f7271757782a6735eb7f03c0551d190722974d * remove explicit import of dso_suffix Change-Id: I626c6391b22524895199db5508606c4cf22bf9b5
This commit is contained in:

committed by
Adam J. Stewart

parent
af881b8c2e
commit
1d3ad6ea7e
@@ -63,6 +63,19 @@ class Sqlite(AutotoolsPackage):
|
||||
# compiler is used.
|
||||
patch('remove_overflow_builtins.patch', when='@3.17.0:3.20%intel')
|
||||
|
||||
variant('functions', default=False,
|
||||
description='Provide mathematical and string extension functions '
|
||||
'for SQL queries using the loadable extensions '
|
||||
'mechanism.')
|
||||
|
||||
resource(name='extension-functions',
|
||||
url='https://sqlite.org/contrib/download/extension-functions.c/download/extension-functions.c?get=25',
|
||||
md5='3a32bfeace0d718505af571861724a43',
|
||||
expand=False,
|
||||
placement={'extension-functions.c?get=25':
|
||||
'extension-functions.c'},
|
||||
when='+functions')
|
||||
|
||||
def get_arch(self):
|
||||
arch = architecture.Arch()
|
||||
arch.platform = architecture.platform()
|
||||
@@ -75,3 +88,12 @@ def configure_args(self):
|
||||
args.append('--build=powerpc64le-redhat-linux-gnu')
|
||||
|
||||
return args
|
||||
|
||||
@run_after('install')
|
||||
def build_libsqlitefunctions(self):
|
||||
if '+functions' in self.spec:
|
||||
libraryname = 'libsqlitefunctions.' + dso_suffix
|
||||
cc = Executable(spack_cc)
|
||||
cc(self.compiler.pic_flag, '-lm', '-shared',
|
||||
'extension-functions.c', '-o', libraryname)
|
||||
install(libraryname, self.prefix.lib)
|
||||
|
Reference in New Issue
Block a user