forked from enlightenment/terminology
snap: make embedded efl able to start efreetd
+ add new dependencies + reorder deps + Also change the source for efl to my own that I find way more reliable than efl's server (might only be because I'm closer)
This commit is contained in:
parent
e082daa6c1
commit
4745752fab
|
@ -0,0 +1,76 @@
|
|||
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
|
||||
index f859c630f0..159cc81155 100644
|
||||
--- a/src/lib/efreet/efreet_cache.c
|
||||
+++ b/src/lib/efreet/efreet_cache.c
|
||||
@@ -112,6 +112,53 @@ EAPI int EFREET_EVENT_DESKTOP_CACHE_BUILD = 0;
|
||||
if (e->server != ipc) \
|
||||
return ECORE_CALLBACK_PASS_ON
|
||||
|
||||
+static void
|
||||
+_find_binary(char buf[PATH_MAX])
|
||||
+{
|
||||
+ char *path_env = getenv("PATH");
|
||||
+ char *names[] = { "efreetd", "terminology.efreetd"};
|
||||
+ int i, n_names = sizeof(names) / sizeof(names[0]);
|
||||
+
|
||||
+ if (!path_env)
|
||||
+ goto error;
|
||||
+
|
||||
+ for (i = 0; i < n_names; i++)
|
||||
+ {
|
||||
+ char *name = names[i];
|
||||
+ char *start = path_env;
|
||||
+ char *end = strchrnul(start, ':');
|
||||
+ while (*start)
|
||||
+ {
|
||||
+ if (end > start)
|
||||
+ {
|
||||
+ struct stat st;
|
||||
+ int res;
|
||||
+ int len = (int)(end - start);
|
||||
+ if (*(end-1) == '/')
|
||||
+ len = snprintf(buf, PATH_MAX, "%.*s%s",
|
||||
+ len,
|
||||
+ start,
|
||||
+ name);
|
||||
+ else
|
||||
+ len = snprintf(buf, PATH_MAX, "%.*s/%s",
|
||||
+ len,
|
||||
+ start,
|
||||
+ name);
|
||||
+ res = stat(buf, &st);
|
||||
+ if (res == 0 && S_ISREG(st.st_mode) && (S_IXUSR & st.st_mode))
|
||||
+ return;
|
||||
+ }
|
||||
+ if (!*end)
|
||||
+ break;
|
||||
+ start = end + 1;
|
||||
+ end = strchrnul(start, ':');
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+error:
|
||||
+ snprintf(buf, sizeof(buf), PACKAGE_BIN_DIR "/efreetd");
|
||||
+}
|
||||
+
|
||||
static void
|
||||
_ipc_launch(void)
|
||||
{
|
||||
@@ -146,7 +193,7 @@ _ipc_launch(void)
|
||||
if (run_in_tree)
|
||||
bs_binary_get(buf, sizeof(buf), "efreet", "efreetd");
|
||||
else
|
||||
- snprintf(buf, sizeof(buf), PACKAGE_BIN_DIR "/efreetd");
|
||||
+ _find_binary(buf);
|
||||
ecore_exe_run(buf, NULL);
|
||||
num = 0;
|
||||
while ((!ipc) && (num < tries))
|
||||
@@ -155,7 +202,7 @@ _ipc_launch(void)
|
||||
usleep(try_gap);
|
||||
ipc = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, "efreetd", 0, NULL);
|
||||
}
|
||||
- if (!ipc) ERR("Timeout in trying to start and then connect to efreetd");
|
||||
+ if (!ipc) ERR("Timeout in trying to start '%s' and then connect to efreetd", buf);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
|
@ -32,11 +32,18 @@ apps:
|
|||
command: usr/bin/tysend
|
||||
elementaryConfig:
|
||||
command: usr/bin/elementary_config
|
||||
efreetd:
|
||||
command: usr/bin/efreetd
|
||||
parts:
|
||||
efl:
|
||||
plugin: meson
|
||||
source-type: tar
|
||||
source: https://download.enlightenment.org/rel/libs/efl/efl-1.24.1.tar.xz
|
||||
# source: https://download.enlightenment.org/rel/libs/efl/efl-1.24.1.tar.xz
|
||||
source: https://downloads.terminolo.gy/efl-1.24.1.tar.xz
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
cd "${SNAPCRAFT_PART_SRC}"
|
||||
patch -p1 < "${SNAPCRAFT_PROJECT_DIR}"/snap/local/efl-efreetd-search.patch
|
||||
meson-parameters:
|
||||
- --prefix=/usr
|
||||
- --libdir=/usr/lib
|
||||
|
@ -63,7 +70,6 @@ parts:
|
|||
- gcc
|
||||
- pkg-config
|
||||
- libdbus-1-dev
|
||||
- libssl-dev
|
||||
- libfontconfig1-dev
|
||||
- libfreetype6-dev
|
||||
- libfribidi-dev
|
||||
|
@ -71,11 +77,17 @@ parts:
|
|||
- libgstreamer1.0-dev
|
||||
- libgstreamer-plugins-base1.0-dev
|
||||
- libharfbuzz-dev
|
||||
- libibus-1.0-dev
|
||||
- libjpeg-turbo8-dev
|
||||
- libluajit-5.1-dev
|
||||
- libopenjp2-7-dev
|
||||
- libpng-dev
|
||||
- libpulse-dev
|
||||
- librsvg2-dev
|
||||
- libscim-dev
|
||||
- libsndfile1-dev
|
||||
- libssl-dev
|
||||
- libsystemd-dev
|
||||
- libx11-dev
|
||||
- libxkbcommon-dev
|
||||
- libxkbcommon-x11-dev
|
||||
|
@ -86,11 +98,6 @@ parts:
|
|||
- libxrandr-dev
|
||||
- libxss-dev
|
||||
- libxtst-dev
|
||||
- libsystemd-dev
|
||||
- libluajit-5.1-dev
|
||||
- libibus-1.0-dev
|
||||
- libscim-dev
|
||||
- libopenjp2-7-dev
|
||||
stage-packages:
|
||||
- libcairo2
|
||||
- libcroco3
|
||||
|
@ -110,7 +117,9 @@ parts:
|
|||
- libibus-1.0-5
|
||||
- libicu60
|
||||
- libjpeg-turbo8
|
||||
- libltdl7
|
||||
- libluajit-5.1-2
|
||||
- libopenjp2-7
|
||||
- liborc-0.4-0
|
||||
- libpango-1.0-0
|
||||
- libpangocairo-1.0-0
|
||||
|
@ -118,6 +127,7 @@ parts:
|
|||
- libpixman-1-0
|
||||
- libpng16-16
|
||||
- librsvg2-2
|
||||
- libscim8v5
|
||||
- libthai0
|
||||
- libwayland-egl1
|
||||
- libx11-6
|
||||
|
@ -140,7 +150,6 @@ parts:
|
|||
- libxrender1
|
||||
- libxss1
|
||||
- libxtst6
|
||||
- libopenjp2-7
|
||||
terminology:
|
||||
plugin: meson
|
||||
after: [ efl ]
|
||||
|
|
Loading…
Reference in New Issue