Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 2021 19:40:20 +0000 (UTC)
From:      "Tobias C. Berner" <tcberner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r565056 - in head/devel/glib20: . files
Message-ID:  <202102121940.11CJeKwZ010727@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tcberner
Date: Fri Feb 12 19:40:20 2021
New Revision: 565056
URL: https://svnweb.freebsd.org/changeset/ports/565056

Log:
  devel/glib20: Fix mime search path when LOCALBASE != /usr/local (honour LOCALBASE)
  
  - explicitely not bumping port revision, as the package does not change for people
    who are using the defaults LOCALBASE=/usr/local -- no need to burden the package
    builders for this.
  
  PR:		225378
  Submitted by:	John Hein <jcfyecrayz@liamekaens.com>

Modified:
  head/devel/glib20/Makefile
  head/devel/glib20/files/patch-gio_xdgmime_xdgmime.c
  head/devel/glib20/files/patch-glib_gutils.c
  head/devel/glib20/files/patch-glib_tests_utils.c

Modified: head/devel/glib20/Makefile
==============================================================================
--- head/devel/glib20/Makefile	Fri Feb 12 19:35:23 2021	(r565055)
+++ head/devel/glib20/Makefile	Fri Feb 12 19:40:20 2021	(r565056)
@@ -80,6 +80,10 @@ post-patch:
 	@${REINPLACE_CMD} -e '/inotify_init1/d' \
 		-e '/inotify.h/d' \
 		${WRKSRC}/meson.build
+	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+		${WRKSRC}/gio/xdgmime/xdgmime.c \
+		${WRKSRC}/glib/gutils.c \
+		${WRKSRC}/glib/tests/utils.c
 
 CODEGENDIR=	${PREFIX}/share/glib-2.0/codegen
 

Modified: head/devel/glib20/files/patch-gio_xdgmime_xdgmime.c
==============================================================================
--- head/devel/glib20/files/patch-gio_xdgmime_xdgmime.c	Fri Feb 12 19:35:23 2021	(r565055)
+++ head/devel/glib20/files/patch-gio_xdgmime_xdgmime.c	Fri Feb 12 19:40:20 2021	(r565056)
@@ -1,11 +1,11 @@
---- gio/xdgmime/xdgmime.c.orig	Mon Nov  8 22:25:27 2004
-+++ gio/xdgmime/xdgmime.c	Sat Nov 13 10:27:22 2004
-@@ -204,7 +204,7 @@
- 
+--- gio/xdgmime/xdgmime.c.orig	2020-12-17 11:47:11 UTC
++++ gio/xdgmime/xdgmime.c
+@@ -235,7 +235,7 @@ xdg_init_dirs (void)
    xdg_data_dirs = getenv ("XDG_DATA_DIRS");
+ 
    if (xdg_data_dirs == NULL)
 -    xdg_data_dirs = "/usr/local/share/:/usr/share/";
-+    xdg_data_dirs = "/usr/local/share/";
++    xdg_data_dirs = "%%LOCALBASE%%/share/";
  
-   ptr = xdg_data_dirs;
- 
+   /* Work out how many dirs we’re dealing with. */
+   if (xdg_data_home != NULL || home != NULL)

Modified: head/devel/glib20/files/patch-glib_gutils.c
==============================================================================
--- head/devel/glib20/files/patch-glib_gutils.c	Fri Feb 12 19:35:23 2021	(r565055)
+++ head/devel/glib20/files/patch-glib_gutils.c	Fri Feb 12 19:40:20 2021	(r565056)
@@ -1,11 +1,20 @@
---- glib/gutils.c.orig	2018-12-23 14:10:41.000000000 +0100
-+++ glib/gutils.c	2018-12-27 00:18:23.471950000 +0100
-@@ -2219,7 +2219,7 @@
+--- glib/gutils.c.orig	2020-12-17 11:47:11 UTC
++++ glib/gutils.c
+@@ -2500,7 +2500,7 @@ g_build_system_data_dirs (void)
+    */
+ #ifndef G_OS_WIN32
+   if (!data_dirs || !data_dirs[0])
+-    data_dirs = "/usr/local/share/:/usr/share/";
++    data_dirs = "%%LOCALBASE%%/share/:/usr/share/";
+ 
+   data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
+ #else
+@@ -2594,7 +2594,7 @@ g_build_system_config_dirs (void)
      }
  #else
    if (!conf_dirs || !conf_dirs[0])
 -    conf_dirs = "/etc/xdg";
-+    conf_dirs = "/usr/local/etc/xdg:/etc/xdg";
++    conf_dirs = "%%LOCALBASE%%/etc/xdg:/etc/xdg";
  
    conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
  #endif

Modified: head/devel/glib20/files/patch-glib_tests_utils.c
==============================================================================
--- head/devel/glib20/files/patch-glib_tests_utils.c	Fri Feb 12 19:35:23 2021	(r565055)
+++ head/devel/glib20/files/patch-glib_tests_utils.c	Fri Feb 12 19:40:20 2021	(r565056)
@@ -1,11 +1,11 @@
---- glib/tests/utils.c.orig	2012-09-24 02:19:54.000000000 +0000
-+++ glib/tests/utils.c	2012-09-24 02:20:48.000000000 +0000
-@@ -416,7 +416,7 @@
+--- glib/tests/utils.c.orig	2020-12-17 11:47:11 UTC
++++ glib/tests/utils.c
+@@ -485,7 +485,7 @@ test_xdg_dirs (void)
  
    xdg = (gchar *)g_getenv ("XDG_CONFIG_DIRS");
    if (!xdg)
 -    xdg = "/etc/xdg";
-+    xdg = "/usr/local/etc/xdg:/etc/xdg";
++    xdg = "%%LOCALBASE%%/etc/xdg:/etc/xdg";
  
    dirs = g_get_system_config_dirs ();
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102121940.11CJeKwZ010727>