head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC4:1.1.1.1.2.2 netbsd-11-0-RC3:1.1.1.1.2.2 netbsd-11-0-RC2:1.1.1.1.2.2 netbsd-11-0-RC1:1.1.1.1.2.2 netbsd-9:1.1.1.1.0.6 netbsd-10:1.1.1.1.0.4 netbsd-11:1.1.1.1.0.2 xkbcomp-1-5-0:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.1 date 2025.12.09.06.00.32; author mrg; state Exp; branches 1.1.1.1; next ; commitid rXOCxy6gW5LKgHlG; 1.1.1.1 date 2025.12.09.06.00.32; author mrg; state Exp; branches 1.1.1.1.2.1 1.1.1.1.4.1 1.1.1.1.6.1; next ; commitid rXOCxy6gW5LKgHlG; 1.1.1.1.2.1 date 2025.12.09.06.00.32; author martin; state dead; branches; next 1.1.1.1.2.2; commitid 4LfsjMPXG9eWJSlG; 1.1.1.1.2.2 date 2025.12.10.16.37.21; author martin; state Exp; branches; next ; commitid 4LfsjMPXG9eWJSlG; 1.1.1.1.4.1 date 2025.12.09.06.00.32; author martin; state dead; branches; next 1.1.1.1.4.2; commitid pawUR5Jzt6bT9OoG; 1.1.1.1.4.2 date 2026.01.02.11.01.42; author martin; state Exp; branches; next ; commitid pawUR5Jzt6bT9OoG; 1.1.1.1.6.1 date 2025.12.09.06.00.32; author martin; state dead; branches; next 1.1.1.1.6.2; commitid AXnzVUMwXRjydOoG; 1.1.1.1.6.2 date 2026.01.02.11.12.34; author martin; state Exp; branches; next ; commitid AXnzVUMwXRjydOoG; desc @@ 1.1 log @Initial revision @ text @# SPDX-License-Identifier: MIT # # Copyright (c) 2025, Pierre Le Marre # # 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 (including the next # paragraph) 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. # project( 'xkbcomp', 'c', default_options: ['buildtype=debugoptimized', 'c_std=gnu99'], version: '1.5.0', license: 'HPND', license_files: 'COPYING', meson_version: '>= 1.1.0', ) cc = meson.get_compiler('c') cflags = [ '-fno-strict-aliasing', '-Wall', '-Wpointer-arith', '-Wmissing-declarations', '-Wformat=2', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs', '-Wbad-function-cast', '-Wold-style-definition', '-Wunused', '-Wuninitialized', '-Wshadow', '-Wmissing-noreturn', '-Wmissing-format-attribute', '-Wredundant-decls', '-Werror=implicit', '-Werror=nonnull', '-Werror=init-self', '-Werror=main', '-Werror=missing-braces', '-Werror=sequence-point', '-Werror=return-type', '-Werror=trigraphs', '-Werror=array-bounds', '-Werror=write-strings', '-Werror=address', '-Werror=int-to-pointer-cast', '-Werror=pointer-to-int-cast', ] add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a') if bison.found() yacc = bison yacc_gen = generator( bison, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['--defines=@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else byacc = find_program('byacc', required: false) if byacc.found() yacc = byacc yacc_gen = generator( byacc, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['-H', '@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else error('Could not find a compatible YACC program (bison or byacc)') endif endif # The XKB config root. XKBCONFIGROOT = get_option('xkb-config-root') if XKBCONFIGROOT == '' xkeyboard_config_dep = dependency('xkeyboard-config', required: false) if xkeyboard_config_dep.found() XKBCONFIGROOT = xkeyboard_config_dep.get_variable(pkgconfig: 'xkb_base') else XKBCONFIGROOT = get_option('prefix') / get_option('datadir') / 'X11' / 'xkb' endif endif # TODO # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) # XORG_MACROS_VERSION(1.8) # XORG_DEFAULT_OPTIONS # TODO: AC_SYS_LARGEFILE # Checks for pkg-config packages xkbcomp_deps = { 'x11': [], 'xkbfile': [], } x11_dep = dependency('x11', version: xkbcomp_deps['x11']) xkbfile_dep = dependency('xkbfile', version: xkbcomp_deps['xkbfile']) xproto_dep = dependency('xproto', version: '>= 7.0.17') # config.h. xkbcomp_version = meson.project_version() configh_data = configuration_data() configh_data.set_quoted('PACKAGE_VERSION', meson.project_version()) configh_data.set_quoted('XKBCONFIGROOT', XKBCONFIGROOT) configh_data.set_quoted('DFLT_XKB_CONFIG_ROOT', XKBCONFIGROOT) # Like AC_USE_SYSTEM_EXTENSIONS, what #define to use to get extensions # beyond the base POSIX function set. if host_machine.system() == 'sunos' system_extensions = '__EXTENSIONS__' else system_extensions = '_GNU_SOURCE' endif configh_data.set(system_extensions, 1) system_ext_define = '#define ' + system_extensions if cc.has_header_symbol('stdio.h', 'asprintf', prefix: system_ext_define) configh_data.set('HAVE_ASPRINTF', 1) endif if cc.has_header_symbol('stdlib.h', 'reallocarray', prefix: system_ext_define) configh_data.set('HAVE_REALLOCARRAY', 1) endif if cc.has_header_symbol('stdlib.h', 'recallocarray', prefix: system_ext_define) configh_data.set('HAVE_RECALLOCARRAY', 1) endif config_h = configure_file(output: 'config.h', configuration: configh_data) add_project_arguments('-DHAVE_CONFIG_H', language: 'c') xkbcomp = executable( 'xkbcomp', 'action.c', 'action.h', 'alias.c', 'alias.h', 'compat.c', 'compat.h', config_h, 'expr.c', 'expr.h', 'geometry.c', 'indicators.c', 'indicators.h', 'keycodes.c', 'keycodes.h', 'keymap.c', 'keytypes.c', 'listing.c', 'misc.c', 'misc.h', 'parseutils.c', 'parseutils.h', 'symbols.c', 'tokens.h', 'utils.c', 'utils.h', 'vmod.c', 'vmod.h', 'xkbcomp.c', 'xkbcomp.h', yacc_gen.process('xkbparse.y'), 'xkbpath.c', 'xkbpath.h', 'xkbscan.c', include_directories: include_directories('.'), dependencies: [xkbfile_dep, x11_dep, xproto_dep], install: true, install_dir: join_paths(get_option('prefix'), get_option('bindir')), ) subdir('man') pkgconfig_data = configuration_data() pkgconfig_data.set('prefix', get_option('prefix')) pkgconfig_data.set('exec_prefix', '${prefix}') pkgconfig_data.set('bindir', join_paths('${exec_prefix}', get_option('bindir'))) pkgconfig_data.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_data.set('datadir', '${datarootdir}') pkgconfig_data.set('XKBCONFIGROOT', XKBCONFIGROOT) pkgconfig_data.set('PACKAGE_VERSION', meson.project_version()) xkbcomp_deps_list = [] foreach dep, versions : xkbcomp_deps if versions.length() == 0 xkbcomp_deps_list += dep else foreach version : versions xkbcomp_deps_list += [dep, version] endforeach endif endforeach pkgconfig_data.set('XKBCOMP_EXTRA_DEPS', ' '.join(xkbcomp_deps_list)) configure_file( input: 'xkbcomp.pc.in', output: 'xkbcomp.pc', configuration: pkgconfig_data, install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'), ) summary( { 'backend': meson.backend(), 'buildtype': get_option('buildtype'), 'id': cc.get_id(), 'c_args': get_option('c_args'), 'c_link_args': get_option('c_link_args'), 'yacc': yacc.full_path() + ' ' + yacc.version(), }, section: 'Compiler', ) summary( { 'prefix': get_option('prefix'), 'bindir': get_option('bindir'), 'libdir': get_option('libdir'), 'datadir': get_option('datadir'), 'xkb-config-root': XKBCONFIGROOT, }, section: 'Directories', ) @ 1.1.1.1 log @initial import of xkbcomp-1.5.0 @ text @@ 1.1.1.1.6.1 log @file meson.build was added on branch netbsd-9 on 2026-01-02 11:12:34 +0000 @ text @d1 240 @ 1.1.1.1.6.2 log @Pull up the following, requested by mrg in ticket #1992: external/mit/xkbcomp/dist/COPYING up to 1.1.1.2 external/mit/xkbcomp/dist/ChangeLog up to 1.1.1.16 external/mit/xkbcomp/dist/Makefile.am up to 1.1.1.8 external/mit/xkbcomp/dist/Makefile.in up to 1.1.1.14 external/mit/xkbcomp/dist/README up to 1.1.1.4 external/mit/xkbcomp/dist/aclocal.m4 up to 1.1.1.15 external/mit/xkbcomp/dist/action.c up to 1.1.1.5 external/mit/xkbcomp/dist/action.h up to 1.1.1.5 external/mit/xkbcomp/dist/alias.c up to 1.1.1.6 external/mit/xkbcomp/dist/alias.h up to 1.1.1.4 external/mit/xkbcomp/dist/compat.c up to 1.1.1.9 external/mit/xkbcomp/dist/compile up to 1.1.1.7 external/mit/xkbcomp/dist/config.guess up to 1.1.1.14 external/mit/xkbcomp/dist/config.h.in up to 1.1.1.6 external/mit/xkbcomp/dist/config.sub up to 1.1.1.14 external/mit/xkbcomp/dist/configure up to 1.1.1.16 external/mit/xkbcomp/dist/configure.ac up to 1.1.1.16 external/mit/xkbcomp/dist/depcomp up to 1.1.1.11 external/mit/xkbcomp/dist/expr.c up to 1.6 external/mit/xkbcomp/dist/expr.h up to 1.1.1.4 external/mit/xkbcomp/dist/geometry.c up to 1.1.1.7 external/mit/xkbcomp/dist/indicators.c up to 1.1.1.6 external/mit/xkbcomp/dist/indicators.h up to 1.1.1.5 external/mit/xkbcomp/dist/install-sh up to 1.1.1.10 external/mit/xkbcomp/dist/keycodes.c up to 1.1.1.9 external/mit/xkbcomp/dist/keycodes.h up to 1.1.1.3 external/mit/xkbcomp/dist/keymap.c up to 1.1.1.4 external/mit/xkbcomp/dist/keytypes.c up to 1.1.1.6 external/mit/xkbcomp/dist/listing.c up to 1.2 external/mit/xkbcomp/dist/misc.c up to 1.1.1.5 external/mit/xkbcomp/dist/misc.h up to 1.1.1.4 external/mit/xkbcomp/dist/missing up to 1.1.1.11 external/mit/xkbcomp/dist/parseutils.c up to 1.1.1.9 external/mit/xkbcomp/dist/parseutils.h up to 1.1.1.7 external/mit/xkbcomp/dist/symbols.c up to 1.1.1.11 external/mit/xkbcomp/dist/tokens.h up to 1.1.1.3 external/mit/xkbcomp/dist/utils.c up to 1.1.1.6 external/mit/xkbcomp/dist/utils.h up to 1.9 external/mit/xkbcomp/dist/vmod.c up to 1.1.1.5 external/mit/xkbcomp/dist/vmod.h up to 1.1.1.4 external/mit/xkbcomp/dist/xkbcomp.c up to 1.3 external/mit/xkbcomp/dist/xkbcomp.h up to 1.1.1.6 external/mit/xkbcomp/dist/xkbcomp.pc.in up to 1.1.1.4 external/mit/xkbcomp/dist/xkbparse.c up to 1.1.1.13 external/mit/xkbcomp/dist/xkbparse.y up to 1.1.1.8 external/mit/xkbcomp/dist/xkbpath.c up to 1.1.1.6 external/mit/xkbcomp/dist/xkbpath.h up to 1.1.1.3 external/mit/xkbcomp/dist/xkbscan.c up to 1.1.1.9 external/mit/xkbcomp/dist/ylwrap up to 1.1.1.11 external/mit/xkbcomp/dist/man/Makefile.am up to 1.1.1.3 external/mit/xkbcomp/dist/man/Makefile.in up to 1.1.1.9 external/mit/xkbcomp/dist/man/xkbcomp.man up to 1.1.1.5 Import xkbcomp 1.5.0, which fixes CVE-2018-15853, CVE-2018-15859, CVE-2018-15861, and CVE-2018-15863. @ text @a0 240 # SPDX-License-Identifier: MIT # # Copyright (c) 2025, Pierre Le Marre # # 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 (including the next # paragraph) 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. # project( 'xkbcomp', 'c', default_options: ['buildtype=debugoptimized', 'c_std=gnu99'], version: '1.5.0', license: 'HPND', license_files: 'COPYING', meson_version: '>= 1.1.0', ) cc = meson.get_compiler('c') cflags = [ '-fno-strict-aliasing', '-Wall', '-Wpointer-arith', '-Wmissing-declarations', '-Wformat=2', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs', '-Wbad-function-cast', '-Wold-style-definition', '-Wunused', '-Wuninitialized', '-Wshadow', '-Wmissing-noreturn', '-Wmissing-format-attribute', '-Wredundant-decls', '-Werror=implicit', '-Werror=nonnull', '-Werror=init-self', '-Werror=main', '-Werror=missing-braces', '-Werror=sequence-point', '-Werror=return-type', '-Werror=trigraphs', '-Werror=array-bounds', '-Werror=write-strings', '-Werror=address', '-Werror=int-to-pointer-cast', '-Werror=pointer-to-int-cast', ] add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a') if bison.found() yacc = bison yacc_gen = generator( bison, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['--defines=@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else byacc = find_program('byacc', required: false) if byacc.found() yacc = byacc yacc_gen = generator( byacc, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['-H', '@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else error('Could not find a compatible YACC program (bison or byacc)') endif endif # The XKB config root. XKBCONFIGROOT = get_option('xkb-config-root') if XKBCONFIGROOT == '' xkeyboard_config_dep = dependency('xkeyboard-config', required: false) if xkeyboard_config_dep.found() XKBCONFIGROOT = xkeyboard_config_dep.get_variable(pkgconfig: 'xkb_base') else XKBCONFIGROOT = get_option('prefix') / get_option('datadir') / 'X11' / 'xkb' endif endif # TODO # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) # XORG_MACROS_VERSION(1.8) # XORG_DEFAULT_OPTIONS # TODO: AC_SYS_LARGEFILE # Checks for pkg-config packages xkbcomp_deps = { 'x11': [], 'xkbfile': [], } x11_dep = dependency('x11', version: xkbcomp_deps['x11']) xkbfile_dep = dependency('xkbfile', version: xkbcomp_deps['xkbfile']) xproto_dep = dependency('xproto', version: '>= 7.0.17') # config.h. xkbcomp_version = meson.project_version() configh_data = configuration_data() configh_data.set_quoted('PACKAGE_VERSION', meson.project_version()) configh_data.set_quoted('XKBCONFIGROOT', XKBCONFIGROOT) configh_data.set_quoted('DFLT_XKB_CONFIG_ROOT', XKBCONFIGROOT) # Like AC_USE_SYSTEM_EXTENSIONS, what #define to use to get extensions # beyond the base POSIX function set. if host_machine.system() == 'sunos' system_extensions = '__EXTENSIONS__' else system_extensions = '_GNU_SOURCE' endif configh_data.set(system_extensions, 1) system_ext_define = '#define ' + system_extensions if cc.has_header_symbol('stdio.h', 'asprintf', prefix: system_ext_define) configh_data.set('HAVE_ASPRINTF', 1) endif if cc.has_header_symbol('stdlib.h', 'reallocarray', prefix: system_ext_define) configh_data.set('HAVE_REALLOCARRAY', 1) endif if cc.has_header_symbol('stdlib.h', 'recallocarray', prefix: system_ext_define) configh_data.set('HAVE_RECALLOCARRAY', 1) endif config_h = configure_file(output: 'config.h', configuration: configh_data) add_project_arguments('-DHAVE_CONFIG_H', language: 'c') xkbcomp = executable( 'xkbcomp', 'action.c', 'action.h', 'alias.c', 'alias.h', 'compat.c', 'compat.h', config_h, 'expr.c', 'expr.h', 'geometry.c', 'indicators.c', 'indicators.h', 'keycodes.c', 'keycodes.h', 'keymap.c', 'keytypes.c', 'listing.c', 'misc.c', 'misc.h', 'parseutils.c', 'parseutils.h', 'symbols.c', 'tokens.h', 'utils.c', 'utils.h', 'vmod.c', 'vmod.h', 'xkbcomp.c', 'xkbcomp.h', yacc_gen.process('xkbparse.y'), 'xkbpath.c', 'xkbpath.h', 'xkbscan.c', include_directories: include_directories('.'), dependencies: [xkbfile_dep, x11_dep, xproto_dep], install: true, install_dir: join_paths(get_option('prefix'), get_option('bindir')), ) subdir('man') pkgconfig_data = configuration_data() pkgconfig_data.set('prefix', get_option('prefix')) pkgconfig_data.set('exec_prefix', '${prefix}') pkgconfig_data.set('bindir', join_paths('${exec_prefix}', get_option('bindir'))) pkgconfig_data.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_data.set('datadir', '${datarootdir}') pkgconfig_data.set('XKBCONFIGROOT', XKBCONFIGROOT) pkgconfig_data.set('PACKAGE_VERSION', meson.project_version()) xkbcomp_deps_list = [] foreach dep, versions : xkbcomp_deps if versions.length() == 0 xkbcomp_deps_list += dep else foreach version : versions xkbcomp_deps_list += [dep, version] endforeach endif endforeach pkgconfig_data.set('XKBCOMP_EXTRA_DEPS', ' '.join(xkbcomp_deps_list)) configure_file( input: 'xkbcomp.pc.in', output: 'xkbcomp.pc', configuration: pkgconfig_data, install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'), ) summary( { 'backend': meson.backend(), 'buildtype': get_option('buildtype'), 'id': cc.get_id(), 'c_args': get_option('c_args'), 'c_link_args': get_option('c_link_args'), 'yacc': yacc.full_path() + ' ' + yacc.version(), }, section: 'Compiler', ) summary( { 'prefix': get_option('prefix'), 'bindir': get_option('bindir'), 'libdir': get_option('libdir'), 'datadir': get_option('datadir'), 'xkb-config-root': XKBCONFIGROOT, }, section: 'Directories', ) @ 1.1.1.1.4.1 log @file meson.build was added on branch netbsd-10 on 2026-01-02 11:01:42 +0000 @ text @d1 240 @ 1.1.1.1.4.2 log @Pull up the following, requested by mrg in ticket #1213: external/mit/xkbcomp/dist/man/meson.build up to 1.1.1.1 external/mit/xkbcomp/dist/meson.build up to 1.1.1.1 external/mit/xkbcomp/dist/meson.options up to 1.1.1.1 external/mit/xkbcomp/dist/ChangeLog up to 1.1.1.16 external/mit/xkbcomp/dist/Makefile.am up to 1.1.1.8 external/mit/xkbcomp/dist/Makefile.in up to 1.1.1.14 external/mit/xkbcomp/dist/aclocal.m4 up to 1.1.1.15 external/mit/xkbcomp/dist/action.c up to 1.1.1.5 external/mit/xkbcomp/dist/action.h up to 1.1.1.5 external/mit/xkbcomp/dist/alias.c up to 1.1.1.6 external/mit/xkbcomp/dist/alias.h up to 1.1.1.4 external/mit/xkbcomp/dist/compat.c up to 1.1.1.9 external/mit/xkbcomp/dist/compile up to 1.1.1.7 external/mit/xkbcomp/dist/config.guess up to 1.1.1.14 external/mit/xkbcomp/dist/config.h.in up to 1.1.1.6 external/mit/xkbcomp/dist/config.sub up to 1.1.1.14 external/mit/xkbcomp/dist/configure up to 1.1.1.16 external/mit/xkbcomp/dist/configure.ac up to 1.1.1.16 external/mit/xkbcomp/dist/depcomp up to 1.1.1.11 external/mit/xkbcomp/dist/expr.c up to 1.6 external/mit/xkbcomp/dist/expr.h up to 1.1.1.4 external/mit/xkbcomp/dist/geometry.c up to 1.1.1.7 external/mit/xkbcomp/dist/indicators.c up to 1.1.1.6 external/mit/xkbcomp/dist/indicators.h up to 1.1.1.5 external/mit/xkbcomp/dist/install-sh up to 1.1.1.10 external/mit/xkbcomp/dist/keycodes.c up to 1.1.1.9 external/mit/xkbcomp/dist/keymap.c up to 1.1.1.4 external/mit/xkbcomp/dist/keytypes.c up to 1.1.1.6 external/mit/xkbcomp/dist/listing.c up to 1.2 external/mit/xkbcomp/dist/misc.c up to 1.1.1.5 external/mit/xkbcomp/dist/misc.h up to 1.1.1.4 external/mit/xkbcomp/dist/missing up to 1.1.1.11 external/mit/xkbcomp/dist/parseutils.c up to 1.1.1.9 external/mit/xkbcomp/dist/parseutils.h up to 1.1.1.7 external/mit/xkbcomp/dist/symbols.c up to 1.1.1.11 external/mit/xkbcomp/dist/utils.c up to 1.1.1.6 external/mit/xkbcomp/dist/utils.h up to 1.9 external/mit/xkbcomp/dist/vmod.c up to 1.1.1.5 external/mit/xkbcomp/dist/vmod.h up to 1.1.1.4 external/mit/xkbcomp/dist/xkbcomp.c up to 1.3 external/mit/xkbcomp/dist/xkbcomp.h up to 1.1.1.6 external/mit/xkbcomp/dist/xkbcomp.pc.in up to 1.1.1.4 external/mit/xkbcomp/dist/xkbparse.c up to 1.1.1.13 external/mit/xkbcomp/dist/xkbparse.y up to 1.1.1.8 external/mit/xkbcomp/dist/xkbpath.c up to 1.1.1.6 external/mit/xkbcomp/dist/xkbpath.h up to 1.1.1.3 external/mit/xkbcomp/dist/xkbscan.c up to 1.1.1.9 external/mit/xkbcomp/dist/ylwrap up to 1.1.1.11 external/mit/xkbcomp/dist/man/Makefile.am up to 1.1.1.3 external/mit/xkbcomp/dist/man/Makefile.in up to 1.1.1.9 external/mit/xkbcomp/dist/man/xkbcomp.man up to 1.1.1.5 Import xkbcomp 1.5.0, which fixes CVE-2018-15853, CVE-2018-15859, CVE-2018-15861, and CVE-2018-15863. @ text @a0 240 # SPDX-License-Identifier: MIT # # Copyright (c) 2025, Pierre Le Marre # # 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 (including the next # paragraph) 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. # project( 'xkbcomp', 'c', default_options: ['buildtype=debugoptimized', 'c_std=gnu99'], version: '1.5.0', license: 'HPND', license_files: 'COPYING', meson_version: '>= 1.1.0', ) cc = meson.get_compiler('c') cflags = [ '-fno-strict-aliasing', '-Wall', '-Wpointer-arith', '-Wmissing-declarations', '-Wformat=2', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs', '-Wbad-function-cast', '-Wold-style-definition', '-Wunused', '-Wuninitialized', '-Wshadow', '-Wmissing-noreturn', '-Wmissing-format-attribute', '-Wredundant-decls', '-Werror=implicit', '-Werror=nonnull', '-Werror=init-self', '-Werror=main', '-Werror=missing-braces', '-Werror=sequence-point', '-Werror=return-type', '-Werror=trigraphs', '-Werror=array-bounds', '-Werror=write-strings', '-Werror=address', '-Werror=int-to-pointer-cast', '-Werror=pointer-to-int-cast', ] add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a') if bison.found() yacc = bison yacc_gen = generator( bison, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['--defines=@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else byacc = find_program('byacc', required: false) if byacc.found() yacc = byacc yacc_gen = generator( byacc, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['-H', '@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else error('Could not find a compatible YACC program (bison or byacc)') endif endif # The XKB config root. XKBCONFIGROOT = get_option('xkb-config-root') if XKBCONFIGROOT == '' xkeyboard_config_dep = dependency('xkeyboard-config', required: false) if xkeyboard_config_dep.found() XKBCONFIGROOT = xkeyboard_config_dep.get_variable(pkgconfig: 'xkb_base') else XKBCONFIGROOT = get_option('prefix') / get_option('datadir') / 'X11' / 'xkb' endif endif # TODO # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) # XORG_MACROS_VERSION(1.8) # XORG_DEFAULT_OPTIONS # TODO: AC_SYS_LARGEFILE # Checks for pkg-config packages xkbcomp_deps = { 'x11': [], 'xkbfile': [], } x11_dep = dependency('x11', version: xkbcomp_deps['x11']) xkbfile_dep = dependency('xkbfile', version: xkbcomp_deps['xkbfile']) xproto_dep = dependency('xproto', version: '>= 7.0.17') # config.h. xkbcomp_version = meson.project_version() configh_data = configuration_data() configh_data.set_quoted('PACKAGE_VERSION', meson.project_version()) configh_data.set_quoted('XKBCONFIGROOT', XKBCONFIGROOT) configh_data.set_quoted('DFLT_XKB_CONFIG_ROOT', XKBCONFIGROOT) # Like AC_USE_SYSTEM_EXTENSIONS, what #define to use to get extensions # beyond the base POSIX function set. if host_machine.system() == 'sunos' system_extensions = '__EXTENSIONS__' else system_extensions = '_GNU_SOURCE' endif configh_data.set(system_extensions, 1) system_ext_define = '#define ' + system_extensions if cc.has_header_symbol('stdio.h', 'asprintf', prefix: system_ext_define) configh_data.set('HAVE_ASPRINTF', 1) endif if cc.has_header_symbol('stdlib.h', 'reallocarray', prefix: system_ext_define) configh_data.set('HAVE_REALLOCARRAY', 1) endif if cc.has_header_symbol('stdlib.h', 'recallocarray', prefix: system_ext_define) configh_data.set('HAVE_RECALLOCARRAY', 1) endif config_h = configure_file(output: 'config.h', configuration: configh_data) add_project_arguments('-DHAVE_CONFIG_H', language: 'c') xkbcomp = executable( 'xkbcomp', 'action.c', 'action.h', 'alias.c', 'alias.h', 'compat.c', 'compat.h', config_h, 'expr.c', 'expr.h', 'geometry.c', 'indicators.c', 'indicators.h', 'keycodes.c', 'keycodes.h', 'keymap.c', 'keytypes.c', 'listing.c', 'misc.c', 'misc.h', 'parseutils.c', 'parseutils.h', 'symbols.c', 'tokens.h', 'utils.c', 'utils.h', 'vmod.c', 'vmod.h', 'xkbcomp.c', 'xkbcomp.h', yacc_gen.process('xkbparse.y'), 'xkbpath.c', 'xkbpath.h', 'xkbscan.c', include_directories: include_directories('.'), dependencies: [xkbfile_dep, x11_dep, xproto_dep], install: true, install_dir: join_paths(get_option('prefix'), get_option('bindir')), ) subdir('man') pkgconfig_data = configuration_data() pkgconfig_data.set('prefix', get_option('prefix')) pkgconfig_data.set('exec_prefix', '${prefix}') pkgconfig_data.set('bindir', join_paths('${exec_prefix}', get_option('bindir'))) pkgconfig_data.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_data.set('datadir', '${datarootdir}') pkgconfig_data.set('XKBCONFIGROOT', XKBCONFIGROOT) pkgconfig_data.set('PACKAGE_VERSION', meson.project_version()) xkbcomp_deps_list = [] foreach dep, versions : xkbcomp_deps if versions.length() == 0 xkbcomp_deps_list += dep else foreach version : versions xkbcomp_deps_list += [dep, version] endforeach endif endforeach pkgconfig_data.set('XKBCOMP_EXTRA_DEPS', ' '.join(xkbcomp_deps_list)) configure_file( input: 'xkbcomp.pc.in', output: 'xkbcomp.pc', configuration: pkgconfig_data, install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'), ) summary( { 'backend': meson.backend(), 'buildtype': get_option('buildtype'), 'id': cc.get_id(), 'c_args': get_option('c_args'), 'c_link_args': get_option('c_link_args'), 'yacc': yacc.full_path() + ' ' + yacc.version(), }, section: 'Compiler', ) summary( { 'prefix': get_option('prefix'), 'bindir': get_option('bindir'), 'libdir': get_option('libdir'), 'datadir': get_option('datadir'), 'xkb-config-root': XKBCONFIGROOT, }, section: 'Directories', ) @ 1.1.1.1.2.1 log @file meson.build was added on branch netbsd-11 on 2025-12-10 16:37:21 +0000 @ text @d1 240 @ 1.1.1.1.2.2 log @Pull up the following revisions, requested by mrg in ticket #116: external/mit/xorg-server//dist/glamor/glamor_glx_provider.c delete external/mit/xorg-server//dist/glamor/glamor_glx_provider.h delete external/mit/xorg-server/dist/ChangeLog up to 1.1.1.31 external/mit/xorg-server/dist/configure up to 1.24 external/mit/xorg-server/dist/configure.ac up to 1.26 external/mit/xorg-server/dist/meson.build up to 1.1.1.21 external/mit/xorg-server/dist/glamor/Makefile.am up to 1.1.1.4 external/mit/xorg-server/dist/glamor/Makefile.in up to 1.1.1.14 external/mit/xorg-server/dist/glamor/glamor.c up to 1.1.1.9 external/mit/xorg-server/dist/glamor/glamor.h up to 1.1.1.6 external/mit/xorg-server/dist/glamor/glamor_egl.c up to 1.1.1.7 external/mit/xorg-server/dist/glamor/glamor_priv.h up to 1.1.1.7 external/mit/xorg-server/dist/glamor/meson.build up to 1.1.1.3 external/mit/xorg-server/dist/hw/xfree86/glamor_egl/Makefile.am up to 1.1.1.3 external/mit/xorg-server/dist/hw/xfree86/glamor_egl/Makefile.in up to 1.1.1.14 external/mit/xorg-server/dist/hw/xfree86/glamor_egl/meson.build up to 1.1.1.3 external/mit/xorg-server/include/dix-config.h up to 1.57 external/mit/xorg-server/include/version-config.h up to 1.27 external/mit/xorg-server/include/xorg-config.h up to 1.37 external/mit/xorg-server/include/xorg-server.h up to 1.37 external/mit/xkbcomp//dist/man/meson.build up to external/mit/xkbcomp//dist/meson.build up to external/mit/xkbcomp//dist/meson.options up to external/mit/xkbcomp/dist/ChangeLog up to 1.1.1.16 external/mit/xkbcomp/dist/Makefile.am up to 1.1.1.8 external/mit/xkbcomp/dist/Makefile.in up to 1.1.1.14 external/mit/xkbcomp/dist/aclocal.m4 up to 1.1.1.15 external/mit/xkbcomp/dist/alias.c up to 1.1.1.6 external/mit/xkbcomp/dist/compat.c up to 1.1.1.9 external/mit/xkbcomp/dist/compile up to 1.1.1.7 external/mit/xkbcomp/dist/config.guess up to 1.1.1.14 external/mit/xkbcomp/dist/config.h.in up to 1.1.1.6 external/mit/xkbcomp/dist/config.sub up to 1.1.1.14 external/mit/xkbcomp/dist/configure up to 1.1.1.16 external/mit/xkbcomp/dist/configure.ac up to 1.1.1.16 external/mit/xkbcomp/dist/depcomp up to 1.1.1.11 external/mit/xkbcomp/dist/expr.c up to 1.6 external/mit/xkbcomp/dist/install-sh up to 1.1.1.10 external/mit/xkbcomp/dist/keycodes.c up to 1.1.1.9 external/mit/xkbcomp/dist/keytypes.c up to 1.1.1.6 external/mit/xkbcomp/dist/missing up to 1.1.1.11 external/mit/xkbcomp/dist/symbols.c up to 1.1.1.11 external/mit/xkbcomp/dist/utils.c up to 1.1.1.6 external/mit/xkbcomp/dist/utils.h up to 1.8 external/mit/xkbcomp/dist/vmod.c up to 1.1.1.5 external/mit/xkbcomp/dist/xkbcomp.c up to 1.3 external/mit/xkbcomp/dist/xkbcomp.pc.in up to 1.1.1.4 external/mit/xkbcomp/dist/xkbparse.c up to 1.1.1.13 external/mit/xkbcomp/dist/xkbparse.y up to 1.1.1.8 external/mit/xkbcomp/dist/xkbpath.c up to 1.1.1.6 external/mit/xkbcomp/dist/xkbscan.c up to 1.1.1.9 external/mit/xkbcomp/dist/ylwrap up to 1.1.1.11 external/mit/xkbcomp/dist/man/Makefile.am up to 1.1.1.3 external/mit/xkbcomp/dist/man/Makefile.in up to 1.1.1.9 external/mit/xkbcomp/dist/man/xkbcomp.man up to 1.1.1.5 Import xorg-server 21.1.21 and xkbcomp 1.5.0. @ text @a0 240 # SPDX-License-Identifier: MIT # # Copyright (c) 2025, Pierre Le Marre # # 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 (including the next # paragraph) 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. # project( 'xkbcomp', 'c', default_options: ['buildtype=debugoptimized', 'c_std=gnu99'], version: '1.5.0', license: 'HPND', license_files: 'COPYING', meson_version: '>= 1.1.0', ) cc = meson.get_compiler('c') cflags = [ '-fno-strict-aliasing', '-Wall', '-Wpointer-arith', '-Wmissing-declarations', '-Wformat=2', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs', '-Wbad-function-cast', '-Wold-style-definition', '-Wunused', '-Wuninitialized', '-Wshadow', '-Wmissing-noreturn', '-Wmissing-format-attribute', '-Wredundant-decls', '-Werror=implicit', '-Werror=nonnull', '-Werror=init-self', '-Werror=main', '-Werror=missing-braces', '-Werror=sequence-point', '-Werror=return-type', '-Werror=trigraphs', '-Werror=array-bounds', '-Werror=write-strings', '-Werror=address', '-Werror=int-to-pointer-cast', '-Werror=pointer-to-int-cast', ] add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a') if bison.found() yacc = bison yacc_gen = generator( bison, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['--defines=@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else byacc = find_program('byacc', required: false) if byacc.found() yacc = byacc yacc_gen = generator( byacc, output: ['@@BASENAME@@.c', '@@BASENAME@@.h'], arguments: ['-H', '@@OUTPUT1@@', '-o', '@@OUTPUT0@@', '@@INPUT@@'], ) else error('Could not find a compatible YACC program (bison or byacc)') endif endif # The XKB config root. XKBCONFIGROOT = get_option('xkb-config-root') if XKBCONFIGROOT == '' xkeyboard_config_dep = dependency('xkeyboard-config', required: false) if xkeyboard_config_dep.found() XKBCONFIGROOT = xkeyboard_config_dep.get_variable(pkgconfig: 'xkb_base') else XKBCONFIGROOT = get_option('prefix') / get_option('datadir') / 'X11' / 'xkb' endif endif # TODO # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) # XORG_MACROS_VERSION(1.8) # XORG_DEFAULT_OPTIONS # TODO: AC_SYS_LARGEFILE # Checks for pkg-config packages xkbcomp_deps = { 'x11': [], 'xkbfile': [], } x11_dep = dependency('x11', version: xkbcomp_deps['x11']) xkbfile_dep = dependency('xkbfile', version: xkbcomp_deps['xkbfile']) xproto_dep = dependency('xproto', version: '>= 7.0.17') # config.h. xkbcomp_version = meson.project_version() configh_data = configuration_data() configh_data.set_quoted('PACKAGE_VERSION', meson.project_version()) configh_data.set_quoted('XKBCONFIGROOT', XKBCONFIGROOT) configh_data.set_quoted('DFLT_XKB_CONFIG_ROOT', XKBCONFIGROOT) # Like AC_USE_SYSTEM_EXTENSIONS, what #define to use to get extensions # beyond the base POSIX function set. if host_machine.system() == 'sunos' system_extensions = '__EXTENSIONS__' else system_extensions = '_GNU_SOURCE' endif configh_data.set(system_extensions, 1) system_ext_define = '#define ' + system_extensions if cc.has_header_symbol('stdio.h', 'asprintf', prefix: system_ext_define) configh_data.set('HAVE_ASPRINTF', 1) endif if cc.has_header_symbol('stdlib.h', 'reallocarray', prefix: system_ext_define) configh_data.set('HAVE_REALLOCARRAY', 1) endif if cc.has_header_symbol('stdlib.h', 'recallocarray', prefix: system_ext_define) configh_data.set('HAVE_RECALLOCARRAY', 1) endif config_h = configure_file(output: 'config.h', configuration: configh_data) add_project_arguments('-DHAVE_CONFIG_H', language: 'c') xkbcomp = executable( 'xkbcomp', 'action.c', 'action.h', 'alias.c', 'alias.h', 'compat.c', 'compat.h', config_h, 'expr.c', 'expr.h', 'geometry.c', 'indicators.c', 'indicators.h', 'keycodes.c', 'keycodes.h', 'keymap.c', 'keytypes.c', 'listing.c', 'misc.c', 'misc.h', 'parseutils.c', 'parseutils.h', 'symbols.c', 'tokens.h', 'utils.c', 'utils.h', 'vmod.c', 'vmod.h', 'xkbcomp.c', 'xkbcomp.h', yacc_gen.process('xkbparse.y'), 'xkbpath.c', 'xkbpath.h', 'xkbscan.c', include_directories: include_directories('.'), dependencies: [xkbfile_dep, x11_dep, xproto_dep], install: true, install_dir: join_paths(get_option('prefix'), get_option('bindir')), ) subdir('man') pkgconfig_data = configuration_data() pkgconfig_data.set('prefix', get_option('prefix')) pkgconfig_data.set('exec_prefix', '${prefix}') pkgconfig_data.set('bindir', join_paths('${exec_prefix}', get_option('bindir'))) pkgconfig_data.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_data.set('datadir', '${datarootdir}') pkgconfig_data.set('XKBCONFIGROOT', XKBCONFIGROOT) pkgconfig_data.set('PACKAGE_VERSION', meson.project_version()) xkbcomp_deps_list = [] foreach dep, versions : xkbcomp_deps if versions.length() == 0 xkbcomp_deps_list += dep else foreach version : versions xkbcomp_deps_list += [dep, version] endforeach endif endforeach pkgconfig_data.set('XKBCOMP_EXTRA_DEPS', ' '.join(xkbcomp_deps_list)) configure_file( input: 'xkbcomp.pc.in', output: 'xkbcomp.pc', configuration: pkgconfig_data, install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'), ) summary( { 'backend': meson.backend(), 'buildtype': get_option('buildtype'), 'id': cc.get_id(), 'c_args': get_option('c_args'), 'c_link_args': get_option('c_link_args'), 'yacc': yacc.full_path() + ' ' + yacc.version(), }, section: 'Compiler', ) summary( { 'prefix': get_option('prefix'), 'bindir': get_option('bindir'), 'libdir': get_option('libdir'), 'datadir': get_option('datadir'), 'xkb-config-root': XKBCONFIGROOT, }, section: 'Directories', ) @