Files
termux-packages/packages/i2pd/boost-1.89.patch
termux-pacman-bot 29e4386a8b bump(main/boost): 1.89.0
- Progress on https://github.com/termux/termux-packages/issues/23492

- Dependency of https://github.com/termux/termux-packages/pull/25826

- In order to rebuild all reverse dependencies successfully, also includes some fixes for builds of packages that currently fail to build with CMake 4, which are either the commonly-used `-DCMAKE_POLICY_VERSION_MINIMUM=3.5` argument, or are patches named to indicate their purpose

- All patches with attribution headers are cherry-picked from respective upstream PRs or commits

- All patches without attribution headers are written from scratch by me to solve errors that are either Termux-specific or are not yet fixed anywhere in upstream

Some notes about unique patches:

- Very big thanks to cho-m, who almost single-handedly brought boost 1.89 to `libc++`-based UNIX-like operating systems with their work on boost 1.89 for MacOS in https://github.com/Homebrew/homebrew-core/pull/233031. Many cherry-picked patches originated from them.
  - I chose to write my own patch for `ncmpcpp` for boost 1.89 rather then exactly copy the example of cho-m, even though my method involves more lines of code, because **I decided that I would like to be notified, through the patch failing to apply, when upstream `ncmpcpp` has added official support for boost 1.89**, indicating that the downstream change can then be removed without me having to remember it, which cho-m's example unfortunately wouldn't do.

- For some reason, building `openfoam` with boost 1.89 instead of boost 1.87 causes it to attempt to link to `libgmp.so` in a nonexistent folder `/data/data/com.termux/files/usr/lib64`, instead of `/data/data/com.termux/files/usr/lib`
  - It's unclear how exactly boost 1.89 draws out this error, but it can also be seen that the origin of the "lib64" instance is within openfoam, and Termux does not use any "lib64" folder, so it should be patched out from `openfoam` (which resolves the error)

```
    -L/data/data/com.termux/files/usr/lib64
    -L/home/builder/.termux-build/openfoam/src/ThirdParty/platforms/linuxARM64Clang/boost-system/lib
    -L/home/builder/.termux-build/openfoam/src/ThirdParty/platforms/linuxARM64Clang/boost-system/lib64
    -lmpfr -lgmp -lfileFormats -lsurfMesh -lmeshTools -ldecompose -ldynamicMesh -lsnappyHexMesh
    -o /home/builder/.termux-build/openfoam/src/platforms/linuxARM64ClangDPInt32Opt/lib/libconformalVoronoiMesh.so
ld.lld: error: unable to find library -lmpfr
```

- `ravencoin` and `mkvtoolnix` use `autoreconf -fi` during their `build.sh` files, but unfortunately, in the Ubuntu 24.04 cross-builder Docker image, there is a package installed in Ubuntu `autoconf-archive` version 20220903-3, which contains a file `/usr/share/aclocal/ax_boost_system.m4`, and this file is unfortunately propagated into the build systems of `ravencoin` and `mkvtoolnix` by `autoreconf -fi` and "pollutes" them with "awareness" that they would not otherwise have of the `Boost::System` shared library that no longer exists in boost 1.89, so temporary changes to `TERMUX_PKG_EXTRA_CONFIGURE_ARGS` are required, which should be removed the next time the Ubuntu cross-builder image is bumped, since after that happens, they will no longer be necessary.

- Copy and paste fix for building `abiword` with `libc++` 19+ (NDK r28c) from FreeBSD: e6daa211c6

- Fix prefix pollution `libjxl`->`telegram-desktop`
  - (i.e. the command `scripts/run-docker.sh ./build-package.sh -I -f libjxl telegram-desktop`)
  - For clarity, the edits to `packages/libjxl/fix-pkgconfig-file.patch` are primarily implementing this fix by removing the invalid path `/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include` from the command `pkg-config --cflags libjxl`
2025-09-02 13:13:46 +00:00

71 lines
2.5 KiB
Diff

From 27f2c5285da9bec537caeba9f7df6920b9f21c87 Mon Sep 17 00:00:00 2001
From: orignal <i2porignal@yandex.ru>
Date: Thu, 14 Aug 2025 18:51:54 -0400
Subject: [PATCH] support boost 1.89
---
Makefile.bsd | 2 +-
Makefile.homebrew | 2 +-
Makefile.osx | 2 +-
libi2pd/Timestamp.h | 3 ++-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Makefile.bsd b/Makefile.bsd
index 1c9118028a0..9c6de7f0d87 100644
--- a/Makefile.bsd
+++ b/Makefile.bsd
@@ -3,7 +3,7 @@ CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misl
DEFINES = -D_GLIBCXX_USE_NANOSLEEP=1
INCFLAGS = -I/usr/include/ -I/usr/local/include/
LDFLAGS = ${LD_DEBUG} -Wl,-rpath,/usr/local/lib -L/usr/local/lib
-LDLIBS = -lssl -lcrypto -lz -lpthread -lboost_system -lboost_program_options
+LDLIBS = -lssl -lcrypto -lz -lpthread -lboost_program_options
## NOTE: NEEDED_CXXFLAGS is here so that custom CXXFLAGS can be specified at build time
## **without** overwriting the CXXFLAGS which we need in order to build.
diff --git a/Makefile.homebrew b/Makefile.homebrew
index 706f981110c..9d8d17cdb52 100644
--- a/Makefile.homebrew
+++ b/Makefile.homebrew
@@ -18,7 +18,7 @@ endif
LDLIBS += -lpthread -ldl
else
LDFLAGS += -L${SSLROOT}/lib -L${BOOSTROOT}/lib
- LDLIBS = -lz -lssl -lcrypto -lboost_system -lboost_filesystem -lboost_program_options -lpthread
+ LDLIBS = -lz -lssl -lcrypto -lboost_program_options -lpthread
ifeq ($(USE_UPNP),yes)
LDFLAGS += -L${UPNPROOT}/lib
LDLIBS += -lminiupnpc
diff --git a/Makefile.osx b/Makefile.osx
index 52282307fa0..a2ad515efd8 100644
--- a/Makefile.osx
+++ b/Makefile.osx
@@ -9,7 +9,7 @@ LDFLAGS += -Wl,-dead_strip_dylibs
ifeq ($(USE_STATIC),yes)
LDLIBS = -lz /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a /usr/local/lib/libboost_system.a /usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_program_options.a -lpthread
else
- LDLIBS = -lz -lssl -lcrypto -lboost_system -lboost_filesystem -lboost_program_options -lpthread
+ LDLIBS = -lz -lssl -lcrypto -lboost_program_options -lpthread
endif
ifeq ($(USE_UPNP),yes)
diff --git a/libi2pd/Timestamp.h b/libi2pd/Timestamp.h
index 00c60433251..6b22468566e 100644
--- a/libi2pd/Timestamp.h
+++ b/libi2pd/Timestamp.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2013-2024, The PurpleI2P Project
+* Copyright (c) 2013-2025, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@@ -14,6 +14,7 @@
#include <vector>
#include <string>
#include <boost/asio.hpp>
+#include <boost/asio/deadline_timer.hpp> // for boost 1.89
namespace i2p
{