Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thirdparty/lua-Spore 0.4.0 #2015

Merged
merged 2 commits into from
Jan 10, 2025
Merged

thirdparty/lua-Spore 0.4.0 #2015

merged 2 commits into from
Jan 10, 2025

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Jan 7, 2025

@benoit-pierre
Copy link
Contributor

So dkjson needs to be promoted from thirdparty/spec to a standard dependency so it's available, e.g. when running the emulator and not the testsuite:

1/07/25-18:14:14 WARN  Error when loading plugins/kosync.koplugin/main.lua common/Spore.lua:5: module 'dkjson' not found:
        no field package.preload['dkjson']
        no file 'plugins/kosync.koplugin/dkjson.lua'
        no file 'common/dkjson.lua'
        no file 'frontend/dkjson.lua'
        no file 'plugins/exporter.koplugin/dkjson.lua'
        no file './dkjson.lua'
        no file '/usr/local/share/luajit-2.1/dkjson.lua'
        no file '/usr/local/share/lua/5.1/dkjson.lua'
        no file '/usr/local/share/lua/5.1/dkjson/init.lua'
        no file 'plugins/kosync.koplugin/lib/dkjson.so'
        no file 'common/dkjson.so'
        no file 'common/dkjson.dll'
        no file '/usr/lib/lua/dkjson.so'
        no file './dkjson.so'
        no file '/usr/local/lib/lua/5.1/dkjson.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
--- i/plugins/kosync.koplugin/main.lua
+++ w/plugins/kosync.koplugin/main.lua
@@ -16,6 +16,8 @@ local util = require("util")
 local T = require("ffi/util").template
 local _ = require("gettext")
 
+print('Spore', require("Spore"))
+
 if G_reader_settings:hasNot("device_id") then
     G_reader_settings:saveSetting("device_id", random.uuid())
 end

@benoit-pierre
Copy link
Contributor

 cmake/CMakeLists.txt                  |  4 +++-
 thirdparty/dkjson/CMakeLists.txt      | 10 ++++++++++
 thirdparty/spec/dkjson/CMakeLists.txt |  4 ----
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git c/cmake/CMakeLists.txt i/cmake/CMakeLists.txt
index 1b841aeb8..3c1a71a95 100644
--- c/cmake/CMakeLists.txt
+++ i/cmake/CMakeLists.txt
@@ -185,6 +185,9 @@ declare_project(thirdparty/czmq DEPENDS libzmq ${EXCLUDE_FROM_ALL})
 # djvulibre
 declare_project(thirdparty/djvulibre DEPENDS libjpeg-turbo EXCLUDE_FROM_ALL)
 
+# dkjson
+declare_project(thirdparty/dkjson)
+
 # dropbear
 if(CERVANTES OR KINDLE OR KOBO OR POCKETBOOK)
     set(EXCLUDE_FROM_ALL)
@@ -421,7 +424,6 @@ if(EMULATE_READER)
     foreach(PRJ
             busted
             cluacov
-            dkjson
             lua-term
             lua_cliargs
             luacov
diff --git c/thirdparty/dkjson/CMakeLists.txt i/thirdparty/dkjson/CMakeLists.txt
new file mode 100644
index 000000000..4b1c3728d
--- /dev/null
+++ i/thirdparty/dkjson/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Build in source tree.
+set(BINARY_DIR ${SOURCE_DIR})
+
+append_install_commands(INSTALL_CMD dkjson.lua DESTINATION common)
+
+external_project(
+    DOWNLOAD URL d7754634dcbe6e95f3b6b55fd4ca5ceb
+    http://dkolf.de/dkjson-lua/dkjson-2.8.tar.gz
+    INSTALL_COMMAND ${INSTALL_CMD}
+)
diff --git c/thirdparty/spec/dkjson/CMakeLists.txt i/thirdparty/spec/dkjson/CMakeLists.txt
deleted file mode 100644
index 976f0e640..000000000
--- c/thirdparty/spec/dkjson/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-spec_rock(
-    https://luarocks.org/manifests/dhkolf/dkjson-2.8-1.src.rock
-    4d002b7591658983248f8214e9459e1d
-)

@Frenzie
Copy link
Member Author

Frenzie commented Jan 7, 2025

That wasn't necessary, but thanks. It did make it quicker. ;-)

@Frenzie Frenzie merged commit 5854014 into master Jan 10, 2025
7 checks passed
@Frenzie Frenzie deleted the Frenzie-patch-1 branch January 10, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants