From 3f98f73322b1532cb50923e4650f103836b8531b Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Tue, 24 Apr 2018 19:34:45 +0000 Subject: [PATCH] - Add font as valid media type - Fix missing ; when appending to a list not ending with one from upstream --- devel/desktop-file-utils/Makefile | 5 ++-- .../patches/patch-src_keyfileutils_c | 28 +++++++++++++++++++ .../patches/patch-src_mimeutils_c | 22 +++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 devel/desktop-file-utils/patches/patch-src_keyfileutils_c create mode 100644 devel/desktop-file-utils/patches/patch-src_mimeutils_c diff --git a/devel/desktop-file-utils/Makefile b/devel/desktop-file-utils/Makefile index b1dfb27c097..4bfce82029e 100644 --- a/devel/desktop-file-utils/Makefile +++ b/devel/desktop-file-utils/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.42 2017/11/03 10:32:52 jasper Exp $ +# $OpenBSD: Makefile,v 1.43 2018/04/24 19:34:45 ajacoutot Exp $ COMMENT= utilities for dot.desktop entries DISTNAME= desktop-file-utils-0.23 -REVISION = 0 +REVISION = 1 + EXTRACT_SUFX= .tar.xz CATEGORIES= devel diff --git a/devel/desktop-file-utils/patches/patch-src_keyfileutils_c b/devel/desktop-file-utils/patches/patch-src_keyfileutils_c new file mode 100644 index 00000000000..3d05da1e576 --- /dev/null +++ b/devel/desktop-file-utils/patches/patch-src_keyfileutils_c @@ -0,0 +1,28 @@ +$OpenBSD: patch-src_keyfileutils_c,v 1.1 2018/04/24 19:34:45 ajacoutot Exp $ + +From d281ed4b9db22ff9e4c7e56b5cce58a72d11fc54 Mon Sep 17 00:00:00 2001 +From: Pascal Terjan +Date: Wed, 17 Aug 2016 21:52:48 -0400 +Subject: Fix missing ; when appending to a list not ending with one + +Index: src/keyfileutils.c +--- src/keyfileutils.c.orig ++++ src/keyfileutils.c +@@ -187,9 +187,14 @@ dfu_key_file_merge_list (GKeyFile *keyfile, + + value = g_key_file_get_value (keyfile, group, key, NULL); + +- if (value) +- str = g_strconcat (value, to_merge, ";", NULL); +- else ++ if (value) { ++ size_t len = strlen (value); ++ if (len > 0 && value[len - 1] != ';') { ++ str = g_strconcat (value, ";", to_merge, ";", NULL); ++ } else { ++ str = g_strconcat (value, to_merge, ";", NULL); ++ } ++ } else + str = g_strconcat (to_merge, ";", NULL); + + g_key_file_set_value (keyfile, group, key, str); diff --git a/devel/desktop-file-utils/patches/patch-src_mimeutils_c b/devel/desktop-file-utils/patches/patch-src_mimeutils_c new file mode 100644 index 00000000000..4113d1b8a9f --- /dev/null +++ b/devel/desktop-file-utils/patches/patch-src_mimeutils_c @@ -0,0 +1,22 @@ +$OpenBSD: patch-src_mimeutils_c,v 1.5 2018/04/24 19:34:45 ajacoutot Exp $ + +From 92af4108750ceaf4191fd54e255885c7d8a78b70 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 9 Apr 2018 17:06:37 -0400 +Subject: Add font as valid media type + +Index: src/mimeutils.c +--- src/mimeutils.c.orig ++++ src/mimeutils.c +@@ -52,9 +52,9 @@ static const char *known_old_fdo_media_types[] = { + "x-directory" + }; + +-/* Defined in RFC 2045/2046 and RFC 2077 */ ++/* Defined in RFC 2045/2046, RFC 2077 and RFC 8081 */ + static const char *registered_discrete_media_types[] = { +- "application", "audio", "image", "model", "text", "video" ++ "application", "audio", "font", "image", "model", "text", "video" + }; + + /* Defined in RFC 2045/2046 */