mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
Merge pull request #8682 from heitbaum/libplist
Apple libplist updates and depends
This commit is contained in:
commit
d72cc46e38
@ -0,0 +1,25 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libimobiledevice-glue"
|
||||
PKG_VERSION="1.1.0"
|
||||
PKG_SHA256="e7f93c1e6ceacf617ed78bdca92749d15a9dac72443ccb62eb59e4d606d87737"
|
||||
PKG_LICENSE="LGPL-2.1"
|
||||
PKG_SITE="http://www.libimobiledevice.org"
|
||||
PKG_URL="https://github.com/libimobiledevice/libimobiledevice-glue/releases/download/${PKG_VERSION}/libimobiledevice-glue-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libplist"
|
||||
PKG_LONGDESC="A library with common code used by libraries and tools around the libimobiledevice project"
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
--disable-shared \
|
||||
--disable-largefile"
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p "${SYSROOT_PREFIX}/usr/include/lib/libimobiledevice-glue"
|
||||
cp ${PKG_BUILD}/include/libimobiledevice-glue/utils.h "${SYSROOT_PREFIX}/usr/include/libimobiledevice-glue"
|
||||
}
|
@ -2,12 +2,12 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libimobiledevice"
|
||||
PKG_VERSION="1.3.0"
|
||||
PKG_SHA256="53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6"
|
||||
PKG_VERSION="73b6fd183872096f20e6d1007429546a317a7cb1"
|
||||
PKG_SHA256="854cb9e2671fdf5a2fca609e5e247ab498218b1659a2e5e2b47cf7c1392cec46"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.libimobiledevice.org"
|
||||
PKG_URL="https://github.com/libimobiledevice/libimobiledevice/releases/download/${PKG_VERSION}/libimobiledevice-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libusbmuxd openssl"
|
||||
PKG_URL="https://github.com/libimobiledevice/libimobiledevice/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libimobiledevice-glue libplist libusbmuxd openssl"
|
||||
PKG_LONGDESC="A cross-platform software library that talks the protocols to support Apple devices."
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
||||
@ -16,11 +16,11 @@ PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
--without-cython \
|
||||
--disable-largefile"
|
||||
|
||||
configure_package() {
|
||||
# if using a git hash as a package version - set RELEASE_VERSION
|
||||
export RELEASE_VERSION="$(sed -n '1,/RE/s/Version \(.*\)/\1/p' ${PKG_BUILD}/NEWS)-git-${PKG_VERSION:0:7}"
|
||||
}
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p "${SYSROOT_PREFIX}/usr/include/lib/libimobiledevice"
|
||||
cp ${PKG_BUILD}/common/utils.h "${SYSROOT_PREFIX}/usr/include/libimobiledevice"
|
||||
}
|
||||
|
@ -2,19 +2,25 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libusbmuxd"
|
||||
PKG_VERSION="2.0.2"
|
||||
PKG_SHA256="cc6a808553da4efa9fa5638be256d5ae020498795d9d260d280b87074e799b20"
|
||||
PKG_VERSION="07cd6f774fd444f981ade6e75e10962ba0439350"
|
||||
PKG_SHA256="fc17f3fb8236afe159c2fbb1dc373a26cf3491150ec43d6ecb4f160a0557ee4f"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.libimobiledevice.org"
|
||||
PKG_URL="https://github.com/libimobiledevice/libusbmuxd/releases/download/${PKG_VERSION}/libusbmuxd-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libplist"
|
||||
PKG_URL="https://github.com/libimobiledevice/libusbmuxd/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libimobiledevice-glue libplist"
|
||||
PKG_LONGDESC="A USB multiplex daemon."
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_realloc_0_nonnull=yes \
|
||||
--enable-static \
|
||||
--disable-shared"
|
||||
|
||||
configure_package() {
|
||||
# if using a git hash as a package version - set RELEASE_VERSION
|
||||
export RELEASE_VERSION="$(sed -n '1,/RE/s/Version \(.*\)/\1/p' ${PKG_BUILD}/NEWS)-git-${PKG_VERSION:0:7}"
|
||||
}
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="snapclient"
|
||||
PKG_VERSION="0.27.0"
|
||||
PKG_REV="1"
|
||||
PKG_REV="2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-plugins snapcast"
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="snapserver"
|
||||
PKG_VERSION="0.27.0"
|
||||
PKG_REV="1"
|
||||
PKG_REV="2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain nqptp shairport-sync snapcast"
|
||||
|
@ -2,14 +2,15 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="usbmuxd"
|
||||
PKG_VERSION="1.1.1"
|
||||
PKG_SHA256="c0ec9700172bf635ccb5bed98daae607d2925c2bc3597f25706ecd9dfbfd2d9e"
|
||||
PKG_REV="0"
|
||||
PKG_VERSION="360619c5f721f93f0b9d8af1a2df0b926fbcf281"
|
||||
PKG_SHA256="3f36b9f427f388c701798904ed2655867e0113ef3ac68e73f1a69a6e5e2940b2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.libimobiledevice.org"
|
||||
PKG_URL="https://github.com/libimobiledevice/usbmuxd/releases/download/${PKG_VERSION}/usbmuxd-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb libimobiledevice"
|
||||
PKG_URL="https://github.com/libimobiledevice/usbmuxd/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb libimobiledevice libimobiledevice-glue libusbmuxd libplist"
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="USB Multiplex Daemon"
|
||||
PKG_LONGDESC="USB Multiplex Daemon"
|
||||
@ -23,6 +24,11 @@ PKG_DISCLAIMER="Additional data charges may occur. The LibreELEC team doesn't ta
|
||||
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_realloc_0_nonnull=yes"
|
||||
|
||||
configure_package() {
|
||||
# if using a git hash as a package version - set RELEASE_VERSION
|
||||
export RELEASE_VERSION="$(sed -n '1,/RE/s/Version \(.*\)/\1/p' ${PKG_BUILD}/NEWS)-git-${PKG_VERSION:0:7}"
|
||||
}
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
@ -1,207 +0,0 @@
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 206c684..2ce59ff 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -160,170 +160,6 @@ char *stpcpy(char * s1, const char * s2)
|
||||
}
|
||||
#endif
|
||||
|
||||
-/**
|
||||
- * Concatenate strings into a newly allocated string
|
||||
- *
|
||||
- * @note: Specify NULL for the last string in the varargs list
|
||||
- *
|
||||
- * @str: The first string in the list
|
||||
- * @...: Subsequent strings. Use NULL for the last item.
|
||||
- *
|
||||
- * @return a newly allocated string, or NULL if @str is NULL. This will also
|
||||
- * return NULL and set errno to ENOMEM if memory is exhausted.
|
||||
- */
|
||||
-char *string_concat(const char *str, ...)
|
||||
-{
|
||||
- size_t len;
|
||||
- va_list args;
|
||||
- char *s;
|
||||
- char *result;
|
||||
- char *dest;
|
||||
-
|
||||
- if (!str)
|
||||
- return NULL;
|
||||
-
|
||||
- /* Compute final length */
|
||||
-
|
||||
- len = strlen(str) + 1; /* plus 1 for the null terminator */
|
||||
-
|
||||
- va_start(args, str);
|
||||
- s = va_arg(args, char *);
|
||||
- while (s) {
|
||||
- len += strlen(s);
|
||||
- s = va_arg(args, char*);
|
||||
- }
|
||||
- va_end(args);
|
||||
-
|
||||
- /* Concat each string */
|
||||
-
|
||||
- result = malloc(len);
|
||||
- if (!result)
|
||||
- return NULL; /* errno remains set */
|
||||
-
|
||||
- dest = result;
|
||||
-
|
||||
- dest = stpcpy(dest, str);
|
||||
-
|
||||
- va_start(args, str);
|
||||
- s = va_arg(args, char *);
|
||||
- while (s) {
|
||||
- dest = stpcpy(dest, s);
|
||||
- s = va_arg(args, char *);
|
||||
- }
|
||||
- va_end(args);
|
||||
-
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
-int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length)
|
||||
-{
|
||||
- FILE *f;
|
||||
- uint64_t size;
|
||||
-
|
||||
- *length = 0;
|
||||
-
|
||||
- f = fopen(filename, "rb");
|
||||
- if (!f) {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- fseek(f, 0, SEEK_END);
|
||||
- size = ftell(f);
|
||||
- rewind(f);
|
||||
-
|
||||
- if (size == 0) {
|
||||
- fclose(f);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- *buffer = (char*)malloc(sizeof(char)*(size+1));
|
||||
-
|
||||
- if (!buffer) {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- int ret = 1;
|
||||
- if (fread(*buffer, sizeof(char), size, f) != size) {
|
||||
- usbmuxd_log(LL_ERROR, "%s: ERROR: couldn't read %d bytes from %s", __func__, (int)size, filename);
|
||||
- free(*buffer);
|
||||
- ret = 0;
|
||||
- errno = EIO;
|
||||
- }
|
||||
- fclose(f);
|
||||
-
|
||||
- *length = size;
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length)
|
||||
-{
|
||||
- FILE *f;
|
||||
-
|
||||
- f = fopen(filename, "wb");
|
||||
- if (f) {
|
||||
- size_t written = fwrite(buffer, sizeof(char), length, f);
|
||||
- fclose(f);
|
||||
-
|
||||
- if (written == length) {
|
||||
- return 1;
|
||||
- }
|
||||
- else {
|
||||
- // Not all data could be written.
|
||||
- errno = EIO;
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- else {
|
||||
- // Failed to open the file, let the caller know.
|
||||
- return 0;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-int plist_read_from_filename(plist_t *plist, const char *filename)
|
||||
-{
|
||||
- char *buffer = NULL;
|
||||
- uint64_t length;
|
||||
-
|
||||
- if (!filename)
|
||||
- return 0;
|
||||
-
|
||||
- if (!buffer_read_from_filename(filename, &buffer, &length)) {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- if ((length > 8) && (memcmp(buffer, "bplist00", 8) == 0)) {
|
||||
- plist_from_bin(buffer, length, plist);
|
||||
- } else {
|
||||
- plist_from_xml(buffer, length, plist);
|
||||
- }
|
||||
-
|
||||
- free(buffer);
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format)
|
||||
-{
|
||||
- char *buffer = NULL;
|
||||
- uint32_t length;
|
||||
-
|
||||
- if (!plist || !filename)
|
||||
- return 0;
|
||||
-
|
||||
- if (format == PLIST_FORMAT_XML)
|
||||
- plist_to_xml(plist, &buffer, &length);
|
||||
- else if (format == PLIST_FORMAT_BINARY)
|
||||
- plist_to_bin(plist, &buffer, &length);
|
||||
- else
|
||||
- return 0;
|
||||
-
|
||||
- int res = buffer_write_to_filename(filename, buffer, length);
|
||||
-
|
||||
- free(buffer);
|
||||
-
|
||||
- return res;
|
||||
-}
|
||||
-
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
typedef int clockid_t;
|
||||
#define CLOCK_MONOTONIC 1
|
||||
diff --git a/src/utils.h b/src/utils.h
|
||||
index b5cab3f..f862271 100644
|
||||
--- a/src/utils.h
|
||||
+++ b/src/utils.h
|
||||
@@ -19,6 +19,8 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#include <libimobiledevice/utils.h>
|
||||
+
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
@@ -73,18 +75,6 @@ void collection_copy(struct collection *dest, struct collection *src);
|
||||
#ifndef HAVE_STPCPY
|
||||
char *stpcpy(char * s1, const char * s2);
|
||||
#endif
|
||||
-char *string_concat(const char *str, ...);
|
||||
-
|
||||
-int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length);
|
||||
-int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length);
|
||||
-
|
||||
-enum plist_format_t {
|
||||
- PLIST_FORMAT_XML,
|
||||
- PLIST_FORMAT_BINARY
|
||||
-};
|
||||
-
|
||||
-int plist_read_from_filename(plist_t *plist, const char *filename);
|
||||
-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format);
|
||||
|
||||
uint64_t mstime64(void);
|
||||
void get_tick_count(struct timeval * tv);
|
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
|
||||
PKG_NAME="libplist"
|
||||
PKG_VERSION="2.2.0"
|
||||
PKG_SHA256="4a5517e5377ec421df84c586ba85bb4e1d26f11ad203d7d450a907c0156fbd9a"
|
||||
PKG_VERSION="2.4.0"
|
||||
PKG_SHA256="3f5868ae15b117320c1ff5e71be53d29469d4696c4085f89db1975705781a7cd"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.libimobiledevice.org/"
|
||||
PKG_URL="https://github.com/libimobiledevice/libplist/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user