package/pugixml: use explicit build options

Commit upstream 986b7ffd01aedcd4f2aa16e78e4cad9313b6d7b2
"Add Cmake options for pugiconfig.hpp" added feature toogles to release
v1.12, including PUGIXML_NO_XPATH and PUGIXML_COMPACT.

Commit upstream 5f49f2c6575cc2b7d343f8d41581fe92d69d7b52
"Mark advanced options and removed redundant ones" removed CMake
specific support for PUGIXML_HEADER_ONLY and PUGIXML_HAS_LONG_LONG, but
they can still be provided using PUGIXML_BUILD_DEFINES, starting from
release v1.12.

So use the explicit build options PUGIXML_NO_XPATH and PUGIXML_COMPACT,
but keep using PUGIXML_BUILD_DEFINES to set PUGIXML_HEADER_ONLY and
PUGIXML_HAS_LONG_LONG.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Theo Debrouwere <t.debrouwere@televic.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023.02.x
Ricardo Martincoski 2022-11-27 10:07:24 -03:00 committed by Peter Korsgaard
parent cc3a4a7b1d
commit f043f92867
1 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,18 @@ PUGIXML_CPE_ID_VENDOR = pugixml_project
PUGIXML_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PUGIXML_XPATH_SUPPORT),y)
PUGIXML_CONF_OPTS += -DPUGIXML_NO_XPATH=OFF
else
PUGIXML_CONF_OPTS += -DPUGIXML_NO_XPATH=ON
endif
ifeq ($(BR2_PACKAGE_PUGIXML_COMPACT),y)
PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=ON
else
PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=OFF
endif
# Pugixml will automatically enable 'long long' support on C++11 compilers,
# which means gcc 4.8+. As gcc always supports the 'long long' type,
# force-enable this option to support older gcc versions. See also:
@ -19,12 +31,6 @@ PUGIXML_INSTALL_STAGING = YES
PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
HOST_PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
ifeq ($(BR2_PACKAGE_PUGIXML_XPATH_SUPPORT),)
PUGIXML_BUILD_DEFINES += PUGIXML_NO_XPATH
endif
ifeq ($(BR2_PACKAGE_PUGIXML_COMPACT),y)
PUGIXML_BUILD_DEFINES += PUGIXML_COMPACT
endif
ifeq ($(BR2_PACKAGE_PUGIXML_HEADER_ONLY),y)
PUGIXML_BUILD_DEFINES += PUGIXML_HEADER_ONLY
endif