From f1e66baf0ace9a742b9841ffaef52046d9c8335b Mon Sep 17 00:00:00 2001 From: Markham Date: Sat, 6 Feb 2016 19:13:04 +0100 Subject: [PATCH] update target libdvbsi++; bump version 0.3.7 --- ...vbsi++-content_identifier_descriptor.patch | 17 ++++++++++++ ...bsi++-fix-unaligned-access-on-SuperH.patch | 19 +++++++++++++ ..._section.cpp-fix-sectionLength-check.patch | 25 +++++++++++++++++ make/archives.mk | 3 +++ make/libraries.mk | 27 +++++++++---------- make/neutrino.mk | 2 +- make/prerequisites.mk | 11 -------- make/versions.mk | 3 +++ 8 files changed, 81 insertions(+), 26 deletions(-) create mode 100644 archive-patches/libdvbsi++-content_identifier_descriptor.patch create mode 100644 archive-patches/libdvbsi++-fix-unaligned-access-on-SuperH.patch create mode 100644 archive-patches/libdvbsi++-src-time_date_section.cpp-fix-sectionLength-check.patch diff --git a/archive-patches/libdvbsi++-content_identifier_descriptor.patch b/archive-patches/libdvbsi++-content_identifier_descriptor.patch new file mode 100644 index 0000000..aef0cea --- /dev/null +++ b/archive-patches/libdvbsi++-content_identifier_descriptor.patch @@ -0,0 +1,17 @@ +From: [CST] Focus +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); + } diff --git a/archive-patches/libdvbsi++-fix-unaligned-access-on-SuperH.patch b/archive-patches/libdvbsi++-fix-unaligned-access-on-SuperH.patch new file mode 100644 index 0000000..aba3f9a --- /dev/null +++ b/archive-patches/libdvbsi++-fix-unaligned-access-on-SuperH.patch @@ -0,0 +1,19 @@ +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) diff --git a/archive-patches/libdvbsi++-src-time_date_section.cpp-fix-sectionLength-check.patch b/archive-patches/libdvbsi++-src-time_date_section.cpp-fix-sectionLength-check.patch new file mode 100644 index 0000000..f62a82c --- /dev/null +++ b/archive-patches/libdvbsi++-src-time_date_section.cpp-fix-sectionLength-check.patch @@ -0,0 +1,25 @@ +>From 47578127ccfed131eb4586ce48a568b7aed0e9b9 Mon Sep 17 00:00:00 2001 +From: [CST] Focus +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 + diff --git a/make/archives.mk b/make/archives.mk index b39f8e0..12168e1 100755 --- a/make/archives.mk +++ b/make/archives.mk @@ -42,6 +42,9 @@ $(ARCHIVE)/libjpeg-turbo-$(JPEG_TURBO_VER).tar.gz: $(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 diff --git a/make/libraries.mk b/make/libraries.mk index f23bc63..d2a3d0a 100755 --- a/make/libraries.mk +++ b/make/libraries.mk @@ -472,20 +472,19 @@ $(D)/ffmpeg: $(D)/librtmp $(D)/libxml2 | $(TARGETPREFIX) $(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) diff --git a/make/neutrino.mk b/make/neutrino.mk index c3b4c3e..41c9397 100755 --- a/make/neutrino.mk +++ b/make/neutrino.mk @@ -143,5 +143,5 @@ $(TARGETPREFIX)/.version2: $(BASE_DIR)/customize/version.sh $(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 $@ diff --git a/make/prerequisites.mk b/make/prerequisites.mk index a28496f..db023e0 100755 --- a/make/prerequisites.mk +++ b/make/prerequisites.mk @@ -152,16 +152,6 @@ $(GIT_DRIVERS): 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) && \ @@ -220,7 +210,6 @@ PHONY += $(SOURCE_DIR)/neutrino-hd 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) diff --git a/make/versions.mk b/make/versions.mk index b9c92c1..e103be2 100644 --- a/make/versions.mk +++ b/make/versions.mk @@ -20,6 +20,9 @@ HD_IDLE_VER=1.04 # 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 -- 2.39.5