Skip to content

Commit ee7d89b

Browse files
committed
autogen: build with gperf 3.3
1 parent e4689a9 commit ee7d89b

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SPDX-FileCopyrightText: Samuel Tyler <samuel@samuelt.me>
2+
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
In gperf 3.3, a new set of #if .. #elif .. #endif is added. Obviously
6+
this sed then breaks the C preprocessor.
7+
8+
It turns out these are unnecessary.
9+
10+
--- a/autoopts/tpl/str2enum.tpl 2026-01-13 19:48:05.623459591 +1100
11+
+++ b/autoopts/tpl/str2enum.tpl 2026-01-13 19:47:41.613458157 +1100
12+
@@ -811,9 +811,6 @@
13+
-e '/GNUC_.*_INLINE/d' \
14+
-e '/__attribute__.*inline/d' \
15+
-e '/^#if.*== *32/,/^#endif/d' \
16+
- -e '/^#ifdef/d' \
17+
- -e '/^#else/d' \
18+
- -e '/^#endif$/d' \
19+
-e '/key = [=(. base-type-name)=]_hash/s/key = /key = (int)/' \
20+
-e 's/^\(const [=(. base-type-name)=]_map_t\)/static inline \1/' \
21+
> baseline

steps/autogen-5.18.16/pass1.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
noextract="autogen-5.18.16.tar.xz"
77

88
src_prepare() {
9+
default
10+
911
mkdir build
1012
mv ../autogen-5.18.16 build/src
1113
mv ../autogen-5.18.16.tar.xz build/
@@ -25,6 +27,7 @@ src_compile() {
2527

2628
SKIP_MAIN=1 . ./bootstrap_tarball.sh
2729
prepare_tarball
30+
patch -Np1 -i ../../gperf-3.3.patch -d build/autogen-5.18.16
2831
bootstrap_columns
2932
bootstrap_getdefs
3033
bootstrap_autogen
@@ -42,10 +45,10 @@ src_compile() {
4245
SOURCE_DIR="$PWD" ./config/bootstrap
4346
# Specify timeout to avoid non-reproducibility
4447
CPPFLAGS=-D_LARGEFILE64_SOURCE=1 ./configure \
45-
--prefix="${FINALPREFIX}" \
46-
--libdir="${FINALPREFIX}/lib/${TARGET}" \
47-
--disable-shared \
48-
--enable-timeout=15
48+
--prefix="${FINALPREFIX}" \
49+
--libdir="${FINALPREFIX}/lib/${TARGET}" \
50+
--disable-shared \
51+
--enable-timeout=15
4952
touch doc/agdoc.texi # build later
5053
make -j1 CFLAGS=-Wno-error
5154

0 commit comments

Comments
 (0)