Update to desktop-file-utils-0.25.
This commit is contained in:
parent
736685475e
commit
5eae86bf3b
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.55 2019/08/03 22:58:42 tb Exp $
|
||||
# $OpenBSD: Makefile,v 1.56 2020/06/19 08:18:07 ajacoutot Exp $
|
||||
|
||||
COMMENT= utilities for dot.desktop entries
|
||||
|
||||
DISTNAME= desktop-file-utils-0.24
|
||||
REVISION= 0
|
||||
DISTNAME= desktop-file-utils-0.25
|
||||
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
|
||||
@ -21,14 +20,11 @@ WANTLIB += c glib-2.0 intl
|
||||
|
||||
MASTER_SITES= https://freedesktop.org/software/desktop-file-utils/releases/
|
||||
|
||||
MODULES= devel/meson
|
||||
|
||||
LIB_DEPENDS= devel/glib2
|
||||
|
||||
USE_GMAKE= Yes
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
ac_cv_prog_EMACS=no
|
||||
DEBUG_PACKAGES= ${BUILD_PACKAGES}
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/src/update-desktop-database.c
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (desktop-file-utils-0.24.tar.xz) = od5dpgy9vpHlycEKya/ubD3rAZ4M7l/bmpnd3CRfg9k=
|
||||
SIZE (desktop-file-utils-0.24.tar.xz) = 137424
|
||||
SHA256 (desktop-file-utils-0.25.tar.xz) = Q4GZQAMzMA+4oUAz18LyTOPPLjADEtqf8LMzfjXQa44=
|
||||
SIZE (desktop-file-utils-0.25.tar.xz) = 82888
|
||||
|
@ -1,4 +1,6 @@
|
||||
$OpenBSD: patch-src_install_c,v 1.2 2019/07/27 09:34:40 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_install_c,v 1.3 2020/06/19 08:18:08 ajacoutot Exp $
|
||||
|
||||
https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/merge_requests/8
|
||||
|
||||
Index: src/install.c
|
||||
--- src/install.c.orig
|
||||
@ -7,8 +9,8 @@ Index: src/install.c
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
+#if HAVE_PLEDGE
|
||||
+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
|
||||
+#ifdef HAVE_PLEDGE
|
||||
+ if (pledge ("stdio rpath wpath cpath fattr", NULL) == -1) {
|
||||
+ g_printerr ("pledge\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
@ -21,11 +23,11 @@ Index: src/install.c
|
||||
g_option_group_add_entries (group, install_options);
|
||||
g_option_context_add_group (context, group);
|
||||
}
|
||||
+#if HAVE_PLEDGE
|
||||
+#ifdef HAVE_PLEDGE
|
||||
+ else
|
||||
+ {
|
||||
+ /* In edit mode we can drop the fattr pledge. */
|
||||
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
|
||||
+ if (pledge ("stdio rpath wpath cpath", NULL) == -1) {
|
||||
+ g_printerr ("pledge in edit_mode\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
|
16
devel/desktop-file-utils/patches/patch-src_meson_build
Normal file
16
devel/desktop-file-utils/patches/patch-src_meson_build
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-src_meson_build,v 1.1 2020/06/19 08:18:08 ajacoutot Exp $
|
||||
|
||||
https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/issues/58
|
||||
|
||||
Index: src/meson.build
|
||||
--- src/meson.build.orig
|
||||
+++ src/meson.build
|
||||
@@ -24,7 +24,7 @@ executable('desktop-file-install',
|
||||
install: true,
|
||||
)
|
||||
|
||||
-executable('desktop-file-update',
|
||||
+executable('update-desktop-database',
|
||||
'update-desktop-database.c',
|
||||
link_with: desktop_file_lib,
|
||||
dependencies: glib,
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_update-desktop-database_c,v 1.18 2019/08/03 22:58:42 tb Exp $
|
||||
$OpenBSD: patch-src_update-desktop-database_c,v 1.19 2020/06/19 08:18:08 ajacoutot Exp $
|
||||
|
||||
Unveil the required directory with .desktop files and where the cache file needs
|
||||
to be written out to.
|
||||
@ -6,12 +6,14 @@ to be written out to.
|
||||
Index: src/update-desktop-database.c
|
||||
--- src/update-desktop-database.c.orig
|
||||
+++ src/update-desktop-database.c
|
||||
@@ -452,7 +452,7 @@ main (int argc,
|
||||
@@ -451,8 +451,8 @@ main (int argc,
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#if HAVE_PLEDGE
|
||||
-#if HAVE_PLEDGE
|
||||
- if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
|
||||
+ if (pledge("stdio rpath wpath cpath fattr unveil", NULL) == -1) {
|
||||
+#ifdef HAVE_PLEDGE
|
||||
+ if (pledge ("stdio rpath wpath cpath fattr unveil", NULL) == -1) {
|
||||
g_printerr ("pledge\n");
|
||||
return 1;
|
||||
}
|
||||
@ -19,13 +21,13 @@ Index: src/update-desktop-database.c
|
||||
|
||||
print_desktop_dirs (desktop_dirs);
|
||||
|
||||
+ if (unveil("${LOCALBASE}/share/locale/locale.alias", "r") == -1) {
|
||||
+ if (unveil ("${LOCALBASE}/share/locale/locale.alias", "r") == -1) {
|
||||
+ g_printerr ("Can't unveil '${LOCALBASE}/share/locale/locale.alias': %s\n", g_strerror(errno));
|
||||
+ }
|
||||
found_processable_dir = FALSE;
|
||||
for (i = 0; desktop_dirs[i] != NULL; i++)
|
||||
{
|
||||
+ if (unveil(desktop_dirs[i], "rwc") == -1) {
|
||||
+ if (unveil (desktop_dirs[i], "rwc") == -1) {
|
||||
+ g_printerr ("Can't unveil '%s' directory: %s\n", desktop_dirs[i], g_strerror(errno));
|
||||
+ }
|
||||
error = NULL;
|
||||
@ -36,7 +38,7 @@ Index: src/update-desktop-database.c
|
||||
}
|
||||
g_option_context_free (context);
|
||||
+
|
||||
+ if (unveil(NULL, NULL) == -1) {
|
||||
+ if (unveil (NULL, NULL) == -1) {
|
||||
+ g_printerr ("unveil\n");
|
||||
+ }
|
||||
|
||||
|
@ -1,29 +1,31 @@
|
||||
$OpenBSD: patch-src_validator_c,v 1.2 2019/07/27 09:34:40 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_validator_c,v 1.3 2020/06/19 08:18:08 ajacoutot Exp $
|
||||
|
||||
https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/merge_requests/8
|
||||
|
||||
Index: src/validator.c
|
||||
--- src/validator.c.orig
|
||||
+++ src/validator.c
|
||||
@@ -26,6 +26,9 @@
|
||||
* USA.
|
||||
*/
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
+#if HAVE_PLEDGE
|
||||
#include <locale.h>
|
||||
|
||||
+#ifdef HAVE_PLEDGE
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
#include "validate.h"
|
||||
|
||||
static gboolean warn_kde = FALSE;
|
||||
@@ -48,6 +51,13 @@ main (int argc, char *argv[])
|
||||
@@ -50,6 +53,13 @@ main (int argc, char *argv[])
|
||||
GError *error;
|
||||
int i;
|
||||
gboolean all_valid;
|
||||
+
|
||||
+#if HAVE_PLEDGE
|
||||
+ if (pledge("stdio rpath", NULL) == -1) {
|
||||
+ g_printerr("pledge\n");
|
||||
+#ifdef HAVE_PLEDGE
|
||||
+ if (pledge ("stdio rpath", NULL) == -1) {
|
||||
+ g_printerr ("pledge\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_summary (context, "Validate desktop entry files "
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.14 2019/07/27 09:34:40 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.15 2020/06/19 08:18:08 ajacoutot Exp $
|
||||
@define-tag update-desktop-database at-end %D/bin/update-desktop-database
|
||||
@tag update-desktop-database
|
||||
@unexec-delete rm -f %D/share/applications/mimeinfo.cache
|
||||
@ -6,11 +6,11 @@ bin/desktop-file-edit
|
||||
@bin bin/desktop-file-install
|
||||
@bin bin/desktop-file-validate
|
||||
@bin bin/update-desktop-database
|
||||
share/emacs/
|
||||
share/emacs/site-lisp/
|
||||
share/emacs/site-lisp/desktop-entry-mode.el
|
||||
@man man/man1/desktop-file-edit.1
|
||||
@man man/man1/desktop-file-install.1
|
||||
@man man/man1/desktop-file-validate.1
|
||||
@man man/man1/update-desktop-database.1
|
||||
share/emacs/
|
||||
share/emacs/site-lisp/
|
||||
share/emacs/site-lisp/desktop-entry-mode.el
|
||||
@sample share/applications/
|
||||
|
Loading…
x
Reference in New Issue
Block a user