From 86a9b7cd9fdc86b237994ea3a8a0b6940d215b27 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Sat, 24 Aug 2024 04:08:26 +0800 Subject: [PATCH 1/2] libmhash: make boolean usage libc++ portable --- packages/libmhash/build.sh | 2 +- packages/libmhash/libcxx.patch | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 packages/libmhash/libcxx.patch diff --git a/packages/libmhash/build.sh b/packages/libmhash/build.sh index 739957d5f7b059..57a97cb7edcb94 100644 --- a/packages/libmhash/build.sh +++ b/packages/libmhash/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A thread-safe hash library which provides a uniform inte TERMUX_PKG_LICENSE="LGPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=0.9.9.9 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/sourceforge/mhash/mhash-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SHA256=56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0 TERMUX_PKG_BREAKS="libmhash-dev" diff --git a/packages/libmhash/libcxx.patch b/packages/libmhash/libcxx.patch new file mode 100644 index 00000000000000..5451f87968f95e --- /dev/null +++ b/packages/libmhash/libcxx.patch @@ -0,0 +1,23 @@ +https://github.com/void-linux/void-packages/pull/46005 + +--- a/include/mutils/mutils.h ++++ b/include/mutils/mutils.h +@@ -21,6 +21,9 @@ + #if !defined(__MUTILS_H) + #define __MUTILS_H + ++#ifndef __cplusplus ++#include ++#endif + #include + + #if defined(const) +@@ -97,7 +100,7 @@ typedef unsigned char mutils_word8; + */ + + #if defined(HAVE__BOOL) +-#define mutils_boolean _Bool ++#define mutils_boolean bool + #else + typedef char mutils_boolean; + #endif From f3d7c3449ef28ac20cd1c372026b38061ba088c1 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Sat, 24 Aug 2024 04:08:44 +0800 Subject: [PATCH 2/2] steghide: revbump to rebuild --- packages/steghide/build.sh | 2 +- packages/steghide/use-cxx11.patch | 45 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 packages/steghide/use-cxx11.patch diff --git a/packages/steghide/build.sh b/packages/steghide/build.sh index 7276328bcb3648..8e5653e5f43ba7 100644 --- a/packages/steghide/build.sh +++ b/packages/steghide/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Embeds a message in a file by replacing some of the leas TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=0.5.1 -TERMUX_PKG_REVISION=6 +TERMUX_PKG_REVISION=7 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/steghide/steghide-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=78069b7cfe9d1f5348ae43f918f06f91d783c2b3ff25af021e6a312cf541b47b TERMUX_PKG_AUTO_UPDATE=false diff --git a/packages/steghide/use-cxx11.patch b/packages/steghide/use-cxx11.patch new file mode 100644 index 00000000000000..a8902dd7d19285 --- /dev/null +++ b/packages/steghide/use-cxx11.patch @@ -0,0 +1,45 @@ +error: no template named 'unary_function' in namespace 'std' + +--- a/configure.in ++++ b/configure.in +@@ -22,14 +22,14 @@ + then + AC_MSG_RESULT([yes]) + AC_DEFINE(DEBUG,1,[enable code used only for debugging]) +- CXXFLAGS="-O2 -Wall -g" ++ CXXFLAGS="-std=c++11 -O2 -Wall -g" + else + AC_MSG_RESULT([no]) +- CXXFLAGS="-O2 -Wall" ++ CXXFLAGS="-std=c++11 -O2 -Wall" + fi + , + AC_MSG_RESULT([no]) +- CXXFLAGS="-O2 -Wall" ++ CXXFLAGS="-std=c++11 -O2 -Wall" + ) + + dnl check if randomness should be disabled +--- a/configure ++++ b/configure +@@ -7560,17 +7560,17 @@ + #define DEBUG 1 + _ACEOF + +- CXXFLAGS="-O2 -Wall -g" ++ CXXFLAGS="-std=c++11 -O2 -Wall -g" + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +- CXXFLAGS="-O2 -Wall" ++ CXXFLAGS="-std=c++11 -O2 -Wall" + fi + + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +- CXXFLAGS="-O2 -Wall" ++ CXXFLAGS="-std=c++11 -O2 -Wall" + + fi; +