summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2022-02-27 11:57:31 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2022-02-27 11:59:23 +0100
commit92ab1f5a9b8413e15b8cc6f5a896354f88a47f87 (patch)
tree54e6013ba9d35ad4b1b60eb87be1f90e6741aa98 /package
parent884e156e1db5f92555b04bd150f64392d4c47c1c (diff)
kodi: update to Matrix with all dependencies
Diffstat (limited to 'package')
-rw-r--r--package/bcm28xx-vc/patches/patch-host_applications_android_apps_vidtex_CMakeLists_txt10
-rw-r--r--package/bcm28xx-vc/patches/patch-host_applications_linux_apps_raspicam_CMakeLists_txt11
-rw-r--r--package/bcm28xx-vc/patches/patch-interface_vmcs_host_linux_vcfiled_CMakeLists_txt9
-rw-r--r--package/expat/Makefile8
-rw-r--r--package/ffmpeg/Makefile12
-rw-r--r--package/ffmpeg/patches/patch-configure15
-rw-r--r--package/flac/Makefile7
-rw-r--r--package/flatbuffers/Makefile39
-rw-r--r--package/fmt/Makefile4
-rw-r--r--package/fstrcmp/Makefile24
-rw-r--r--package/fstrcmp/patches/patch-Makefile_in11
-rw-r--r--package/kodi/Makefile36
-rw-r--r--package/kodi/patches/patch-cmake_KodiConfig_cmake_in20
-rw-r--r--package/kodi/patches/patch-tools_depends_native_TexturePacker_src_decoder_GifHelper_cpp15
-rw-r--r--package/kodi/patches/patch-xbmc_cores_AudioEngine_Sinks_AESinkALSA_cpp30
-rw-r--r--package/kodi/patches/patch-xbmc_platform_linux_CPUInfoLinux_cpp31
-rw-r--r--package/libcec/Makefile17
-rw-r--r--package/libcec/patches/libcec-00-imx6-support.patch879
-rw-r--r--package/libcec/patches/patch-src_cec-client_CMakeLists_txt10
-rw-r--r--package/libpciaccess/Makefile4
-rw-r--r--package/libxkbcommon/Makefile5
-rw-r--r--package/p8-platform/Makefile (renamed from package/platform/Makefile)15
-rw-r--r--package/pulseaudio/Makefile5
-rw-r--r--package/samba/Makefile2
-rw-r--r--package/spdlog/Makefile31
-rw-r--r--package/yajl/Makefile7
26 files changed, 233 insertions, 1024 deletions
diff --git a/package/bcm28xx-vc/patches/patch-host_applications_android_apps_vidtex_CMakeLists_txt b/package/bcm28xx-vc/patches/patch-host_applications_android_apps_vidtex_CMakeLists_txt
deleted file mode 100644
index a36625f8e..000000000
--- a/package/bcm28xx-vc/patches/patch-host_applications_android_apps_vidtex_CMakeLists_txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- bcm28xx-vc-c2f27fb8e581f8e5af83bf28422553ade8f7a7c8.orig/host_applications/android/apps/vidtex/CMakeLists.txt 2015-10-27 10:59:47.000000000 +0100
-+++ bcm28xx-vc-c2f27fb8e581f8e5af83bf28422553ade8f7a7c8/host_applications/android/apps/vidtex/CMakeLists.txt 2015-11-16 20:31:58.396542125 +0100
-@@ -1,6 +1,6 @@
- cmake_minimum_required(VERSION 2.8)
-
--SET(COMPILE_DEFINITIONS -Werror -Wall)
-+SET(COMPILE_DEFINITIONS -Wall)
- include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include)
-
- set (VIDTEX_SOURCES
diff --git a/package/bcm28xx-vc/patches/patch-host_applications_linux_apps_raspicam_CMakeLists_txt b/package/bcm28xx-vc/patches/patch-host_applications_linux_apps_raspicam_CMakeLists_txt
deleted file mode 100644
index b92e1e625..000000000
--- a/package/bcm28xx-vc/patches/patch-host_applications_linux_apps_raspicam_CMakeLists_txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- bcm28xx-vc-8d518460723779f95b49efafc04c183e83da3a18.orig/host_applications/linux/apps/raspicam/CMakeLists.txt 2017-06-27 18:59:31.000000000 +0200
-+++ bcm28xx-vc-8d518460723779f95b49efafc04c183e83da3a18/host_applications/linux/apps/raspicam/CMakeLists.txt 2017-06-30 23:35:09.949011873 +0200
-@@ -1,8 +1,6 @@
-
- # raspistill/raspivid/raspiyuv
-
--SET(COMPILE_DEFINITIONS -Werror)
--
- include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include)
- include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/apps/raspicam/)
- include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/sm)
diff --git a/package/bcm28xx-vc/patches/patch-interface_vmcs_host_linux_vcfiled_CMakeLists_txt b/package/bcm28xx-vc/patches/patch-interface_vmcs_host_linux_vcfiled_CMakeLists_txt
deleted file mode 100644
index 06bc3da60..000000000
--- a/package/bcm28xx-vc/patches/patch-interface_vmcs_host_linux_vcfiled_CMakeLists_txt
+++ /dev/null
@@ -1,9 +0,0 @@
---- bcm28xx-vc-c2f27fb8e581f8e5af83bf28422553ade8f7a7c8.orig/interface/vmcs_host/linux/vcfiled/CMakeLists.txt 2015-10-27 10:59:48.000000000 +0100
-+++ bcm28xx-vc-c2f27fb8e581f8e5af83bf28422553ade8f7a7c8/interface/vmcs_host/linux/vcfiled/CMakeLists.txt 2015-11-16 20:16:31.801734911 +0100
-@@ -1,6 +1,4 @@
-
--add_definitions(-Werror)
--
- # vcfiled - serves files to videocore. used for media handlers from
- # OpenMAX/IL and loading VLLs.
- add_executable(vcfiled vcfiled.c)
diff --git a/package/expat/Makefile b/package/expat/Makefile
index 8b3419e25..2ab8949ef 100644
--- a/package/expat/Makefile
+++ b/package/expat/Makefile
@@ -4,19 +4,17 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= expat
-PKG_VERSION:= 2.4.3
+PKG_VERSION:= 2.4.6
PKG_RELEASE:= 1
-PKG_HASH:= 6f262e216a494fbf42d8c22bc841b3e117c21f2467a19dc4c27c991b5622f986
+PKG_HASH:= de55794b7a9bc214852fdc075beaaecd854efe1361597e6268ee87946951289b
PKG_DESCR:= xml parsing library
PKG_SECTION:= libs/data
PKG_NEEDS:= c++
PKG_URL:= http://expat.sourceforge.net
-PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=expat/}
+PKG_SITES:= https://github.com/libexpat/libexpat/releases/download/R_2_4_6/
PKG_LIBNAME:= libexpat
PKG_OPTS:= dev
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
-
include ${ADK_TOPDIR}/mk/host.mk
include ${ADK_TOPDIR}/mk/package.mk
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile
index 9a257c385..11ceb7813 100644
--- a/package/ffmpeg/Makefile
+++ b/package/ffmpeg/Makefile
@@ -17,13 +17,10 @@ PKG_SITES:= http://www.ffmpeg.org/releases/
PKG_LIBNAME:= libffmpeg
PKG_OPTS:= dev
-PKG_SUBPKGS:= LIBFFMPEG FFSERVER FFPROBE FFMPEG
+PKG_SUBPKGS:= LIBFFMPEG FFPROBE FFMPEG
PKGSD_FFMPEG:= video converter
PKGSC_FFMPEG:= mm/video
PKGSS_FFMPEG:= libffmpeg
-PKGSD_FFSERVER:= streaming server
-PKGSC_FFSERVER:= mm/video
-PKGSS_FFSERVER:= libffmpeg
PKGSD_FFPROBE:= simple multimedia stream analyzer
PKGSC_FFPROBE:= mm/video
PKGSS_FFPROBE:= libffmpeg
@@ -97,7 +94,6 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBFFMPEG,libffmpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_FDEPENDS),$(PKGSD_LIBFFMPEG),$(PKGSC_LIBFFMPEG),$(PKG_OPTS)))
$(eval $(call PKG_template,FFMPEG,ffmpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFMPEG),$(PKGSC_FFMPEG)))
-$(eval $(call PKG_template,FFSERVER,ffserver,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFSERVER),$(PKGSC_FFSERVER)))
$(eval $(call PKG_template,FFPROBE,ffprobe,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFPROBE),$(PKGSC_FFPROBE)))
ifeq ($(ADK_DEBUG),y)
@@ -106,6 +102,7 @@ else
TARGET_CFLAGS:= $(subst Os,O2,$(TARGET_CFLAGS))
endif
TARGET_CPPFLAGS+= -D_POSIX_SOURCE -D_GNU_SOURCE
+TARGET_LDFLAGS+= -latomic
ifeq ($(ADK_TARGET_CPU_WITH_MMX),y)
CONFIGURE_CPU_OPTS+= --enable-mmx
@@ -254,11 +251,6 @@ ffmpeg-install:
$(INSTALL_BIN) $(WRKINST)/usr/bin/ffmpeg \
$(IDIR_FFMPEG)/usr/bin
-ffserver-install:
- $(INSTALL_DIR) $(IDIR_FFSERVER)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/usr/bin/ffserver \
- $(IDIR_FFSERVER)/usr/bin
-
ffprobe-install:
$(INSTALL_DIR) $(IDIR_FFPROBE)/usr/bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/ffprobe \
diff --git a/package/ffmpeg/patches/patch-configure b/package/ffmpeg/patches/patch-configure
new file mode 100644
index 000000000..645eb4d6a
--- /dev/null
+++ b/package/ffmpeg/patches/patch-configure
@@ -0,0 +1,15 @@
+--- ffmpeg-4.4.1.orig/configure 2021-10-24 22:47:11.000000000 +0200
++++ ffmpeg-4.4.1/configure 2022-02-25 12:51:17.554887194 +0100
+@@ -4984,9 +4984,10 @@ elif enabled arm; then
+ fi
+ }
+
+- [ "$cpu" = generic ] && cpu=$(probe_arm_arch)
+-
+ case $cpu in
++ generic)
++ subarch=$(probe_arm_arch | sed 's/[^a-z0-9]//g')
++ ;;
+ armv*)
+ cpuflags="-march=$cpu"
+ subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
diff --git a/package/flac/Makefile b/package/flac/Makefile
index 0153a5459..d6a89159d 100644
--- a/package/flac/Makefile
+++ b/package/flac/Makefile
@@ -4,14 +4,14 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= flac
-PKG_VERSION:= 1.3.3
+PKG_VERSION:= 1.3.4
PKG_RELEASE:= 1
-PKG_HASH:= 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748
+PKG_HASH:= 8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737
PKG_DESCR:= free lossless audio codec utility
PKG_SECTION:= mm/audio
PKG_DEPENDS:= libflac
PKG_URL:= https://xiph.org/flac/
-PKG_SITES:= http://downloads.xiph.org/releases/flac/
+PKG_SITES:= https://ftp.osuosl.org/pub/xiph/releases/flac/
PKG_LIBNAME:= libflac
PKG_OPTS:= dev
@@ -25,6 +25,7 @@ $(eval $(call PKG_template,FLAC,flac,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBFLAC,libflac,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
CONFIGURE_ARGS+= --enable-asm-optimizations \
+ --disable-stack-smash-protection \
--disable-xmms-plugin \
--disable-cpplibs \
--disable-ogg
diff --git a/package/flatbuffers/Makefile b/package/flatbuffers/Makefile
new file mode 100644
index 000000000..f4811d7a8
--- /dev/null
+++ b/package/flatbuffers/Makefile
@@ -0,0 +1,39 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= flatbuffers
+PKG_VERSION:= 2.0.6
+PKG_RELEASE:= 1
+PKG_HASH:= e2dc24985a85b278dd06313481a9ca051d048f9474e0f199e372fea3ea4248c9
+PKG_DESCR:= cross platform serialization library
+PKG_SECTION:= libs/misc
+PKG_BUILDDEP:= flatbuffers-host
+PKG_URL:= https://github.com/google/flatbuffers
+PKG_SITES:= https://github.com/google/flatbuffers/archive/refs/tags/
+PKG_OPTS:= dev
+
+DISTFILES:= v$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,FLATBUFFERS,flatbuffers,$(PKG_VERSION)-${PKG_RELEASE}))
+$(eval $(call PKG_template,FLATBUFFERS,flatbuffers,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+HOST_CONFIG_STYLE:= cmake
+CONFIG_STYLE:= cmake
+
+CMAKE_FLAGS+= -DFLATBUFFERS_BUILD_TESTS=OFF \
+ -DFLATBUFFERS_BUILD_FLATC=OFF \
+ -DFLATBUFFERS_BUILD_FLATHASH=OFF
+
+HOST_CMAKE_FLAGS+= -DFLATBUFFERS_BUILD_TESTS=OFF \
+ -DFLATBUFFERS_BUILD_FLATC=ON \
+ -DFLATBUFFERS_BUILD_FLATHASH=ON
+
+flatbuffers-install:
+
+include ${ADK_TOPDIR}/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/fmt/Makefile b/package/fmt/Makefile
index 2831edea5..4aa6aab5b 100644
--- a/package/fmt/Makefile
+++ b/package/fmt/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= fmt
-PKG_VERSION:= 5.0.0
+PKG_VERSION:= 8.1.1
PKG_RELEASE:= 1
-PKG_HASH:= fc33d64d5aa2739ad2ca1b128628a7fc1b7dca1ad077314f09affc57d59cf88a
+PKG_HASH:= 3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346
PKG_DESCR:= modern formatting library
PKG_SECTION:= libs/misc
PKG_URL:= http://fmtlib.net/latest/index.html
diff --git a/package/fstrcmp/Makefile b/package/fstrcmp/Makefile
new file mode 100644
index 000000000..23eb0f6f1
--- /dev/null
+++ b/package/fstrcmp/Makefile
@@ -0,0 +1,24 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= fstrcmp
+PKG_VERSION:= 0.7
+PKG_RELEASE:= 1
+PKG_HASH:= e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476
+PKG_DESCR:= make fuzzy comparisons of strings
+PKG_SECTION:= libs/misc
+PKG_SITES:= http://fstrcmp.sourceforge.net/
+PKG_OPTS:= dev
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).D001.tar.gz
+WRKDIST= $(WRKDIR)/$(PKG_NAME)-$(PKG_VERSION).D001
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,FSTRCMP,fstrcmp,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+fstrcmp-install:
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/fstrcmp/patches/patch-Makefile_in b/package/fstrcmp/patches/patch-Makefile_in
new file mode 100644
index 000000000..d947c7d30
--- /dev/null
+++ b/package/fstrcmp/patches/patch-Makefile_in
@@ -0,0 +1,11 @@
+--- fstrcmp-0.7.D001.orig/Makefile.in 2014-03-05 01:13:45.000000000 +0100
++++ fstrcmp-0.7.D001/Makefile.in 2022-02-26 01:14:24.379687998 +0100
+@@ -588,7 +588,7 @@ bin/test_user$(EXEEXT): $(test_user_obj)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ \
+ $(test_user_obj) lib/libfstrcmp.la $(LDFLAGS) $(LIBS)
+
+-all: all-bin all-doc
++all: all-bin
+
+ all-bin: bin/fstrcmp$(EXEEXT) bin/test_prelude$(EXEEXT) bin/test_user$(EXEEXT)
+
diff --git a/package/kodi/Makefile b/package/kodi/Makefile
index 4e9a57a4c..91a9951e2 100644
--- a/package/kodi/Makefile
+++ b/package/kodi/Makefile
@@ -4,19 +4,20 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= kodi
-PKG_VERSION:= 18.0a1
+PKG_VERSION:= 19.3
PKG_RELEASE:= 1
-PKG_HASH:= 8892498d5248eea29c30db7c128a5910afc60d1b0b894aea472604bb879a0310
+PKG_HASH:= 440f47e475dd8a48e0a6d41349e83b74890f3fbe8275d3e401d3c50f5b9ea09b
PKG_DESCR:= software media player
PKG_SECTION:= mm/video
-PKG_DEPENDS:= python2 libsquish libressl libxz libfmt rapidjson
+PKG_DEPENDS:= python3 libsquish libressl libxz libfmt rapidjson
PKG_DEPENDS+= libass libmpeg2 libmad libmodplug libcurl
PKG_DEPENDS+= libflac libbz2 libtiff libnettle librtmp liblzo
PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libncurses libpng
PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate libuuid
-PKG_DEPENDS+= taglib libjasper libmp3lame libgpg-error python2-mod-sqlite
+PKG_DEPENDS+= taglib libjasper libmp3lame libgpg-error
PKG_DEPENDS+= glib libdcadec bcm28xx-vc-gl-libs libffmpeg libxvidcore
-PKG_BUILDDEP:= python2 libass ffmpeg rtmpdump bcm28xx-vc
+PKG_DEPENDS+= flatbuffers fstrcmp spdlog mesa libinput libxkbcommon
+PKG_BUILDDEP:= python3 libass ffmpeg rtmpdump bcm28xx-vc
PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo fmt rapidjson
PKG_BUILDDEP+= curl flac bzip2 libtiff yajl cmake-host
PKG_BUILDDEP+= tinyxml sqlite pcre libcdio freetype libpng
@@ -25,15 +26,16 @@ PKG_BUILDDEP+= glib libmodplug libgpg-error xvidcore
PKG_BUILDDEP+= swig-host liblzo-host libpng-host libjpeg-turbo-host
PKG_BUILDDEP+= zip-host unzip-host giflib-host libsquish libdcadec
PKG_BUILDDEP+= libcrossguid libressl xz bzip2 liblzo
+PKG_BUILDDEP+= flatbuffers fstrcmp spdlog mesa libinput libxkbcommon
PKG_NEEDS:= threads c++ data iconv
PKG_URL:= http://kodi.tv/
PKG_SITES:= https://github.com/xbmc/xbmc/archive/
-DISTFILES:= $(PKG_VERSION)-Leia.tar.gz
-WRKDIST= ${WRKDIR}/xbmc-$(PKG_VERSION)-Leia
+DISTFILES:= $(PKG_VERSION)-Matrix.tar.gz
+WRKDIST= ${WRKDIR}/xbmc-$(PKG_VERSION)-Matrix
WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 raspberry-pi3 raspberry-pi3p raspberry-pi3p-64
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 raspberry-pi3 raspberry-pi4
PKG_FLAVOURS_KODI:= WITH_ALSA WITH_CEC WITH_PULSEAUDIO WITH_SMB
PKG_FLAVOURS_KODI+= WITH_MICROHTTPD WITH_SSH WITH_AVAHI
@@ -87,14 +89,20 @@ CMAKE_FLAGS+= -DENABLE_CCACHE=OFF \
-DENABLE_OPTICAL=OFF \
-DENABLE_DBUS=OFF \
-DENABLE_EVENTCLIENTS=OFF \
- -DENABLE_UDEV=OFF \
+ -DENABLE_UDEV=ON \
-DENABLE_PLIST=OFF \
-DNATIVEPREFIX=$(STAGING_HOST_DIR)/usr \
-DDEPENDS_PATH=$(STAGING_HOST_DIR) \
- -DWITH_TEXTUREPACKER=$(STAGING_HOST_DIR)/usr/bin/TexturePacker
+ -DWITH_TEXTUREPACKER=$(STAGING_HOST_DIR)/usr/bin/TexturePacker \
+ -DCMAKE_EXE_LINKER_FLAGS=-latomic \
+ -DLIBDVDCSS_URL=$(DL_DIR)/libdvdcss-1.4.2-Leia-Beta-5.tar.gz \
+ -DLIBDVDNAV_URL=$(DL_DIR)/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz \
+ -DLIBDVDREAD_URL=$(DL_DIR)/libdvdread-6.0.0-Leia-Alpha-3.tar.gz
+
ifeq ($(ADK_TARGET_BOARD_BCM28XX),y)
-CMAKE_FLAGS+= -DCORE_PLATFORM_NAME=rbpi \
+CMAKE_FLAGS+= -DCORE_PLATFORM_NAME=gbm \
+ -DAPP_RENDER_SYSTEM=gles \
-DWITH_ARCH=arm \
-DWITH_CPU=arm \
-DENABLE_NEON=ON \
@@ -140,12 +148,13 @@ CMAKE_FLAGS+= -DENABLE_SSH=OFF
endif
XAKE_FLAGS+= VERBOSE=1
+TARGET_LDFLAGS+= -latomic
pre-configure:
(cd $(WRKSRC)/tools/depends/native/JsonSchemaBuilder && PATH='$(HOST_PATH)' cmake .)
PATH='$(HOST_PATH)' make -C $(WRKSRC)/tools/depends/native/JsonSchemaBuilder
cp $(WRKSRC)/tools/depends/native/JsonSchemaBuilder/JsonSchemaBuilder \
- $(STAGING_HOST_DIR)/usr/bin
+ $(STAGING_HOST_DIR)/usr/bin/JsonSchemaBuilder::JsonSchemaBuilder
(cd $(WRKSRC)/tools/depends/native/TexturePacker && PATH='$(HOST_PATH)' cmake \
-DCORE_SOURCE_DIR=$(WRKSRC) \
-DCMAKE_MODULE_PATH=$(WRKSRC)/cmake/modules \
@@ -153,6 +162,9 @@ pre-configure:
PATH='$(HOST_PATH)' make -C $(WRKSRC)/tools/depends/native/TexturePacker
cp $(WRKSRC)/tools/depends/native/TexturePacker/TexturePacker \
$(STAGING_HOST_DIR)/usr/bin
+ (cd $(DL_DIR) && wget -O libdvdcss-1.4.2-Leia-Beta-5.tar.gz https://github.com/xbmc/libdvdcss/archive/refs/tags/1.4.2-Leia-Beta-5.tar.gz)
+ (cd $(DL_DIR) && wget -O libdvdnav-6.0.0-Leia-Alpha-3.tar.gz https://github.com/xbmc/libdvdnav/archive/refs/tags/6.0.0-Leia-Alpha-3.tar.gz)
+ (cd $(DL_DIR) && wget -O libdvdread-6.0.0-Leia-Alpha-3.tar.gz https://github.com/xbmc/libdvdread/archive/refs/tags/6.0.0-Leia-Alpha-3.tar.gz)
kodi-install:
$(INSTALL_DIR) $(STAGING_TARGET_DIR)/usr/share/kodi
diff --git a/package/kodi/patches/patch-cmake_KodiConfig_cmake_in b/package/kodi/patches/patch-cmake_KodiConfig_cmake_in
deleted file mode 100644
index 3ebae759b..000000000
--- a/package/kodi/patches/patch-cmake_KodiConfig_cmake_in
+++ /dev/null
@@ -1,20 +0,0 @@
---- xbmc-18.0a1-Leia.orig/cmake/KodiConfig.cmake.in 2018-03-04 10:21:28.000000000 +0100
-+++ xbmc-18.0a1-Leia/cmake/KodiConfig.cmake.in 2018-05-23 08:10:01.842094111 +0200
-@@ -8,7 +8,7 @@ if(NOT @APP_NAME_UC@_PREFIX)
- set(@APP_NAME_UC@_PREFIX @APP_PREFIX@)
- endif()
- if(NOT @APP_NAME_UC@_INCLUDE_DIR)
-- set(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@)
-+ set(@APP_NAME_UC@_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_INCLUDE_DIR@)
- endif()
- if(NOT @APP_NAME_UC@_LIB_DIR)
- set(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@)
-@@ -20,7 +20,7 @@ set(APP_RENDER_SYSTEM @APP_RENDER_SYSTEM
- if(NOT WIN32)
- set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@")
- endif()
--list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake)
-+list(APPEND CMAKE_MODULE_PATH ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@ ${CMAKE_FIND_ROOT_PATH}/@APP_DATA_DIR@/cmake)
-
- string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@")
- add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON)
diff --git a/package/kodi/patches/patch-tools_depends_native_TexturePacker_src_decoder_GifHelper_cpp b/package/kodi/patches/patch-tools_depends_native_TexturePacker_src_decoder_GifHelper_cpp
new file mode 100644
index 000000000..67e51c6e9
--- /dev/null
+++ b/package/kodi/patches/patch-tools_depends_native_TexturePacker_src_decoder_GifHelper_cpp
@@ -0,0 +1,15 @@
+--- xbmc-19.3-Matrix.orig/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp 2021-10-24 12:09:58.000000000 +0200
++++ xbmc-19.3-Matrix/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp 2022-02-26 00:09:15.499548854 +0100
+@@ -18,11 +18,11 @@
+ *
+ */
+
+-#include "GifHelper.h"
+
+ #include <algorithm>
+ #include <cstdlib>
+ #include <cstring>
++#include "GifHelper.h"
+
+ #define UNSIGNED_LITTLE_ENDIAN(lo, hi) ((lo) | ((hi) << 8))
+ #define GIF_MAX_MEMORY 82944000U // about 79 MB, which is equivalent to 10 full hd frames.
diff --git a/package/kodi/patches/patch-xbmc_cores_AudioEngine_Sinks_AESinkALSA_cpp b/package/kodi/patches/patch-xbmc_cores_AudioEngine_Sinks_AESinkALSA_cpp
deleted file mode 100644
index fa943b89a..000000000
--- a/package/kodi/patches/patch-xbmc_cores_AudioEngine_Sinks_AESinkALSA_cpp
+++ /dev/null
@@ -1,30 +0,0 @@
---- xbmc-18.0a1-Leia.orig/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2018-03-04 10:21:28.000000000 +0100
-+++ xbmc-18.0a1-Leia/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2018-05-26 06:48:45.750618626 +0200
-@@ -1213,7 +1213,8 @@ void CAESinkALSA::EnumerateDevicesEx(AED
- * found by the enumeration process. Skip them as well ("hw", "dmix",
- * "plughw", "dsnoop"). */
-
-- else if (baseName != "default"
-+ else if (true)
-+/* baseName != "default"
- && baseName != "sysdefault"
- && baseName != "surround40"
- && baseName != "surround41"
-@@ -1223,7 +1224,7 @@ void CAESinkALSA::EnumerateDevicesEx(AED
- && baseName != "hw"
- && baseName != "dmix"
- && baseName != "plughw"
-- && baseName != "dsnoop")
-+ && baseName != "dsnoop")*/
- {
- EnumerateDevice(list, name, desc ? desc : name, config);
- }
-@@ -1380,7 +1381,7 @@ void CAESinkALSA::EnumerateDevice(AEDevi
- info.m_displayName.substr(info.m_displayName.size()-5) == " HDMI")
- {
- /* We already know this is HDMI, strip it */
-- info.m_displayName.erase(info.m_displayName.size()-5);
-+ /*info.m_displayName.erase(info.m_displayName.size()-5);*/
- }
-
- /* "CONEXANT Analog", "USB Audio", "HDMI 0", "ALC889 Digital" ... */
diff --git a/package/kodi/patches/patch-xbmc_platform_linux_CPUInfoLinux_cpp b/package/kodi/patches/patch-xbmc_platform_linux_CPUInfoLinux_cpp
new file mode 100644
index 000000000..afd13ea30
--- /dev/null
+++ b/package/kodi/patches/patch-xbmc_platform_linux_CPUInfoLinux_cpp
@@ -0,0 +1,31 @@
+--- xbmc-19.3-Matrix.orig/xbmc/platform/linux/CPUInfoLinux.cpp 2021-10-24 12:09:58.000000000 +0200
++++ xbmc-19.3-Matrix/xbmc/platform/linux/CPUInfoLinux.cpp 2022-02-26 13:55:19.357313177 +0100
+@@ -18,10 +18,7 @@
+ #include <sstream>
+ #include <vector>
+
+-#if (defined(__arm__) && defined(HAS_NEON)) || defined(__aarch64__)
+-#include <asm/hwcap.h>
+-#include <sys/auxv.h>
+-#elif defined(__i386__) || defined(__x86_64__)
++#if defined(__i386__) || defined(__x86_64__)
+ #include <cpuid.h>
+ #endif
+
+@@ -252,16 +249,6 @@ CCPUInfoLinux::CCPUInfoLinux()
+ }
+ #endif
+
+-#if defined(HAS_NEON) && defined(__arm__)
+- if (getauxval(AT_HWCAP) & HWCAP_NEON)
+- m_cpuFeatures |= CPU_FEATURE_NEON;
+-#endif
+-
+-#if defined(HAS_NEON) && defined(__aarch64__)
+- if (getauxval(AT_HWCAP) & HWCAP_ASIMD)
+- m_cpuFeatures |= CPU_FEATURE_NEON;
+-#endif
+-
+ // Set MMX2 when SSE is present as SSE is a superset of MMX2 and Intel doesn't set the MMX2 cap
+ if (m_cpuFeatures & CPU_FEATURE_SSE)
+ m_cpuFeatures |= CPU_FEATURE_MMX2;
diff --git a/package/libcec/Makefile b/package/libcec/Makefile
index 422bf679b..302f03e4e 100644
--- a/package/libcec/Makefile
+++ b/package/libcec/Makefile
@@ -4,24 +4,29 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= libcec
-PKG_VERSION:= d156e7cb684f86a9d73f8dcf087d4799c62d9721
+PKG_VERSION:= 6.0.2
PKG_RELEASE:= 1
-PKG_GIT:= hash
+PKG_HASH:= 090696d7a4fb772d7acebbb06f91ab92e025531c7c91824046b9e4e71ecb3377
PKG_DESCR:= control your device with your tv remote control
PKG_SECTION:= libs/video
-PKG_DEPENDS:= libudev libplatform
-PKG_BUILDDEP:= eudev cmake-host platform
+PKG_DEPENDS:= libudev p8-platform
+PKG_BUILDDEP:= eudev cmake-host p8-platform
PKG_URL:= http://libcec.pulse-eight.com/
-PKG_SITES:= https://github.com/Pulse-Eight/libcec.git
+PKG_SITES:= https://github.com/Pulse-Eight/libcec/archive/refs/tags/
PKG_OPTS:= dev
+PKG_DEPENDS_RASPBERRY_PI4:= bcm28xx-vc
+PKG_BUILDDEP_RASPBERRY_PI4:= bcm28xx-vc
PKG_DEPENDS_RASPBERRY_PI3:= bcm28xx-vc
PKG_BUILDDEP_RASPBERRY_PI3:= bcm28xx-vc
PKG_DEPENDS_RASPBERRY_PI2:= bcm28xx-vc
PKG_BUILDDEP_RASPBERRY_PI2:= bcm28xx-vc
PKG_DEPENDS_RASPBERRY_PI:= bcm28xx-vc
PKG_BUILDDEP_RASPBERRY_PI:= bcm28xx-vc
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 raspberry-pi3 raspberry-pi3p solidrun-imx6
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 raspberry-pi3 raspberry-pi4 solidrun-imx6
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
+WRKDIST= $(WRKDIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
include $(ADK_TOPDIR)/mk/package.mk
diff --git a/package/libcec/patches/libcec-00-imx6-support.patch b/package/libcec/patches/libcec-00-imx6-support.patch
deleted file mode 100644
index 2c24635c4..000000000
--- a/package/libcec/patches/libcec-00-imx6-support.patch
+++ /dev/null
@@ -1,879 +0,0 @@
-From a7f3315333c1a79259a763c6542a6cd71855b357 Mon Sep 17 00:00:00 2001
-From: Stefan Saraev <stefan@saraev.ca>
-Date: Thu, 7 May 2015 11:35:04 +0300
-Subject: [PATCH] imx support
-
-note. I am NOT the author of the patch. just rebased it
----
- include/cectypes.h | 14 +-
- src/libcec/CECTypeUtils.h | 2 +
- src/libcec/adapter/AdapterFactory.cpp | 29 +-
- src/libcec/adapter/IMX/AdapterMessageQueue.h | 134 +++++++++
- .../adapter/IMX/IMXCECAdapterCommunication.cpp | 328 +++++++++++++++++++++
- .../adapter/IMX/IMXCECAdapterCommunication.h | 119 ++++++++
- src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp | 42 +++
- src/libcec/adapter/IMX/IMXCECAdapterDetection.h | 36 +++
- src/libcec/cmake/CheckPlatformSupport.cmake | 10 +
- src/libcec/cmake/DisplayPlatformSupport.cmake | 6 +
- src/libcec/env.h.in | 3 +
- 11 files changed, 720 insertions(+), 3 deletions(-)
- create mode 100644 src/libcec/adapter/IMX/AdapterMessageQueue.h
- create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
- create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
- create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
- create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterDetection.h
-
-diff --git a/include/cectypes.h b/include/cectypes.h
-index acff259..0cfee8c 100644
---- a/include/cectypes.h
-+++ b/include/cectypes.h
-@@ -309,6 +309,17 @@ namespace CEC {
- #define CEC_EXYNOS_VIRTUAL_COM "Exynos"
-
- /*!
-+ * the path to use for the i.MX CEC wire
-+ */
-+#define CEC_IMX_PATH "/dev/mxc_hdmi_cec"
-+
-+/*!
-+ * the name of the virtual COM port to use for the i.MX CEC wire
-+ */
-+#define CEC_IMX_VIRTUAL_COM "i.MX"
-+
-+
-+/*!
- * Mimimum client version
- */
- #define CEC_MIN_LIB_VERSION 3
-@@ -876,7 +887,8 @@ typedef enum cec_adapter_type
- ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
- ADAPTERTYPE_RPI = 0x100,
- ADAPTERTYPE_TDA995x = 0x200,
-- ADAPTERTYPE_EXYNOS = 0x300
-+ ADAPTERTYPE_EXYNOS = 0x300,
-+ ADAPTERTYPE_IMX = 0x400
- } cec_adapter_type;
-
- /** force exporting through swig */
-diff --git a/src/libcec/CECTypeUtils.h b/src/libcec/CECTypeUtils.h
-index fd8046a..48cb215 100644
---- a/src/libcec/CECTypeUtils.h
-+++ b/src/libcec/CECTypeUtils.h
-@@ -765,6 +765,8 @@ namespace CEC
- return "Raspberry Pi";
- case ADAPTERTYPE_TDA995x:
- return "TDA995x";
-+ case ADAPTERTYPE_IMX:
-+ return "i.MX";
- default:
- return "unknown";
- }
-diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp
-index da05725..92e378b 100644
---- a/src/libcec/adapter/AdapterFactory.cpp
-+++ b/src/libcec/adapter/AdapterFactory.cpp
-@@ -58,6 +58,11 @@
- #include "Exynos/ExynosCECAdapterCommunication.h"
- #endif
-
-+#if defined(HAVE_IMX_API)
-+#include "IMX/IMXCECAdapterDetection.h"
-+#include "IMX/IMXCECAdapterCommunication.h"
-+#endif
-+
- using namespace CEC;
-
- int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
-@@ -127,7 +132,22 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
- #endif
-
-
--#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API)
-+
-+#if defined(HAVE_IMX_API)
-+ if (iAdaptersFound < iBufSize && CIMXCECAdapterDetection::FindAdapter() &&
-+ (!strDevicePath || !strcmp(strDevicePath, CEC_IMX_VIRTUAL_COM)))
-+ {
-+ snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_IMX_PATH);
-+ snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_IMX_VIRTUAL_COM);
-+ deviceList[iAdaptersFound].iVendorId = IMX_ADAPTER_VID;
-+ deviceList[iAdaptersFound].iProductId = IMX_ADAPTER_PID;
-+ deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_IMX;
-+ iAdaptersFound++;
-+ }
-+#endif
-+
-+
-+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_IMX_API)
- #error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
- #endif
-
-@@ -151,11 +171,16 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
- return new CRPiCECAdapterCommunication(m_lib->m_cec);
- #endif
-
-+#if defined(HAVE_IMX_API)
-+ if (!strcmp(strPort, CEC_IMX_VIRTUAL_COM))
-+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
-+#endif
-+
- #if defined(HAVE_P8_USB)
- return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
- #endif
-
--#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API)
-+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API) && !defined(HAVE_IMX_API)
- return NULL;
- #endif
- }
-diff --git a/src/libcec/adapter/IMX/AdapterMessageQueue.h b/src/libcec/adapter/IMX/AdapterMessageQueue.h
-new file mode 100644
-index 0000000..af6742c
---- /dev/null
-+++ b/src/libcec/adapter/IMX/AdapterMessageQueue.h
-@@ -0,0 +1,134 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * This program is dual-licensed; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ * Alternatively, you can license this library under a commercial license,
-+ * please contact Pulse-Eight Licensing for more information.
-+ *
-+ * For more information contact:
-+ * Pulse-Eight Licensing <license@pulse-eight.com>
-+ * http://www.pulse-eight.com/
-+ * http://www.pulse-eight.net/
-+ */
-+
-+#include "platform/threads/mutex.h"
-+
-+namespace CEC
-+{
-+ using namespace PLATFORM;
-+
-+ class CAdapterMessageQueueEntry
-+ {
-+ public:
-+ CAdapterMessageQueueEntry(const cec_command &command)
-+ : m_bWaiting(true), m_retval((uint32_t)-1), m_bSucceeded(false)
-+ {
-+ m_hash = hashValue(
-+ uint32_t(command.opcode_set ? command.opcode : CEC_OPCODE_NONE),
-+ command.initiator, command.destination);
-+ }
-+
-+ virtual ~CAdapterMessageQueueEntry(void) {}
-+
-+ /*!
-+ * @brief Query result from worker thread
-+ */
-+ uint32_t Result() const
-+ {
-+ return m_retval;
-+ }
-+
-+ /*!
-+ * @brief Signal waiting threads
-+ */
-+ void Broadcast(void)
-+ {
-+ CLockObject lock(m_mutex);
-+ m_condition.Broadcast();
-+ }
-+
-+ /*!
-+ * @brief Signal waiting thread(s) when message matches this entry
-+ */
-+ bool CheckMatch(uint32_t opcode, cec_logical_address initiator,
-+ cec_logical_address destination, uint32_t response)
-+ {
-+ uint32_t hash = hashValue(opcode, initiator, destination);
-+
-+ if (hash == m_hash)
-+ {
-+ CLockObject lock(m_mutex);
-+
-+ m_retval = response;
-+ m_bSucceeded = true;
-+ m_condition.Signal();
-+ return true;
-+ }
-+
-+ return false;
-+ }
-+
-+ /*!
-+ * @brief Wait for a response to this command.
-+ * @param iTimeout The timeout to use while waiting.
-+ * @return True when a response was received before the timeout passed, false otherwise.
-+ */
-+ bool Wait(uint32_t iTimeout)
-+ {
-+ CLockObject lock(m_mutex);
-+
-+ bool bReturn = m_bSucceeded ? true : m_condition.Wait(m_mutex, m_bSucceeded, iTimeout);
-+ m_bWaiting = false;
-+ return bReturn;
-+ }
-+
-+ /*!
-+ * @return True while a thread is waiting for a signal or isn't waiting yet, false otherwise.
-+ */
-+ bool IsWaiting(void)
-+ {
-+ CLockObject lock(m_mutex);
-+ return m_bWaiting;
-+ }
-+
-+ /*!
-+ * @return Hash value for given cec_command
-+ */
-+ static uint32_t hashValue(uint32_t opcode,
-+ cec_logical_address initiator,
-+ cec_logical_address destination)
-+ {
-+ return 1 | ((uint32_t)initiator << 8) |
-+ ((uint32_t)destination << 16) | ((uint32_t)opcode << 16);
-+ }
-+
-+ private:
-+ bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
-+ PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
-+ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
-+ uint32_t m_hash;
-+ uint32_t m_retval;
-+ bool m_bSucceeded;
-+ };
-+
-+};
-diff --git a/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
-new file mode 100644
-index 0000000..2daa8cb
---- /dev/null
-+++ b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
-@@ -0,0 +1,328 @@
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#include "env.h"
-+
-+#if defined(HAVE_IMX_API)
-+#include "IMXCECAdapterCommunication.h"
-+
-+#include "CECTypeUtils.h"
-+#include "LibCEC.h"
-+#include "platform/sockets/cdevsocket.h"
-+#include "platform/util/StdString.h"
-+#include "platform/util/buffer.h"
-+
-+/*
-+ * Ioctl definitions from kernel header
-+ */
-+#define HDMICEC_IOC_MAGIC 'H'
-+#define HDMICEC_IOC_SETLOGICALADDRESS _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char)
-+#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2)
-+#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3)
-+#define HDMICEC_IOC_GETPHYADDRESS _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4])
-+
-+#define MAX_CEC_MESSAGE_LEN 17
-+
-+#define MESSAGE_TYPE_RECEIVE_SUCCESS 1
-+#define MESSAGE_TYPE_NOACK 2
-+#define MESSAGE_TYPE_DISCONNECTED 3
-+#define MESSAGE_TYPE_CONNECTED 4
-+#define MESSAGE_TYPE_SEND_SUCCESS 5
-+
-+typedef struct hdmi_cec_event{
-+ int event_type;
-+ int msg_len;
-+ unsigned char msg[MAX_CEC_MESSAGE_LEN];
-+}hdmi_cec_event;
-+
-+
-+using namespace std;
-+using namespace CEC;
-+using namespace PLATFORM;
-+
-+#include "AdapterMessageQueue.h"
-+
-+#define LIB_CEC m_callback->GetLib()
-+
-+// these are defined in nxp private header file
-+#define CEC_MSG_SUCCESS 0x00 /*Message transmisson Succeed*/
-+#define CEC_CSP_OFF_STATE 0x80 /*CSP in Off State*/
-+#define CEC_BAD_REQ_SERVICE 0x81 /*Bad .req service*/
-+#define CEC_MSG_FAIL_UNABLE_TO_ACCESS 0x82 /*Message transmisson failed: Unable to access CEC line*/
-+#define CEC_MSG_FAIL_ARBITRATION_ERROR 0x83 /*Message transmisson failed: Arbitration error*/
-+#define CEC_MSG_FAIL_BIT_TIMMING_ERROR 0x84 /*Message transmisson failed: Bit timming error*/
-+#define CEC_MSG_FAIL_DEST_NOT_ACK 0x85 /*Message transmisson failed: Destination Address not aknowledged*/
-+#define CEC_MSG_FAIL_DATA_NOT_ACK 0x86 /*Message transmisson failed: Databyte not acknowledged*/
-+
-+
-+CIMXCECAdapterCommunication::CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
-+ IAdapterCommunication(callback)/*,
-+ m_bLogicalAddressChanged(false)*/
-+{
-+ CLockObject lock(m_mutex);
-+
-+ m_iNextMessage = 0;
-+ //m_logicalAddresses.Clear();
-+ m_logicalAddress = CECDEVICE_UNKNOWN;
-+ m_bLogicalAddressRegistered = false;
-+ m_bInitialised = false;
-+ m_dev = new CCDevSocket(CEC_IMX_PATH);
-+}
-+
-+CIMXCECAdapterCommunication::~CIMXCECAdapterCommunication(void)
-+{
-+ Close();
-+
-+ CLockObject lock(m_mutex);
-+ delete m_dev;
-+ m_dev = 0;
-+}
-+
-+bool CIMXCECAdapterCommunication::IsOpen(void)
-+{
-+ return IsInitialised() && m_dev->IsOpen();
-+}
-+
-+bool CIMXCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening)
-+{
-+ if (m_dev->Open(iTimeoutMs))
-+ {
-+ if (!bStartListening || CreateThread()) {
-+ if (m_dev->Ioctl(HDMICEC_IOC_STARTDEVICE, NULL) == 0) {
-+ m_bInitialised = true;
-+ return true;
-+ }
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to start device\n", __func__);
-+ }
-+ m_dev->Close();
-+ }
-+
-+ return false;
-+}
-+
-+
-+void CIMXCECAdapterCommunication::Close(void)
-+{
-+ StopThread(0);
-+
-+ CLockObject lock(m_mutex);
-+ if (!m_bInitialised) {
-+ return;
-+ }
-+ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0) {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to stop device\n", __func__);
-+ }
-+ m_dev->Close();
-+ m_bInitialised = false;
-+}
-+
-+
-+std::string CIMXCECAdapterCommunication::GetError(void) const
-+{
-+ std::string strError(m_strError);
-+ return strError;
-+}
-+
-+
-+cec_adapter_message_state CIMXCECAdapterCommunication::Write(
-+ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
-+{
-+ //cec_frame frame;
-+ unsigned char message[MAX_CEC_MESSAGE_LEN];
-+ int msg_len = 1;
-+ cec_adapter_message_state rc = ADAPTER_MESSAGE_STATE_ERROR;
-+
-+ if ((size_t)data.parameters.size + data.opcode_set + 1 > sizeof(message))
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__);
-+ return ADAPTER_MESSAGE_STATE_ERROR;
-+ }
-+
-+ message[0] = (data.initiator << 4) | (data.destination & 0x0f);
-+ if (data.opcode_set)
-+ {
-+ message[1] = data.opcode;
-+ msg_len++;
-+ memcpy(&message[2], data.parameters.data, data.parameters.size);
-+ msg_len+=data.parameters.size;
-+ }
-+
-+ if (m_dev->Write(message, msg_len) == msg_len)
-+ {
-+ rc = ADAPTER_MESSAGE_STATE_SENT_ACKED;
-+ }
-+ else
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: sent command error !", __func__);
-+
-+ return rc;
-+}
-+
-+
-+uint16_t CIMXCECAdapterCommunication::GetFirmwareVersion(void)
-+{
-+ /* FIXME add ioctl ? */
-+ return 0;
-+}
-+
-+
-+cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void)
-+{
-+ return CEC_VENDOR_UNKNOWN;
-+}
-+
-+
-+uint16_t CIMXCECAdapterCommunication::GetPhysicalAddress(void)
-+{
-+ uint32_t info;
-+ uint16_t phy_addr;
-+
-+ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &info) != 0)
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_GETPHYADDRESS failed !", __func__);
-+ return CEC_INVALID_PHYSICAL_ADDRESS;
-+ }
-+ /* Rebuild 16 bit raw value from fsl 32 bits value */
-+ phy_addr = ((info & 0x0f) << 12) | (info & 0x0f00) |
-+ ((info & 0x0f0000) >> 12) | ((info & 0x0f000000) >> 24);
-+
-+ return phy_addr;
-+}
-+
-+
-+cec_logical_addresses CIMXCECAdapterCommunication::GetLogicalAddresses(void)
-+{
-+ cec_logical_addresses addresses;
-+ addresses.Clear();
-+
-+ CLockObject lock(m_mutex);
-+ if ((m_logicalAddress & (CECDEVICE_UNKNOWN | CECDEVICE_UNREGISTERED)) == 0)
-+ addresses.Set(m_logicalAddress);
-+
-+ return addresses;
-+}
-+
-+void CIMXCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress))
-+{
-+ UnregisterLogicalAddress();
-+}
-+
-+bool CIMXCECAdapterCommunication::UnregisterLogicalAddress(void)
-+{
-+ CLockObject lock(m_mutex);
-+ if (!m_bLogicalAddressRegistered)
-+ return true;
-+
-+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)CECDEVICE_BROADCAST) != 0)
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
-+ return false;
-+ }
-+
-+ m_logicalAddress = CECDEVICE_UNKNOWN;
-+ m_bLogicalAddressRegistered = false;
-+ return true;
-+}
-+
-+bool CIMXCECAdapterCommunication::RegisterLogicalAddress(const cec_logical_address address)
-+{
-+ CLockObject lock(m_mutex);
-+
-+ if (m_logicalAddress == address && m_bLogicalAddressRegistered)
-+ {
-+ return true;
-+ }
-+
-+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)address) != 0)
-+ {
-+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
-+ return false;
-+ }
-+
-+ m_logicalAddress = address;
-+ m_bLogicalAddressRegistered = true;
-+ return true;
-+}
-+
-+bool CIMXCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
-+{
-+ int log_addr = addresses.primary;
-+
-+ return RegisterLogicalAddress((cec_logical_address)log_addr);
-+}
-+
-+void *CIMXCECAdapterCommunication::Process(void)
-+{
-+ bool bHandled;
-+ hdmi_cec_event event;
-+ int ret;
-+
-+ uint32_t opcode, status;
-+ cec_logical_address initiator, destination;
-+
-+ while (!IsStopped())
-+ {
-+ ret = m_dev->Read((char *)&event, sizeof(event), 5000);
-+ if (ret > 0)
-+ {
-+
-+ initiator = cec_logical_address(event.msg[0] >> 4);
-+ destination = cec_logical_address(event.msg[0] & 0x0f);
-+
-+ //LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read data : type : %d initiator %d dest %d", __func__, event.event_type, initiator, destination);
-+ if (event.event_type == MESSAGE_TYPE_RECEIVE_SUCCESS)
-+ /* Message received */
-+ {
-+ cec_command cmd;
-+
-+ cec_command::Format(
-+ cmd, initiator, destination,
-+ ( event.msg_len > 1 ) ? cec_opcode(event.msg[1]) : CEC_OPCODE_NONE);
-+
-+ for( uint8_t i = 2; i < event.msg_len; i++ )
-+ cmd.parameters.PushBack(event.msg[i]);
-+
-+ if (!IsStopped())
-+ m_callback->OnCommandReceived(cmd);
-+ }
-+
-+ if (event.event_type == MESSAGE_TYPE_CONNECTED)
-+ /* HDMI has just been reconnected - Notify phy address*/
-+ {
-+ uint16_t iNewAddress = GetPhysicalAddress();
-+ m_callback->HandlePhysicalAddressChanged(iNewAddress);
-+ }
-+ /* We are not interested in other events */
-+ } /*else {
-+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read returned %d", __func__, ret);
-+ }*/
-+
-+ }
-+
-+ return 0;
-+}
-+
-+#endif // HAVE_IMX_API
-diff --git a/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
-new file mode 100644
-index 0000000..9e899a3
---- /dev/null
-+++ b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
-@@ -0,0 +1,119 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#if defined(HAVE_IMX_API)
-+
-+#include "platform/threads/mutex.h"
-+#include "platform/threads/threads.h"
-+#include "platform/sockets/socket.h"
-+#include "adapter/AdapterCommunication.h"
-+#include <map>
-+
-+#define IMX_ADAPTER_VID 0x0471 /*FIXME TBD*/
-+#define IMX_ADAPTER_PID 0x1001
-+
-+
-+
-+namespace PLATFORM
-+{
-+ class CCDevSocket;
-+};
-+
-+
-+namespace CEC
-+{
-+ class CAdapterMessageQueueEntry;
-+
-+ class CIMXCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread
-+ {
-+ public:
-+ /*!
-+ * @brief Create a new USB-CEC communication handler.
-+ * @param callback The callback to use for incoming CEC commands.
-+ */
-+ CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback);
-+ virtual ~CIMXCECAdapterCommunication(void);
-+
-+ /** @name IAdapterCommunication implementation */
-+ ///{
-+ bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true);
-+ void Close(void);
-+ bool IsOpen(void);
-+ std::string GetError(void) const;
-+ cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply);
-+
-+ bool SetLineTimeout(uint8_t UNUSED(iTimeout)) { return true; }
-+ bool StartBootloader(void) { return false; }
-+ bool SetLogicalAddresses(const cec_logical_addresses &addresses);
-+ cec_logical_addresses GetLogicalAddresses(void);
-+ bool PingAdapter(void) { return IsInitialised(); }
-+ uint16_t GetFirmwareVersion(void);
-+ uint32_t GetFirmwareBuildDate(void) { return 0; }
-+ bool IsRunningLatestFirmware(void) { return true; }
-+ bool PersistConfiguration(const libcec_configuration & UNUSED(configuration)) { return false; }
-+ bool GetConfiguration(libcec_configuration & UNUSED(configuration)) { return false; }
-+ std::string GetPortName(void) { return std::string("IMX"); }
-+ uint16_t GetPhysicalAddress(void);
-+ bool SetControlledMode(bool UNUSED(controlled)) { return true; }
-+ cec_vendor_id GetVendorId(void);
-+ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; }
-+ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_IMX; }
-+ uint16_t GetAdapterVendorId(void) const { return IMX_ADAPTER_VID; }
-+ uint16_t GetAdapterProductId(void) const { return IMX_ADAPTER_PID; }
-+ void HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress));
-+ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {}
-+ bool RegisterLogicalAddress(const cec_logical_address address);
-+ ///}
-+
-+ /** @name PLATFORM::CThread implementation */
-+ ///{
-+ void *Process(void);
-+ ///}
-+
-+ private:
-+ bool IsInitialised(void) const { return m_bInitialised; };
-+ bool UnregisterLogicalAddress(void);
-+
-+ std::string m_strError; /**< current error message */
-+
-+ //cec_logical_addresses m_logicalAddresses;
-+ cec_logical_address m_logicalAddress;
-+
-+ PLATFORM::CMutex m_mutex;
-+ PLATFORM::CCDevSocket *m_dev; /**< the device connection */
-+ bool m_bLogicalAddressRegistered;
-+ bool m_bInitialised;
-+
-+ PLATFORM::CMutex m_messageMutex;
-+ uint32_t m_iNextMessage;
-+ std::map<uint32_t, CAdapterMessageQueueEntry *> m_messages;
-+ };
-+
-+};
-+
-+#endif
-diff --git a/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp b/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
-new file mode 100644
-index 0000000..6c93c45
---- /dev/null
-+++ b/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
-@@ -0,0 +1,42 @@
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+#include "env.h"
-+#include <stdio.h>
-+
-+#if defined(HAVE_IMX_API)
-+#include "IMXCECAdapterDetection.h"
-+
-+
-+using namespace CEC;
-+
-+bool CIMXCECAdapterDetection::FindAdapter(void)
-+{
-+ return access(CEC_IMX_PATH, 0) == 0;
-+}
-+
-+#endif
-diff --git a/src/libcec/adapter/IMX/IMXCECAdapterDetection.h b/src/libcec/adapter/IMX/IMXCECAdapterDetection.h
-new file mode 100644
-index 0000000..d54891d
---- /dev/null
-+++ b/src/libcec/adapter/IMX/IMXCECAdapterDetection.h
-@@ -0,0 +1,36 @@
-+#pragma once
-+/*
-+ * This file is part of the libCEC(R) library.
-+ *
-+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
-+ * libCEC(R) is an original work, containing original code.
-+ *
-+ * libCEC(R) is a trademark of Pulse-Eight Limited.
-+ *
-+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
-+ *
-+ * You can redistribute this file and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ *
-+ */
-+
-+namespace CEC
-+{
-+ class CIMXCECAdapterDetection
-+ {
-+ public:
-+ static bool FindAdapter(void);
-+ };
-+}
-diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
-index 828cdb2..8b47795 100644
---- a/src/libcec/cmake/CheckPlatformSupport.cmake
-+++ b/src/libcec/cmake/CheckPlatformSupport.cmake
-@@ -8,6 +8,7 @@
- # HAVE_RANDR 1 if xrandr is supported
- # HAVE_LIBUDEV 1 if udev is supported
- # HAVE_RPI_API 1 if Raspberry Pi is supported
-+# HAVE_IMX_API 1 if i.MX is supported
- # HAVE_TDA995X_API 1 if TDA995X is supported
- # HAVE_EXYNOS_API 1 if Exynos is supported
- # HAVE_P8_USB_DETECT 1 if Pulse-Eight devices can be auto-detected
-@@ -87,6 +88,15 @@ else()
- list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_RPI})
- endif()
-
-+ # i.MX
-+ if (HAVE_IMX_API)
-+ set(LIB_INFO "${LIB_INFO}, 'IMX'")
-+ set(CEC_SOURCES_ADAPTER_IMX adapter/IMX/IMXCECAdapterDetection.cpp
-+ adapter/IMX/IMXCECAdapterCommunication.cpp)
-+ source_group("Source Files\\adapter\\IMX" FILES ${CEC_SOURCES_ADAPTER_IMX})
-+ list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_IMX})
-+ endif()
-+
- # TDA995x
- check_include_files("tda998x_ioctl.h;comps/tmdlHdmiCEC/inc/tmdlHdmiCEC_Types.h" HAVE_TDA995X_API)
- if (HAVE_TDA995X_API)
-diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake
-index feee111..0309c56 100644
---- a/src/libcec/cmake/DisplayPlatformSupport.cmake
-+++ b/src/libcec/cmake/DisplayPlatformSupport.cmake
-@@ -32,6 +32,12 @@ else()
- message(STATUS "Raspberry Pi support: no")
- endif()
-
-+if (HAVE_IMX_API)
-+ message(STATUS "i.MX support: yes")
-+else()
-+ message(STATUS "i.MX support: no")
-+endif()
-+
- if (HAVE_TDA995X_API)
- message(STATUS "TDA995x support: yes")
- else()
-diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in
-index a1a1f26..f90e729 100644
---- a/src/libcec/env.h.in
-+++ b/src/libcec/env.h.in
-@@ -60,6 +60,9 @@
- /* Define to 1 for Raspberry Pi support */
- #cmakedefine HAVE_RPI_API @HAVE_RPI_API@
-
-+/* Define to 1 for IMX support */
-+#cmakedefine HAVE_IMX_API @HAVE_IMX_API@
-+
- /* Define to 1 for TDA995x support */
- #cmakedefine HAVE_TDA995X_API @HAVE_TDA995X_API@
-
---
-2.1.4
-
diff --git a/package/libcec/patches/patch-src_cec-client_CMakeLists_txt b/package/libcec/patches/patch-src_cec-client_CMakeLists_txt
deleted file mode 100644
index c6faee0ef..000000000
--- a/package/libcec/patches/patch-src_cec-client_CMakeLists_txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- libcec-185559110dc88aeca0915a90b3b369d2d42c0f7c.orig/src/cec-client/CMakeLists.txt 2015-05-22 14:47:17.000000000 -0500
-+++ libcec-185559110dc88aeca0915a90b3b369d2d42c0f7c/src/cec-client/CMakeLists.txt 2015-05-22 15:02:00.606971031 -0500
-@@ -44,6 +44,7 @@ if (NOT WIN32)
- # curses
- if (HAVE_CURSES_API)
- target_link_libraries(cec-client curses)
-+ target_link_libraries(cec-client tinfo)
- endif()
-
- # rt
diff --git a/package/libpciaccess/Makefile b/package/libpciaccess/Makefile
index 13abcdbeb..89e388cd4 100644
--- a/package/libpciaccess/Makefile
+++ b/package/libpciaccess/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= libpciaccess
-PKG_VERSION:= 0.13.4
+PKG_VERSION:= 0.16
PKG_RELEASE:= 1
-PKG_HASH:= 74d92bda448e6fdb64fee4e0091255f48d625d07146a121653022ed3a0ca1f2f
+PKG_HASH:= 84413553994aef0070cf420050aa5c0a51b1956b404920e21b81e96db6a61a27
PKG_DESCR:= pci access library
PKG_SECTION:= x11/libs
PKG_SITES:= http://www.x.org/releases/individual/lib/
diff --git a/package/libxkbcommon/Makefile b/package/libxkbcommon/Makefile
index cdacda12e..2f91328c4 100644
--- a/package/libxkbcommon/Makefile
+++ b/package/libxkbcommon/Makefile
@@ -9,7 +9,7 @@ PKG_RELEASE:= 1
PKG_HASH:= b3c710d27a2630054e1e1399c85b7f330ef03359b460f0c1b3b587fd01fe9234
PKG_DESCR:= library for handling of keyboard descriptions
PKG_SECTION:= libs/misc
-PKG_URL:= add project url
+PKG_BUILDDEP:= meson-host
PKG_SITES:= https://xkbcommon.org/download/
PKG_OPTS:= dev
@@ -17,7 +17,8 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBXKBCOMMON,libxkbcommon,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
-MESON_FLAGS+= -Denable-docs=false
+MESON_FLAGS+= -Denable-docs=false \
+ -Denable-wayland=false
WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj
diff --git a/package/platform/Makefile b/package/p8-platform/Makefile
index c23c3e21a..af0bd5a87 100644
--- a/package/platform/Makefile
+++ b/package/p8-platform/Makefile
@@ -3,24 +3,27 @@
include $(ADK_TOPDIR)/rules.mk
-PKG_NAME:= platform
-PKG_VERSION:= aafa6e9f3b86f2258f5f75809849743b1779072b
+PKG_NAME:= p8-platform
+PKG_VERSION:= 2.1.0.1
PKG_RELEASE:= 1
-PKG_GIT:= hash
+PKG_HASH:= 064f8d2c358895c7e0bea9ae956f8d46f3f057772cb97f2743a11d478a0f68a0
PKG_DESCR:= platform library used by libcec
PKG_SECTION:= libs/misc
PKG_URL:= https://github.com/Pulse-Eight/platform
-PKG_SITES:= https://github.com/Pulse-Eight/platform.git
+PKG_SITES:= https://github.com/Pulse-Eight/platform/archive/refs/tags/
PKG_LIBNAME:= libplatform
PKG_OPTS:= dev
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
+WRKDIST= $(WRKDIR)/platform-$(PKG_NAME)-$(PKG_VERSION)
+
include $(ADK_TOPDIR)/mk/package.mk
-$(eval $(call PKG_template,LIBPLATFORM,libplatform,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+$(eval $(call PKG_template,P8_PLATFORM,p8-platform,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
CONFIG_STYLE:= cmake
-libplatform-install:
+p8-platform-install:
:
include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile
index 363cff4dd..9f03b1638 100644
--- a/package/pulseaudio/Makefile
+++ b/package/pulseaudio/Makefile
@@ -11,9 +11,10 @@ PKG_DESCR:= sound system
PKG_SECTION:= mm/audio
PKG_DEPENDS:= libltdl json-c libsndfile libspeex libncurses
PKG_DEPENDS+= libflac libvorbis libogg libuuid libsndfile
-PKG_DEPENDS+= alsa-lib
-PKG_BUILDDEP:= libtool json-c libsndfile speex check
+PKG_DEPENDS+= alsa-lib libICE libSM libxtst
+PKG_BUILDDEP:= libtool json-c libsndfile speex check meson-host
PKG_BUILDDEP+= flac libvorbis libogg util-linux ncurses alsa-lib
+PKG_BUILDDEP+= libICE libSM libXtst
PKG_NEEDS:= threads
PKG_URL:= http://www.freedesktop.org/wiki/Software/PulseAudio/
PKG_SITES:= http://freedesktop.org/software/pulseaudio/releases/
diff --git a/package/samba/Makefile b/package/samba/Makefile
index e21f06ed2..2a04e10c6 100644
--- a/package/samba/Makefile
+++ b/package/samba/Makefile
@@ -11,7 +11,7 @@ PKG_DESCR:= file and print server
PKG_SECTION:= net/fs
PKG_DEPENDS:= libuuid libpopt libgnutls libtirpc
PKG_DEPENDS+= libtalloc libkrb5
-PKG_BUILDDEP:= util-linux talloc p5-parse-yapp-host
+PKG_BUILDDEP:= util-linux talloc p5-parse-yapp-host gnutls krb5
PKG_NEEDS:= threads intl
PKG_URL:= http://www.samba.org/
PKG_SITES:= http://samba.org/samba/ftp/stable/
diff --git a/package/spdlog/Makefile b/package/spdlog/Makefile
new file mode 100644
index 000000000..3d96eecb9
--- /dev/null
+++ b/package/spdlog/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= spdlog
+PKG_VERSION:= 1.9.2
+PKG_RELEASE:= 1
+PKG_HASH:= 6fff9215f5cb81760be4cc16d033526d1080427d236e86d70bb02994f85e3d38
+PKG_DESCR:= very fast, header-only/compiled, C++ logging library
+PKG_BUILDDEP:= fmt
+PKG_SECTION:= libs/misc
+PKG_SITES:= https://github.com/gabime/spdlog/archive/refs/tags/
+PKG_OPTS:= dev
+
+DISTFILES:= v$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,SPDLOG,spdlog,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+CONFIG_STYLE:= cmake
+CMAKE_FLAGS+= -DSPDLOG_BUILD_TESTS=OFF \
+ -DSPDLOG_BUILD_EXAMPLE=OFF \
+ -DSPDLOG_BUILD_BENCH=OFF \
+ -DSPDLOG_FMT_EXTERNAL=ON
+
+
+spdlog-install:
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/yajl/Makefile b/package/yajl/Makefile
index f81ccf66b..321d24971 100644
--- a/package/yajl/Makefile
+++ b/package/yajl/Makefile
@@ -6,16 +6,15 @@ include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= yajl
PKG_VERSION:= 2.1.0
PKG_RELEASE:= 1
-PKG_HASH:= 510a13e0be57cd4ba99e60ac806a3635854af51316d3131d3742a90298ccde38
+PKG_HASH:= 3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a
PKG_DESCR:= small event-driven json parser
PKG_SECTION:= libs/data
PKG_BUILDDEP:= cmake-host ruby-host
PKG_URL:= http://lloyd.github.com/yajl/
-PKG_SITES:= http://github.com/lloyd/yajl/tarball/$(PKG_VERSION)/
+PKG_SITES:= https://github.com/lloyd/yajl/archive/refs/tags/
PKG_OPTS:= dev
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
-WRKDIST= $(WRKDIR)/lloyd-yajl-66cb08c/
+DISTFILES:= ${PKG_VERSION}.tar.gz
include $(ADK_TOPDIR)/mk/package.mk