From d71f18f5841f7d5814b09ad19efa55f6e7360ff2 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sat, 9 Jul 2022 19:43:43 +1000 Subject: [PATCH] fsearch: update to 0.1.4 --- .../fsearch/patches/musl-no-malloc_trim.diff | 38 ++++++++++++++++--- srcpkgs/fsearch/template | 17 +++------ 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/srcpkgs/fsearch/patches/musl-no-malloc_trim.diff b/srcpkgs/fsearch/patches/musl-no-malloc_trim.diff index fd6c7304fc32..49403a2c5f79 100644 --- a/srcpkgs/fsearch/patches/musl-no-malloc_trim.diff +++ b/srcpkgs/fsearch/patches/musl-no-malloc_trim.diff @@ -1,11 +1,39 @@ -diff -ruN fsearch-0.1/src/fsearch_database.c fsearch-0.1-musl/src/fsearch_database.c ---- fsearch-0.1/src/fsearch_database.c 2021-09-25 02:41:49.000000000 +1000 -+++ fsearch-0.1-musl/src/fsearch_database.c 2021-09-25 21:42:00.187684634 +1000 -@@ -1454,7 +1454,9 @@ +diff --git a/meson.build b/meson.build +index 0e26bf5..9114af6 100644 +--- a/meson.build ++++ b/meson.build +@@ -12,7 +12,10 @@ cc = meson.get_compiler('c') + gnome = import('gnome') + i18n = import('i18n') + ++have_malloc_trim = cc.has_function('malloc_trim') ++ + config_h = configuration_data() ++config_h.set('HAVE_MALLOC_TRIM', have_malloc_trim) + config_h.set_quoted('APP_ID', app_id) + config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) + config_h.set_quoted('VERSION', meson.project_version()) +diff --git a/src/fsearch_database.c b/src/fsearch_database.c +index 8dcc9d0..80518b7 100644 +--- a/src/fsearch_database.c ++++ b/src/fsearch_database.c +@@ -25,7 +25,11 @@ + #include + #include + #include ++ ++#ifdef HAVE_MALLOC_TRIM + #include ++#endif ++ + #include + #include + #include +@@ -1459,7 +1463,9 @@ db_free(FsearchDatabase *db) { g_clear_pointer(&db, free); -+#ifdef __GLIBC__ ++#ifdef HAVE_MALLOC_TRIM malloc_trim(0); +#endif diff --git a/srcpkgs/fsearch/template b/srcpkgs/fsearch/template index cdf4e8056ec4..32d5cb6b4bc0 100644 --- a/srcpkgs/fsearch/template +++ b/srcpkgs/fsearch/template @@ -1,18 +1,13 @@ # Template file for 'fsearch' pkgname=fsearch -version=0.1.2 -revision=2 -build_style=gnu-configure -hostmakedepends="autogen automake libtool pkg-config autoconf-archive - gettext-devel glib-devel" +version=0.1.4 +revision=1 +build_style=meson +hostmakedepends="libtool pkg-config glib-devel gettext-devel" makedepends="gtk+3-devel" short_desc="Fast file search utility based on GTK+3" -maintainer="a dinosaur " +maintainer="a dinosaur " license="GPL-2.0-or-later" homepage="https://cboxdoerfer.github.io/fsearch/" distfiles="https://github.com/cboxdoerfer/fsearch/archive/${version}.tar.gz" -checksum=f80e10922812169e8437476d5fbe6d05249997c49b98f991d382a6d5566551b4 - -pre_configure() { - ./autogen.sh -} +checksum=289c19136f89712100ff8f6ad4e7cbbdfbd2938a7c076c85c45658f5c36fc7fd