Skip to content
Snippets Groups Projects
Commit 2ea47d6e authored by mio's avatar mio Committed by Kevin Daudt
Browse files

community/tectonic: fix build with icu 76.1

Use `-std=c++17` when compiling xetex_layout crate. Resolves build error
with icu 76.1.

```
cargo:warning=In file included from /usr/include/unicode/ubidi.h:26,
  cargo:warning=                 from layout/xetex-XeTeXLayoutInterface.cpp:36:
  cargo:warning=/usr/include/unicode/localpointer.h:561:26: error: 'auto' parameter not permitted in this context
  cargo:warning=  561 | template <typename Type, auto closeFunction>
  cargo:warning=      |                          ^~~~
  cargo:warning=/usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid
  cargo:warning=  573 |     explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)
  cargo:warning=      |                                                                            ^
  cargo:warning=/usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid
  cargo:warning=  583 |     LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
  cargo:warning=      |                                                                              ^
  cargo:warning=/usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid
  cargo:warning=  599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {
  cargo:warning=      |                                                           ^
  cargo:warning=/usr/include/unicode/ubidi.h:579:1: note: invalid template non-type parameter
  cargo:warning=  579 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUBiDiPointer, UBiDi, ubidi_close);
  cargo:warning=      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
parent e92fb1aa
No related branches found
No related tags found
1 merge request!82035community/tectonic: fix build with icu 76.1
Pipeline #311413 skipped
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tectonic pkgname=tectonic
pkgver=0.15.0 pkgver=0.15.0
pkgrel=2 pkgrel=3
pkgdesc="Tectonic is a modernized, complete, self-contained TeX/LaTeX engine" pkgdesc="Tectonic is a modernized, complete, self-contained TeX/LaTeX engine"
url="https://tectonic-typesetting.github.io" url="https://tectonic-typesetting.github.io"
# s390x: rust # s390x: rust
...@@ -22,6 +22,7 @@ makedepends=" ...@@ -22,6 +22,7 @@ makedepends="
" "
source="$pkgname-$pkgver.tar.gz::https://github.com/tectonic-typesetting/tectonic/archive/tectonic@$pkgver.tar.gz source="$pkgname-$pkgver.tar.gz::https://github.com/tectonic-typesetting/tectonic/archive/tectonic@$pkgver.tar.gz
time-crate-update.patch time-crate-update.patch
use-cpp17.patch
" "
builddir="$srcdir/tectonic-tectonic-$pkgver" builddir="$srcdir/tectonic-tectonic-$pkgver"
options="net !check" # needs unpackages ubuntu mono font options="net !check" # needs unpackages ubuntu mono font
...@@ -49,4 +50,5 @@ package() { ...@@ -49,4 +50,5 @@ package() {
sha512sums=" sha512sums="
82ccaf68ddfb864ae439b2698a518ce77b000044b74d7752e9a45fa200c95d3a08cbdda14c2d253b4c78824e061bd2721f26fa2cac2ace9d60684cb330d1f3be tectonic-0.15.0.tar.gz 82ccaf68ddfb864ae439b2698a518ce77b000044b74d7752e9a45fa200c95d3a08cbdda14c2d253b4c78824e061bd2721f26fa2cac2ace9d60684cb330d1f3be tectonic-0.15.0.tar.gz
a74132063038a993672df8afa9460cfebe125182f39e3d8b275b8d2b689eb99bc521e240fa65c18dc1694d6ebaba7aa44288fddb2dc97809a45873feb1b7abc4 time-crate-update.patch a74132063038a993672df8afa9460cfebe125182f39e3d8b275b8d2b689eb99bc521e240fa65c18dc1694d6ebaba7aa44288fddb2dc97809a45873feb1b7abc4 time-crate-update.patch
64daeb5aecabec9ce458c2b01f51e6e6d0029692f8122910a1ae0c25dbb8e356f86c19b8884d1191112bd67f0e8270b63730d94dcfc36e43fe3cae6cc8c6c6a0 use-cpp17.patch
" "
Patch-Source: https://github.com/tectonic-typesetting/tectonic/pull/1202/commits/d260961426b01f7643ba0f35f493bdb671eeaf3f
Fix `'auto' parameter not permitted in this context` error when building
against icu 76.1.
---
From d260961426b01f7643ba0f35f493bdb671eeaf3f Mon Sep 17 00:00:00 2001
From: Winston H <56998716+winstxnhdw@users.noreply.github.com>
Date: Wed, 26 Jun 2024 07:05:10 +0800
Subject: [PATCH] fix: use c++ 17
---
crates/xetex_layout/build.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/xetex_layout/build.rs b/crates/xetex_layout/build.rs
index bdd0d03fc..558fd29e1 100644
--- a/crates/xetex_layout/build.rs
+++ b/crates/xetex_layout/build.rs
@@ -86,7 +86,7 @@ fn main() {
let mut cppcfg = cc::Build::new();
let cppflags = [
- "-std=c++14",
+ "-std=c++17",
"-Wall",
"-Wdate-time",
"-Wendif-labels",
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment