Skip to content

Commit

Permalink
updating poco
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Oct 12, 2024
1 parent 83d9bad commit 2a7f0c1
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 5 deletions.
8 changes: 3 additions & 5 deletions external/setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ rsync_dir $EXTERNAL/build .
rsync_dir $EXTERNAL/buildroot/ $BUILDROOT_DIR/
echo "patching openhd into config.in"
sed -i '/menu "Audio and video applications"/a\ source "package/openhd/Config.in"' "$BUILDROOT_DIR/package/Config.in"
echo "patching poco"
sed -i 's/c++14/c++17/g' buildroot-2021.05/package/poco/poco.mk
rm -Rf buildroot-2021.05/package/poco/poco.hash
sed -i 's|POCO_SITE = $(call github,pocoproject,poco,poco-$(POCO_VERSION)-release)|POCO_SITE = $(call github,OpenHD,poco,v$(POCO_VERSION))|' buildroot-2021.05/package/poco/poco.mk
sed -i 's/1.10.1/1.13.3/g' buildroot-2021.05/package/poco/poco.mk
echo "updating poco"
rm -Rf buildroot-2021.05/package/poco/*
mv -v external/updates/* buildroot-2021.05/package/poco/
rsync_dir $EXTERNAL/isp_tuning .
rsync_dir $EXTERNAL/ramdisk/ ramdisk/
rsync_dir $EXTERNAL/u-boot/ $UBOOT_DIR/
Expand Down
123 changes: 123 additions & 0 deletions external/updates/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
config BR2_PACKAGE_POCO_ARCH_SUPPORTS
bool
default y
depends on !BR2_arc
depends on !BR2_microblaze
depends on !BR2_mipsel
depends on !BR2_or1k
depends on !BR2_RISCV_32
depends on !BR2_xtensa

config BR2_PACKAGE_POCO
bool "poco"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17
# pthread_condattr_setclock
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on !BR2_STATIC_LIBS # dlopen()
depends on BR2_PACKAGE_POCO_ARCH_SUPPORTS
select BR2_PACKAGE_PCRE2
select BR2_PACKAGE_ZLIB
help
The C++ Portable Components Libraries

http://pocoproject.org

if BR2_PACKAGE_POCO

comment "poco components"

config BR2_PACKAGE_POCO_ACTIVERECORD
bool "ActiveRecord"
select BR2_PACKAGE_POCO_XML

config BR2_PACKAGE_POCO_CPP_PARSER
bool "CppParser"

config BR2_PACKAGE_POCO_CRYPTO
bool "Crypto"
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
select BR2_PACKAGE_OPENSSL

config BR2_PACKAGE_POCO_DATA
bool

config BR2_PACKAGE_POCO_DATA_MYSQL
bool "Data/MySQL"
depends on BR2_USE_MMU # mysql
select BR2_PACKAGE_MARIADB
select BR2_PACKAGE_POCO_DATA

config BR2_PACKAGE_POCO_DATA_PGSQL
bool "Data/PostgreSQL"
depends on BR2_USE_MMU # postgresql
depends on !BR2_OPTIMIZE_FAST # postgresql
select BR2_PACKAGE_POCO_DATA
select BR2_PACKAGE_POSTGRESQL

comment "Data/PostgreSQL can't be built with Optimize for fast"
depends on BR2_OPTIMIZE_FAST

config BR2_PACKAGE_POCO_DATA_SQLITE
bool "Data/SQLite"
select BR2_PACKAGE_POCO_DATA
select BR2_PACKAGE_SQLITE

config BR2_PACKAGE_POCO_JSON
bool "JSON"

config BR2_PACKAGE_POCO_JWT
bool "JWT"
select BR2_PACKAGE_POCO_CRYPTO
select BR2_PACKAGE_POCO_JSON

config BR2_PACKAGE_POCO_MONGODB
bool "MongoDB"
select BR2_PACKAGE_POCO_NET

config BR2_PACKAGE_POCO_NET
bool "Net"

config BR2_PACKAGE_POCO_NETSSL_OPENSSL
bool "NetSSL_OpenSSL"
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_POCO_CRYPTO
select BR2_PACKAGE_POCO_NET
select BR2_PACKAGE_POCO_UTIL

config BR2_PACKAGE_POCO_PDF
bool "PDF"
select BR2_PACKAGE_POCO_JSON
select BR2_PACKAGE_POCO_UTIL
select BR2_PACKAGE_POCO_XML

config BR2_PACKAGE_POCO_PROMETHEUS
bool "Prometheus"
select BR2_PACKAGE_POCO_NET

config BR2_PACKAGE_POCO_REDIS
bool "Redis"
select BR2_PACKAGE_POCO_NET

config BR2_PACKAGE_POCO_UTIL
bool "Util"
select BR2_PACKAGE_POCO_XML

config BR2_PACKAGE_POCO_XML
bool "XML"
select BR2_PACKAGE_EXPAT

config BR2_PACKAGE_POCO_ZIP
bool "Zip"
select BR2_PACKAGE_POCO_NET
select BR2_PACKAGE_POCO_UTIL
select BR2_PACKAGE_POCO_XML

endif # BR2_PACKAGE_POCO

comment "poco needs a toolchain w/ wchar, NPTL, C++, dynamic library, gcc >= 8"
depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \
|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_8
depends on BR2_PACKAGE_POCO_ARCH_SUPPORTS
3 changes: 3 additions & 0 deletions external/updates/poco.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Locally computed
sha256 c01221870aa9bccedf1de39890279699207848fe61a0cfb6aeec7c5942c4627f poco-1.13.2.tar.gz
sha256 c4b1e1e5f36d8331737231fefcc30f5714326aec7c387ad59a8115eb0ba7d6b5 LICENSE
99 changes: 99 additions & 0 deletions external/updates/poco.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
################################################################################
#
# poco
#
################################################################################

POCO_VERSION = 1.13.2
POCO_SITE = $(call github,pocoproject,poco,poco-$(POCO_VERSION)-release)
POCO_LICENSE = BSL-1.0
POCO_LICENSE_FILES = LICENSE
POCO_CPE_ID_VENDOR = pocoproject
POCO_INSTALL_STAGING = YES

POCO_DEPENDENCIES = \
pcre2 \
zlib \
$(if $(BR2_PACKAGE_POCO_CRYPTO),openssl) \
$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),mariadb) \
$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite) \
$(if $(BR2_PACKAGE_POCO_DATA_PGSQL),postgresql) \
$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl) \
$(if $(BR2_PACKAGE_POCO_XML),expat)

POCO_OMIT = \
Data/ODBC \
PageCompiler \
$(if $(BR2_PACKAGE_POCO_ACTIVERECORD),,ActiveRecord) \
$(if $(BR2_PACKAGE_POCO_CPP_PARSER),,CppParser) \
$(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto) \
$(if $(BR2_PACKAGE_POCO_DATA),,Data) \
$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL) \
$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite) \
$(if $(BR2_PACKAGE_POCO_DATA_PGSQL),,Data/PostgreSQL) \
$(if $(BR2_PACKAGE_POCO_JSON),,JSON) \
$(if $(BR2_PACKAGE_POCO_JWT),,JWT) \
$(if $(BR2_PACKAGE_POCO_MONGODB),,MongoDB) \
$(if $(BR2_PACKAGE_POCO_NET),,Net) \
$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL) \
$(if $(BR2_PACKAGE_POCO_PDF),,PDF) \
$(if $(BR2_PACKAGE_POCO_PROMETHEUS),,Prometheus) \
$(if $(BR2_PACKAGE_POCO_REDIS),,Redis) \
$(if $(BR2_PACKAGE_POCO_UTIL),,Util) \
$(if $(BR2_PACKAGE_POCO_XML),,XML) \
$(if $(BR2_PACKAGE_POCO_ZIP),,Zip)

ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
POCO_CONF_OPTS += --no-fpenvironment --no-wstring
endif

# architectures missing some FE_* in their fenv.h
ifeq ($(BR2_sh4a)$(BR2_nios2),y)
POCO_CONF_OPTS += --no-fpenvironment
endif

# disable fpenvironment for soft floating point configuration
ifeq ($(BR2_SOFT_FLOAT),y)
POCO_CONF_OPTS += --no-fpenvironment
endif

POCO_MAKE_TARGET = shared_release

POCO_LDFLAGS=$(TARGET_LDFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
POCO_LDFLAGS += -latomic
endif

define POCO_CONFIGURE_CMDS
(cd $(@D); $(TARGET_MAKE_ENV) ./configure \
--config=Linux \
--prefix=/usr \
--ldflags="$(POCO_LDFLAGS)" \
--omit="$(POCO_OMIT)" \
$(POCO_CONF_OPTS) \
--unbundled \
--no-tests \
--no-samples)
endef

# Use $(MAKE1) to avoid failures on heavilly parallel machines (e.g. -j25)
define POCO_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) POCO_TARGET_OSARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) \
POCO_MYSQL_INCLUDE=$(STAGING_DIR)/usr/include/mysql \
POCO_MYSQL_LIB=$(STAGING_DIR)/usr/lib/mysql \
POCO_PGSQL_INCLUDE=$(STAGING_DIR)/usr/include/postgresql \
POCO_PGSQL_LIB=$(STAGING_DIR)/usr/lib/postgresql \
DEFAULT_TARGET=$(POCO_MAKE_TARGET) -C $(@D)
endef

define POCO_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) \
DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
endef

define POCO_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) \
DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
endef

$(eval $(generic-package))

0 comments on commit 2a7f0c1

Please sign in to comment.