--- /dev/null
+From: [CST] Focus <focus.cst@gmail.com>
+Date: Thu, 19 Jan 2015 13:50:45 +0400
+Subject: [PATCH] libdvbsi++: workaround bug in content identifier descriptor processing
+
+---
+--- libdvbsi++-0.3.6.cst/src/content_identifier_descriptor.cpp 2013-02-20 20:59:19.000000000 +0800
++++ libdvbsi++-0.3.7/src/content_identifier_descriptor.cpp 2013-09-24 03:10:43.000000000 +0800
+
+@@ -69,6 +69,8 @@
+ i += crid->getLength() + 2;
+ else if (crid->getLocation() == 1)
+ i += 3;
++ else
++ break;
+
+ identifier.push_back(crid);
+ }
--- /dev/null
+diff --git a/include/dvbsi++/byte_stream.h b/include/dvbsi++/byte_stream.h
+index 0387a15..204f9a9 100644
+--- a/include/dvbsi++/byte_stream.h
++++ b/include/dvbsi++/byte_stream.h
+@@ -23,8 +23,14 @@
+ #define w32(p,v) do { *(uint32_t * const)(p) = ((const uint32_t)v) } while (0)
+ #define w64(p,v) do { *(uint64_t * const)(p) = ((const uint64_t)v) } while (0)
+ #else
++#ifdef __sh__
++/* SuperH does not like unaligned accesses, so work around that */
++#define r16(p) ((((uint8_t *)p)[0]) << 8 | (((uint8_t *)p)[1]))
++#define r32(p) ((((uint8_t *)p)[0]) << 24 | (((uint8_t *)p)[1]) << 16 | (((uint8_t *)p)[2]) << 8 | ((uint8_t *)p)[3])
++#else
+ #define r16(p) bswap_16(*(const uint16_t * const)p)
+ #define r32(p) bswap_32(*(const uint32_t * const)p)
++#endif
+ #define r64(p) bswap_64(*(const uint64_t * const)p)
+ #define w16(p,v) do { *(uint16_t * const)(p) = bswap_16((const uint16_t)v) } while (0)
+ #define w32(p,v) do { *(uint32_t * const)(p) = bswap_32((const uint32_t)v) } while (0)
--- /dev/null
+>From 47578127ccfed131eb4586ce48a568b7aed0e9b9 Mon Sep 17 00:00:00 2001
+From: [CST] Focus <focus.cst@gmail.com>
+Date: Thu, 1 Mar 2012 13:37:55 +0400
+Subject: [PATCH 1/2] src/time_date_section.cpp: fix sectionLength check
+
+---
+ src/time_date_section.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/time_date_section.cpp b/src/time_date_section.cpp
+index 63e24dd..f71ff42 100644
+--- a/src/time_date_section.cpp
++++ b/src/time_date_section.cpp
+@@ -15,7 +15,7 @@
+
+ TimeAndDateSection::TimeAndDateSection(const uint8_t * const buffer) : ShortSection(buffer)
+ {
+- if (sectionLength > 8) {
++ if (sectionLength >= 5) {
+ utcTimeMjd = UINT16(&buffer[3]);
+ utcTimeBcd = (buffer[5] << 16) | UINT16(&buffer[6]);
+ }
+--
+1.7.1
+
$(ARCHIVE)/libbluray-0.5.0.tar.bz2:
$(WGET) http://www.fhloston-paradise.de/libbluray-0.5.0.tar.bz2
+$(ARCHIVE)/libdvbsi++-$(LIBDVBSI_VER).tar.bz2:
+ $(WGET) http://www.saftware.de/libdvbsi++/libdvbsi++-$(LIBDVBSI_VER).tar.bz2
+
$(ARCHIVE)/libsigc++-2.3.1.tar.xz:
$(WGET) http://www.fhloston-paradise.de/libsigc++-2.3.1.tar.xz
$(REMOVE)/ffmpeg $(TARGETPREFIX)/.remove
touch $@
-$(D)/dvbsi: | $(TARGETPREFIX)
- tar -C $(SOURCE_DIR)/git/LIBRARIES -cp dvbsi --exclude=.git | tar -C $(BUILD_TMP) -x
- pushd $(BUILD_TMP)/dvbsi && \
- ./autogen.sh && \
- CCPATH= \
- ./configure \
- --prefix= \
- --build=$(BUILD) \
- --host=$(TARGET) \
- --mandir=/.remove && \
- $(MAKE) && \
- $(MAKE) install DESTDIR=$(TARGETPREFIX)
- $(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libdvbsi++.pc
- $(REMOVE)/dvbsi
+$(D)/libdvbsi++: $(ARCHIVE)/libdvbsi++-$(LIBDVBSI_VER).tar.bz2 | $(TARGETPREFIX)
+ $(UNTAR)/libdvbsi++-$(LIBDVBSI_VER).tar.bz2
+ pushd $(BUILD_TMP)/libdvbsi++-$(LIBDVBSI_VER); \
+ $(PATCH)/libdvbsi++-src-time_date_section.cpp-fix-sectionLength-check.patch; \
+ $(PATCH)/libdvbsi++-fix-unaligned-access-on-SuperH.patch; \
+ $(PATCH)/libdvbsi++-content_identifier_descriptor.patch; \
+ $(CONFIGURE) \
+ --prefix=$(TARGETPREFIX) \
+ --build=$(BUILD) \
+ --host=$(TARGET); \
+ $(MAKE); \
+ $(MAKE) install
+ $(REMOVE)/libdvbsi++-$(LIBDVBSI_VER)
touch $@
$(D)/libsigc: $(ARCHIVE)/libsigc++-2.3.1.tar.xz | $(TARGETPREFIX)
$(BASE_DIR)/customize/version.sh
$(D)/neutrino-hd-libs:
- $(MAKE) $(D)/libsigc $(D)/giflib $(D)/openssl $(D)/libcurl $(D)/freetype $(D)/libjpeg $(D)/libiconv $(D)/dvbsi $(D)/ffmpeg $(D)/libbluray $(D)/openthreads $(D)/libusb $(D)/luaposix $(D)/luacurl $(D)/lua-socket
+ $(MAKE) $(D)/libsigc $(D)/giflib $(D)/openssl $(D)/libcurl $(D)/freetype $(D)/libjpeg $(D)/libiconv $(D)/libdvbsi++ $(D)/ffmpeg $(D)/libbluray $(D)/openthreads $(D)/libusb $(D)/luaposix $(D)/luacurl $(D)/lua-socket
touch $@
git checkout $(CST_DRIVER_VERSION); \
fi
-$(GIT_LIBRARIES)/dvbsi:
- mkdir -p $(GIT_LIBRARIES)
- cd $(GIT_LIBRARIES) && \
- if [ -d $(GIT_LIBRARIES)/dvbsi/ ]; then \
- cd $(GIT_LIBRARIES)/dvbsi && \
- git pull origin master; \
- else \
- git clone $(CSGIT)/cst-public-libraries-dvbsi.git/ dvbsi; \
- fi
-
$(GIT_LIBRARIES)/ffmpeg:
mkdir -p $(GIT_LIBRARIES)
cd $(GIT_LIBRARIES) && \
PHONY += $(GIT_BOOTLOADER)
PHONY += $(GIT_DRIVERS_THIRDPARTY)
PHONY += $(GIT_DRIVERS)
-PHONY += $(GIT_LIBRARIES)/dvbsi
PHONY += $(GIT_LIBRARIES)/ffmpeg
PHONY += $(GIT_LIBRARIES)/OpenThreads
PHONY += $(GIT_KERNEL)
# libjpeg-turbo; a derivative of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression
JPEG_TURBO_VER = 1.4.2
+# libdvbsi++; libdvbsi++ is a open source C++ library for parsing DVB Service Information and MPEG-2 Program Specific Information.
+LIBDVBSI_VER=0.3.7
+
# libupnp; portable Universal Plug and Play (UPnP) needed for ushare
LIBUPNP_VER = 1.6.19