From 0196fa4caf9d06837a3a37e0a1c03484c746c6ef Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Fri, 30 Mar 2018 15:34:55 -0400 Subject: [PATCH] Add a few more libs and remove iotivity --- libs/expat/Makefile | 69 ++++ libs/glib2/Makefile | 111 ++++++ libs/glib2/patches/001-automake-compat.patch | 11 + ...ppress-string-format-literal-warning.patch | 24 ++ libs/gnutls/Config.in | 56 +++ libs/gnutls/Makefile | 248 ++++++++++++ libs/libgcrypt/Makefile | 68 ++++ .../libgcrypt/patches/001-no_docs_tests.patch | 28 ++ libs/libgd/Makefile | 81 ++++ libs/libgd/patches/101-gdlib-config.patch | 20 + libs/libgd/patches/200-uclibc-ceill.patch | 24 ++ libs/libjpeg/Makefile | 91 +++++ libs/libnetfilter-acct/Makefile | 70 ++++ libs/libpng/Makefile | 68 ++++ libs/libpng/patches/100-config_fix.patch | 10 + libs/libssh2/Makefile | 59 +++ libs/libxml2/Makefile | 139 +++++++ libs/openldap/Makefile | 151 ++++++++ libs/openldap/files/ldap.init | 19 + .../patches/001-automake-compat.patch | 323 ++++++++++++++++ .../patches/002-no-doc-and-tests-subdir.patch | 5 + libs/openldap/patches/020-autofs-schema.patch | 26 ++ libs/openldap/patches/750-no-strip.patch | 22 ++ libs/pcre/Makefile | 102 +++++ libs/sqlite3/Makefile | 112 ++++++ net/iotivity/Makefile | 311 --------------- net/iotivity/files/etc/iotivity/ReadMe.txt | 2 - .../files/etc/iotivity/oic_svr_db.cbor | Bin 1234 -> 0 bytes .../files/etc/iotivity/oic_svr_db.json | 101 ----- net/iotivity/patches/001-no_unit_test.patch | 141 ------- .../patches/002-do-not-chck-for-boost.patch | 29 -- .../020-linux-Add-more-architectures.patch | 44 --- ...ld-do-not-set-TARGET_ARCH-to-default.patch | 39 -- ...ompiler-options-to-supported-archite.patch | 57 --- ...ke-compiler-options-from-environment.patch | 126 ------- .../patches/030-remove-check-for-curl.patch | 55 --- .../040-linux-Use-system-sqlite3.patch | 27 -- ...tyHandlerResponse-from-stack-to-heap.patch | 54 --- ...-OCClientResponse-from-stack-to-heap.patch | 357 ------------------ ...-OCClientResponse-from-stack-to-heap.patch | 103 ----- ...ompilation-against-non-debug-mbedtls.patch | 27 -- ..._version_get_string-only-if-availabl.patch | 35 -- ..._ssl_conf_renegotiation-only-if-avai.patch | 30 -- ...-of-patched-mbed-functions-condition.patch | 44 --- .../patches/078-use-system-mbedtls.patch | 22 -- ...pper-do-not-check-for-floating-point.patch | 31 -- net/iotivity/patches/140-remove-glib2.patch | 32 -- ...le-try-to-load-security-configuratio.patch | 44 --- 48 files changed, 1937 insertions(+), 1711 deletions(-) create mode 100644 libs/expat/Makefile create mode 100644 libs/glib2/Makefile create mode 100644 libs/glib2/patches/001-automake-compat.patch create mode 100644 libs/glib2/patches/002-gdate-Suppress-string-format-literal-warning.patch create mode 100644 libs/gnutls/Config.in create mode 100644 libs/gnutls/Makefile create mode 100644 libs/libgcrypt/Makefile create mode 100644 libs/libgcrypt/patches/001-no_docs_tests.patch create mode 100644 libs/libgd/Makefile create mode 100644 libs/libgd/patches/101-gdlib-config.patch create mode 100644 libs/libgd/patches/200-uclibc-ceill.patch create mode 100644 libs/libjpeg/Makefile create mode 100644 libs/libnetfilter-acct/Makefile create mode 100644 libs/libpng/Makefile create mode 100644 libs/libpng/patches/100-config_fix.patch create mode 100644 libs/libssh2/Makefile create mode 100644 libs/libxml2/Makefile create mode 100644 libs/openldap/Makefile create mode 100644 libs/openldap/files/ldap.init create mode 100644 libs/openldap/patches/001-automake-compat.patch create mode 100644 libs/openldap/patches/002-no-doc-and-tests-subdir.patch create mode 100644 libs/openldap/patches/020-autofs-schema.patch create mode 100644 libs/openldap/patches/750-no-strip.patch create mode 100644 libs/pcre/Makefile create mode 100644 libs/sqlite3/Makefile delete mode 100644 net/iotivity/Makefile delete mode 100644 net/iotivity/files/etc/iotivity/ReadMe.txt delete mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.cbor delete mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.json delete mode 100644 net/iotivity/patches/001-no_unit_test.patch delete mode 100644 net/iotivity/patches/002-do-not-chck-for-boost.patch delete mode 100644 net/iotivity/patches/020-linux-Add-more-architectures.patch delete mode 100644 net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch delete mode 100644 net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch delete mode 100644 net/iotivity/patches/023-build-take-compiler-options-from-environment.patch delete mode 100644 net/iotivity/patches/030-remove-check-for-curl.patch delete mode 100644 net/iotivity/patches/040-linux-Use-system-sqlite3.patch delete mode 100644 net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch delete mode 100644 net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch delete mode 100644 net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch delete mode 100644 net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch delete mode 100644 net/iotivity/patches/078-use-system-mbedtls.patch delete mode 100644 net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch delete mode 100644 net/iotivity/patches/140-remove-glib2.patch delete mode 100644 net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch diff --git a/libs/expat/Makefile b/libs/expat/Makefile new file mode 100644 index 0000000..27a8e50 --- /dev/null +++ b/libs/expat/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=expat +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=2f47841c829facb346eb6e3fab5212e2 +PKG_SOURCE_URL:=@SF/expat +PKG_MAINTAINER:=Steven Barth + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=conftools/libtool.m4 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/libexpat + SECTION:=libs + CATEGORY:=Libraries + TITLE:=An XML parsing library + URL:=http://expat.sourceforge.net/ +endef + +define Package/libexpat/description + A fast, non-validating, stream-oriented XML parsing library. +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/expat.pc $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/ +endef + +define Package/libexpat/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libexpat)) diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile new file mode 100644 index 0000000..dce64f9 --- /dev/null +++ b/libs/glib2/Makefile @@ -0,0 +1,111 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=glib2 +PKG_VERSION:=2.50.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz +PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION) +PKG_SOURCE_URL:=@GNOME/glib/2.50 +PKG_MD5SUM:=5eeb2bfaf78a07be59585e8b6e80b1d6 + +PKG_BUILD_PARALLEL:=1 +HOST_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=glib2/host libpthread zlib libintl libffi +HOST_BUILD_DEPENDS:=gettext-full/host libiconv/host libffi/host +PKG_INSTALL:=1 +PKG_USE_MIPS16:=0 + +PKG_FIXUP:=autoreconf + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/glib2 + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr + TITLE:=glib 2.0 + MAINTAINER:=Peter Wagner + URL:=http://www.gtk.org/ +endef + +define Package/glib2/description + The GLib library of C routines +endef + +HOST_CONFIGURE_ARGS += \ + --disable-selinux \ + --with-libiconv=gnu \ + --with-pcre=internal \ + --enable-libmount=no + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --enable-debug=no \ + --disable-selinux \ + --enable-libmount=no \ + --disable-fam \ + --with-libiconv=gnu \ + --with-pcre=internal + +CONFIGURE_VARS += \ + glib_cv_stack_grows=no \ + glib_cv_uscore=no \ + ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOSTPKG)/bin/glib-genmarshal \ + ac_cv_func_mmap_fixed_mapped=yes \ + ac_cv_func_posix_getpwuid_r=yes \ + ac_cv_func_posix_getgrgid_r=yes + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \ + $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \ + $(1)/usr/include/glib-2.0/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \ + $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \ + $(1)/usr/lib/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ + $(1)/usr/lib/pkgconfig + + $(INSTALL_DIR) $(2)/share/aclocal/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \ + $(2)/share/aclocal/ +endef + +define Package/glib2/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,glib2)) diff --git a/libs/glib2/patches/001-automake-compat.patch b/libs/glib2/patches/001-automake-compat.patch new file mode 100644 index 0000000..05c28ca --- /dev/null +++ b/libs/glib2/patches/001-automake-compat.patch @@ -0,0 +1,11 @@ +--- a/gtk-doc.make ++++ b/gtk-doc.make +@@ -282,7 +282,7 @@ uninstall-local: + # + # Require gtk-doc when making dist + # +-if HAVE_GTK_DOC ++if ENABLE_GTK_DOC + dist-check-gtkdoc: docs + else + dist-check-gtkdoc: diff --git a/libs/glib2/patches/002-gdate-Suppress-string-format-literal-warning.patch b/libs/glib2/patches/002-gdate-Suppress-string-format-literal-warning.patch new file mode 100644 index 0000000..01769cb --- /dev/null +++ b/libs/glib2/patches/002-gdate-Suppress-string-format-literal-warning.patch @@ -0,0 +1,24 @@ +From 0817af40e8c74c721c30f6ef482b1f53d12044c7 Mon Sep 17 00:00:00 2001 +From: coypu +Date: Mon, 8 Feb 2016 00:06:06 +0200 +Subject: gdate: Suppress string format literal warning + +Newer versions of GCC emit an error here, but we know it's safe. +https://bugzilla.gnome.org/761550 +--- + glib/gdate.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/glib/gdate.c ++++ b/glib/gdate.c +@@ -2497,7 +2497,10 @@ g_date_strftime (gchar *s, + * recognize whether strftime actually failed or just returned "". + */ + tmpbuf[0] = '\1'; ++ #pragma GCC diagnostic push ++ #pragma GCC diagnostic ignored "-Wformat-nonliteral" + tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm); ++ #pragma GCC diagnostic pop + + if (tmplen == 0 && tmpbuf[0] != '\0') + { diff --git a/libs/gnutls/Config.in b/libs/gnutls/Config.in new file mode 100644 index 0000000..562d678 --- /dev/null +++ b/libs/gnutls/Config.in @@ -0,0 +1,56 @@ +# gnutls avanced configuration + +menu "Configuration" + depends on PACKAGE_libgnutls + +config GNUTLS_DTLS_SRTP + bool "enable DTLS SRTP support" + default y + +config GNUTLS_ALPN + bool "enable ALPN support" + default y + +config GNUTLS_OCSP + bool "enable ocsp support" + default y + +config GNUTLS_CRYPTODEV + bool "enable /dev/crypto support" + default n + +config GNUTLS_HEARTBEAT + bool "enable DTLS heartbeat support" + default y + +config GNUTLS_OPENPGP + bool "enable OPENPGP authentication support" + default n + +config GNUTLS_SRP + bool "enable SRP authentication support" + default n + +config GNUTLS_PSK + bool "enable PSK authentication support" + default y + +config GNUTLS_ANON + bool "enable anonymous authentication support" + default y + +config GNUTLS_TPM + bool "enable tpm support" + select GNUTLS_PKCS11 + default n + +config GNUTLS_PKCS11 + bool "enable smart card (PKCS11) support" + select GNUTLS_EXT_LIBTASN1 + default n + +config GNUTLS_EXT_LIBTASN1 + bool "use external libtasn1" + default n + +endmenu diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile new file mode 100644 index 0000000..b5bbd15 --- /dev/null +++ b/libs/gnutls/Makefile @@ -0,0 +1,248 @@ +# +# Copyright (C) 2005-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnutls +PKG_VERSION:=3.5.16 +PKG_RELEASE:=1 +PKG_USE_MIPS16:=0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5 +PKG_HASH:=0924dec90c37c05f49fec966eba3672dab4d336d879e5c06e06e13325cbfec25 +#PKG_FIXUP:=autoreconf gettext-version +PKG_MAINTAINER:=Nikos Mavrogiannopoulos +PKG_LICENSE:=LGPLv2.1+ + +PKG_INSTALL:=1 +PKG_LIBTOOL_PATHS:=. lib +PKG_CHECK_FORMAT_SECURITY:=0 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_GNUTLS_ALPN \ + CONFIG_GNUTLS_ANON \ + CONFIG_GNUTLS_CRYPTODEV \ + CONFIG_GNUTLS_DTLS_SRTP \ + CONFIG_GNUTLS_EXT_LIBTASN1 \ + CONFIG_GNUTLS_HEARTBEAT \ + CONFIG_GNUTLS_OCSP \ + CONFIG_GNUTLS_OPENPGP \ + CONFIG_GNUTLS_PKCS11 \ + CONFIG_GNUTLS_PSK \ + CONFIG_GNUTLS_SRP \ + CONFIG_GNUTLS_TPM \ + CONFIG_LIBNETTLE_MINI \ + +include $(INCLUDE_DIR)/package.mk + + +define Package/gnutls/Default + SUBMENU:=SSL + SECTION:=libs + CATEGORY:=Libraries + TITLE:=GNU TLS + URL:=http://www.gnutls.org/ +endef + +define Package/gnutls/Default/description + GnuTLS is a secure communications library implementing the SSL, TLS + and DTLS protocols and technologies around them. It provides a simple + C language application programming interface (API) to access the secure + communications protocols as well as APIs to parse and write X.509, PKCS12, + OpenPGP and other required structures. It is aimed to be portable and + efficient with focus on security and interoperability. +endef + + +define Package/certtool +$(call Package/gnutls/Default) + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Encryption + TITLE+= (certool utility) + DEPENDS+= +libgnutls +endef + +define Package/certtool/description +$(call Package/gnutls/Default/description) + This package contains the GnuTLS certtool utility. +endef + + +define Package/gnutls-utils +$(call Package/gnutls/Default) + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Encryption + TITLE+= (utilities) + DEPENDS+= +libgnutls +endef + +define Package/gnutls-utils/description +$(call Package/gnutls/Default/description) + This package contains the GnuTLS gnutls-cli, gnutls-serv, psktool, + and srptool utilities. +endef + +define Package/libgnutls/config + source "$(SOURCE)/Config.in" +endef + +define Package/libgnutls +$(call Package/gnutls/Default) + TITLE+= (library) + DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev +endef + +define Package/libgnutls/description +$(call Package/gnutls/Default/description) + This package contains the GnuTLS shared library, needed by other programs. +endef + + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --disable-libdane \ + --with-included-unistring \ + --disable-guile \ + --disable-nls \ + --without-idn \ + --without-zlib \ + --enable-local-libopts \ + --disable-doc \ + --disable-tests \ + --with-default-trust-store-dir=/etc/ssl/certs/ \ + --disable-crywrap \ + --with-librt-prefix="$(LIBRT_ROOT_DIR)/" + +ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y) +CONFIGURE_ARGS += --with-included-libtasn1 +endif + +ifneq ($(CONFIG_GNUTLS_PKCS11),y) +CONFIGURE_ARGS += --without-p11-kit +endif + +ifeq ($(CONFIG_LIBNETTLE_MINI),y) +CONFIGURE_ARGS += --with-nettle-mini +endif + +ifneq ($(CONFIG_GNUTLS_DTLS_SRTP),y) +CONFIGURE_ARGS += --disable-dtls-srtp-support +endif + +ifneq ($(CONFIG_GNUTLS_ALPN),y) +CONFIGURE_ARGS += --disable-alpn-support +endif + +ifneq ($(CONFIG_GNUTLS_HEARTBEAT),y) +CONFIGURE_ARGS += --disable-heartbeat-support +endif + +ifneq ($(CONFIG_GNUTLS_SRP),y) +CONFIGURE_ARGS += --disable-srp-authentication +endif + +ifneq ($(CONFIG_GNUTLS_PSK),y) +CONFIGURE_ARGS += --disable-psk-authentication +endif + +ifneq ($(CONFIG_GNUTLS_OPENPGP),y) +CONFIGURE_ARGS += --disable-openpgp-authentication +endif + +ifneq ($(CONFIG_GNUTLS_ANON),y) +CONFIGURE_ARGS += --disable-anon-authentication +endif + +ifneq ($(CONFIG_GNUTLS_OCSP),y) +CONFIGURE_ARGS += --disable-ocsp +endif + +ifneq ($(CONFIG_GNUTLS_TPM),y) +CONFIGURE_ARGS += --without-tpm +endif + +ifeq ($(CONFIG_GNUTLS_CRYPTODEV),y) +CONFIGURE_ARGS += --enable-cryptodev +endif + +TARGET_CFLAGS += $(FPIC) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so* \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/gnutls \ + $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls.pc \ + $(1)/usr/lib/pkgconfig/ +endef + + +define Package/certtool/conffiles +/etc/gnutls/certtool.cfg +endef + +define Package/certtool/install + $(INSTALL_DIR) $(1)/etc/gnutls + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/ + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/ +endef + + +define Package/gnutls-utils/install + $(INSTALL_DIR) $(1)/usr/bin +ifeq ($(CONFIG_GNUTLS_OCSP),y) +ifeq ($(CONFIG_GNUTLS_ANON),y) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \ + $(1)/usr/bin/ +endif + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/ocsptool \ + $(1)/usr/bin/ +endif +ifeq ($(CONFIG_GNUTLS_SRP),y) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/srptool \ + $(1)/usr/bin/ +endif +ifeq ($(CONFIG_GNUTLS_PSK),y) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/psktool \ + $(1)/usr/bin/ +endif +ifeq ($(CONFIG_GNUTLS_PKCS11),y) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/p11tool \ + $(1)/usr/bin/ +endif +ifeq ($(CONFIG_GNUTLS_TPM),y) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/tpmtool \ + $(1)/usr/bin/ +endif +endef + + +define Package/libgnutls/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/ +endef + + +$(eval $(call BuildPackage,certtool)) +$(eval $(call BuildPackage,gnutls-utils)) +$(eval $(call BuildPackage,libgnutls)) diff --git a/libs/libgcrypt/Makefile b/libs/libgcrypt/Makefile new file mode 100644 index 0000000..46a9546 --- /dev/null +++ b/libs/libgcrypt/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2005-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libgcrypt +PKG_VERSION:=1.6.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgcrypt +PKG_MD5SUM:=944cf6595021d0c33478148a315b335b + +PKG_FIXUP:=patch-libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libgcrypt + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libgpg-error + TITLE:=GNU crypto library + URL:=http://directory.fsf.org/security/libgcrypt.html + MAINTAINER:=W. Michael Petullo +endef + +define Package/libgcrypt/description + This is a general purpose cryptographic library based on the code from + GnuPG. It provides functions for all cryptograhic building blocks: + symmetric ciphers (AES, DES, Arcfour, CAST5), hash algorithms (MD5, SHA-1, + RIPE-MD160, SHA-224/256, SHA-384/512), MACs (HMAC for all hash + algorithms), public key algorithms (RSA, DSA), large integer functions, + random numbers and a lot of supporting functions. Some algorithms have + been disabled to reduce size (Blowfish, Twofish, Serpent, + RC2, SEED, Camellia, CRC, MD4, TIGER-192, Whirlpool, ElGamal, ECC). +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-asm \ + --with-gpg-error-prefix="$(STAGING_DIR)/usr" + +TARGET_CFLAGS += $(FPIC) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{la,a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(1)/usr/share/aclocal/ + $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/libgcrypt-config + $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/libgcrypt-config + ln -sf $(STAGING_DIR)/usr/bin/libgcrypt-config $(2)/bin/ +endef + +define Package/libgcrypt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libgcrypt)) diff --git a/libs/libgcrypt/patches/001-no_docs_tests.patch b/libs/libgcrypt/patches/001-no_docs_tests.patch new file mode 100644 index 0000000..b5aeacc --- /dev/null +++ b/libs/libgcrypt/patches/001-no_docs_tests.patch @@ -0,0 +1,28 @@ +diff -u --recursive libgcrypt-1.6.1-vanilla/Makefile.am libgcrypt-1.6.1/Makefile.am +--- libgcrypt-1.6.1-vanilla/Makefile.am 2014-07-18 00:31:21.020329371 -0400 ++++ libgcrypt-1.6.1/Makefile.am 2014-07-18 00:31:49.076314616 -0400 +@@ -25,8 +25,8 @@ + # (A suitable gitlog-to-changelog script can be found in GnuPG master.) + GITLOG_TO_CHANGELOG=gitlog-to-changelog + +-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests +-SUBDIRS = compat mpi cipher random src doc tests ++DIST_SUBDIRS = m4 compat mpi cipher random src ++SUBDIRS = compat mpi cipher random src + + EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ + ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ +diff -u --recursive libgcrypt-1.6.1-vanilla/Makefile.in libgcrypt-1.6.1/Makefile.in +--- libgcrypt-1.6.1-vanilla/Makefile.in 2014-07-18 00:31:21.020329371 -0400 ++++ libgcrypt-1.6.1/Makefile.in 2014-07-18 00:31:54.974311498 -0400 +@@ -331,8 +331,8 @@ + + # (A suitable gitlog-to-changelog script can be found in GnuPG master.) + GITLOG_TO_CHANGELOG = gitlog-to-changelog +-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests +-SUBDIRS = compat mpi cipher random src doc tests ++DIST_SUBDIRS = m4 compat mpi cipher random src ++SUBDIRS = compat mpi cipher random src + EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ + ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ + m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \ diff --git a/libs/libgd/Makefile b/libs/libgd/Makefile new file mode 100644 index 0000000..3749982 --- /dev/null +++ b/libs/libgd/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libgd +PKG_VERSION:=2.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=gd-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/libgd/libgd/archive +PKG_MD5SUM:=e91a1a99903e460e7ba00a794e72cc1e +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=MIT + +PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/libgd-gd-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libgd + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libjpeg +libpng + TITLE:=The GD graphics library + URL:=http://www.libgd.org/ +endef + +define Package/libgd/description + GD is an open source code library for the dynamic creation of images by + programmers. GD creates PNG, JPEG and GIF images, among other formats. +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --without-x \ + --without-fontconfig \ + --without-freetype \ + --with-jpeg=$(STAGING_DIR)/usr \ + --with-png=$(STAGING_DIR)/usr \ + --with-vpx=no \ + --without-xpm \ + --without-iconv + +CONFIGURE_VARS += \ + LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \ + ac_cv_header_iconv_h=no + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/ + $(SED) \ + 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ + $(1)/usr/bin/gdlib-config + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(2)/bin + $(LN) ../../usr/bin/gdlib-config $(2)/bin/ +endef + +define Package/libgd/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libgd)) diff --git a/libs/libgd/patches/101-gdlib-config.patch b/libs/libgd/patches/101-gdlib-config.patch new file mode 100644 index 0000000..e51502c --- /dev/null +++ b/libs/libgd/patches/101-gdlib-config.patch @@ -0,0 +1,20 @@ +--- a/config/gdlib-config.in ++++ b/config/gdlib-config.in +@@ -71,7 +71,7 @@ while test $# -gt 0; do + echo @LDFLAGS@ + ;; + --libs) +- echo -lgd @LIBS@ @LIBICONV@ ++ echo -lgd @LIBS@ + ;; + --cflags|--includes) + echo -I@includedir@ +@@ -84,7 +84,7 @@ while test $# -gt 0; do + echo "includedir: $includedir" + echo "cflags: -I@includedir@" + echo "ldflags: @LDFLAGS@" +- echo "libs: @LIBS@ @LIBICONV@" ++ echo "libs: @LIBS@" + echo "libdir: $libdir" + echo "features: @FEATURES@" + ;; diff --git a/libs/libgd/patches/200-uclibc-ceill.patch b/libs/libgd/patches/200-uclibc-ceill.patch new file mode 100644 index 0000000..8d2aa12 --- /dev/null +++ b/libs/libgd/patches/200-uclibc-ceill.patch @@ -0,0 +1,24 @@ +--- a/src/gd_bmp.c ++++ b/src/gd_bmp.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include "gd.h" + #include "gdhelpers.h" + #include "bmp.h" +@@ -42,6 +43,13 @@ static int bmp_read_rle(gdImagePtr im, g + + #define BMP_DEBUG(s) + ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__) ++long double ceill(long double x) ++{ ++ return (long double)ceil((double)x); ++} ++#endif ++ + static int gdBMPPutWord(gdIOCtx *out, int w) + { + /* Byte order is little-endian */ diff --git a/libs/libjpeg/Makefile b/libs/libjpeg/Makefile new file mode 100644 index 0000000..c88bca0 --- /dev/null +++ b/libs/libjpeg/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jpeg +PKG_VERSION:=9a +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.ijg.org/files +PKG_MD5SUM:=3353992aecaee1805ef4109aadd433e7 + +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=IJG +PKG_LICENSE_FILES:=README + +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=libltdl + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/jpeg/Default + TITLE:=The Independent JPEG Group's JPEG + URL:=http://www.ijg.org/ +endef + +define Package/libjpeg + $(call Package/jpeg/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= runtime library +endef + +define Package/jpeg-tools + $(call Package/jpeg/Default) + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Image Manipulation + DEPENDS:=+libjpeg + TITLE+= manipulation tools +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +HOST_CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + LIBTOOL="./libtool --tag=CC" \ + prefix="$(PKG_INSTALL_DIR)/usr" \ + exec_prefix="$(PKG_INSTALL_DIR)/usr" \ + all + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/ +endef + +define Package/libjpeg/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/ +endef + +define Package/jpeg-tools/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libjpeg)) +$(eval $(call BuildPackage,jpeg-tools)) diff --git a/libs/libnetfilter-acct/Makefile b/libs/libnetfilter-acct/Makefile new file mode 100644 index 0000000..8926607 --- /dev/null +++ b/libs/libnetfilter-acct/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2009-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnetfilter_acct +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://www.netfilter.org/projects/libnetfilter_acct/files/ \ + ftp://ftp.netfilter.org/pub/libnetfilter_acct/ \ + http://mirrors.evolva.ro/netfilter.org/libnetfilter_acct/ +PKG_MD5SUM:=2118d9514c079839ebd9cb3144ad2ad7 + +PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libnetfilter-acct + SECTION:=libs + CATEGORY:=Libraries + TITLE:=API to extended accounting infrastructure + URL:=http://www.netfilter.org/projects/libnetfilter_acct/ + DEPENDS:=+libmnl +endef + +define Package/libnetfilter-acct/description + libnetfilter_acct is a userspace library providing a programming interface + (API) to the extended accounting infrastructure. +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared \ + + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/libnetfilter_acct \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_acct*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetfilter_acct.pc \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libnetfilter-acct/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_acct.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libnetfilter-acct)) diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile new file mode 100644 index 0000000..a4eda8e --- /dev/null +++ b/libs/libpng/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libpng +PKG_VERSION:=1.2.57 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@SF/libpng +PKG_MD5SUM:=307052e5e8af97b82b17b64fb1b3677a +PKG_MAINTAINER:=Jo-Philipp Wich + +PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause +PKC_LICENSE_FILES:=LICENSE contrib/gregbook/COPYING contrib/gregbook/LICENSE + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/libpng + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+zlib + TITLE:=A PNG format files handling library + URL:=http://www.libpng.org/pub/png/libpng.html +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(1)/usr/bin/ + $(SED) \ + 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ + $(1)/usr/bin/libpng{,12}-config + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng12 $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,la,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(2)/bin + for f in libpng{,12}-config; do \ + $(LN) ../../usr/bin/$$$$f $(2)/bin/ ; \ + done +endef + +define Package/libpng/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libpng)) diff --git a/libs/libpng/patches/100-config_fix.patch b/libs/libpng/patches/100-config_fix.patch new file mode 100644 index 0000000..3cb6d8a --- /dev/null +++ b/libs/libpng/patches/100-config_fix.patch @@ -0,0 +1,10 @@ +--- a/scripts/libpng-config-body.in ++++ b/scripts/libpng-config-body.in +@@ -83,6 +83,7 @@ while test $# -gt 0; do + + --static) + R_opts="" ++ libs=${all_libs} + ;; + + *) diff --git a/libs/libssh2/Makefile b/libs/libssh2/Makefile new file mode 100644 index 0000000..f591953 --- /dev/null +++ b/libs/libssh2/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2015-2018 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libssh2 +PKG_VERSION:=1.7.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://www.libssh2.org/download +PKG_MD5SUM:=b01662a210e94cccf2f76094db7dac5c + +PKG_INSTALL:=1 + +PKG_LICENSE:=BSD +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +define Package/libssh2 + SECTION:=libs + CATEGORY:=Libraries + TITLE:=SSH2 library + URL:=https://www.libssh2.org/ + DEPENDS:=+libopenssl +zlib + MAINTAINER:=Jiri Slachta +endef + +define Package/libssh2/description + libssh2 is a client-side C library implementing the SSH2 protocol. +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --disable-examples-build \ + --with-libssl-prefix=$(STAGING_DIR)/usr \ + --with-libz-prefix=$(STAGING_DIR)/usr + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libssh2.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libssh2/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libssh2)) diff --git a/libs/libxml2/Makefile b/libs/libxml2/Makefile new file mode 100644 index 0000000..155640c --- /dev/null +++ b/libs/libxml2/Makefile @@ -0,0 +1,139 @@ +# +# Copyright (C) 2006-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libxml2 +PKG_VERSION:=2.9.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://gd.tuwien.ac.at/languages/libxml/ \ + http://xmlsoft.org/sources/ \ + ftp://fr.rpmfind.net/pub/libxml/ +PKG_MD5SUM:=ae249165c173b1ff386ee8ad676815f5 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_MAINTAINER:=Michael Heimpold + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/libxml2 + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Gnome XML library + URL:=http://xmlsoft.org/ + DEPENDS:=+libpthread +zlib +endef + +define Package/libxml2/description + A library for manipulating XML and HTML resources. +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --with-c14n \ + --without-catalog \ + --with-debug \ + --without-docbook \ + --with-html \ + --without-ftp \ + --without-http \ + --without-iconv \ + --without-iso8859x \ + --without-legacy \ + --with-output \ + --without-pattern \ + --without-push \ + --without-python \ + --with-reader \ + --without-readline \ + --without-regexps \ + --with-sax1 \ + --with-schemas \ + --with-threads \ + --with-tree \ + --with-valid \ + --with-writer \ + --with-xinclude \ + --with-xpath \ + --with-xptr \ + --with-zlib=$(STAGING_DIR)/usr \ + --without-lzma + +HOST_CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --with-c14n \ + --without-catalog \ + --with-debug \ + --without-docbook \ + --with-html \ + --without-ftp \ + --without-http \ + --without-iconv \ + --without-iso8859x \ + --without-legacy \ + --with-output \ + --without-pattern \ + --without-push \ + --without-python \ + --with-reader \ + --without-readline \ + --without-regexps \ + --with-sax1 \ + --with-schemas \ + --with-threads \ + --with-tree \ + --with-valid \ + --with-writer \ + --with-xinclude \ + --with-xpath \ + --with-xptr \ + --with-zlib \ + --without-lzma + +define Build/InstallDev + $(INSTALL_DIR) $(2)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/ + $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config + + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(2)/share/aclocal/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal +endef + +define Package/libxml2/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/ +endef + +define Host/Install + $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config + $(call Host/Install/Default) +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libxml2)) diff --git a/libs/openldap/Makefile b/libs/openldap/Makefile new file mode 100644 index 0000000..d9e1e92 --- /dev/null +++ b/libs/openldap/Makefile @@ -0,0 +1,151 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openldap +PKG_VERSION:=2.4.45 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \ + ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \ + ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \ + ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/ +PKG_MD5SUM:=00ff8301277cdfd0af728a6927042a13 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/openldap/Default + TITLE:=LDAP implementation + URL:=http://www.openldap.org/ + MAINTAINER:=W. Michael Petullo +endef + +define Package/openldap/Default/description + OpenLDAP Software is an open source implementation of the + Lightweight Directory Access Protocol (LDAP). +endef + +define Package/libopenldap + $(call Package/openldap/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libsasl2 +libpthread + TITLE+= (libraries) +endef + +define Package/libopenldap/description + $(call Package/openldap/Default/description) + This package contains the shared LDAP client libraries, needed by other programs. +endef + +define Package/libopenldap/conffiles +/etc/openldap/ldap.conf +endef + +define Package/openldap-utils + $(call Package/openldap/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libopenldap + TITLE+= (utilities) +endef + +define Package/openldap-utils/description + $(call Package/openldap/Default/description) + This package contains client programs required to access LDAP servers. +endef + +define Package/openldap-server + $(call Package/openldap/Default) + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenldap +libuuid + TITLE+= (server) +endef + +define Package/openldap-server/description + $(call Package/openldap/Default/description) + This package contains server programs required to provide LDAP services. +endef + +define Package/openldap-server/conffiles +/etc/openldap/slapd.conf +endef + +TARGET_CFLAGS += $(FPIC) -lpthread + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-debug \ + --enable-dynamic \ + --enable-syslog \ + --disable-local \ + --disable-slurpd \ + --with-cyrus-sasl \ + --without-fetch \ + --with-threads \ + --with-tls \ + --with-yielding_select="yes" \ + --without-threads \ + --enable-null \ + --disable-bdb \ + --disable-hdb \ + --disable-monitor \ + --disable-relay + +CONFIGURE_VARS += \ + ol_cv_lib_icu="no" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + HOSTCC="$(HOSTCC)" \ + depend all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/ +endef + +define Package/libopenldap/install + $(INSTALL_DIR) $(1)/etc/openldap + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/ +endef + +define Package/openldap-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/ +endef + +define Package/openldap-server/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap + $(INSTALL_DIR) $(1)/etc/openldap/schema + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/ + $(INSTALL_DIR) $(1)/usr/sbin + # XXX: OpenLDAP installs slapd into libexecdir, not sbindir: + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/ + # XXX: switch default backend to ldif, since bdb is disabled + $(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \ + -e 's|^\(index\)|#\1|g' \ + $(1)/etc/openldap/slapd.conf +endef + +$(eval $(call BuildPackage,libopenldap)) +$(eval $(call BuildPackage,openldap-utils)) +$(eval $(call BuildPackage,openldap-server)) diff --git a/libs/openldap/files/ldap.init b/libs/openldap/files/ldap.init new file mode 100644 index 0000000..2209e76 --- /dev/null +++ b/libs/openldap/files/ldap.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009-2011 OpenWrt.org + +START=60 + +SERVICE_USE_PID=1 + +start() { + mkdir -m 0755 -p /var/openldap-data + service_start /usr/sbin/slapd -h "ldap://localhost/ ldaps:///" +} + +stop() { + service_stop /usr/sbin/slapd +} + +reload() { + service_reload /usr/sbin/slapd +} diff --git a/libs/openldap/patches/001-automake-compat.patch b/libs/openldap/patches/001-automake-compat.patch new file mode 100644 index 0000000..71cdebe --- /dev/null +++ b/libs/openldap/patches/001-automake-compat.patch @@ -0,0 +1,323 @@ +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1 @@ ++SUBDIRS = include libraries clients servers tests doc +--- a/libraries/Makefile.in ++++ b/libraries/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SUBDIRS= \ + liblutil \ + liblber \ +--- a/libraries/liblber/Makefile.in ++++ b/libraries/liblber/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = liblber.la + + NT_SRCS = nt_err.c +--- a/libraries/libldap/Makefile.in ++++ b/libraries/libldap/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = libldap.la + + PROGRAMS = apitest dntest ftest ltest urltest +--- a/libraries/libldap_r/Makefile.in ++++ b/libraries/libldap_r/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = libldap_r.la + + PROGRAMS = apitest ltest +--- a/libraries/liblunicode/Makefile.in ++++ b/libraries/liblunicode/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = liblunicode.a + + XXDIR = $(srcdir)/ucdata/ +--- a/libraries/liblutil/Makefile.in ++++ b/libraries/liblutil/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = liblutil.a + PROGRAM = testavl + +--- a/libraries/librewrite/Makefile.in ++++ b/libraries/librewrite/Makefile.in +@@ -16,6 +16,8 @@ + ## Copyright 2000-2001 Pierangelo Masarati + ## + ++SHELL = @SHELL@ ++ + SRCS = config.c context.c info.c ldapmap.c map.c params.c rule.c \ + session.c subst.c var.c xmap.c \ + parse.c rewrite.c +--- a/clients/tools/Makefile.in ++++ b/clients/tools/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c \ + ldappasswd.c ldapwhoami.c ldapcompare.c \ + ldapexop.c ldapurl.c common.c +--- a/servers/slapd/Makefile.in ++++ b/servers/slapd/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema + PROGRAMS=slapd $(SLAPTOOLS) + XPROGRAMS=sslapd libbackends.a .backend liboverlays.a +--- a/servers/slapd/overlays/Makefile.in ++++ b/servers/slapd/overlays/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = overlays.c \ + accesslog.c \ + auditlog.c \ +--- a/tests/progs/Makefile.in ++++ b/tests/progs/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel slapd-modrdn \ + slapd-modify slapd-bind slapd-mtread ldif-filter + +--- a/servers/slapd/back-bdb/Makefile.in ++++ b/servers/slapd/back-bdb/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c tools.c config.c \ + add.c bind.c compare.c delete.c modify.c modrdn.c search.c \ + extended.c referral.c operational.c \ +--- a/servers/slapd/back-dnssrv/Makefile.in ++++ b/servers/slapd/back-dnssrv/Makefile.in +@@ -18,6 +18,8 @@ + # The DNSSRV backend was written by Kurt D. Zeilenga. + # + ++SHELL = @SHELL@ ++ + SRCS = init.c bind.c search.c config.c referral.c + OBJS = init.lo bind.lo search.lo config.lo referral.lo + +--- a/servers/slapd/back-hdb/Makefile.in ++++ b/servers/slapd/back-hdb/Makefile.in +@@ -15,6 +15,8 @@ + # + ## Copyright 2003 Howard Chu @ Symas Corp. See master COPYRIGHT file for terms. + ++SHELL = @SHELL@ ++ + XXDIR = $(srcdir)/../back-bdb + + XXSRCS = init.c tools.c config.c \ +--- a/servers/slapd/back-ldap/Makefile.in ++++ b/servers/slapd/back-ldap/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c config.c search.c bind.c unbind.c add.c compare.c \ + delete.c modify.c modrdn.c extended.c chain.c \ + distproc.c monitor.c pbind.c +--- a/servers/slapd/back-ldif/Makefile.in ++++ b/servers/slapd/back-ldif/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = ldif.c + OBJS = ldif.lo + +--- a/servers/slapd/back-mdb/Makefile.in ++++ b/servers/slapd/back-mdb/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c tools.c config.c \ + add.c bind.c compare.c delete.c modify.c modrdn.c search.c \ + extended.c operational.c \ +--- a/servers/slapd/back-meta/Makefile.in ++++ b/servers/slapd/back-meta/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c config.c search.c bind.c unbind.c add.c compare.c \ + delete.c modify.c modrdn.c suffixmassage.c map.c \ + conn.c candidates.c dncache.c +--- a/servers/slapd/back-monitor/Makefile.in ++++ b/servers/slapd/back-monitor/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c search.c compare.c modify.c bind.c \ + operational.c \ + cache.c entry.c \ +--- a/servers/slapd/back-ndb/Makefile.in ++++ b/servers/slapd/back-ndb/Makefile.in +@@ -17,6 +17,8 @@ + ## This work was initially developed by Howard Chu for inclusion + ## in OpenLDAP Software. This work was sponsored by MySQL. + ++SHELL = @SHELL@ ++ + SRCS = init.cpp tools.cpp config.cpp ndbio.cpp \ + add.cpp bind.cpp compare.cpp delete.cpp modify.cpp modrdn.cpp search.cpp + +--- a/servers/slapd/back-null/Makefile.in ++++ b/servers/slapd/back-null/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = null.c + OBJS = null.lo + +--- a/servers/slapd/back-passwd/Makefile.in ++++ b/servers/slapd/back-passwd/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = search.c config.c init.c + OBJS = search.lo config.lo init.lo + +--- a/servers/slapd/back-perl/Makefile.in ++++ b/servers/slapd/back-perl/Makefile.in +@@ -14,6 +14,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c search.c close.c config.c bind.c compare.c \ + modify.c add.c modrdn.c delete.c + OBJS = init.lo search.lo close.lo config.lo bind.lo compare.lo \ +--- a/servers/slapd/back-relay/Makefile.in ++++ b/servers/slapd/back-relay/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c op.c + OBJS = init.lo op.lo + +--- a/servers/slapd/back-shell/Makefile.in ++++ b/servers/slapd/back-shell/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c \ + delete.c modify.c modrdn.c compare.c result.c + OBJS = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \ +--- a/servers/slapd/back-sock/Makefile.in ++++ b/servers/slapd/back-sock/Makefile.in +@@ -17,6 +17,8 @@ + ## This work was initially developed by Brian Candler for inclusion + ## in OpenLDAP Software. + ++SHELL = @SHELL@ ++ + SRCS = init.c config.c opensock.c search.c bind.c unbind.c add.c \ + delete.c modify.c modrdn.c compare.c result.c + OBJS = init.lo config.lo opensock.lo search.lo bind.lo unbind.lo add.lo \ +--- a/servers/slapd/back-sql/Makefile.in ++++ b/servers/slapd/back-sql/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + SRCS = init.c config.c search.c bind.c compare.c operational.c \ + entry-id.c schema-map.c sql-wrap.c modify.c util.c \ + add.c delete.c modrdn.c api.c +--- a/servers/slapd/shell-backends/Makefile.in ++++ b/servers/slapd/shell-backends/Makefile.in +@@ -13,6 +13,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + PROGRAMS = passwd-shell + + SRCS = passwd-shell.c shellutil.c +--- a/servers/slapd/slapi/Makefile.in ++++ b/servers/slapd/slapi/Makefile.in +@@ -14,6 +14,8 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + ++SHELL = @SHELL@ ++ + LIBRARY = libslapi.la + + #all-common: $(LIBRARY) $(PROGRAMS) diff --git a/libs/openldap/patches/002-no-doc-and-tests-subdir.patch b/libs/openldap/patches/002-no-doc-and-tests-subdir.patch new file mode 100644 index 0000000..5d8c93e --- /dev/null +++ b/libs/openldap/patches/002-no-doc-and-tests-subdir.patch @@ -0,0 +1,5 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -1 +1 @@ +-SUBDIRS = include libraries clients servers tests doc ++SUBDIRS = include libraries clients servers diff --git a/libs/openldap/patches/020-autofs-schema.patch b/libs/openldap/patches/020-autofs-schema.patch new file mode 100644 index 0000000..11c73f5 --- /dev/null +++ b/libs/openldap/patches/020-autofs-schema.patch @@ -0,0 +1,26 @@ +--- /dev/null ++++ b/servers/slapd/schema/autofs.schema +@@ -0,0 +1,23 @@ ++attributetype ( 1.3.6.1.1.1.1.31 NAME 'automountMapName' ++ DESC 'Automount map name' ++ EQUALITY caseExactMatch ++ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) ++ ++attributetype ( 1.3.6.1.1.1.1.32 NAME 'automountKey' ++ DESC 'Automount key value' ++ EQUALITY caseExactMatch ++ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) ++ ++attributetype ( 1.3.6.1.1.1.1.33 NAME 'automountInformation' ++ DESC 'Automount information' ++ EQUALITY caseExactMatch ++ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) ++ ++objectclass ( 1.3.6.1.1.1.2.16 NAME 'automountMap' SUP top STRUCTURAL ++ MUST ( automountMapName ) ++ MAY ( description ) ) ++ ++objectclass ( 1.3.6.1.1.1.2.17 NAME 'automount' SUP top STRUCTURAL ++ DESC 'Automount' ++ MUST ( automountKey $ automountInformation ) ++ MAY description ) diff --git a/libs/openldap/patches/750-no-strip.patch b/libs/openldap/patches/750-no-strip.patch new file mode 100644 index 0000000..a70aacc --- /dev/null +++ b/libs/openldap/patches/750-no-strip.patch @@ -0,0 +1,22 @@ +--- a/clients/tools/Makefile.in ++++ b/clients/tools/Makefile.in +@@ -122,7 +122,7 @@ install-local: FORCE + -$(MKDIR) $(DESTDIR)$(bindir) + @( \ + for prg in $(PROGRAMS); do \ +- $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT) \ ++ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT) \ + $(DESTDIR)$(bindir); \ + done \ + ) +--- a/servers/slapd/Makefile.in ++++ b/servers/slapd/Makefile.in +@@ -380,7 +380,7 @@ install-local-srv: install-slapd install + install-slapd: FORCE + -$(MKDIR) $(DESTDIR)$(libexecdir) + -$(MKDIR) $(DESTDIR)$(localstatedir)/run +- $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \ ++ $(LTINSTALL) $(INSTALLFLAGS) -m 755 \ + slapd$(EXEEXT) $(DESTDIR)$(libexecdir) + @for i in $(SUBDIRS); do \ + if test -d $$i && test -f $$i/Makefile ; then \ diff --git a/libs/pcre/Makefile b/libs/pcre/Makefile new file mode 100644 index 0000000..3171d2f --- /dev/null +++ b/libs/pcre/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pcre +PKG_VERSION:=8.41 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ +PKG_MD5SUM:=c160d22723b1670447341b08c58981c1 +PKG_MAINTAINER:=Thomas Heil + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENCE + +PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libpcre/default + SECTION:=libs + CATEGORY:=Libraries + URL:=http://www.pcre.org/ +endef + +define Package/libpcre + $(call Package/libpcre/default) + TITLE:=A Perl Compatible Regular Expression library +endef + +define Package/libpcre16 + $(call Package/libpcre/default) + TITLE:=A Perl Compatible Regular Expression library (16bit support) +endef + +define Package/libpcrecpp + $(call Package/libpcre/default) + TITLE:=C++ wrapper for Perl Compatible Regular Expression library + DEPENDS:=+libpcre +libstdcpp +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-utf8 \ + --enable-unicode-properties \ + --enable-pcre16 \ + --with-match-limit-recursion=16000 \ + +ifneq ($(CONFIG_PACKAGE_libpcrecpp),) + CONFIGURE_ARGS+= --enable-cpp +else + CONFIGURE_ARGS+= --disable-cpp +endif + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/ + + $(INSTALL_DIR) $(2)/bin + $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin + + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libpcre/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/ +endef + +define Package/libpcre16/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/ +endef + +define Package/libpcrecpp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libpcre)) +$(eval $(call BuildPackage,libpcre16)) +$(eval $(call BuildPackage,libpcrecpp)) diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile new file mode 100644 index 0000000..5cdd1e5 --- /dev/null +++ b/libs/sqlite3/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2006-2018 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sqlite +PKG_VERSION:=3190300 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz +PKG_HASH:=06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301 +PKG_SOURCE_URL:=http://www.sqlite.org/2017/ + +PKG_LICENSE:=PUBLICDOMAIN +PKG_LICENSE_FILES:= + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=libncurses libreadline + +PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sqlite3/Default + SUBMENU:=database + TITLE:=SQLite (v3.x) database engine + URL:=http://www.sqlite.org/ + MAINTAINER:=Etienne CHAMPETIER +endef + +define Package/sqlite3/Default/description + SQLite is a small C library that implements a self-contained, embeddable, + zero-configuration SQL database engine. +endef + +define Package/libsqlite3 + $(call Package/sqlite3/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libpthread + TITLE+= (library) +endef + +define Package/libsqlite3/description +$(call Package/sqlite3/Default/description) + This package contains the SQLite (v3.x) shared library, used by other + programs. +endef + +define Package/sqlite3-cli + $(call Package/sqlite3/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libsqlite3 +libncurses +libreadline + TITLE+= (cli) +endef + +define Package/sqlite3-cli/description +$(call Package/sqlite3/Default/description) + This package contains a terminal-based front-end to the SQLite (v3.x) library + that can evaluate queries interactively and display the results in multiple + formats. +endef + +# On uClibc libm needs to be linked in for ISNAN() +TARGET_LDFLAGS += $(if $(CONFIG_USE_UCLIBC),-lm) + +TARGET_CFLAGS += $(FPIC) \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ + -DHAVE_ISNAN=1 \ + -DHAVE_MALLOC_USABLE_SIZE=1 + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-editline + +CONFIGURE_VARS += \ + config_BUILD_CC="$(HOSTCC)" \ + config_BUILD_CFLAGS="-O2" \ + config_TARGET_CC="$(TARGET_CC)" \ + config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \ + config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libsqlite3/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/ +endef + +define Package/sqlite3-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libsqlite3)) +$(eval $(call BuildPackage,sqlite3-cli)) diff --git a/net/iotivity/Makefile b/net/iotivity/Makefile deleted file mode 100644 index e1491f7..0000000 --- a/net/iotivity/Makefile +++ /dev/null @@ -1,311 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iotivity -PKG_VERSION:=1.2.1 -PKG_RELEASE=1 - -PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz -PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/ -PKG_MD5SUM:=7dcd9f0f48263c6b27a2c3d085dd7278b5c0feed1dfec8872a04899707fa23d8 -PKG_USE_MIPS16:=0 - -PKG_BUILD_DEPENDS:=boost - -PKG_MAINTAINER:=Hauke Mehrtens - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.md - -PKG_CONFIG_DEPENDS := \ - CONFIG_PACKAGE_iotivity \ - CONFIG_PACKAGE_iotivity-cpp \ - CONFIG_PACKAGE_iotivity-resource-directory-lib \ - CONFIG_PACKAGE_iotivity-oic-middle \ - CONFIG_PACKAGE_iotivity-resource-container-lib \ - CONFIG_PACKAGE_iotivity-resource-container-sample \ - CONFIG_PACKAGE_iotivity-resource-container-hue \ - CONFIG_PACKAGE_iotivity-example-garage \ - CONFIG_PACKAGE_iotivity-example-simple \ - CONFIG_PACKAGE_iotivity_DEBUG \ - CONFIG_PACKAGE_iotivity_SECURE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/scons.mk - - -define Package/iotivity - SECTION:=net - CATEGORY:=Network - DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid +libsqlite3 +PACKAGE_iotivity_SECURE:libmbedtls - TITLE:=IoTivity C Library - URL:=https://www.iotivity.org - MENU:=1 -endef - -define Package/iotivity/description - IoTivity is a framework for the Internet of Things based on the - Open Interconnect Consortium Specification. -endef - -define Package/iotivity/config - if PACKAGE_iotivity - config PACKAGE_iotivity_DEBUG - bool "IoTivity with debug support" - help - Build IoTivity with debuging support. - - config PACKAGE_iotivity_SECURE - bool "IoTivity with security support" - help - Activate security support. - - config PACKAGE_iotivity_LOGGING - bool "IoTivity with logging support" - default y - help - Activate logging support. - This will make IoTivity write a lot of log messages to stdout. - endif -endef - - -define Package/iotivity-cpp - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +libpthread +libstdcpp - TITLE:=IoTivity C++ Library - URL:=https://www.iotivity.org -endef - -define Package/iotivity-cpp/description - IoTivity is a framework for the Internet of Things based on the - Open Interconnect Consortium Specification. -endef - -define Package/iotivity-resource-directory-lib - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp - TITLE:=IoTivity Resource Directory library - URL:=https://www.iotivity.org -endef - - -define Package/iotivity-oic-middle - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity OIC Middle - URL:=https://www.iotivity.org -endef - -define Package/iotivity-oic-middle/description - IoTivity OIC Middle -endef - -define Package/iotivity-resource-container-lib - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +boost +boost-system +boost-thread +boost-date_time - TITLE:=IoTivity Resource Container library - URL:=https://www.iotivity.org -endef - -define Package/iotivity-resource-container-sample - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-resource-container-lib - TITLE:=IoTivity Resource Container sample Application - URL:=https://www.iotivity.org -endef - -define Package/iotivity-resource-container-hue - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-resource-container-lib +libcurl - TITLE:=IoTivity Resource Container Hue Bundle - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-garage - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity Garage example - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-garage/description - An IoTivity example application -endef - -define Package/iotivity-example-simple - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity simple client + server - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-simple/description - The IoTivity simple client and simple server exmaple -endef - - -PKG_TINYCBOR_NAME:=tinycbor -PKG_TINYCBOR_PROTO:=git -PKG_TINYCBOR_VERSION:=0.4 -PKG_TINYCBOR_SOURCE_VERSION:=a088996aa5f59b4f27f20fadad053d88bee357d4 -PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2 -PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git -PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME) - -define Download/iotivity-tinycbor - FILE:=$(PKG_TINYCBOR_SOURCE) - URL:=$(PKG_TINYCBOR_SOURCE_URL) - PROTO:=$(PKG_TINYCBOR_PROTO) - VERSION:=$(PKG_TINYCBOR_SOURCE_VERSION) - SUBDIR:=$(PKG_TINYCBOR_SUBDIR) -endef -$(eval $(call Download,iotivity-tinycbor)) - - -EXTRA_CXXFLAGS += -std=gnu++11 - -SCONS_OPTIONS += \ - TARGET_OS=linux \ - TARGET_TRANSPORT=IP \ - TARGET_ARCH=$(ARCH) \ - STAGING_DIR=$(STAGING_DIR) \ - WITH_ENV=true \ - octbstack oc \ - $(if $(CONFIG_PACKAGE_iotivity-oic-middle),examples) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-lib),libResContainer) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-sample),containersample) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-hue),libHueBundle) \ - $(if $(CONFIG_PACKAGE_iotivity-example-garage),examples) \ - $(if $(CONFIG_PACKAGE_iotivity-example-simple),examples) \ - install - -ifeq ($(CONFIG_PACKAGE_iotivity_DEBUG),y) - SCONS_OPTIONS += RELEASE=false - APP_OPTIM:=debug -else - SCONS_OPTIONS += RELEASE=true - APP_OPTIM:=release -endif - -ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y) - SCONS_OPTIONS += SECURED=1 -else - SCONS_OPTIONS += SECURED=0 -endif - -ifeq ($(CONFIG_PACKAGE_iotivity_LOGGING),y) - SCONS_OPTIONS += LOGGING=true -endif - -ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) - SCONS_OPTIONS += VERBOSE=true -endif - -define Build/Prepare - $(call Build/Prepare/Default) - $(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE) -endef - - -define Build/Configure - (cd $(PKG_BUILD_DIR); \ - $(SCONS_VARS) \ - scons \ - $(SCONS_OPTIONS) \ - ) -endef - - -define Package/iotivity/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/ -ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y) - $(INSTALL_DIR) $(1)/etc/iotivity/ - $(INSTALL_DATA) ./files/etc/iotivity/oic_svr_db.cbor $(1)/etc/iotivity/ -endif -endef - -define Package/iotivity-cpp/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/ -endef - -define Package/iotivity-resource-directory-lib/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/ -endef - -define Package/iotivity-oic-middle/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/examples/OICMiddle/OICMiddle $(1)/usr/bin/ -endef - -define Package/iotivity-resource-container-lib/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_common.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_client.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_server.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_container.so $(1)/usr/lib/ -endef - -define Package/iotivity-resource-container-sample/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/service/resource-container/ContainerSample $(1)/usr/bin/ -endef - -define Package/iotivity-resource-container-hue/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libHueBundle.so $(1)/usr/lib/ -endef - -define Package/iotivity-example-garage/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/garageclient $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/garageserver $(1)/usr/bin/ -endef - -define Package/iotivity-example-simple/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleclient $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleserver $(1)/usr/bin/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/include $(1)/usr/include/iotivity - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/ -endef - - -$(eval $(call BuildPackage,iotivity)) -$(eval $(call BuildPackage,iotivity-cpp)) -$(eval $(call BuildPackage,iotivity-resource-directory-lib)) -$(eval $(call BuildPackage,iotivity-oic-middle)) -$(eval $(call BuildPackage,iotivity-resource-container-lib)) -$(eval $(call BuildPackage,iotivity-resource-container-sample)) -$(eval $(call BuildPackage,iotivity-resource-container-hue)) -$(eval $(call BuildPackage,iotivity-example-garage)) -$(eval $(call BuildPackage,iotivity-example-simple)) diff --git a/net/iotivity/files/etc/iotivity/ReadMe.txt b/net/iotivity/files/etc/iotivity/ReadMe.txt deleted file mode 100644 index ae47a5f..0000000 --- a/net/iotivity/files/etc/iotivity/ReadMe.txt +++ /dev/null @@ -1,2 +0,0 @@ -The file oic_svr_db.cbor in generated from the oic_svr_db.json with the -resource/csdk/security/tool/json2cbor.c tool. diff --git a/net/iotivity/files/etc/iotivity/oic_svr_db.cbor b/net/iotivity/files/etc/iotivity/oic_svr_db.cbor deleted file mode 100644 index c8f19f53a32aaf2e10a4fad3452729661bd0c01d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1234 zcmbtTQBuM%5Cw)AFX9(7lo3wg4gAC}O_Qxnn>L*!1^g^}4L{WWcnVJ81-t{_m`$O> zR6A5`rrB(EUv~Fpv!R5F+reEKSjn|{WrTu$dXIJPM?g)Ub4Es7ftI1nX z4KWCgkq+fmdKoJ>S@0CPQB*!-&CxQ|KP?tQ1d?%ka+TpBogq=mjW1^r)t$4@e2y{y9-$D?4U$ zI&));qA^vL+4QX1+#77~x*fBf&E{VvpwvYfpyaH7{LbxVcStWpqlJWGxU<=y^=N&dYMV1VGZmt{Oe=5Z+e(UDlHzO0Uv;Y7A diff --git a/net/iotivity/files/etc/iotivity/oic_svr_db.json b/net/iotivity/files/etc/iotivity/oic_svr_db.json deleted file mode 100644 index 2155071..0000000 --- a/net/iotivity/files/etc/iotivity/oic_svr_db.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "acl": { - "aclist": { - "aces": [ - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/res", - "rel": "", - "rt": ["oic.wk.res"], - "if": ["oic.if.ll"] - }, - { - "href": "/oic/d", - "rel": "", - "rt": ["oic.wk.d"], - "if": ["oic.if.baseline", "oic.if.r"] - }, - { - "href": "/oic/p", - "rel": "", - "rt": ["oic.wk.p"], - "if": ["oic.if.baseline", "oic.if.r"] - }, - { - "href": "/oic/sec/acl", - "rel": "", - "rt": ["oic.r.acl"], - "if": ["oic.if.baseline"] - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rel": "", - "rt": ["oic.r.doxm"], - "if": ["oic.if.baseline"] - }, - { - "href": "/oic/sec/pstat", - "rel": "", - "rt": ["oic.r.pstat"], - "if": ["oic.if.baseline"] - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "*", - "rel": "", - "rt": ["oic.core"], - "if": ["oic.if.baseline"] - } - ], - "permission": 7 - } - ] - }, - "rowneruuid" : "31313131-3131-3131-3131-313131313131" - }, - "pstat": { - "isop": true, - "deviceuuid": "31313131-3131-3131-3131-313131313131", - "rowneruuid": "31313131-3131-3131-3131-313131313131", - "cm": 0, - "tm": 0, - "om": 4, - "sm": 4 - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceuuid": "31313131-3131-3131-3131-313131313131", - "devowneruuid": "32323232-3232-3232-3232-323232323232", - "rowneruuid": "31313131-3131-3131-3131-313131313131" - }, - "cred": { - "creds": [ - { - "credid": 1, - "subjectuuid": "32323232-3232-3232-3232-323232323232", - "credtype": 1, - "privatedata": { - "data": "AAAAAAAAAAAAAAAA", - "encoding": "oic.sec.encoding.raw" - } - } - ], - "rowneruuid": "31313131-3131-3131-3131-313131313131" - } -} diff --git a/net/iotivity/patches/001-no_unit_test.patch b/net/iotivity/patches/001-no_unit_test.patch deleted file mode 100644 index 8a40e73..0000000 --- a/net/iotivity/patches/001-no_unit_test.patch +++ /dev/null @@ -1,141 +0,0 @@ ---- a/plugins/SConscript -+++ b/plugins/SConscript -@@ -35,7 +35,7 @@ if target_os not in ['android', 'arduino - - SConscript(os.path.join('src', 'SConscript')) - -- SConscript(os.path.join('unittests', 'SConscript')) -+# SConscript(os.path.join('unittests', 'SConscript')) - - if build_sample == 'ON': - if target_os in ['linux']: ---- a/resource/SConscript -+++ b/resource/SConscript -@@ -78,7 +78,7 @@ if target_os in ['linux', 'windows']: - SConscript('csdk/stack/samples/linux/secure/SConscript') - - # Build C/C++ unit tests -- SConscript('unit_tests.scons') -+ # SConscript('unit_tests.scons') - - elif target_os == 'darwin': - env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh') ---- a/resource/csdk/resource-directory/SConscript -+++ b/resource/csdk/resource-directory/SConscript -@@ -114,8 +114,3 @@ if 'SERVER' in rd_mode: - if target_os in ['linux']: - SConscript('samples/SConscript') - --###################################################################### --# Build UnitTests of the Resource Directory --################################################ ###################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') ---- a/service/coap-http-proxy/SConscript -+++ b/service/coap-http-proxy/SConscript -@@ -84,6 +84,3 @@ local_env.UserInstallTargetHeader('inclu - ###################################################################### - if target_os in ['linux', 'tizen']: - SConscript('samples/SConscript') -- --if target_os in ['linux']: -- SConscript('unittests/SConscript') ---- a/service/easy-setup/enrollee/SConscript -+++ b/service/easy-setup/enrollee/SConscript -@@ -123,7 +123,3 @@ if target_os == 'arduino': - - if target_os in ['linux']: - SConscript('../sampleapp/enrollee/linux/SConscript') -- #Build UnitTestcases for Enrollee -- if enrollee_env.get('SECURED') == '0': -- SConscript('../enrollee/unittests/SConscript') -- ---- a/service/easy-setup/mediator/richsdk/SConscript -+++ b/service/easy-setup/mediator/richsdk/SConscript -@@ -163,11 +163,3 @@ if target_os in ['linux']: - if target_os in ['android']: - SConscript('../../sampleapp/mediator/android/SConscript') - -- --###################################################################### --#Build UnitTestcases for Mediator[RichSDK] --################################################ ###################### --if env.get('SECURED') == '0': -- if target_os == 'linux': -- SConscript('unittests/SConscript') -- ---- a/service/resource-container/SConscript -+++ b/service/resource-container/SConscript -@@ -223,12 +223,6 @@ else: - lib_env = conf2.Finish() - - ###################################################################### --# build resource container unit tests --###################################################################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- --###################################################################### - # Build Container Sample - ###################################################################### - if target_os not in ['ios']: ---- a/service/resource-encapsulation/SConscript -+++ b/service/resource-encapsulation/SConscript -@@ -121,14 +121,5 @@ resourceClient_env.UserInstallTargetHead - ###################################################################### - SConscript('examples/SConscript') - --###################################################################### --# Build UnitTests Resource Client , resourceCache and resourceBroker and --# DiscoveryManager --################################################ ###################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- SConscript('src/resourceCache/unittests/SConscript') -- SConscript('src/resourceBroker/unittest/SConscript') -- - if target_os == 'android': - SConscript('android/SConscript') ---- a/service/resource-encapsulation/src/common/SConscript -+++ b/service/resource-encapsulation/src/common/SConscript -@@ -22,10 +22,10 @@ - # rcs_common (primitiveResource and expiryTimer) build script - ## - import os -+Import('env') - - # SConscript file for Local PKI google tests --gtest_env = SConscript('#extlibs/gtest/SConscript') --lib_env = gtest_env.Clone() -+lib_env = env.Clone() - - # Add third party libraries - SConscript('#service/third_party_libs.scons', exports = 'lib_env') ---- a/service/resource-encapsulation/src/serverBuilder/SConscript -+++ b/service/resource-encapsulation/src/serverBuilder/SConscript -@@ -21,9 +21,11 @@ - ## - # rcs_server (Server Builder) project build script - ## -+import os -+Import('env') -+ - # SConscript file for Local PKI google tests --gtest_env = SConscript('#extlibs/gtest/SConscript') --lib_env = gtest_env.Clone() -+lib_env = env.Clone() - - # Add third party libraries - SConscript('#service/third_party_libs.scons', exports = 'lib_env') ---- a/service/scene-manager/SConscript -+++ b/service/scene-manager/SConscript -@@ -100,9 +100,5 @@ scenemanager_env.UserInstallTargetHeader - scenemanager_env.UserInstallTargetHeader('include/RemoteScene.h', 'service/scene-manager', 'RemoteScene.h') - scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h') - --# Go to build Unit test --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- - # Go to build sample apps - SConscript('sampleapp/SConscript') diff --git a/net/iotivity/patches/002-do-not-chck-for-boost.patch b/net/iotivity/patches/002-do-not-chck-for-boost.patch deleted file mode 100644 index 6be8f84..0000000 --- a/net/iotivity/patches/002-do-not-chck-for-boost.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 51e26e002aa043435f94ac0f071066090d5c2de8 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 22 Jun 2015 20:23:36 +0200 -Subject: [PATCH 5/5] do not chck for boost - -Boost is not needed for every package just for some. - -Signed-off-by: Hauke Mehrtens ---- - service/third_party_libs.scons | 8 -------- - 1 file changed, 8 deletions(-) - ---- a/service/third_party_libs.scons -+++ b/service/third_party_libs.scons -@@ -49,14 +49,6 @@ if target_os in ['linux']: - - conf = Configure(lib_env) - -- if target_os not in ['tizen'] and not conf.CheckLib('boost_thread', language='C++'): -- print 'Did not find boost_thread, exiting!' -- Exit(1) -- -- if target_os not in ['tizen'] and not conf.CheckLib('boost_system', language='C++'): -- print 'Did not find boost_system, exiting!' -- Exit(1) -- - lib_env = conf.Finish() - - ###################################################################### diff --git a/net/iotivity/patches/020-linux-Add-more-architectures.patch b/net/iotivity/patches/020-linux-Add-more-architectures.patch deleted file mode 100644 index cb01381..0000000 --- a/net/iotivity/patches/020-linux-Add-more-architectures.patch +++ /dev/null @@ -1,44 +0,0 @@ -From dabd6597013e1df72b08621b466d136b8d25d110 Mon Sep 17 00:00:00 2001 -From: Philippe Coval -Date: Thu, 29 Sep 2016 10:57:59 +0200 -Subject: [PATCH 20/23] linux: Add more architectures - -This does not scale and this check should be removed. - -Signed-off-by: Hauke Mehrtens -Author: Hauke Mehrtens -Change-Id: Ibb271701904745ee4f5dd689c197228239c37262 -Origin: https://github.com/openwrt/packages/blob/master/net/iotivity/patches/021-add-some-more-architectures.patch -Signed-off-by: Philippe Coval -Reviewed-on: https://gerrit.iotivity.org/gerrit/14575 -Tested-by: jenkins-iotivity -Reviewed-by: Nivedita Singhvi -Reviewed-by: Jaehong Jo -Reviewed-by: Hauke Mehrtens ---- - build_common/SConscript | 2 +- - resource/csdk/connectivity/build/SConscript | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -18,7 +18,7 @@ host_target_map = { - - # Map of os and allowed archs (os: allowed archs) - os_arch_map = { -- 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], -+ 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'], - 'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], - 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], - 'windows': ['x86', 'amd64', 'arm'], ---- a/resource/csdk/connectivity/build/SConscript -+++ b/resource/csdk/connectivity/build/SConscript -@@ -14,7 +14,7 @@ host_target_map = { - - # Map of os and allowed archs (os: allowed archs) - os_arch_map = { -- 'linux': ['x86', 'x86_64', 'arm', 'arm64'], -+ 'linux': ['x86', 'x86_64', 'arm', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'], - 'tizen': ['x86', 'x86_64', 'arm', 'arm64'], - 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], - 'windows': ['x86', 'amd64', 'arm'], diff --git a/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch b/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch deleted file mode 100644 index 2756fde..0000000 --- a/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 792f68219b3ab4ff5238e3abc7aa1c68bfa4a22b Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:15:32 +0100 -Subject: [PATCH 21/23] build: do not set TARGET_ARCH to default - -This check is useless, scons already checks this and returns such an -error message: -Invalid value for option TARGET_ARCH: mips. Valid values are: ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'] - -Change-Id: I3f7dd3b9fcae875ab20349203fb77537f24be763 -Signed-off-by: Hauke Mehrtens ---- - build_common/SConscript | 3 --- - resource/csdk/connectivity/build/SConscript | 2 -- - 2 files changed, 5 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -54,9 +54,6 @@ if target_os == 'android': - else: - default_arch = platform.machine() - --if default_arch not in os_arch_map[target_os]: -- default_arch = os_arch_map[target_os][0].lower() -- - target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch - - # True if binary needs to be installed on board. (Might need root permissions) ---- a/resource/csdk/connectivity/build/SConscript -+++ b/resource/csdk/connectivity/build/SConscript -@@ -40,8 +40,6 @@ if target_os not in host_target_map[host - Exit(1) - - default_arch = platform.machine() --if default_arch not in os_arch_map[target_os]: -- default_arch = os_arch_map[target_os][0].lower() - - target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch - diff --git a/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch b/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch deleted file mode 100644 index dfb546a..0000000 --- a/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 39b0c436c77555849da1e68cc8733c67183c291f Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:35:04 +0100 -Subject: [PATCH 22/23] build: restrict compiler options to supported - architectures - -For Linux we currently only support the following architectures: -'x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64' -explicitly check for those architectures and also remove ARM hard float. - -Change-Id: I7078530bc2a89b88c7049cc53e8bb3fbe5d75ca8 -Signed-off-by: Hauke Mehrtens ---- - build_common/linux/SConscript | 11 +++-------- - resource/csdk/connectivity/build/linux/SConscript | 11 +++-------- - 2 files changed, 6 insertions(+), 16 deletions(-) - ---- a/build_common/linux/SConscript -+++ b/build_common/linux/SConscript -@@ -30,14 +30,9 @@ if target_arch in ['x86']: - elif target_arch in ['x86_64']: - env.AppendUnique(CCFLAGS = ['-m64']) - env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm'] or target_arch.find('v5') > 0: -+elif target_arch in ['arm']: - env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch.find('v7a-hard') > 0: -+elif target_arch in ['arm-v7a', 'armeabi-v7a']: - env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard']) --elif target_arch.find('v7a') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') >= 0: -+elif target_arch.find('arm64') > 0: - env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) ---- a/resource/csdk/connectivity/build/linux/SConscript -+++ b/resource/csdk/connectivity/build/linux/SConscript -@@ -29,14 +29,9 @@ if target_arch in ['x86']: - elif target_arch in ['x86_64']: - env.AppendUnique(CCFLAGS = ['-m64']) - env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch.find('v7a-hard') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard']) --elif target_arch.find('v7a') > 0: -+elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+elif target_arch in ['arm-v7a', 'armeabi-v7a']: - env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) - elif target_arch.find('arm64') > 0: - env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) --else: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) diff --git a/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch b/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch deleted file mode 100644 index b6a2bfd..0000000 --- a/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 5f9513eb341d520d10c48f8ba2bd145063405fdd Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:08:05 +0100 -Subject: [PATCH 23/23] build: take compiler options from environment - -This makes it possible to compile IoTivity with custom compiler -options. This way someone can use optimized compiler settings for the -target CPU. I want to use this in OpenWrt / LEDE to build specific -IoTivity binaries for each CPU architecture, there the build system -provides the matching compiler options. - -Change-Id: I86772f73b81c41d7e96e51b434fd9e3b4992753a -Signed-off-by: Hauke Mehrtens ---- - build_common/SConscript | 25 +++++++++++++++++++++ - build_common/linux/SConscript | 27 ++++++++++++----------- - resource/csdk/connectivity/build/linux/SConscript | 27 ++++++++++++----------- - 3 files changed, 53 insertions(+), 26 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -120,6 +120,7 @@ help_vars.Add(PathVariable('ANDROID_NDK' - help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept)) - help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile)) - help_vars.Add(EnumVariable('WITH_UPSTREAM_LIBCOAP', 'Use latest stable version of LibCoAP downloaded from github', default_with_upstream_libcoap, allowed_values=('0','1'))) -+help_vars.Add(BoolVariable('WITH_ENV', 'Use compiler options from environment', False)) - - AddOption('--prefix', - dest='prefix', -@@ -153,6 +154,30 @@ else: - ) - Help(help_vars.GenerateHelpText(env)) - -+if env.get('WITH_ENV'): -+ env['ENV'] = os.environ -+ if 'CC' in os.environ: -+ env['CC'] = Split(os.environ['CC']) -+ print "using CC from environment: %s" % env['CC'] -+ if 'CXX' in os.environ: -+ env['CXX'] = Split(os.environ['CXX']) -+ print "using CXX from environment: %s" % env['CXX'] -+ if 'CFLAGS' in os.environ: -+ env['CFLAGS'] = Split(os.environ['CFLAGS']) -+ print "using CFLAGS from environment: %s" % env['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS']) -+ print "using CXXFLAGS from environment: %s" % env['CXXFLAGS'] -+ if 'CCFLAGS' in os.environ: -+ env['CCFLAGS'] = Split(os.environ['CCFLAGS']) -+ print "using CCFLAGS from environment: %s" % env['CCFLAGS'] -+ if 'CPPFLAGS' in os.environ: -+ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS']) -+ print "using CPPFLAGS from environment: %s" % env['CPPFLAGS'] -+ if 'LDFLAGS' in os.environ: -+ env['LINKFLAGS'] = Split(os.environ['LDFLAGS']) -+ print "using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS'] -+ - tc_set_msg = ''' - ************************************ Warning ********************************** - * Enviornment variable TC_PREFIX/TC_PATH is set. It will change the default * ---- a/build_common/linux/SConscript -+++ b/build_common/linux/SConscript -@@ -23,16 +23,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-W - env.AppendUnique(LIBS = ['dl', 'pthread', 'uuid']) - - # Set arch flags that match best TARGET_ARCH variable --target_arch = env.get('TARGET_ARCH') --if target_arch in ['x86']: -- env.AppendUnique(CCFLAGS = ['-m32']) -- env.AppendUnique(LINKFLAGS = ['-m32']) --elif target_arch in ['x86_64']: -- env.AppendUnique(CCFLAGS = ['-m64']) -- env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm']: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch in ['arm-v7a', 'armeabi-v7a']: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) -+if not env.get('WITH_ENV'): -+ target_arch = env.get('TARGET_ARCH') -+ if target_arch in ['x86']: -+ env.AppendUnique(CCFLAGS = ['-m32']) -+ env.AppendUnique(LINKFLAGS = ['-m32']) -+ elif target_arch in ['x86_64']: -+ env.AppendUnique(CCFLAGS = ['-m64']) -+ env.AppendUnique(LINKFLAGS = ['-m64']) -+ elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+ elif target_arch in ['arm-v7a', 'armeabi-v7a']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -+ elif target_arch.find('arm64') > 0: -+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) ---- a/resource/csdk/connectivity/build/linux/SConscript -+++ b/resource/csdk/connectivity/build/linux/SConscript -@@ -22,16 +22,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-f - env.AppendUnique(LIBS = ['dl', 'pthread']) - - # Set arch flags --target_arch = env.get('TARGET_ARCH') --if target_arch in ['x86']: -- env.AppendUnique(CCFLAGS = ['-m32']) -- env.AppendUnique(LINKFLAGS = ['-m32']) --elif target_arch in ['x86_64']: -- env.AppendUnique(CCFLAGS = ['-m64']) -- env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm']: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch in ['arm-v7a', 'armeabi-v7a']: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) -+if not env.get('WITH_ENV'): -+ target_arch = env.get('TARGET_ARCH') -+ if target_arch in ['x86']: -+ env.AppendUnique(CCFLAGS = ['-m32']) -+ env.AppendUnique(LINKFLAGS = ['-m32']) -+ elif target_arch in ['x86_64']: -+ env.AppendUnique(CCFLAGS = ['-m64']) -+ env.AppendUnique(LINKFLAGS = ['-m64']) -+ elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+ elif target_arch in ['arm-v7a', 'armeabi-v7a']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -+ elif target_arch.find('arm64') > 0: -+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) diff --git a/net/iotivity/patches/030-remove-check-for-curl.patch b/net/iotivity/patches/030-remove-check-for-curl.patch deleted file mode 100644 index 475976d..0000000 --- a/net/iotivity/patches/030-remove-check-for-curl.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/service/resource-container/SConscript -+++ b/service/resource-container/SConscript -@@ -191,36 +191,22 @@ if target_os in ['linux', 'tizen', 'andr - # build hue sample bundle - ###################################################################### - --conf2 = Configure(lib_env) --if not conf2.CheckLib('curl'): -- print '''X --*********************************** Error ************************************* --* Cannot build hue sample. Please install libcurl. --* Example (Ubuntu): --* sudo apt-get install libcurl4-openssl-dev --* sudo ldconfig --* Hint: check with pkg-config --libs libcurl and clear scons cache. --* Skipping hue sample build. --******************************************************************************* -- ''' --else: -- hue_resource_bundle_env = resource_container_env.Clone() -- hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC']) -- -- HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/' -- hue_resource_bundle_env.AppendUnique(CPPPATH = [ -- HUE_RESOURCE_BUNDLE_DIR + 'include', -- 'include/' -- ]) -- -- hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container']) -- -- hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')] -- -- HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) -- hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') -- hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle') --lib_env = conf2.Finish() -+hue_resource_bundle_env = resource_container_env.Clone() -+hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC']) -+ -+HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/' -+hue_resource_bundle_env.AppendUnique(CPPPATH = [ -+ HUE_RESOURCE_BUNDLE_DIR + 'include', -+ 'include/' -+ ]) -+ -+hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container']) -+ -+hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')] -+ -+HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) -+hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') -+hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle') - - ###################################################################### - # Build Container Sample diff --git a/net/iotivity/patches/040-linux-Use-system-sqlite3.patch b/net/iotivity/patches/040-linux-Use-system-sqlite3.patch deleted file mode 100644 index 50d55a7..0000000 --- a/net/iotivity/patches/040-linux-Use-system-sqlite3.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 08b403572985a70fe5d652378e1cfa2b72ac6a3d Mon Sep 17 00:00:00 2001 -From: Philippe Coval -Date: Fri, 9 Dec 2016 02:12:04 +0100 -Subject: [PATCH] linux: Use system sqlite3 - -Problem was discovered on yocto - -Change-Id: I5274bed9e4b7ddcdc1b17a265a1886cd78cb631f -Signed-off-by: Philippe Coval -Reviewed-on: https://gerrit.iotivity.org/gerrit/15305 -Tested-by: jenkins-iotivity -Reviewed-by: Ziran Sun ---- - resource/csdk/SConscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/resource/csdk/SConscript -+++ b/resource/csdk/SConscript -@@ -191,7 +191,7 @@ if with_tcp == True: - - if 'SERVER' in rd_mode: - liboctbstack_src.append(OCTBSTACK_SRC + 'oicresourcedirectory.c') -- if target_os not in ['tizen']: -+ if target_os not in ['linux', 'tizen']: - liboctbstack_src.append('#extlibs/sqlite3/sqlite3.c') - - if target_os in ['linux']: diff --git a/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch b/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch deleted file mode 100644 index 5ba18d8..0000000 --- a/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,54 +0,0 @@ -From d8cf30cb0abd5fa8f6282b490618204d683b625c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 3 Oct 2016 21:00:28 +0200 -Subject: [PATCH 1/3] csdk: move OCEntityHandlerResponse from stack to heap - -OCEntityHandlerResponse is over 50KByte and I got a stack overflow on MIPS -running on LEDE without this patch. Instead of storing -OCEntityHandlerResponse on the program stack, allocate some memory on -the heap and free it afterwards again. - -This fixes one part of this issue for me: -https://jira.iotivity.org/browse/IOT-1374 - -Change-Id: I365a5c7a34dce2dfb0897a20b57a13ba566748ec -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/stack/src/ocresource.c | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) - ---- a/resource/csdk/stack/src/ocresource.c -+++ b/resource/csdk/stack/src/ocresource.c -@@ -774,15 +774,25 @@ static bool includeThisResourceInRespons - OCStackResult SendNonPersistantDiscoveryResponse(OCServerRequest *request, OCResource *resource, - OCPayload *discoveryPayload, OCEntityHandlerResult ehResult) - { -- OCEntityHandlerResponse response = {0}; -+ OCEntityHandlerResponse *response = NULL; -+ OCStackResult result = OC_STACK_ERROR; - -- response.ehResult = ehResult; -- response.payload = discoveryPayload; -- response.persistentBufferFlag = 0; -- response.requestHandle = (OCRequestHandle) request->requestId; -- response.resourceHandle = (OCResourceHandle) resource; -+ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response)); -+ VERIFY_PARAM_NON_NULL(TAG, response, "Failed allocating OCEntityHandlerResponse"); - -- return OCDoResponse(&response); -+ response->ehResult = ehResult; -+ response->payload = discoveryPayload; -+ response->persistentBufferFlag = 0; -+ response->requestHandle = (OCRequestHandle) request->requestId; -+ response->resourceHandle = (OCResourceHandle) resource; -+ -+ result = OCDoResponse(response); -+ -+ OICFree(response); -+ return result; -+ -+exit: -+ return OC_STACK_NO_MEMORY; - } - - static OCStackResult EHRequest(OCEntityHandlerRequest *ehRequest, OCPayloadType type, diff --git a/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch b/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch deleted file mode 100644 index db8ede4..0000000 --- a/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,357 +0,0 @@ -From e8971dd4914c9d42938c4c885b4ac6d784d7e0ff Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 3 Oct 2016 23:22:36 +0200 -Subject: [PATCH 2/3] csdk: move OCClientResponse from stack to heap - -OCClientResponse is about 50KByte and should not be stored on the -stack. On LEDE with MIPS, musl libc this causes a segmentation fault. -Moving this structure to the heap is the simple solution for this -problem, but this structure should be shrined. - -There are probably more places were this is stored on the stack and -will cause problems. This fixes the other issue I saw in -https://jira.iotivity.org/browse/IOT-1374 - -Change-Id: I45d8aee4a8151fea51d3318acb1eea61ce579060 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/stack/src/ocstack.c | 163 ++++++++++++++++++++++++-------------- - 1 file changed, 102 insertions(+), 61 deletions(-) - ---- a/resource/csdk/stack/src/ocstack.c -+++ b/resource/csdk/stack/src/ocstack.c -@@ -1042,7 +1042,7 @@ OCStackResult HandlePresenceResponse(con - OCStackApplicationResult cbResult = OC_STACK_DELETE_TRANSACTION; - ClientCB * cbNode = NULL; - char *resourceTypeName = NULL; -- OCClientResponse response = {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -+ OCClientResponse *response = NULL; - OCStackResult result = OC_STACK_ERROR; - uint32_t maxAge = 0; - int uriLen; -@@ -1057,15 +1057,23 @@ OCStackResult HandlePresenceResponse(con - return OC_STACK_ERROR; - } - -- response.payload = NULL; -- response.result = OC_STACK_OK; -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return OC_STACK_ERROR; -+ } -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; - -- CopyEndpointToDevAddr(endpoint, &response.devAddr); -- FixUpClientResponse(&response); -+ response->payload = NULL; -+ response->result = OC_STACK_OK; -+ -+ CopyEndpointToDevAddr(endpoint, &response->devAddr); -+ FixUpClientResponse(response); - - if (responseInfo->info.payload) - { -- result = OCParsePayload(&response.payload, -+ result = OCParsePayload(&response->payload, - PAYLOAD_TYPE_PRESENCE, - responseInfo->info.payload, - responseInfo->info.payloadSize); -@@ -1075,15 +1083,15 @@ OCStackResult HandlePresenceResponse(con - OIC_LOG(ERROR, TAG, "Presence parse failed"); - goto exit; - } -- if(!response.payload || response.payload->type != PAYLOAD_TYPE_PRESENCE) -+ if(!response->payload || response->payload->type != PAYLOAD_TYPE_PRESENCE) - { - OIC_LOG(ERROR, TAG, "Presence payload was wrong type"); - result = OC_STACK_ERROR; - goto exit; - } -- response.sequenceNumber = ((OCPresencePayload*)response.payload)->sequenceNumber; -- resourceTypeName = ((OCPresencePayload*)response.payload)->resourceType; -- maxAge = ((OCPresencePayload*)response.payload)->maxAge; -+ response->sequenceNumber = ((OCPresencePayload*)response->payload)->sequenceNumber; -+ resourceTypeName = ((OCPresencePayload*)response->payload)->resourceType; -+ maxAge = ((OCPresencePayload*)response->payload)->maxAge; - } - - // check for unicast presence -@@ -1091,6 +1099,7 @@ OCStackResult HandlePresenceResponse(con - responseInfo->isMulticast); - if (uriLen < 0 || (size_t)uriLen >= sizeof (presenceUri)) - { -+ OICFree(response); - return OC_STACK_INVALID_URI; - } - OIC_LOG(ERROR, TAG, "check for unicast presence"); -@@ -1118,7 +1127,7 @@ OCStackResult HandlePresenceResponse(con - - if (presenceSubscribe) - { -- if(cbNode->sequenceNumber == response.sequenceNumber) -+ if(cbNode->sequenceNumber == response->sequenceNumber) - { - OIC_LOG(INFO, TAG, "No presence change"); - ResetPresenceTTL(cbNode, maxAge); -@@ -1129,7 +1138,7 @@ OCStackResult HandlePresenceResponse(con - if(maxAge == 0) - { - OIC_LOG(INFO, TAG, "Stopping presence"); -- response.result = OC_STACK_PRESENCE_STOPPED; -+ response->result = OC_STACK_PRESENCE_STOPPED; - if(cbNode->presence) - { - OICFree(cbNode->presence->timeOut); -@@ -1165,7 +1174,7 @@ OCStackResult HandlePresenceResponse(con - - ResetPresenceTTL(cbNode, maxAge); - -- cbNode->sequenceNumber = response.sequenceNumber; -+ cbNode->sequenceNumber = response->sequenceNumber; - } - } - else -@@ -1175,7 +1184,7 @@ OCStackResult HandlePresenceResponse(con - if (0 == maxAge) - { - OIC_LOG(INFO, TAG, "Stopping presence"); -- response.result = OC_STACK_PRESENCE_STOPPED; -+ response->result = OC_STACK_PRESENCE_STOPPED; - } - } - -@@ -1191,7 +1200,7 @@ OCStackResult HandlePresenceResponse(con - - OIC_LOG(INFO, TAG, "Callback for presence"); - -- cbResult = cbNode->callBack(cbNode->context, cbNode->handle, &response); -+ cbResult = cbNode->callBack(cbNode->context, cbNode->handle, response); - - if (cbResult == OC_STACK_DELETE_TRANSACTION) - { -@@ -1199,7 +1208,8 @@ OCStackResult HandlePresenceResponse(con - } - - exit: -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return result; - } - -@@ -1240,36 +1250,53 @@ void OCHandleResponse(const CAEndpoint_t - OIC_LOG(INFO, TAG, "Receiving A Timeout for this token"); - OIC_LOG(INFO, TAG, "Calling into application address space"); - -- OCClientResponse response = -- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = responseInfo->info.resourceUri; -- memcpy(response.identity.id, responseInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = responseInfo->info.identity.id_length; -+ OCClientResponse *response = NULL; -+ -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = responseInfo->info.resourceUri; -+ memcpy(response->identity.id, responseInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = responseInfo->info.identity.id_length; - -- response.result = CAResponseToOCStackResult(responseInfo->result); -+ response->result = CAResponseToOCStackResult(responseInfo->result); - cbNode->callBack(cbNode->context, -- cbNode->handle, &response); -+ cbNode->handle, response); - FindAndDeleteClientCB(cbNode); -+ OICFree(response); - } - else - { - OIC_LOG(INFO, TAG, "This is a regular response, A client call back is found"); - OIC_LOG(INFO, TAG, "Calling into application address space"); - -- OCClientResponse response = -- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -- response.sequenceNumber = MAX_SEQUENCE_NUMBER + 1; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = responseInfo->info.resourceUri; -- memcpy(response.identity.id, responseInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = responseInfo->info.identity.id_length; -+ OCClientResponse *response = NULL; - -- response.result = CAResponseToOCStackResult(responseInfo->result); -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ response->sequenceNumber = MAX_SEQUENCE_NUMBER + 1; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = responseInfo->info.resourceUri; -+ memcpy(response->identity.id, responseInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = responseInfo->info.identity.id_length; -+ -+ response->result = CAResponseToOCStackResult(responseInfo->result); - - if(responseInfo->info.payload && - responseInfo->info.payloadSize) -@@ -1359,21 +1386,23 @@ void OCHandleResponse(const CAEndpoint_t - { - OIC_LOG_V(ERROR, TAG, "Unknown Payload type: %d %s", - cbNode->method, cbNode->requestUri); -+ OICFree(response); - return; - } - -- if(OC_STACK_OK != OCParsePayload(&response.payload, -+ if(OC_STACK_OK != OCParsePayload(&response->payload, - type, - responseInfo->info.payload, - responseInfo->info.payloadSize)) - { - OIC_LOG(ERROR, TAG, "Error converting payload"); -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return; - } - } - -- response.numRcvdVendorSpecificHeaderOptions = 0; -+ response->numRcvdVendorSpecificHeaderOptions = 0; - if(responseInfo->info.numOptions > 0) - { - int start = 0; -@@ -1391,19 +1420,20 @@ void OCHandleResponse(const CAEndpoint_t - observationOption = - (observationOption << 8) | optionData[i]; - } -- response.sequenceNumber = observationOption; -- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1; -+ response->sequenceNumber = observationOption; -+ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1; - start = 1; - } - else - { -- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions; -+ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions; - } - -- if(response.numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS) -+ if(response->numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS) - { - OIC_LOG(ERROR, TAG, "#header options are more than MAX_HEADER_OPTIONS"); -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return; - } - -@@ -1411,19 +1441,19 @@ void OCHandleResponse(const CAEndpoint_t - { - if(&(responseInfo->info.options[i])) - { -- memcpy (&(response.rcvdVendorSpecificHeaderOptions[i-start]), -+ memcpy (&(response->rcvdVendorSpecificHeaderOptions[i-start]), - &(responseInfo->info.options[i]), sizeof(OCHeaderOption)); - } - } - } - - if (cbNode->method == OC_REST_OBSERVE && -- response.sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER && -+ response->sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER && - cbNode->sequenceNumber <= MAX_SEQUENCE_NUMBER && -- response.sequenceNumber <= cbNode->sequenceNumber) -+ response->sequenceNumber <= cbNode->sequenceNumber) - { - OIC_LOG_V(INFO, TAG, "Received stale notification. Number :%d", -- response.sequenceNumber); -+ response->sequenceNumber); - } - else - { -@@ -1432,13 +1462,13 @@ void OCHandleResponse(const CAEndpoint_t - char *targetUri = strstr(cbNode->requestUri, OC_RSRVD_RD_URI); - if (targetUri) - { -- OCUpdateResourceInsWithResponse(cbNode->requestUri, &response); -+ OCUpdateResourceInsWithResponse(cbNode->requestUri, response); - } - #endif - OCStackApplicationResult appFeedback = cbNode->callBack(cbNode->context, - cbNode->handle, -- &response); -- cbNode->sequenceNumber = response.sequenceNumber; -+ response); -+ cbNode->sequenceNumber = response->sequenceNumber; - - if (appFeedback == OC_STACK_DELETE_TRANSACTION) - { -@@ -1459,7 +1489,8 @@ void OCHandleResponse(const CAEndpoint_t - CA_MSG_ACKNOWLEDGE, 0, NULL, NULL, 0, NULL, CA_RESPONSE_FOR_RES); - } - -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - } - return; - } -@@ -1585,16 +1616,26 @@ void HandleCAErrorResponse(const CAEndpo - errorInfo->info.tokenLength, NULL, NULL); - if (cbNode) - { -- OCClientResponse response = { .devAddr = { .adapter = OC_DEFAULT_ADAPTER } }; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = errorInfo->info.resourceUri; -- memcpy(response.identity.id, errorInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = errorInfo->info.identity.id_length; -- response.result = CAResultToOCResult(errorInfo->result); -+ OCClientResponse *response = NULL; -+ -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = errorInfo->info.resourceUri; -+ memcpy(response->identity.id, errorInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = errorInfo->info.identity.id_length; -+ response->result = CAResultToOCResult(errorInfo->result); - -- cbNode->callBack(cbNode->context, cbNode->handle, &response); -+ cbNode->callBack(cbNode->context, cbNode->handle, response); -+ OICFree(response); - } - - ResourceObserver *observer = GetObserverUsingToken(errorInfo->info.token, diff --git a/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch b/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch deleted file mode 100644 index 523cfe1..0000000 --- a/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 7fb5b6a19b06dc5b0a7f32261551b206b1e6a563 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 19:24:26 +0100 -Subject: [PATCH 3/3] src: move OCClientResponse from stack to heap - -OCClientResponse is about 50KByte and should not be stored on the -stack. On LEDE with MIPS, musl libc this causes a segmentation fault. -Moving this structure to the heap is the simple solution for this -problem, but this structure should be shrinked. - -Change-Id: I7887f93450f45b8031fcdfffb9ee2214fc3d5dd2 -Signed-off-by: Hauke Mehrtens ---- - resource/src/InProcServerWrapper.cpp | 44 +++++++++++++++++++++--------------- - 1 file changed, 26 insertions(+), 18 deletions(-) - ---- a/resource/src/InProcServerWrapper.cpp -+++ b/resource/src/InProcServerWrapper.cpp -@@ -568,51 +568,58 @@ namespace OC - } - else - { -- OCEntityHandlerResponse response; -+ OCEntityHandlerResponse *response = NULL; -+ -+ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) { -+ result = OC_STACK_MALFORMED_RESPONSE; -+ throw OCException(OC::Exception::STR_NULL_RESPONSE, OC_STACK_MALFORMED_RESPONSE); -+ } -+ - // OCRepPayload* payLoad = pResponse->getPayload(); - HeaderOptions serverHeaderOptions = pResponse->getHeaderOptions(); - -- response.requestHandle = pResponse->getRequestHandle(); -- response.resourceHandle = pResponse->getResourceHandle(); -- response.ehResult = pResponse->getResponseResult(); -+ response->requestHandle = pResponse->getRequestHandle(); -+ response->resourceHandle = pResponse->getResourceHandle(); -+ response->ehResult = pResponse->getResponseResult(); - -- response.payload = reinterpret_cast(pResponse->getPayload()); -+ response->payload = reinterpret_cast(pResponse->getPayload()); - -- response.persistentBufferFlag = 0; -+ response->persistentBufferFlag = 0; - -- response.numSendVendorSpecificHeaderOptions = serverHeaderOptions.size(); -+ response->numSendVendorSpecificHeaderOptions = serverHeaderOptions.size(); - int i = 0; - for (auto it=serverHeaderOptions.begin(); it != serverHeaderOptions.end(); ++it) - { -- response.sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID; -- response.sendVendorSpecificHeaderOptions[i].optionID = -+ response->sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID; -+ response->sendVendorSpecificHeaderOptions[i].optionID = - static_cast(it->getOptionID()); -- response.sendVendorSpecificHeaderOptions[i].optionLength = -+ response->sendVendorSpecificHeaderOptions[i].optionLength = - (it->getOptionData()).length() + 1; - std::string optionData = it->getOptionData(); - std::copy(optionData.begin(), - optionData.end(), -- response.sendVendorSpecificHeaderOptions[i].optionData); -- response.sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()] -+ response->sendVendorSpecificHeaderOptions[i].optionData); -+ response->sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()] - = '\0'; - i++; - } - -- if(OC_EH_RESOURCE_CREATED == response.ehResult) -+ if(OC_EH_RESOURCE_CREATED == response->ehResult) - { -- pResponse->getNewResourceUri().copy(response.resourceUri, -- sizeof (response.resourceUri) - 1); -- response.resourceUri[pResponse->getNewResourceUri().length()] = '\0'; -+ pResponse->getNewResourceUri().copy(response->resourceUri, -+ sizeof (response->resourceUri) - 1); -+ response->resourceUri[pResponse->getNewResourceUri().length()] = '\0'; - } - - if(cLock) - { - std::lock_guard lock(*cLock); -- result = OCDoResponse(&response); -+ result = OCDoResponse(response); - } - else - { -- OICFree(response.payload); -+ OICFree(response->payload); - result = OC_STACK_ERROR; - } - -@@ -620,6 +627,7 @@ namespace OC - { - oclog() << "Error sending response\n"; - } -+ OICFree(response); - return result; - } - } diff --git a/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch b/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch deleted file mode 100644 index 903cb72..0000000 --- a/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 261cf19bfa3dea10ed0f2ebbb2d945c19c9a2804 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 4 Dec 2016 00:18:37 +0100 -Subject: [PATCH 5/7] ssl: fix compilation against non debug mbedtls - -The function mbedtls_debug_set_threshold() is only available when -MBEDTLS_DEBUG_C is set. make the call depend on this condition. - -Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1278,8 +1278,10 @@ static int InitConfig(mbedtls_ssl_config - - #if !defined(NDEBUG) || defined(TB_LOG) - mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL); -+#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL); - #endif -+#endif - OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__); - return 0; - } diff --git a/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch b/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch deleted file mode 100644 index 83aec07..0000000 --- a/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cee085e0e62214603b9ae035d63fabca23c491bd Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 01:39:35 +0100 -Subject: [PATCH 6/7] ssl: call mbedtls_version_get_string() only if available - -The function mbedtls_version_get_string() is only available if -MBEDTLS_VERSION_C is set in the mbedtls configuration. Check this -before calling this function and print the mbedtls version this was -compiled against instead if mbedtls_version_get_string() is not -available. - -This fixes a compile problem when MBEDTLS_VERSION_C is not set. - -Change-Id: I54c2c2a3fc1f9d35afa475500e3db68420a1b54a -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1376,9 +1376,13 @@ CAResult_t CAinitSslAdapter() - /* Initialize TLS library - */ - #if !defined(NDEBUG) || defined(TB_LOG) -+#ifdef MBEDTLS_VERSION_C - char version[MBED_TLS_VERSION_LEN]; - mbedtls_version_get_string(version); - OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", version); -+#else -+ OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", MBEDTLS_VERSION_STRING); -+#endif - #endif - - /* Entropy settings diff --git a/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch b/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch deleted file mode 100644 index 2e2ccb0..0000000 --- a/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3684ac3720f91dc131c1c61689395a69ae1865f9 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 20:31:18 +0100 -Subject: [PATCH 7/7] ssl: call mbedtls_ssl_conf_renegotiation() only if - available - -The function mbedtls_ssl_conf_renegotiation() is only available if -MBEDTLS_SSL_RENEGOTIATION is set in the mbedtls configuration. Check this -before calling this function. - -This fixes a compile problem when MBEDTLS_SSL_RENEGOTIATION is not set. - -Change-Id: I69f15359d2dcaed1e4fe56fc7799737e38d6c2e7 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1273,7 +1273,9 @@ static int InitConfig(mbedtls_ssl_config - mbedtls_ssl_conf_rng(conf, mbedtls_ctr_drbg_random, &g_caSslContext->rnd); - mbedtls_ssl_conf_curves(conf, curve[ADAPTER_CURVE_SECP256R1]); - mbedtls_ssl_conf_min_version(conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3); -+#ifdef MBEDTLS_SSL_RENEGOTIATION - mbedtls_ssl_conf_renegotiation(conf, MBEDTLS_SSL_RENEGOTIATION_DISABLED); -+#endif - mbedtls_ssl_conf_authmode(conf, MBEDTLS_SSL_VERIFY_REQUIRED); - - #if !defined(NDEBUG) || defined(TB_LOG) diff --git a/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch b/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch deleted file mode 100644 index 0cbd1ed..0000000 --- a/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 01796db0b166e720860eff200acabff410ba6979 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 4 Dec 2016 00:15:21 +0100 -Subject: [PATCH 4/7] ssl: enable usage of patched mbed functions conditionally - -Only activate support for the MBEDTLS_KEY_EXCHANGE_ECDH_ANON_ENABLED -cipher suite when this is actually available in mbedtls. -This makes it possible to compile IoTivity against a unpatched mbedtls -version. - -Change-Id: Ic56d7faf7597cc5dc08f9d55be29dde898949609 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -237,7 +237,9 @@ int tlsCipher[ADAPTER_CIPHER_MAX][2] = - { - {MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, 0}, -+#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256 - {MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256, 0}, -+#endif - {MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 0} -@@ -1943,6 +1945,7 @@ CAResult_t CAsetTlsCipherSuite(const uin - g_caSslContext->cipher = ADAPTER_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8; - break; - } -+#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256 - case MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256: - { - #ifdef __WITH_TLS__ -@@ -1960,6 +1963,7 @@ CAResult_t CAsetTlsCipherSuite(const uin - g_caSslContext->cipher = ADAPTER_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA_256; - break; - } -+#endif - case MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256: - { - #if 0 // PIN OTM diff --git a/net/iotivity/patches/078-use-system-mbedtls.patch b/net/iotivity/patches/078-use-system-mbedtls.patch deleted file mode 100644 index d19c688..0000000 --- a/net/iotivity/patches/078-use-system-mbedtls.patch +++ /dev/null @@ -1,22 +0,0 @@ -Make it possible to use system mbedtls version - ---- a/resource/csdk/connectivity/src/SConscript -+++ b/resource/csdk/connectivity/src/SConscript -@@ -73,16 +73,7 @@ if env.get('SECURED') == '1': - env.AppendUnique(CPPPATH = [src_dir + '/resource/csdk/security/include']) - env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__']) - env.AppendUnique(CPPPATH = [os.path.join(root_dir, 'external/inc')]) -- tls_path = 'extlibs/mbedtls'; -- tls_headers_path = 'mbedtls/include'; -- if ca_os == 'tizen' and os.path.exists(root_dir + '/' + tls_path): -- env.SConscript(os.path.join(root_dir, tls_path + '/SConscript')) -- env.AppendUnique(CPPPATH = [os.path.join(root_dir, tls_path + '/' + tls_headers_path)]) -- else: -- if ca_os != 'android': -- env.SConscript('#' + tls_path + '/SConscript') -- env.AppendUnique(CPPPATH = ['#' + tls_path + '/' + tls_headers_path]) -- env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')]) -+ env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')]) - - if ((secured == '1') and (with_tcp == True)): - env.AppendUnique(CPPDEFINES = ['__WITH_TLS__']) diff --git a/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch b/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch deleted file mode 100644 index e5a95f0..0000000 --- a/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch +++ /dev/null @@ -1,31 +0,0 @@ -From df8360447163762c63994dcb07f9e69a5a365a1c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 22:01:57 +0100 -Subject: [PATCH 8/8] zigbee_wrapper: do not check for floating point - -This makes the compile fail for soft float builds. In such builds the -double is still 64 bit long. - -Change-Id: I45d3f19b49f5d23d2b65307738a362765c5ea1c2 -Signed-off-by: Hauke Mehrtens ---- - plugins/zigbee_wrapper/src/zigbee_wrapper.c | 8 -------- - 1 file changed, 8 deletions(-) - ---- a/plugins/zigbee_wrapper/src/zigbee_wrapper.c -+++ b/plugins/zigbee_wrapper/src/zigbee_wrapper.c -@@ -37,14 +37,6 @@ - #include - #include - --// The following #define must be here under "math.h". --// This ifdef ensures that "__STDC_IEC_559__" is defined. If it is defined, --// then we are guaranteed that the 'double' type is 64-bit. Otherwise, the --// compilation of this file should fail because we are no longer guaranteed. --#ifndef __STDC_IEC_559__ --#error "Requires IEEE 754 floating point!" --#endif -- - #include "zigbee_wrapper.h" - #include "telegesis_wrapper.h" - #include "pluginlist.h" diff --git a/net/iotivity/patches/140-remove-glib2.patch b/net/iotivity/patches/140-remove-glib2.patch deleted file mode 100644 index 1b009db..0000000 --- a/net/iotivity/patches/140-remove-glib2.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript -+++ b/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript -@@ -73,7 +73,6 @@ env.AppendUnique( - - # The Linux BLE adapter implementation uses GDBus to make D-Bus based - # method calls to BlueZ. Pull in the necessary dependencies. --env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs") - - # Set up commands to generate GDBus code from the D-Bus introspection - # XML. ---- a/resource/csdk/security/provisioning/sample/SConscript -+++ b/resource/csdk/security/provisioning/sample/SConscript -@@ -70,7 +70,6 @@ if target_os not in ['windows']: - - if target_os not in ['msys_nt', 'windows']: - provisioning_env.AppendUnique(LIBS = ['dl', 'm']) -- provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); - provisioning_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) - else: - provisioning_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource', 'csdk')]) ---- a/resource/csdk/security/provisioning/SConscript -+++ b/resource/csdk/security/provisioning/SConscript -@@ -73,9 +73,6 @@ provisioning_env.PrependUnique(LIBS = [' - provisioning_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto']) - - --if target_os not in ['msys_nt', 'windows', 'android', 'ios']: -- provisioning_env.ParseConfig('pkg-config --libs glib-2.0') -- - if target_os in ['windows', 'msys_nt']: - provisioning_env.AppendUnique(LIBS = ['ws2_32', 'advapi32', 'iphlpapi']) - diff --git a/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch b/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch deleted file mode 100644 index 4bcd322..0000000 --- a/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ce27d50b9c11386242487852f14b025ed6c67701 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 19 Aug 2015 16:47:21 +0200 -Subject: [PATCH 14/14] examples: OICMiddle: try to load security - configuration by default - -Load the security configuration from the default location by default. -When it is not found security will just not work. - -Signed-off-by: Hauke Mehrtens ---- - examples/OICMiddle/OICMiddle.cpp | 9 ++++++++- - examples/OICMiddle/OICMiddle.h | 1 + - 2 files changed, 9 insertions(+), 1 deletion(-) - ---- a/examples/OICMiddle/OICMiddle.cpp -+++ b/examples/OICMiddle/OICMiddle.cpp -@@ -99,8 +99,15 @@ void Middle::startPlatform() - //std::string ipaddr = INADDR_ANY; - std::string ipaddr = "0.0.0.0"; - -+ // Initialize Persistent Storage for SVR database -+ middle.ps.open = fopen; -+ middle.ps.read = fread; -+ middle.ps.write = fwrite; -+ middle.ps.close = fclose; -+ middle.ps.unlink = unlink; -+ - PlatformConfig cfg { ServiceType::InProc, ModeType::Both, -- ipaddr, port, QualityOfService::LowQos}; -+ ipaddr, port, QualityOfService::LowQos, &middle.ps}; - - OC::OCPlatform::Configure(cfg); - } ---- a/examples/OICMiddle/OICMiddle.h -+++ b/examples/OICMiddle/OICMiddle.h -@@ -83,6 +83,7 @@ protected: - MiddleServer *m_server; - LineInput *m_lineInput; - RestInput *m_restInput; -+ OCPersistentStorage ps; - - protected: - void startPlatform(); -- 2.25.1