Forgot to cvs add these in previous.

This commit is contained in:
ajacoutot 2019-05-10 14:25:43 +00:00
parent c3961abe28
commit ca3c195717
3 changed files with 94 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.81 2019/05/08 11:55:46 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.82 2019/05/10 14:25:43 ajacoutot Exp $
COMMENT= implementation of the FreeDesktop Desktop Menu Spec COMMENT= implementation of the FreeDesktop Desktop Menu Spec
GNOME_PROJECT= gnome-menus GNOME_PROJECT= gnome-menus
GNOME_VERSION= 3.32.0 GNOME_VERSION= 3.32.0
REVISION= 0
SHARED_LIBS += gnome-menu-3 0.0 # 0.0 SHARED_LIBS += gnome-menu-3 0.0 # 0.0

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-libmenu_entry-directories_c,v 1.3 2019/05/10 14:25:43 ajacoutot Exp $
REVERT (our realpath behaves differently)
From f8708a09630eedd038cbc377007cbf687228a2e6 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Mon, 24 Dec 2018 22:36:36 +0100
Subject: [PATCH] Switch to modern realpath()
Index: libmenu/entry-directories.c
--- libmenu/entry-directories.c.orig
+++ libmenu/entry-directories.c
@@ -23,10 +23,10 @@
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
-#include <stdlib.h>
#include "menu-util.h"
#include "menu-monitor.h"
+#include "canonicalize.h"
typedef struct CachedDir CachedDir;
typedef struct CachedDirMonitor CachedDirMonitor;
@@ -766,7 +766,7 @@ entry_directory_new (DesktopEntryType entry_type,
menu_verbose ("Loading entry directory \"%s\"\n", path);
- canonical = realpath (path, NULL);
+ canonical = menu_canonicalize_file_name (path, FALSE);
if (canonical == NULL)
{
menu_verbose ("Failed to canonicalize \"%s\": %s\n",

View File

@ -0,0 +1,60 @@
$OpenBSD: patch-libmenu_gmenu-tree_c,v 1.8 2019/05/10 14:25:44 ajacoutot Exp $
REVERT (our realpath behaves differently)
From f8708a09630eedd038cbc377007cbf687228a2e6 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Mon, 24 Dec 2018 22:36:36 +0100
Subject: [PATCH] Switch to modern realpath()
Index: libmenu/gmenu-tree.c
--- libmenu/gmenu-tree.c.orig
+++ libmenu/gmenu-tree.c
@@ -21,11 +21,11 @@
#include <string.h>
#include <errno.h>
-#include <stdlib.h>
#include "menu-layout.h"
#include "menu-monitor.h"
#include "menu-util.h"
+#include "canonicalize.h"
/* private */
typedef struct GMenuTreeItem GMenuTreeItem;
@@ -330,7 +330,7 @@ static gboolean
canonicalize_path (GMenuTree *tree,
const char *path)
{
- tree->canonical_path = realpath (path, NULL);
+ tree->canonical_path = menu_canonicalize_file_name (path, FALSE);
if (tree->canonical_path)
{
tree->canonical = TRUE;
@@ -1888,7 +1888,7 @@ load_merge_file (GMenuTree *tree,
if (!is_canonical)
{
- canonical = freeme = realpath (filename, NULL);
+ canonical = freeme = menu_canonicalize_file_name (filename, FALSE);
if (canonical == NULL)
{
if (add_monitor)
@@ -1983,7 +1983,7 @@ compare_basedir_to_config_dir (const char *canonical_b
retval = FALSE;
- canonical_menus_dir = realpath (dirname, NULL);
+ canonical_menus_dir = menu_canonicalize_file_name (dirname, FALSE);
if (canonical_menus_dir != NULL &&
strcmp (canonical_basedir, canonical_menus_dir) == 0)
{
@@ -2060,7 +2060,7 @@ load_parent_merge_file (GMenuTree *tree,
basedir = menu_layout_node_root_get_basedir (root);
menu_name = menu_layout_node_root_get_name (root);
- canonical_basedir = realpath (basedir, NULL);
+ canonical_basedir = menu_canonicalize_file_name (basedir, FALSE);
if (canonical_basedir == NULL)
{
menu_verbose ("Menu basedir '%s' no longer exists, not merging parent\n",