diff options
Diffstat (limited to 'www-client/luakit/files')
-rw-r--r-- | www-client/luakit/files/luakit-2.2.1-make.patch | 38 | ||||
-rw-r--r-- | www-client/luakit/files/luakit-2.2.1-pkg-config.patch | 21 | ||||
-rw-r--r-- | www-client/luakit/files/luakit-cflags.patch | 11 | ||||
-rw-r--r-- | www-client/luakit/files/luakit-fix_tests.patch | 108 |
4 files changed, 59 insertions, 119 deletions
diff --git a/www-client/luakit/files/luakit-2.2.1-make.patch b/www-client/luakit/files/luakit-2.2.1-make.patch new file mode 100644 index 000000000000..0e0689feee2e --- /dev/null +++ b/www-client/luakit/files/luakit-2.2.1-make.patch @@ -0,0 +1,38 @@ +--- a/Makefile ++++ b/Makefile +@@ -56,22 +56,18 @@ + $(filter-out $(EXT_OBJS),$(OBJS)) $(EXT_OBJS): $(HEADS) config.mk + + $(filter-out $(EXT_OBJS),$(OBJS)) : %.o : %.c +- @echo $(CC) -c $< -o $@ +- @$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + + $(EXT_OBJS) : %.o : %.c +- @echo $(CC) -c $< -o $@ +- @$(CC) -c $(CFLAGS) -DLUAKIT_WEB_EXTENSION -fpic $(CPPFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) -DLUAKIT_WEB_EXTENSION -fpic $(CPPFLAGS) $< -o $@ + + widgets/webview.o: $(wildcard widgets/webview/*.c) + + luakit: $(OBJS) +- @echo $(CC) -o $@ $(OBJS) +- @$(CC) -o $@ $(OBJS) $(LDFLAGS) ++ $(CC) -o $@ $(OBJS) $(LDFLAGS) + + luakit.so: $(EXT_OBJS) +- @echo $(CC) -o $@ $(EXT_OBJS) +- @$(CC) -o $@ $(EXT_OBJS) -shared $(LDFLAGS) ++ $(CC) -o $@ $(EXT_OBJS) -shared $(LDFLAGS) + + luakit.1: luakit.1.in + @sed "s|LUAKITVERSION|$(VERSION)|" $< > $@ +@@ -115,7 +111,7 @@ + install -d $(DESTDIR)$(APPDIR) + install -m644 extras/luakit.desktop $(DESTDIR)$(APPDIR) + install -d $(DESTDIR)$(MANPREFIX)/man1/ +- install -m644 luakit.1.gz $(DESTDIR)$(MANPREFIX)/man1/ ++ install -m644 luakit.1 $(DESTDIR)$(MANPREFIX)/man1/ + mkdir -p resources + find resources -type d -exec install -d $(DESTDIR)$(PREFIX)/share/luakit/'{}' \; + find resources -type f -exec sh -c 'f="{}"; install -m644 "$$f" "$(DESTDIR)$(PREFIX)/share/luakit/$$(dirname $$f)"' \; diff --git a/www-client/luakit/files/luakit-2.2.1-pkg-config.patch b/www-client/luakit/files/luakit-2.2.1-pkg-config.patch new file mode 100644 index 000000000000..181c02378669 --- /dev/null +++ b/www-client/luakit/files/luakit-2.2.1-pkg-config.patch @@ -0,0 +1,21 @@ +--- a/config.mk ++++ b/config.mk +@@ -98,15 +98,15 @@ + PKGS += javascriptcoregtk-4.0 + + # Check user has correct packages installed (and found by pkg-config). +-PKGS_OK := $(shell pkg-config --print-errors --exists $(PKGS) && echo 1) ++PKGS_OK := $(shell $(PKG_CONFIG) --print-errors --exists $(PKGS) && echo 1) + ifneq ($(PKGS_OK),1) + $(error Cannot find required package(s\) to build luakit. Please \ + check you have the above packages installed and try again) + endif + + # Add pkg-config options to compile flags. +-CFLAGS += $(shell pkg-config --cflags $(PKGS)) ++CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKGS)) + CFLAGS += -I./ + + # Add pkg-config options to linker flags. +-LDFLAGS += $(shell pkg-config --libs $(PKGS)) ++LDFLAGS += $(shell $(PKG_CONFIG) --libs $(PKGS)) diff --git a/www-client/luakit/files/luakit-cflags.patch b/www-client/luakit/files/luakit-cflags.patch deleted file mode 100644 index dd8d51c391f1..000000000000 --- a/www-client/luakit/files/luakit-cflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/config.mk -+++ b/config.mk -@@ -2,7 +2,7 @@ - - # Compile/link options. - CC ?= gcc --CFLAGS += -std=gnu99 -ggdb -W -Wall -Wextra -Werror=unused-result -+CFLAGS += -std=gnu99 -W -Wall -Wextra - LDFLAGS += - CPPFLAGS += - diff --git a/www-client/luakit/files/luakit-fix_tests.patch b/www-client/luakit/files/luakit-fix_tests.patch deleted file mode 100644 index f379fa85f6c8..000000000000 --- a/www-client/luakit/files/luakit-fix_tests.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 1d5ae1d56da688c3ac95301f4ae07eb7721dd20e Mon Sep 17 00:00:00 2001 -From: Aidan Holm <aidanholm@gmail.com> -Date: Fri, 11 Aug 2017 11:32:47 +0800 -Subject: [PATCH] Add support for tests with DEVELOPMENT_PATHS=0 - ---- - ipc.c | 36 ++++++++++++++++-------------------- - tests/async/run_test.lua | 4 ++++ - tests/async/wrangle_paths.lua | 20 ++++++++++++++++++++ - 3 files changed, 40 insertions(+), 20 deletions(-) - create mode 100644 tests/async/wrangle_paths.lua - -diff --git a/ipc.c b/ipc.c -index e0e8bfde..bd871209 100644 ---- a/ipc.c -+++ b/ipc.c -@@ -158,23 +158,20 @@ web_extension_connect_thread(gpointer UNUSED(data)) - static void - initialize_web_extensions_cb(WebKitWebContext *context, gpointer UNUSED(data)) - { --#if DEVELOPMENT_PATHS -- gchar *extension_dir = g_get_current_dir(); --#else -- const gchar *extension_dir = LUAKIT_INSTALL_PATH; --#endif -- -- char *extension_file = g_build_filename(extension_dir, "luakit.so", NULL); -- if (access(extension_file, R_OK)) { --#if DEVELOPMENT_PATHS --# define DEVPATHS "\nLuakit was built with DEVELOPMENT_PATHS=1; are you running luakit correctly?" --#else --# define DEVPATHS "" --#endif -- fatal("Cannot access luakit extension '%s': %s" DEVPATHS, extension_file, strerror(errno)); --#undef DEVPATHS -+ char *dirs[] = { g_get_current_dir(), LUAKIT_INSTALL_PATH }, *dir = NULL; -+ -+ for (unsigned i = 0; !dir && i < LENGTH(dirs); ++i) { -+ char *extension_file = g_build_filename(dirs[i], "luakit.so", NULL); -+ verbose("checking for luakit extension at '%s'", dirs[i]); -+ if (!access(extension_file, R_OK)) -+ dir = dirs[i]; -+ g_free(extension_file); - } -- g_free(extension_file); -+ -+ if (dir) -+ verbose("found luakit extension at '%s'", dir); -+ else -+ fatal("cannot find luakit extension 'luakit.so'"); - - const char *path; - g_mutex_lock (&socket_path_lock); -@@ -185,10 +182,9 @@ initialize_web_extensions_cb(WebKitWebContext *context, gpointer UNUSED(data)) - - GVariant *payload = g_variant_new_string(path); - webkit_web_context_set_web_extensions_initialization_user_data(context, payload); -- webkit_web_context_set_web_extensions_directory(context, extension_dir); --#if DEVELOPMENT_PATHS -- g_free(extension_dir); --#endif -+ webkit_web_context_set_web_extensions_directory(context, dir); -+ -+ g_free(dirs[0]); - } - - static void -diff --git a/tests/async/run_test.lua b/tests/async/run_test.lua -index d281265b..2a55f225 100644 ---- a/tests/async/run_test.lua -+++ b/tests/async/run_test.lua -@@ -3,6 +3,10 @@ - -- @script async.run_test - -- @copyright 2017 Aidan Holm - -+-- Adjust paths to work when running with DEVELOPMENT_PATHS=0 -+dofile("tests/async/wrangle_paths.lua") -+require_web_module("tests/async/wrangle_paths") -+ - local shared_lib = {} - local priv = require "tests.priv" - local test = require("tests.lib") -diff --git a/tests/async/wrangle_paths.lua b/tests/async/wrangle_paths.lua -new file mode 100644 -index 00000000..66efe929 ---- /dev/null -+++ b/tests/async/wrangle_paths.lua -@@ -0,0 +1,20 @@ -+--- Test runner path wrangler. -+-- -+-- @script async.wrangle_paths -+-- @copyright 2017 Aidan Holm -+ -+local system_paths, luakit_paths = {}, {} -+for path in string.gmatch(package.path, "[^;]+") do -+ if not path:match("^%./") and not path:find("luakit") then -+ table.insert(system_paths, path) -+ elseif not path:match("^%./") and path:find("luakit_test_") then -+ table.insert(luakit_paths, path) -+ end -+end -+local rel_paths = { "./lib/?.lua", "./lib/?/init.lua", "./config/?.lua", "./config/?/init.lua", } -+system_paths = table.concat(system_paths, ";") -+rel_paths = table.concat(rel_paths, ";") -+luakit_paths = table.concat(luakit_paths, ";") -+package.path = string.format("./?.lua;%s;%s;%s", system_paths, rel_paths, luakit_paths) -+ -+-- vim: et:sw=4:ts=8:sts=4:tw=80 |