Skip to content

Commit cea5eae

Browse files
authored
Merge pull request #889 from OreoYang/meson_build_v0_61
fix some meson build issues
2 parents 0ca347d + 2f39a79 commit cea5eae

File tree

7 files changed

+71
-8
lines changed

7 files changed

+71
-8
lines changed

.github/workflows/meson_build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
libreadline-dev libedit-dev uuid-dev libossp-uuid-dev \
2525
libipc-run-perl libtime-hires-perl libtest-simple-perl \
2626
libgssapi-krb5-2 libicu-dev
27-
curl -L "https://github.com/mesonbuild/meson/releases/download/0.57.2/meson-0.57.2.tar.gz" -o meson-0.57.2.tar.gz
27+
curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o meson-1.0.1.tar.gz
2828
curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o ninja-linux.zip
2929
unzip -o ninja-linux.zip
3030
sudo cp ninja /usr/bin/
31-
tar xzf meson-0.57.2.tar.gz
32-
cd meson-0.57.2
31+
tar xzf meson-1.0.1.tar.gz
32+
cd meson-1.0.1
3333
sudo python3 setup.py install
3434
3535
- name: configure - linux

contrib/gb18030_2022/meson.build

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Portions Copyright (c) 2023-2025, IvorySQL Global Development Team
2+
3+
gb18030_2022_src_files = files(
4+
'utf8_and_gb18030_2022.c'
5+
)
6+
7+
if host_system == 'windows'
8+
gb18030_2022_src_files += rc_lib_gen.process(win32ver_rc, extra_args: [
9+
'--NAME', 'gb18030_2022',
10+
'--FILEDESC', 'gb18030_2022 - support gb18030 2022 with extension',])
11+
endif
12+
13+
custom_target('gb18030_2022.bc',
14+
output: 'utf8_and_gb18030_2022.bc',
15+
command: [perl, '../contrib/ivorysql_ora/gensql.pl', 'meson', '1.0'],
16+
capture: true,
17+
install: true,
18+
install_dir: contrib_data_args['install_dir'],
19+
)
20+
21+
foreach file : ['utf8_and_gb18030_2022.bc', 'gb18030_2022.bc']
22+
run_target(
23+
file,
24+
command: ['touch', meson.current_build_dir() / file]
25+
)
26+
endforeach
27+
28+
gb18030_2022 = shared_module('gb18030_2022',
29+
gb18030_2022_src_files,
30+
kwargs: contrib_mod_args,
31+
)
32+
contrib_targets += gb18030_2022
33+
34+
install_data(
35+
'gb18030_2022.control',
36+
'gb18030_2022--1.0.sql',
37+
kwargs: contrib_data_args,
38+
)
39+
40+
tests += {
41+
'name': 'gb18030_2022',
42+
'sd': meson.current_source_dir(),
43+
'bd': meson.current_build_dir(),
44+
'regress': {
45+
'sql': [
46+
'gb18030_2022_and_utf8',
47+
'copy',
48+
],
49+
},
50+
}

contrib/ivorysql_ora/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ivorysql_ora_sources = files(
2525
'src/builtin_functions/misc_functions.c',
2626
'src/merge/ora_merge.c',
2727
'src/sysview/sysview_functions.c',
28+
'src/xml_functions/ora_xml_functions.c',
2829
)
2930

3031
if host_system == 'windows'
@@ -52,6 +53,11 @@ install_data(
5253
kwargs: contrib_data_args,
5354
)
5455

56+
install_data(
57+
'preload_ora_misc.sql',
58+
install_dir: dir_data,
59+
)
60+
5561
tests += {
5662
'name': 'ivorysql_ora',
5763
'sd': meson.current_source_dir(),

contrib/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,5 @@ subdir('tsm_system_time')
7474
subdir('unaccent')
7575
subdir('uuid-ossp')
7676
subdir('vacuumlo')
77+
subdir('gb18030_2022')
7778
subdir('xml2')

meson.build

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ project('postgresql',
2727
]
2828
)
2929

30+
# IvorySQL version
31+
ivorysql_version = '5.0'
3032

3133

3234
###############################################################
@@ -152,6 +154,8 @@ cdata.set_quoted('PG_MAJORVERSION', pg_version_major.to_string())
152154
cdata.set('PG_MAJORVERSION_NUM', pg_version_major)
153155
cdata.set('PG_MINORVERSION_NUM', pg_version_minor)
154156
cdata.set('PG_VERSION_NUM', pg_version_num)
157+
158+
cdata.set('PACKAGE_IVORYSQL_VERSION', ivorysql_version)
155159
# PG_VERSION_STR is built later, it depends on compiler test results
156160
cdata.set_quoted('CONFIGURE_ARGS', '')
157161

@@ -487,7 +491,7 @@ pkg = 'postgresql'
487491

488492
dir_prefix = get_option('prefix')
489493

490-
dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres'))
494+
dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres') or dir_prefix.contains('IvorySQL'))
491495

492496
dir_bin = get_option('bindir')
493497

@@ -2973,9 +2977,9 @@ cdata.set_quoted('DLSUFFIX', dlsuffix)
29732977

29742978
# built later than the rest of the version metadata, we need SIZEOF_VOID_P
29752979
cdata.set_quoted('PG_VERSION_STR',
2976-
'PostgreSQL @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
2980+
'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
29772981
pg_version, host_machine.cpu_family(), host_system,
2978-
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8,
2982+
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, cdata.get('PACKAGE_IVORYSQL_VERSION')
29792983
)
29802984
)
29812985

meson_options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ option('systemd', type: 'feature', value: 'auto',
160160
description: 'systemd support')
161161

162162
option('uuid', type: 'combo', choices: ['none', 'bsd', 'e2fs', 'ossp'],
163-
value: 'none',
163+
value: 'ossp',
164164
description: 'Use LIB for contrib/uuid-ossp support')
165165

166166
option('zlib', type: 'feature', value: 'auto',

src/include/catalog/meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ ara_generated_catalog_headers = custom_target('ara_generated_catalog_headers',
167167
'@INPUT@',
168168
'-M=oracle'
169169
],
170+
depends: [generated_catalog_headers]
170171
)
171172

172173
# Target for Oracle
@@ -187,7 +188,8 @@ ora_generated_catalog_headers = custom_target('ora_generated_catalog_headers',
187188
'--output=@OUTDIR@',
188189
'@INPUT@',
189190
'-M=oracle'
190-
]
191+
],
192+
depends: [ara_generated_catalog_headers]
191193
)
192194

193195

0 commit comments

Comments
 (0)