pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
luakit-git: also use the pkgsrc xdg directory
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Tue Jul 11 21:25:21 2017 +0200
Changeset: 4c083f42432d3ff7d176bfc76493f07ef5803fa5
Modified Files:
luakit-git/Makefile
luakit-git/PLIST
luakit-git/distinfo
Added Files:
luakit-git/patches/patch-clib_xdg.c
luakit-git/patches/patch-common_luautil.c
luakit-git/patches/patch-luah.c
Log Message:
luakit-git: also use the pkgsrc xdg directory
Now luakit can start without the user first copying all of the
configuration files to the user's configuration directory.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4c083f42432d3ff7d176bfc76493f07ef5803fa5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
luakit-git/Makefile | 6 ++++++
luakit-git/PLIST | 3 ---
luakit-git/distinfo | 3 +++
luakit-git/patches/patch-clib_xdg.c | 36 +++++++++++++++++++++++++++++++
luakit-git/patches/patch-common_luautil.c | 16 ++++++++++++++
luakit-git/patches/patch-luah.c | 16 ++++++++++++++
6 files changed, 77 insertions(+), 3 deletions(-)
diffs:
diff --git a/luakit-git/Makefile b/luakit-git/Makefile
index fa43ae84c1..b8320405e7 100644
--- a/luakit-git/Makefile
+++ b/luakit-git/Makefile
@@ -28,6 +28,12 @@ INSTALL_MAKE_FLAGS+= ${LUAKIT_MAKE_FLAGS}
LUA_VERSIONS_ACCEPTED= 51
+SUBST_CLASSES+= xdg-dirs
+SUBST_STAGE.xdg-dirs= pre-configure
+SUBST_MESSAGE.xdg-dirs= Add pkgsrc xdg-dirs to the search path.
+SUBST_FILES.xdg-dirs= luah.c clib/xdg.c common/luautil.c
+SUBST_SED.xdg-dirs= -e 's,@PKGSRCXDGPATH@,"${PREFIX}/etc/xdg",g'
+
.include "../../lang/lua/luaversion.mk"
DEPENDS+= ${LUA_PKGPREFIX}-filesystem-[0-9]*:../../devel/lua-filesystem
diff --git a/luakit-git/PLIST b/luakit-git/PLIST
index 16f042a562..09c3a3bc40 100644
--- a/luakit-git/PLIST
+++ b/luakit-git/PLIST
@@ -67,7 +67,6 @@ share/doc/luakit/modules/lousy.widget.tabi.html
share/doc/luakit/modules/lousy.widget.tablist.html
share/doc/luakit/modules/lousy.widget.uri.html
share/doc/luakit/modules/luakit.html
-share/doc/luakit/modules/mixed_content.html
share/doc/luakit/modules/msg.html
share/doc/luakit/modules/newtab_chrome.html
share/doc/luakit/modules/noscript.html
@@ -123,7 +122,6 @@ share/luakit/lib/history.lua
share/luakit/lib/history_chrome.lua
share/luakit/lib/image_css.lua
share/luakit/lib/image_css_wm.lua
-share/luakit/lib/introspector.lua
share/luakit/lib/introspector_chrome.lua
share/luakit/lib/jquery.min.js
share/luakit/lib/lousy/bind.lua
@@ -148,7 +146,6 @@ share/luakit/lib/lousy/widget/tabi.lua
share/luakit/lib/lousy/widget/tablist.lua
share/luakit/lib/lousy/widget/uri.lua
share/luakit/lib/markdown.lua
-share/luakit/lib/mixed_content.lua
share/luakit/lib/newtab_chrome.lua
share/luakit/lib/noscript.lua
share/luakit/lib/open_editor.lua
diff --git a/luakit-git/distinfo b/luakit-git/distinfo
index 3d8c013af3..2e7cafe926 100644
--- a/luakit-git/distinfo
+++ b/luakit-git/distinfo
@@ -4,3 +4,6 @@ SHA1 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903
RMD160 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = c829f11889a2e50e8a91b5c9553e84c0ded5fdd9
SHA512 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = f493fde91e87b8bd40f3a90b558c4d297ed31bc00e6924660a5c1fa55aa35bfd2eb7c8a6a7ea1d6b9ef7d095d358659d350ca92fbc6f654a9df9a1544ce30fdf
Size (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = 518360 bytes
+SHA1 (patch-clib_xdg.c) = 503119fe2bba62a94b77575e3994db6329f19af3
+SHA1 (patch-common_luautil.c) = 8c39c1079832ab4e7e7b118892b9b7645fa48fac
+SHA1 (patch-luah.c) = f811e2ddd3178007c62aba805110ba59934a3c3d
diff --git a/luakit-git/patches/patch-clib_xdg.c b/luakit-git/patches/patch-clib_xdg.c
new file mode 100644
index 0000000000..4f8047b203
--- /dev/null
+++ b/luakit-git/patches/patch-clib_xdg.c
@@ -0,0 +1,36 @@
+$NetBSD$
+
+Also search in the pkgsrc xdg path.
+
+--- clib/xdg.c.orig 2017-07-10 04:22:35.000000000 +0000
++++ clib/xdg.c
+@@ -52,6 +52,20 @@ luaH_push_path_array(lua_State *L, const
+ return 1;
+ }
+
++static int
++luaH_push_path_array_fallback(lua_State *L, const gchar * const * paths, const gchar *fallback)
++{
++ gint n;
++ lua_newtable(L);
++ for (n = 0; paths[n]; ++n) {
++ luaH_push_path(L, paths[n]);
++ lua_rawseti(L, -2, n+1);
++ }
++ luaH_push_path(L, fallback);
++ lua_rawseti(L, -2, n+1);
++ return 1;
++}
++
+ static gint
+ luaH_xdg_index(lua_State *L)
+ {
+@@ -84,7 +98,7 @@ luaH_xdg_index(lua_State *L)
+ return luaH_push_path_array(L, g_get_system_data_dirs());
+
+ case L_TK_SYSTEM_CONFIG_DIRS:
+- return luaH_push_path_array(L, g_get_system_config_dirs());
++ return luaH_push_path_array_fallback(L, g_get_system_config_dirs(), @PKGSRCXDGPATH@);
+
+ default:
+ break;
diff --git a/luakit-git/patches/patch-common_luautil.c b/luakit-git/patches/patch-common_luautil.c
new file mode 100644
index 0000000000..6d16f0fd3d
--- /dev/null
+++ b/luakit-git/patches/patch-common_luautil.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Also search in the pkgsrc xdg path.
+
+--- common/luautil.c.orig 2017-06-05 19:43:00.000000000 +0000
++++ common/luautil.c
+@@ -169,6 +169,9 @@ luaH_add_paths(lua_State *L, const gchar
+ /* add luakit install path */
+ g_ptr_array_add(paths, g_build_filename(LUAKIT_INSTALL_PATH, "lib", NULL));
+
++ /* add luakit xdg path */
++ g_ptr_array_add(paths, g_build_filename(@PKGSRCXDGPATH@, "luakit", NULL));
++
+ const gchar *path;
+ for (guint i = 0; i < paths->len; i++) {
+ path = paths->pdata[i];
diff --git a/luakit-git/patches/patch-luah.c b/luakit-git/patches/patch-luah.c
new file mode 100644
index 0000000000..c133ecaf23
--- /dev/null
+++ b/luakit-git/patches/patch-luah.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Also search in the pkgsrc xdg path.
+
+--- luah.c.orig 2017-07-11 15:46:58.000000000 +0000
++++ luah.c
+@@ -210,6 +210,9 @@ luaH_parserc(const gchar *confpath, gboo
+ for(; *config_dirs; config_dirs++)
+ g_ptr_array_add(paths, g_build_filename(*config_dirs, "luakit", "rc.lua", NULL));
+
++ /* add luakit xdg path */
++ g_ptr_array_add(paths, g_build_filename(@PKGSRCXDGPATH@, "luakit", "rc.lua", NULL));
++
+ /* get continuation variable; bail out if invalid */
+ char *i_str = getenv("LUAKIT_NEXT_CONFIG_INDEX");
+ gint i = i_str ? atoi(i_str) : 0;
Home |
Main Index |
Thread Index |
Old Index