From 2e4d2d36c24c672f7215a6489d73154534386d57 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 2 May 2020 17:05:13 -0700 Subject: [PATCH] gerbera: update to 1.5.0 This is a fairly massive update that adds new dependencies. Switched the CMAKE_OPTIONS to use ON/OFF as is done elsewhere. Added a patch fixing compilation with libiconv-stub/full. Add a small debug option to write to syslog debug information. Signed-off-by: Rosen Penev --- multimedia/gerbera/Makefile | 38 ++++++++++++---------- multimedia/gerbera/files/gerbera.config | 1 + multimedia/gerbera/files/gerbera.init | 3 ++ multimedia/gerbera/patches/010-iconv.patch | 21 ++++++++++++ 4 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 multimedia/gerbera/patches/010-iconv.patch diff --git a/multimedia/gerbera/Makefile b/multimedia/gerbera/Makefile index 9e7c0bba4..29c17c063 100644 --- a/multimedia/gerbera/Makefile +++ b/multimedia/gerbera/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gerbera -PKG_VERSION:=1.4.0 +PKG_VERSION:=1.5.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/gerbera/gerbera/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=904a9031c85ac805e4c139f363510226952683d7257acd1dee25ba1e97fd7651 +PKG_HASH:=693a99b295bc79d842f036a6d04996d4676ac0791d65f3a1f7aab4badf9fb5ef PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0-or-later @@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/nls.mk define Package/gerbera SECTION:=multimedia CATEGORY:=Multimedia - DEPENDS:=+file +libupnp +libsqlite3 +libexif +libexpat +libuuid +libstdcpp $(ICONV_DEPENDS) + DEPENDS:=+file +libupnp +libsqlite3 +libexif +libuuid +pugixml +spdlog $(ICONV_DEPENDS) TITLE:=A free media server URL:=https://gerbera.io USERID:=gerbera:gerbera @@ -43,23 +43,25 @@ define Package/gerbera/conffiles endef CMAKE_OPTIONS += \ + -DCXX_FILESYSTEM_NO_LINK_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_9),ON,OFF) \ + -DCXX_FILESYSTEM_STDCPPFS_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_8),OFF,ON) \ -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \ -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.a \ - -DWITH_MAGIC=1 \ - -DWITH_MYSQL=0 \ - -DWITH_CURL=0 \ - -DWITH_INOTIFY=1 \ - -DWITH_JS=0 \ - -DWITH_TAGLIB=0 \ - -DWITH_AVCODEC=0 \ - -DWITH_FFMPEGTHUMBNAILER=0 \ - -DWITH_EXIF=1 \ - -DWITH_EXIV2=0 \ - -DWITH_MATROSKA=0 \ - -DWITH_SYSTEMD=0 \ - -DWITH_LASTFM=0 \ - -DWITH_DEBUG=0 \ - -DWITH_TESTS=0 + -DWITH_MAGIC=ON \ + -DWITH_MYSQL=OFF \ + -DWITH_CURL=OFF \ + -DWITH_INOTIFY=ON \ + -DWITH_JS=OFF \ + -DWITH_TAGLIB=OFF \ + -DWITH_AVCODEC=OFF \ + -DWITH_FFMPEGTHUMBNAILER=OFF \ + -DWITH_EXIF=ON \ + -DWITH_EXIV2=OFF \ + -DWITH_MATROSKA=OFF \ + -DWITH_SYSTEMD=OFF \ + -DWITH_LASTFM=OFF \ + -DWITH_DEBUG=OFF \ + -DWITH_TESTS=OFF TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed diff --git a/multimedia/gerbera/files/gerbera.config b/multimedia/gerbera/files/gerbera.config index 811005a70..f6d7cd8c8 100644 --- a/multimedia/gerbera/files/gerbera.config +++ b/multimedia/gerbera/files/gerbera.config @@ -1,3 +1,4 @@ config gerbera config option enabled '0' + option debug '0' option home '/tmp/gerbera' diff --git a/multimedia/gerbera/files/gerbera.init b/multimedia/gerbera/files/gerbera.init index 2cc0a52bb..59cd171b0 100644 --- a/multimedia/gerbera/files/gerbera.init +++ b/multimedia/gerbera/files/gerbera.init @@ -7,10 +7,12 @@ PROG=/usr/bin/gerbera start_service() { local enabled + local debug local home config_load 'gerbera' config_get_bool enabled config 'enabled' '0' + config_get_bool debug config 'debug' '0' [ "$enabled" -eq 0 ] && { echo "Gerbera not enabled. Please enable in /etc/config/gerbera" @@ -33,6 +35,7 @@ start_service() { procd_set_param user gerbera procd_set_param group gerbera procd_set_param command "$PROG" -c "$home/config.xml" + procd_set_param stdout "$debug" procd_set_param stderr 1 procd_close_instance } diff --git a/multimedia/gerbera/patches/010-iconv.patch b/multimedia/gerbera/patches/010-iconv.patch new file mode 100644 index 000000000..e93746d33 --- /dev/null +++ b/multimedia/gerbera/patches/010-iconv.patch @@ -0,0 +1,21 @@ +--- a/src/util/string_converter.cc ++++ b/src/util/string_converter.cc +@@ -41,15 +41,15 @@ StringConverter::StringConverter(const std::string& from, const std::string& to) + dirty = false; + + cd = iconv_open(to.c_str(), from.c_str()); +- if (cd == reinterpret_cast(-1)) { +- cd = static_cast(nullptr); ++ if (cd == (iconv_t)(-1)) { ++ cd = (iconv_t)(nullptr); + throw_std_runtime_error(std::string("iconv: ") + strerror(errno)); + } + } + + StringConverter::~StringConverter() + { +- if (cd != static_cast(nullptr)) ++ if (cd != (iconv_t)(nullptr)) + iconv_close(cd); + } +