gerbera: update to 1.5.0 12059/head
authorRosen Penev <rosenp@gmail.com>
Sun, 3 May 2020 00:05:13 +0000 (17:05 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 4 May 2020 23:05:23 +0000 (16:05 -0700)
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 <rosenp@gmail.com>
multimedia/gerbera/Makefile
multimedia/gerbera/files/gerbera.config
multimedia/gerbera/files/gerbera.init
multimedia/gerbera/patches/010-iconv.patch [new file with mode: 0644]

index 9e7c0bba461edd065844d096e63104ad29ac1b2e..29c17c063fe7bd4a795192076bed29e812b9b584 100644 (file)
@@ -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
index 811005a70c30b92346e71b18e11cc8c05b5d0eca..f6d7cd8c895dc125e9f21fd2719f3c011f95dab9 100644 (file)
@@ -1,3 +1,4 @@
 config gerbera config
        option enabled  '0'
+       option debug    '0'
        option home     '/tmp/gerbera'
index 2cc0a52bb1a454221e58ecc12f0c18d6f68b925c..59cd171b0e3b1cc38bf1ccddc8c507c17c8a1a59 100644 (file)
@@ -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 (file)
index 0000000..e93746d
--- /dev/null
@@ -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<iconv_t>(-1)) {
+-        cd = static_cast<iconv_t>(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<iconv_t>(nullptr))
++    if (cd != (iconv_t)(nullptr))
+         iconv_close(cd);
+ }