--- /dev/null
+# Copyright 2014 Emmanuele Bassi
+#
+# SPDX-License-Identifier: MIT
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+import sys
+import re
+
+def rename_babl_object(text):
+ # We need this to rename the Babl type into BablObject
+ # Otherwise the type clashes with the namespace
+ if text == 'Babl':
+ return 'BablObject'
+
+ # Leave the rest unharmed
+ return text
+
+if __name__ == '__main__':
+ in_text = sys.stdin.read()
+ sys.stdout.write(rename_babl_object(in_text))
version: so_version,
install: true,
)
+
+if get_option('enable-gir')
+ # identity filter, so GIR doesn't choke on the Babl type
+ # (since it has the same name as the Babl namespace)
+ identfilter_py = join_paths(meson.current_source_dir(), 'identfilter.py')
+
+ babl_gir = gnome.generate_gir(babl,
+ sources: babl_headers,
+ extra_args: [
+ '--identifier-filter-cmd=@0@ @1@'.format(python.path(), identfilter_py),
+ '-DBABL_IS_BEING_COMPILED',
+ ],
+ namespace: 'Babl',
+ nsversion: '1',
+ header: 'babl.h',
+ install: true,
+ )
+endif
option('enable-sse4_1', type: 'boolean', value: true, description: 'enable SSE4.1 support')
option('enable-avx2', type: 'boolean', value: true, description: 'enable AVX2 support')
option('enable-f16c', type: 'boolean', value: true, description: 'enable hardware half-float support')
+option('enable-gir', type: 'boolean', value: true, description: 'enable GObject-Introspection (GIR)')
option('with-docs', type: 'boolean', value: true, description: 'build website')
option('with-lcms', type: 'boolean', value: true, description: 'build with lcms')