pcre2: add host build (refs #20604)
authorMichael Heimpold <mhei@heimpold.de>
Tue, 14 Mar 2023 19:53:07 +0000 (20:53 +0100)
committerMichael Heimpold <mhei@heimpold.de>
Tue, 14 Mar 2023 21:16:38 +0000 (22:16 +0100)
This adds a host build which can be used later by tools,
e.g. swig - which in turn is used by gensio package to
provide python bindings.

While at, switch back from $(AUTORELEASE).

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
libs/pcre2/Makefile

index 1bd6d27599e651fcb3dd45ac5e890f675521a924..8abdd5d7179afe1e00700b07ced21bc5654dd57f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcre2
 PKG_VERSION:=10.37
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
@@ -28,6 +28,7 @@ PKG_CONFIG_DEPENDS:=\
 PKG_BUILD_DEPENDS:=zlib
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libpcre2/default
@@ -55,6 +56,18 @@ define Package/libpcre2-32
   TITLE:=A Perl Compatible Regular Expression library (32bit support)
 endef
 
+CMAKE_HOST_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DPCRE2_BUILD_PCRE2_8=ON \
+       -DPCRE2_BUILD_PCRE2_16=ON \
+       -DPCRE2_BUILD_PCRE2_32=ON \
+       -DPCRE2_DEBUG=OFF \
+       -DPCRE2_DISABLE_PERCENT_ZT=ON \
+       -DPCRE2_SUPPORT_JIT=OFF \
+       -DPCRE2_SHOW_REPORT=OFF \
+       -DPCRE2_BUILD_PCRE2GREP=OFF \
+       -DPCRE2_BUILD_TESTS=OFF
+
 CMAKE_OPTIONS += \
        -DBUILD_SHARED_LIBS=ON \
        -DPCRE2_BUILD_PCRE2_8=ON \
@@ -92,3 +105,4 @@ endef
 $(eval $(call BuildPackage,libpcre2))
 $(eval $(call BuildPackage,libpcre2-16))
 $(eval $(call BuildPackage,libpcre2-32))
+$(eval $(call HostBuild))