Github messages for voidlinux
 help / color / mirror / Atom feed
From: yoshiyoshyosh <yoshiyoshyosh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] mhash: make boolean usage musl C++ portable.
Date: Sun, 10 Sep 2023 20:10:51 +0200	[thread overview]
Message-ID: <20230910181051.20X7yTmbHY9neIuWM61A3JoGDx9B-FCAfH31f0Bkhdk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46005@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

There is an updated pull request by yoshiyoshyosh against master on the void-packages repository

https://github.com/yoshiyoshyosh/void-packages mhash
https://github.com/void-linux/void-packages/pull/46005

mhash: make boolean usage musl C++ portable.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)
- I built this PR locally for these architectures:
  - `x86_64-musl` (crossbuild)
  - `i686` (crossbuild)

mhash uses `_Bool` directly for `#define mhash_boolean _Bool`. [musl C++ doesn't define `_Bool`](https://www.openwall.com/lists/musl/2017/07/28/1), so any C++ projects that include it will fail to build on musl. This fixes that without impacting any C projects

A patch file from https://github.com/void-linux/void-packages/pull/46005.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mhash-46005.patch --]
[-- Type: text/x-diff, Size: 2033 bytes --]

From 1030401e3d54ed832f4c52bd26cf8c96f32a9b59 Mon Sep 17 00:00:00 2001
From: yosh <yosh-git@riseup.net>
Date: Sun, 10 Sep 2023 12:28:33 -0400
Subject: [PATCH] mhash: make boolean usage musl C++ portable.

---
 srcpkgs/mhash/patches/fix-cpp-bools.patch | 21 +++++++++++++++++++++
 srcpkgs/mhash/template                    |  7 ++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/mhash/patches/fix-cpp-bools.patch

diff --git a/srcpkgs/mhash/patches/fix-cpp-bools.patch b/srcpkgs/mhash/patches/fix-cpp-bools.patch
new file mode 100644
index 0000000000000..418d25c7207e1
--- /dev/null
+++ b/srcpkgs/mhash/patches/fix-cpp-bools.patch
@@ -0,0 +1,21 @@
+--- a/include/mutils/mutils.h
++++ b/include/mutils/mutils.h
+@@ -21,6 +21,9 @@
+ #if !defined(__MUTILS_H)
+ #define __MUTILS_H
+ 
++#ifndef __cplusplus
++#include <stdbool.h>
++#endif
+ #include <mutils/mincludes.h>
+ 
+ #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
diff --git a/srcpkgs/mhash/template b/srcpkgs/mhash/template
index 6f753713a513d..5a4c497927b24 100644
--- a/srcpkgs/mhash/template
+++ b/srcpkgs/mhash/template
@@ -1,8 +1,9 @@
 # Template file for 'mhash'
 pkgname=mhash
 version=0.9.9.9
-revision=1
+revision=2
 build_style=gnu-configure
+checkdepends="perl"
 short_desc="Uniform interface to a large number of hash algorithms"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
 license="LGPL-2.1-or-later"
@@ -10,6 +11,10 @@ homepage="http://mhash.sourceforge.net/"
 distfiles="$SOURCEFORGE_SITE/project/mhash/mhash/${version}/mhash-${version}.tar.bz2"
 checksum=56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0
 
+case "$XBPS_TARGET_ARCH" in
+	i686*|x86_64-musl) make_check=no ;; # tests fail without a hint as to why
+esac
+
 mhash-devel_package() {
 	short_desc+=" - development files"
 	depends="${sourcepkg}>=${version}_${revision}"

  parent reply	other threads:[~2023-09-10 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 16:53 [PR PATCH] " yoshiyoshyosh
2023-09-10 16:58 ` [PR PATCH] [Updated] " yoshiyoshyosh
2023-09-10 17:03 ` yoshiyoshyosh
2023-09-10 17:53 ` yoshiyoshyosh
2023-09-10 18:10 ` yoshiyoshyosh [this message]
2023-09-10 18:13 ` [PR PATCH] [Updated] " yoshiyoshyosh
2023-09-10 19:53 ` yoshiyoshyosh
2023-09-10 19:55 ` yoshiyoshyosh
2023-09-10 20:24 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230910181051.20X7yTmbHY9neIuWM61A3JoGDx9B-FCAfH31f0Bkhdk@z \
    --to=yoshiyoshyosh@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).