diff options
Diffstat (limited to 'app-misc/vifm')
-rw-r--r-- | app-misc/vifm/Manifest | 2 | ||||
-rw-r--r-- | app-misc/vifm/files/vifm-0.13-musl.patch | 133 | ||||
-rw-r--r-- | app-misc/vifm/metadata.xml | 1 | ||||
-rw-r--r-- | app-misc/vifm/vifm-0.11.ebuild | 83 | ||||
-rw-r--r-- | app-misc/vifm/vifm-0.12.ebuild | 86 | ||||
-rw-r--r-- | app-misc/vifm/vifm-0.13-r1.ebuild (renamed from app-misc/vifm/vifm-0.13.ebuild) | 6 |
6 files changed, 139 insertions, 172 deletions
diff --git a/app-misc/vifm/Manifest b/app-misc/vifm/Manifest index 5b8dae320eda..8cbd65b85d8b 100644 --- a/app-misc/vifm/Manifest +++ b/app-misc/vifm/Manifest @@ -1,3 +1 @@ -DIST vifm-0.11.tar.gz 1525791 BLAKE2B c2aa6d3ddd0304ce1e3a0d1c9ac3218a783bc6dd8eebf7b3346ca262811f63dac75597913ad4883c62680cb77036c2985ca4ce88989a0dd0212dce975d8ec8b8 SHA512 15ace460da6d5f9bb7a016d8bb3f3d9cba47a608da5a39defbf7d09ff9de64c90a63a44264d695fe005f2f6d27ecb07dcec8f4ed5aef15e9d8728b52f1168dbd -DIST vifm-0.12.tar.gz 1913398 BLAKE2B 6a1933e5a70a61402ae52259ee9e03515916e9d6df57285726ec6062257d85966a32173142e730fbc35b48250c585a5e66cadba788e2029e5dcd620544341c4f SHA512 9491b1932535daa0ce6bd33ef955bfaedf995da27f049b36bdb0de9aa87a9a4dd6d2e22c8bf79e343febee16ae0fb87edfa8bde9c2d115b92c768e87bc0a8a7d DIST vifm-0.13.tar.gz 2218099 BLAKE2B 99661dd0defcb434abdc397855feac5c6da55a783cf8ad6afe333e208c431b9d10f05928fcf5a9f8e28ed4d602f66414162b14a872ce8881526f679e6e66259a SHA512 bd5e9f84cfb176e220e798dcdfc62e2ae3e89dbebd08cf4cce73eb843b85060c2df05f04f4db994d406baf2e0f90a04f5cb871beaf00fb04174464c81dd85938 diff --git a/app-misc/vifm/files/vifm-0.13-musl.patch b/app-misc/vifm/files/vifm-0.13-musl.patch new file mode 100644 index 000000000000..6682da354187 --- /dev/null +++ b/app-misc/vifm/files/vifm-0.13-musl.patch @@ -0,0 +1,133 @@ +From c97f144231afbeb4215659d5c685fdf1e3fe5612 Mon Sep 17 00:00:00 2001 +From: xaizek <xaizek@posteo.net> +Date: Sat, 8 Jul 2023 15:02:37 +0300 +Subject: [PATCH] Fix running tests with musl libc + +Thanks to Henrik Holst (a.k.a. hholst80). +--- +Upstream commit https://github.com/vifm/vifm/commit/c97f144231afbeb4215659d5c685fdf1e3fe5612 + +diff --git a/src/filelist.c b/src/filelist.c +index 28d26c69f..a7121f238 100644 +--- a/src/filelist.c ++++ b/src/filelist.c +@@ -329,7 +329,11 @@ flist_free_view(view_t *view) + modview_info_free(view->vi); + view->vi = NULL; + +- regfree(&view->primary_group); ++ if(view->primary_group_set) ++ { ++ regfree(&view->primary_group); ++ view->primary_group_set = 0; ++ } + + marks_clear_view(view); + +diff --git a/src/opt_handlers.c b/src/opt_handlers.c +index 5d1c000b0..9905b2b7f 100644 +--- a/src/opt_handlers.c ++++ b/src/opt_handlers.c +@@ -3301,9 +3301,13 @@ set_sortgroups(view_t *view, char **opt, char value[]) + { + if(scope == OPT_LOCAL) + { +- regfree(&view->primary_group); ++ if(view->primary_group_set) ++ { ++ regfree(&view->primary_group); ++ } + (void)regexp_compile(&view->primary_group, first, + REG_EXTENDED | REG_ICASE); ++ view->primary_group_set = 1; + } + free(first); + } +diff --git a/src/ui/fileview.c b/src/ui/fileview.c +index 11c80fe8b..ef5f422be 100644 +--- a/src/ui/fileview.c ++++ b/src/ui/fileview.c +@@ -253,6 +253,7 @@ fview_init(view_t *view) + view->sort_groups_g = strdup(""); + (void)regexp_compile(&view->primary_group, view->sort_groups, + REG_EXTENDED | REG_ICASE); ++ view->primary_group_set = 1; + + view->preview_prg = strdup(""); + view->preview_prg_g = strdup(""); +diff --git a/src/ui/ui.h b/src/ui/ui.h +index c9fee0782..886eb9d38 100644 +--- a/src/ui/ui.h ++++ b/src/ui/ui.h +@@ -449,6 +449,9 @@ struct view_t + char *sort_groups, *sort_groups_g; + /* Primary group of sort_groups (not sort_groups_g) in compiled form. */ + regex_t primary_group; ++ /* Indicates that primary_group was initialized, which is used to avoid ++ * freeing uninitialized data or freeing it twice. */ ++ int primary_group_set; + + int history_num; /* Number of used history elements. */ + int history_pos; /* Current position in history. */ +diff --git a/tests/misc/sort.c b/tests/misc/sort.c +index 9938414b5..3db71db5b 100644 +--- a/tests/misc/sort.c ++++ b/tests/misc/sort.c +@@ -409,8 +409,13 @@ TEST(groups_sorting_works) + lwin.dir_entry[6].origin = lwin.curr_dir; + + update_string(&lwin.sort_groups, "-(done|todo).*"); ++ if(lwin.primary_group_set) ++ { ++ regfree(&lwin.primary_group); ++ } + (void)regcomp(&lwin.primary_group, "-(done|todo).*", + REG_EXTENDED | REG_ICASE); ++ lwin.primary_group_set = 1; + + /* Ascending sorting. */ + +@@ -437,15 +442,17 @@ TEST(groups_sorting_works) + assert_string_equal("11-todo-publish", lwin.dir_entry[4].name); + assert_string_equal("1-done", lwin.dir_entry[5].name); + assert_string_equal("3-done", lwin.dir_entry[6].name); +- +- regfree(&lwin.primary_group); +- update_string(&lwin.sort_groups, NULL); + } + + TEST(global_groups_sorts_entries_list) + { + update_string(&lwin.sort_groups_g, "([0-9])"); ++ if(lwin.primary_group_set) ++ { ++ regfree(&lwin.primary_group); ++ } + (void)regcomp(&lwin.primary_group, "([a-z])", REG_EXTENDED | REG_ICASE); ++ lwin.primary_group_set = 1; + + dir_entry_t entry_list[] = { { .name = "a1" }, { .name = "b0" } }; + entries_t entries = { entry_list, 2 }; +diff --git a/tests/test-support/test-utils.c b/tests/test-support/test-utils.c +index 932bdc9c9..e3d9ba694 100644 +--- a/tests/test-support/test-utils.c ++++ b/tests/test-support/test-utils.c +@@ -32,6 +32,7 @@ + #include "../../src/utils/macros.h" + #include "../../src/utils/matcher.h" + #include "../../src/utils/path.h" ++#include "../../src/utils/regexp.h" + #include "../../src/utils/str.h" + #include "../../src/utils/string_array.h" + #include "../../src/utils/utils.h" +@@ -254,6 +255,10 @@ view_setup(view_t *view) + view_set_sort(view->sort, SK_BY_NAME, SK_NONE); + view_set_sort(view->sort_g, SK_BY_NAME, SK_NONE); + ++ /* The code assumes that this field is initialized. */ ++ assert_success(regexp_compile(&view->primary_group, "", REG_ICASE)); ++ view->primary_group_set = 1; ++ + view->custom.entry_count = 0; + view->custom.entries = NULL; + diff --git a/app-misc/vifm/metadata.xml b/app-misc/vifm/metadata.xml index d48a2ae9eff2..408df775c61b 100644 --- a/app-misc/vifm/metadata.xml +++ b/app-misc/vifm/metadata.xml @@ -14,7 +14,6 @@ conjunto de órdenes. </longdescription> <use> - <flag name="developer">Enable features of interest to developers</flag> <flag name="extended-keys">Support for extended keys (arrows, home etc)</flag> <flag name="gtk">Use gtk+ to determine mimetypes</flag> <flag name="vim">Install the vifm vim plugin and vim-compatible documentation</flag> diff --git a/app-misc/vifm/vifm-0.11.ebuild b/app-misc/vifm/vifm-0.11.ebuild deleted file mode 100644 index 9927dd8f487f..000000000000 --- a/app-misc/vifm/vifm-0.11.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools vim-doc xdg - -DESCRIPTION="Console file manager with vi(m)-like keybindings" -HOMEPAGE="https://vifm.info/" -SRC_URI="https://github.com/vifm/vifm/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm64 ppc x86" -IUSE="developer +extended-keys gtk +magic +vim +vim-syntax X" - -DEPEND=" - >=sys-libs/ncurses-5.9-r3:0 - magic? ( sys-apps/file ) - gtk? ( x11-libs/gtk+:2 ) - X? ( x11-libs/libX11 )" -RDEPEND="${DEPEND} - vim? ( || ( app-editors/vim app-editors/gvim ) ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" - -src_prepare() { - default - eautoreconf -} - -src_configure() { - econf \ - --disable-werror \ - $(use_enable developer) \ - $(use_enable extended-keys) \ - $(use_with magic libmagic) \ - $(use_with gtk) \ - $(use_with X X11) -} - -src_install() { - default - - if use vim; then - local t - for t in app plugin; do - insinto /usr/share/vim/vimfiles/"${t}" - doins -r data/vim/doc/${t}/${PN}* - done - fi - - if use vim-syntax; then - local t - for t in ftdetect ftplugin syntax; do - insinto /usr/share/vim/vimfiles/"${t}" - doins -r data/vim/${t}/${PN}* - done - fi -} - -pkg_postinst() { - xdg_pkg_postinst - if use vim; then - update_vim_helptags - - if [[ -n ${REPLACING_VERSIONS} ]]; then - elog - elog "You don't need to copy or link any files for" - elog " the vim plugin and documentation to work anymore." - elog "If you copied any vifm files to ~/.vim/ manually" - elog " in earlier vifm versions, please delete them." - fi - elog - elog "To use vim in vifm to view the documentation" - elog " edit ~/.vifm/vifmrc and set vimhelp instead of novimhelp" - elog - fi -} - -pkg_postrm() { - xdg_pkg_postrm - use vim && update_vim_helptags -} diff --git a/app-misc/vifm/vifm-0.12.ebuild b/app-misc/vifm/vifm-0.12.ebuild deleted file mode 100644 index 0084f374fe4d..000000000000 --- a/app-misc/vifm/vifm-0.12.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools vim-doc xdg - -DESCRIPTION="Console file manager with vi(m)-like keybindings" -HOMEPAGE="https://vifm.info/" -SRC_URI="https://github.com/vifm/vifm/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc ~x86" -IUSE="+extended-keys gtk +magic +vim +vim-syntax X" - -DEPEND=" - >=sys-libs/ncurses-5.9-r3:0 - magic? ( sys-apps/file ) - gtk? ( x11-libs/gtk+:2 ) - X? ( x11-libs/libX11 )" - -RDEPEND="${DEPEND} - vim? ( || ( app-editors/vim app-editors/gvim ) ) - vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" - -src_prepare() { - default - eautoreconf -} - -src_configure() { - # developer just turns off optimisations and adds -Werror again - # bug #855386 - econf \ - --disable-developer \ - --disable-werror \ - $(use_enable extended-keys) \ - $(use_with magic libmagic) \ - $(use_with gtk) \ - $(use_with X X11) -} - -src_install() { - default - - if use vim; then - local t - for t in app plugin; do - insinto /usr/share/vim/vimfiles/"${t}" - doins -r data/vim/doc/${t}/${PN}* - done - fi - - if use vim-syntax; then - local t - for t in ftdetect ftplugin syntax; do - insinto /usr/share/vim/vimfiles/"${t}" - doins -r data/vim/${t}/${PN}* - done - fi -} - -pkg_postinst() { - xdg_pkg_postinst - if use vim; then - update_vim_helptags - - if [[ -n ${REPLACING_VERSIONS} ]]; then - elog - elog "You don't need to copy or link any files for" - elog " the vim plugin and documentation to work anymore." - elog "If you copied any vifm files to ~/.vim/ manually" - elog " in earlier vifm versions, please delete them." - fi - elog - elog "To use vim in vifm to view the documentation" - elog " edit ~/.vifm/vifmrc and set vimhelp instead of novimhelp" - elog - fi -} - -pkg_postrm() { - xdg_pkg_postrm - use vim && update_vim_helptags -} diff --git a/app-misc/vifm/vifm-0.13.ebuild b/app-misc/vifm/vifm-0.13-r1.ebuild index ae80765cc747..1a7971e162cd 100644 --- a/app-misc/vifm/vifm-0.13.ebuild +++ b/app-misc/vifm/vifm-0.13-r1.ebuild @@ -33,6 +33,12 @@ RDEPEND=" # "Either perl or Vim is necessary to generate tags for documentation in Vim's format." from configure BDEPEND="|| ( dev-lang/perl app-editors/vim )" +PATCHES=( + # Bacported fix from upstream, + # see also https://github.com/vifm/vifm/issues/913 + "${FILESDIR}/${P}-musl.patch" +) + src_prepare() { default eautoreconf |