libunistring: add host build

This commit is contained in:
lean 2024-04-18 16:31:40 +08:00
parent 1fc8099824
commit a01b1ac233
5 changed files with 40 additions and 23 deletions

View File

@ -6,13 +6,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
PKG_VERSION:=3.7.8
PKG_RELEASE:=$(AUTORELEASE)
PKG_USE_MIPS16:=0
PKG_VERSION:=3.8.3
PKG_RELEASE:=1
PKG_BUILD_FLAGS:=no-mips16
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7
PKG_HASH:=c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8
PKG_HASH:=f74fc5954b27d4ec6dfbb11dea987888b5b124289a3703afcada0ee520f4173e
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPL-2.1-or-later
@ -132,6 +132,7 @@ CONFIGURE_ARGS+= \
--without-idn \
--with-default-trust-store-dir=/etc/ssl/certs/ \
--with-included-unistring \
--with-included-libunistring \
--with-librt-prefix="$(LIBRT_ROOT_DIR)/" \
--with-pic \
--with-system-priority-file="" \

View File

@ -62,12 +62,12 @@
[AC_COMPILE_IFELSE(
--- a/src/gl/m4/gnulib-comp.m4
+++ b/src/gl/m4/gnulib-comp.m4
@@ -1188,7 +1188,7 @@ changequote([, ])dnl
@@ -1252,7 +1252,7 @@ changequote([, ])dnl
gl_UNISTD_MODULE_INDICATOR([sleep])
AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gt_TYPE_WCHAR_T])
- AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
gl_FUNC_STRERROR_R
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
AC_LIBOBJ([strerror_r])

View File

@ -14,7 +14,7 @@ Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,7 +57,7 @@ if ENABLE_DOC
@@ -48,7 +48,7 @@ if ENABLE_DOC
SUBDIRS += doc
endif

View File

@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -471,6 +471,8 @@ DEFAULT_VALGRINDFLAGS='-q --error-exitco
gl_VALGRIND_TESTS_DEFAULT_NO
+gl_LIBUNISTRING_OPTIONAL
+
dnl Note that g*l_INIT are run after we check for library capabilities,
dnl to prevent issues from caching lib dependencies. See discussion
dnl in https://bugs.gentoo.org/show_bug.cgi?id=494940 and

View File

@ -1,46 +1,50 @@
#
# 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:=libunistring
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_HASH:=827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/libunistring
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=827c1eb9cb6e7c738b171745dac0888aa58c5924df2e59239318383de0729b98
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:$(PKG_NAME)
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/libunistring
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libunistring
URL:=http://www.gnu.org/software/libunistring/
URL:=https://www.gnu.org/software/libunistring
endef
define Package/libunistring/description
This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.
This library provides functions for manipulating Unicode strings
and for manipulating C strings according to the Unicode standard.
endef
HOST_CFLAGS += $(HOST_FPIC)
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
HOST_CONFIGURE_ARGS += \
--enable-static \
--disable-shared \
--without-libiconv-prefix \
--without-libpth-prefix
--with-pic
CONFIGURE_ARGS += \
--enable-static \
--enable-shared \
--without-libiconv-prefix \
--with-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
@ -56,4 +60,5 @@ define Package/libunistring/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libunistring.so.* $(1)/usr/lib/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libunistring))