Skip to content

Commit b5b8833

Browse files
committed
GH-47833: [C++] Add utf8proc option to Meson configuration
1 parent bfce5f2 commit b5b8833

File tree

5 files changed

+49
-4
lines changed

5 files changed

+49
-4
lines changed

cpp/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ needs_tests = get_option('tests').enabled()
7575
needs_acero = get_option('acero').enabled() or needs_dataset
7676
needs_compute = get_option('compute').enabled() or needs_acero
7777
needs_flight = get_option('flight').enabled()
78+
needs_gandiva = false
7879
needs_ipc = (get_option('ipc').enabled()
7980
or needs_tests
8081
or needs_acero
@@ -103,6 +104,7 @@ needs_brotli = get_option('brotli').enabled() or needs_fuzzing
103104
needs_bz2 = get_option('bz2').enabled()
104105
needs_lz4 = get_option('lz4').enabled()
105106
needs_snappy = get_option('snappy').enabled()
107+
needs_utf8proc = get_option('utf8proc').enabled() or needs_gandiva
106108
needs_zlib = get_option('zlib').enabled()
107109
needs_zstd = get_option('zstd').enabled()
108110
needs_utilities = get_option('utilities').enabled()

cpp/meson.options

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,14 @@ option(
134134
type: 'feature',
135135
description: 'Build the Arrow googletest unit tests',
136136
)
137-
137+
option(
138+
'utf8proc',
139+
type: 'feature',
140+
description: '''
141+
Build with support for Unicode properties using the utf8proc library;
142+
(only used if compute or gandiva is enabled)''',
143+
value: 'enabled',
144+
)
138145
option(
139146
'utilities',
140147
type: 'feature',

cpp/src/arrow/meson.build

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,12 @@ arrow_dep = declare_dependency(
500500
meson.override_dependency('arrow', arrow_dep)
501501

502502
if needs_compute
503+
arrow_compute_deps = []
504+
if needs_utf8proc
505+
utf8proc_dep = dependency('libutf8proc')
506+
arrow_compute_deps += [utf8proc_dep]
507+
endif
508+
503509
arrow_compute_lib_sources = [
504510
'compute/initialize.cc',
505511
'compute/kernels/aggregate_basic.cc',
@@ -551,15 +557,15 @@ if needs_compute
551557
arrow_compute_lib = library(
552558
'arrow-compute',
553559
sources: arrow_compute_lib_sources,
554-
dependencies: arrow_dep,
560+
dependencies: [arrow_dep, arrow_compute_deps],
555561
install: true,
556562
gnu_symbol_visibility: 'inlineshidden',
557563
cpp_shared_args: ['-DARROW_COMPUTE_EXPORTING'],
558564
)
559565
arrow_compute_dep = declare_dependency(
560566
link_with: arrow_compute_lib,
561567
include_directories: include_dir,
562-
dependencies: arrow_dep,
568+
dependencies: [arrow_dep, arrow_compute_deps],
563569
)
564570
meson.override_dependency('arrow-compute', arrow_compute_dep)
565571
else

cpp/src/arrow/util/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ conf_data.set('ARROW_WITH_OPENTELEMETRY', false)
7070
conf_data.set('ARROW_WITH_RE2', false)
7171
conf_data.set('ARROW_WITH_SNAPPY', needs_snappy)
7272
conf_data.set('ARROW_WITH_UCX', false)
73-
conf_data.set('ARROW_WITH_UTF8PROC', false)
73+
conf_data.set('ARROW_WITH_UTF8PROC', needs_utf8proc)
7474
conf_data.set('ARROW_WITH_ZLIB', needs_zlib)
7575
conf_data.set('ARROW_WITH_ZSTD', needs_zstd)
7676
conf_data.set('PARQUET_REQUIRE_ENCRYPTION', needs_parquet_encryption)

cpp/subprojects/utf8proc.wrap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[wrap-file]
19+
directory = utf8proc-2.10.0
20+
source_url = https://github.com/JuliaStrings/utf8proc/releases/download/v2.10.0/utf8proc-2.10.0.tar.gz
21+
source_filename = utf8proc-2.10.0.tar.gz
22+
source_hash = 276a37dc4d1dd24d7896826a579f4439d1e5fe33603add786bb083cab802e23e
23+
patch_filename = utf8proc_2.10.0-1_patch.zip
24+
patch_url = https://wrapdb.mesonbuild.com/v2/utf8proc_2.10.0-1/get_patch
25+
patch_hash = be16c4514603e922f9636045699fe1a6f844d340b9b7c14b809e47253b06a844
26+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/utf8proc_2.10.0-1/utf8proc-2.10.0.tar.gz
27+
wrapdb_version = 2.10.0-1
28+
29+
[provide]
30+
libutf8proc = utf8proc_dep

0 commit comments

Comments
 (0)