Github messages for voidlinux
 help / color / mirror / Atom feed
From: wangp <wangp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: mimalloc-2.0.9, mold-1.11.0
Date: Tue, 20 Jun 2023 09:36:08 +0200	[thread overview]
Message-ID: <20230620073608.pRvTHEAz9V3YK6yhYhLKYil_UF9yqJWtrDrmZ_icTKI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37688@inbox.vuxu.org>

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

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

https://github.com/wangp/void-packages mimalloc-2.0.6
https://github.com/void-linux/void-packages/pull/37688

New packages: mimalloc-2.0.9, mold-1.11.0
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

Note:
- I left /usr/lib/libmimalloc.so in the main package because one of the suggested ways to use mimalloc is
`LD_PRELOAD=/usr/lib/libmimalloc.so  myprogram`

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

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

From 80cbf7c5d257b6647663ee09ab7fe34ed8980c55 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 8 Jan 2023 11:21:49 +1100
Subject: [PATCH 1/4] New package: mimalloc-2.0.9

Closes: #35283
---
 common/shlibs                                 |  1 +
 srcpkgs/mimalloc-devel                        |  1 +
 .../mimalloc/patches/secure-basename.patch    | 15 ++++++++
 srcpkgs/mimalloc/template                     | 34 +++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 120000 srcpkgs/mimalloc-devel
 create mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/template

diff --git a/common/shlibs b/common/shlibs
index c293ac460c08..eaaf31223279 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4272,3 +4272,4 @@ libplayerctl.so.2 playerctl-2.4.1_1
 libwireplumber-0.4.so.0 wireplumber-0.4.14_1
 libjodycode.so.2 libjodycode-2.0.1_1
 libgsoapssl++-2.8.124.so gsoap-2.8.124_1
+libmimalloc.so.2 mimalloc-2.0.9_1
diff --git a/srcpkgs/mimalloc-devel b/srcpkgs/mimalloc-devel
new file mode 120000
index 000000000000..9af584a917a5
--- /dev/null
+++ b/srcpkgs/mimalloc-devel
@@ -0,0 +1 @@
+mimalloc
\ No newline at end of file
diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
new file mode 100644
index 000000000000..ec0d0679f93c
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/secure-basename.patch
@@ -0,0 +1,15 @@
+# Set basename to always be 'mimalloc' for compatibility
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 74c1f29..dfce140 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -311,9 +311,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+ if(MI_VALGRIND)
+   set(mi_basename "${mi_basename}-valgrind")
+ endif()
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
new file mode 100644
index 000000000000..af96d562697b
--- /dev/null
+++ b/srcpkgs/mimalloc/template
@@ -0,0 +1,34 @@
+# Template file for 'mimalloc'
+pkgname=mimalloc
+version=2.0.9
+revision=1
+build_style=cmake
+configure_args="$(vopt_bool secure MI_SECURE)"
+short_desc="General purpose allocator with excellent performance characteristics"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="MIT"
+homepage="https://github.com/microsoft/mimalloc"
+distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
+checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+
+build_options="secure"
+desc_option_secure="Build mimalloc in secure mode"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_install() {
+	vlicense LICENSE
+}
+
+mimalloc-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/cmake
+		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/pkgconfig
+	}
+}

From b163f9caee681218c28246179401a3a5079322e1 Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sat, 21 Jan 2023 15:53:18 +1100
Subject: [PATCH 2/4] New package: mold-1.10.1

Closes: #34820
---
 .../mold/patches/test-target-machine.patch    | 19 +++++++++++++
 srcpkgs/mold/template                         | 27 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/mold/patches/test-target-machine.patch
 create mode 100644 srcpkgs/mold/template

diff --git a/srcpkgs/mold/patches/test-target-machine.patch b/srcpkgs/mold/patches/test-target-machine.patch
new file mode 100644
index 000000000000..a76b7fc236b6
--- /dev/null
+++ b/srcpkgs/mold/patches/test-target-machine.patch
@@ -0,0 +1,19 @@
+Allow tests to run when targeting i686 on a host where uname -m returns x86_64.
+
+diff --git a/test/elf/common.inc b/test/elf/common.inc
+index 1366db94..c67e35e5 100644
+--- a/test/elf/common.inc
++++ b/test/elf/common.inc
+@@ -13,7 +13,11 @@ canonical_name() {
+   esac
+ }
+ 
+-HOST=$(canonical_name $(uname -m))
++if [ -n "$XBPS_TARGET_MACHINE" ]; then
++  HOST=$(canonical_name "${XBPS_TARGET_MACHINE%-musl}")
++else
++  HOST=$(canonical_name $(uname -m))
++fi
+ 
+ if [ -n "$TRIPLE" ]; then
+   MACHINE=$(canonical_name $(echo $TRIPLE | sed 's/-.*//'))
diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
new file mode 100644
index 000000000000..1098f159e5e2
--- /dev/null
+++ b/srcpkgs/mold/template
@@ -0,0 +1,27 @@
+# Template file for 'mold'
+pkgname=mold
+version=1.10.1
+revision=1
+build_style=cmake
+configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -Dmimalloc_DIR=${XBPS_CROSS_BASE}/cmake/mimalloc-2.0"
+makedepends="mimalloc-devel openssl-devel zlib-devel libzstd-devel"
+# It's probably not worth pulling in clang/llvm to run the few tests that
+# depend on them.
+checkdepends="tar zstd libdwarf gdb"
+short_desc="Faster drop-in replacement for existing Unix linkers"
+maintainer="Peter Wang <novalazy@gmail.com>"
+license="AGPL-3.0-only"
+homepage="https://github.com/rui314/mold"
+distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
+checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
+fi
+
+post_install() {
+	vlicense LICENSE
+	rm -v ${DESTDIR}/usr/share/doc/mold/LICENSE
+}

From 4b1bdad9c5970c9177ada4fecfba0ed18203ff1f Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Sun, 2 Apr 2023 10:59:12 +1000
Subject: [PATCH 3/4] mold: update to 1.11.0.

---
 srcpkgs/mold/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mold/template b/srcpkgs/mold/template
index 1098f159e5e2..1621c52dae7e 100644
--- a/srcpkgs/mold/template
+++ b/srcpkgs/mold/template
@@ -1,6 +1,6 @@
 # Template file for 'mold'
 pkgname=mold
-version=1.10.1
+version=1.11.0
 revision=1
 build_style=cmake
 configure_args="-DMOLD_USE_SYSTEM_MIMALLOC=ON
@@ -14,7 +14,7 @@ maintainer="Peter Wang <novalazy@gmail.com>"
 license="AGPL-3.0-only"
 homepage="https://github.com/rui314/mold"
 distfiles="https://github.com/rui314/mold/archive/refs/tags/v${version}.tar.gz"
-checksum=19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787
+checksum=99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"

From 697ba0a75f05de87561967f0a0e8288f24c1ab8b Mon Sep 17 00:00:00 2001
From: Peter Wang <novalazy@gmail.com>
Date: Tue, 20 Jun 2023 17:24:39 +1000
Subject: [PATCH 4/4] mimalloc: update to 2.1.2.

Thanks to paper42.
---
 .../mimalloc/patches/secure-basename.patch    | 15 --------------
 .../mimalloc/patches/unify-library-name.patch | 20 +++++++++++++++++++
 srcpkgs/mimalloc/template                     |  8 +++++---
 3 files changed, 25 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/mimalloc/patches/secure-basename.patch
 create mode 100644 srcpkgs/mimalloc/patches/unify-library-name.patch

diff --git a/srcpkgs/mimalloc/patches/secure-basename.patch b/srcpkgs/mimalloc/patches/secure-basename.patch
deleted file mode 100644
index ec0d0679f93c..000000000000
--- a/srcpkgs/mimalloc/patches/secure-basename.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-# Set basename to always be 'mimalloc' for compatibility
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 74c1f29..dfce140 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -311,9 +311,6 @@ else()
- endif()
- 
- set(mi_basename "mimalloc")
--if(MI_SECURE)
--  set(mi_basename "${mi_basename}-secure")
--endif()
- if(MI_VALGRIND)
-   set(mi_basename "${mi_basename}-valgrind")
- endif()
diff --git a/srcpkgs/mimalloc/patches/unify-library-name.patch b/srcpkgs/mimalloc/patches/unify-library-name.patch
new file mode 100644
index 000000000000..c8cddbef17b8
--- /dev/null
+++ b/srcpkgs/mimalloc/patches/unify-library-name.patch
@@ -0,0 +1,20 @@
+make sure the library name is the same no matter whether is't built as
+secure or not
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -343,15 +343,6 @@ else()
+ endif()
+ 
+ set(mi_basename "mimalloc")
+-if(MI_SECURE)
+-  set(mi_basename "${mi_basename}-secure")
+-endif()
+-if(MI_TRACK_VALGRIND)
+-  set(mi_basename "${mi_basename}-valgrind")
+-endif()
+-if(MI_TRACK_ASAN)
+-  set(mi_basename "${mi_basename}-asan")
+-endif()
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LC)
+ if(NOT(CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$"))
+   set(mi_basename "${mi_basename}-${CMAKE_BUILD_TYPE_LC}") #append build type (e.g. -debug) if not a release version
diff --git a/srcpkgs/mimalloc/template b/srcpkgs/mimalloc/template
index af96d562697b..1c8872823b15 100644
--- a/srcpkgs/mimalloc/template
+++ b/srcpkgs/mimalloc/template
@@ -1,6 +1,6 @@
 # Template file for 'mimalloc'
 pkgname=mimalloc
-version=2.0.9
+version=2.1.2
 revision=1
 build_style=cmake
 configure_args="$(vopt_bool secure MI_SECURE)"
@@ -9,9 +9,10 @@ maintainer="Peter Wang <novalazy@gmail.com>"
 license="MIT"
 homepage="https://github.com/microsoft/mimalloc"
 distfiles="https://github.com/microsoft/mimalloc/archive/v${version}.tar.gz"
-checksum=4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850
+checksum=2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb
 
 build_options="secure"
+build_options_default="secure"
 desc_option_secure="Build mimalloc in secure mode"
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
@@ -28,7 +29,8 @@ mimalloc-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake
-		vmove usr/lib/mimalloc-2.0
+		vmove usr/lib/libmimalloc.so
+		vmove usr/lib/mimalloc-${version%.*}
 		vmove usr/lib/pkgconfig
 	}
 }

  parent reply	other threads:[~2023-06-20  7:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  4:26 [PR PATCH] New package: mimalloc-2.0.6 wangp
2022-06-26  5:06 ` [PR PATCH] [Updated] " wangp
2022-09-11  2:48 ` wangp
2022-09-11  5:01 ` New packages: mimalloc-2.0.6, mold-1.4.2 wangp
2022-09-16 15:30 ` icp1994
2022-09-16 16:38 ` icp1994
2022-09-17  4:28 ` [PR PATCH] [Updated] " wangp
2022-09-17  4:29 ` wangp
2022-09-17  4:40 ` wangp
2022-09-18  2:21 ` [PR PATCH] [Updated] " wangp
2022-09-18  2:22 ` wangp
2022-09-18  8:45 ` [PR PATCH] [Updated] " wangp
2022-09-19 16:18 ` [PR REVIEW] " cinerea0
2022-09-19 16:18 ` cinerea0
2022-09-22  0:57 ` wangp
2022-10-01  1:31 ` [PR PATCH] [Updated] " wangp
2022-10-01  1:33 ` wangp
2022-10-01  2:41 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.6, mold-1.5.1 wangp
2022-10-01  7:33 ` wangp
2022-10-01  7:33 ` wangp
2022-10-22  1:50 ` wangp
2022-10-23  1:41 ` wangp
2022-10-23  2:21 ` wangp
2022-10-24 14:24 ` New packages: mimalloc-2.0.6, mold-1.6.0 sug0
2022-12-02  7:23 ` [PR PATCH] [Updated] " wangp
2023-01-08  0:42 ` [PR PATCH] [Updated] New packages: mimalloc-2.0.7, mold-1.7.1 wangp
2023-01-08  5:58 ` New packages: mimalloc-2.0.9, mold-1.9.0 icp1994
2023-01-08 17:54 ` [PR REVIEW] " classabbyamp
2023-01-09  1:00 ` nekopsykose
2023-01-09  4:54 ` nekopsykose
2023-01-21  5:01 ` [PR PATCH] [Updated] " wangp
2023-03-02 22:22 ` subnut
2023-03-02 23:02 ` [PR REVIEW] " subnut
2023-03-02 23:05 ` subnut
2023-03-04  0:55 ` [PR PATCH] [Updated] " wangp
2023-03-04  0:57 ` [PR REVIEW] " wangp
2023-03-27 18:37 ` New packages: mimalloc-2.0.9, mold-1.10.1 cinerea0
2023-04-02  1:04 ` [PR PATCH] [Updated] " wangp
2023-06-20  7:36 ` wangp [this message]
2023-07-27 16:01 ` New packages: mimalloc-2.1.2, mold-1.11.0 sug0
2023-07-29 14:30 ` leahneukirchen
2023-07-31  8:51 ` [PR PATCH] [Updated] " wangp
2023-07-31 15:29 ` [PR PATCH] [Merged]: " leahneukirchen

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=20230620073608.pRvTHEAz9V3YK6yhYhLKYil_UF9yqJWtrDrmZ_icTKI@z \
    --to=wangp@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).