re: Bump to version 3.16.0
authorDaniel Danzberger <[email protected]>
Fri, 8 Nov 2024 10:36:42 +0000 (11:36 +0100)
committerDaniel Danzberger <[email protected]>
Tue, 12 Nov 2024 16:27:03 +0000 (17:27 +0100)
The previous version 2.0.1 is about 7 years old now and a lot has
changed. Various fixes, improvements and features have been added.

The build system has moved to cmake and pkg-config is used,
which makes it a lot easier to build from the openwrt buildroot.
Therefore a lot of the extra code is removed from it's Makefile

Librem is now integrated into libre.
No more patches are required.

Signed-off-by: Daniel Danzberger <[email protected]>
libs/re/Makefile
libs/re/patches/001-extend-ninit-nclose-check.patch [deleted file]
libs/re/patches/002-fix-redefine-ssize_t.patch [deleted file]
libs/re/patches/004-prevent-optimization-meddling.patch [deleted file]
libs/re/patches/005-fix-builds-for-mipsel-targets.patch [deleted file]

index cdf9c88500a790f9202441a9b0ddc49ffde7370f..d01e1947d3f836ffeab377f4928f14dfed91124d 100644 (file)
@@ -5,16 +5,15 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=re
-PKG_VERSION:=2.0.1
+PKG_VERSION:=3.16.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/baresip/re/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=43aa439b96aff75fe5768b9f9d49dea97042e42e7647df47b345465763e2f7ed
+PKG_HASH:=11b3215064b6ef5a11b0f4645d6d4834f8ba899d5b65c66477f9c4afbd32e1ed
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=docs/COPYING
@@ -24,6 +23,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libre
   SUBMENU:=Telephony
@@ -32,49 +32,17 @@ define Package/libre
   DEPENDS:=+libopenssl +zlib
   TITLE:=Generic library for real-time communications with async IO support
   URL:=https://github.com/baresip/re
-  ABI_VERSION:=1
+  ABI_VERSION:=2
 endef
 
-# re.mk is used for this and all related packages (rem, restund and baresip).
-# It relies on SYSROOT and SYSROOT_ALT being set. SYSROOT is used for finding
-# toolchain headers (like pthread.h). SYSROOT_ALT is used for finding headers
-# from other packages, like openssl etc.
-#
-# CFLAGS are picked up from the environment, as well as CPPFLAGS (and LD etc.).
-# But LDFLAGS aren't picked up, so they need to be handed over via
-# EXTRA_LFLAGS.
-#
-# LD is changed to TARGET_CC to fix build failures on x86 32bit. Without this
-# there's no linking to ssp, which results in undefined references.
-
-# used by 001-extend-ninit-nclose-check.patch
-TARGET_CFLAGS+=-DOPENWRT
-
-ifneq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),)
-TARGET_CFLAGS+=-D_GNU_SOURCE
-endif
-
-MAKE_FLAGS+= \
-       CROSS_COMPILE="$(TARGET_CROSS)" \
-       EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
-       LD="$(TARGET_CC)" \
-       OS=linux \
-       RELEASE=1 \
-       SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
-       SYSROOT_ALT="$(STAGING_DIR)/usr"
-
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/share/re
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/re/re.mk $(1)/usr/share/re
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr
+       $(CP) $(PKG_INSTALL_DIR)/usr/* $(1)/usr
 endef
 
 define Package/libre/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so.$(ABI_VERSION)* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so.* $(1)/usr/lib
 endef
 
 $(eval $(call BuildPackage,libre))
diff --git a/libs/re/patches/001-extend-ninit-nclose-check.patch b/libs/re/patches/001-extend-ninit-nclose-check.patch
deleted file mode 100644 (file)
index 9a22759..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/dns/res.c
-+++ b/src/dns/res.c
-@@ -26,7 +26,7 @@ int get_resolv_dns(char *domain, size_t
-       uint32_t i;
-       int ret, err;
--#ifdef OPENBSD
-+#if defined(OPENBSD) || defined(OPENWRT)
-       ret = res_init();
-       state = _res;
- #else
-@@ -76,7 +76,7 @@ int get_resolv_dns(char *domain, size_t
-       *n = i;
-  out:
--#ifdef OPENBSD
-+#if defined(OPENBSD) || defined(OPENWRT)
- #else
-       res_nclose(&state);
- #endif
diff --git a/libs/re/patches/002-fix-redefine-ssize_t.patch b/libs/re/patches/002-fix-redefine-ssize_t.patch
deleted file mode 100644 (file)
index 5a9e354..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/include/re_types.h
-+++ b/include/re_types.h
-@@ -47,7 +47,7 @@ typedef unsigned long long int    uint64
- #endif /* __BIT_TYPES_DEFINED__ */
- #endif /* __int8_t_defined */
--#ifndef __ssize_t_defined
-+#if !defined(__ssize_t_defined) && !defined(__DEFINED_ssize_t)
- typedef long     ssize_t;
- #define __ssize_t_defined
- #endif
diff --git a/libs/re/patches/004-prevent-optimization-meddling.patch b/libs/re/patches/004-prevent-optimization-meddling.patch
deleted file mode 100644 (file)
index 97caed3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/mk/re.mk
-+++ b/mk/re.mk
-@@ -47,7 +47,6 @@
- ifneq ($(RELEASE),)
- CFLAGS  += -DRELEASE
--OPT_SPEED=1
- endif
- ifneq ($(TRACE_ERR),)
diff --git a/libs/re/patches/005-fix-builds-for-mipsel-targets.patch b/libs/re/patches/005-fix-builds-for-mipsel-targets.patch
deleted file mode 100644 (file)
index c50a463..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/mk/re.mk
-+++ b/mk/re.mk
-@@ -412,11 +412,6 @@ endif
- CFLAGS        += -DARCH=\"$(ARCH)\"
--ifeq ($(ARCH),mipsel)
--CFLAGS += -march=mips32
--endif
--
--
- ##############################################################################
- #
- # External libraries section