textproc/libqxp: Fix build with ICU 76.1 and improve port

Fix build with ICU and while at it clean up port Makefile

PR:		283545
This commit is contained in:
Daniel Engberg 2025-01-18 18:22:05 +01:00
parent e813dd41e8
commit e5c93d0cad
2 changed files with 35 additions and 16 deletions

View file

@ -1,5 +1,5 @@
PORTNAME= libqxp
PORTVERSION= 0.0.0
DISTVERSION= 0.0.0
PORTREVISION= 24
CATEGORIES= textproc
MASTER_SITES= https://dev-www.libreoffice.org/src/${PORTNAME}/
@ -10,34 +10,28 @@ WWW= https://wiki.documentfoundation.org/DLP/Libraries/libqxp
LICENSE= MPL20
BUILD_DEPENDS= ${LOCALBASE}/include/boost/cstdint.hpp:devel/boost-libs
LIB_DEPENDS= librevenge-0.0.so:textproc/librevenge \
libicui18n.so:devel/icu
#libicui18n.so:devel/icu \
#libicuuc.so:devel/icu \
#libicudata.so:devel/icu
BUILD_DEPENDS= ${LOCALBASE}/include/boost/math/constants/constants.hpp:devel/boost-libs \
${LOCALBASE}/include/boost/optional.hpp:devel/boost-libs \
${LOCALBASE}/include/boost/variant.hpp:devel/boost-libs \
${LOCALBASE}/include/boost/range/adaptor/reversed.hpp:devel/boost-libs \
${LOCALBASE}/include/boost/cstdint.hpp:devel/boost-libs
CONFIGURE_ARGS= --disable-werror
CPPFLAGS+= -I${LOCALBASE}/include
USES= autoreconf compiler:c++11-lang libtool localbase pathfix \
pkgconfig tar:xz
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
USES= compiler:c++11-lang libtool pathfix pkgconfig tar:xz
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
TEST_TARGET= check
PORTDOCS= *
CONFIGURE_ARGS= --disable-werror
OPTIONS_DEFINE= DOCS DOXYGEN TEST
OPTIONS_DEFAULT=
OPTIONS_SUB= yes
TEST_TARGET= check
TEST_LIB_DEPENDS= libcppunit.so:devel/cppunit
TEST_CONFIGURE_ENABLE= tests
PORTDOCS= *
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen
DOXYGEN_CONFIGURE_OFF= --without-docs
DOXYGEN_IMPLIES= DOCS

View file

@ -0,0 +1,25 @@
--- configure.ac.orig 2025-01-04 21:30:40 UTC
+++ configure.ac
@@ -69,21 +69,7 @@ AC_SUBST([BOOST_CFLAGS])
# ========
# Find icu
# ========
-AS_IF([test "${ICU_CFLAGS+set}" = set],[
- ICU_CFLAGS_overriden=yes],[
- ICU_CFLAGS_overriden=no])
-PKG_CHECK_MODULES([ICU],[icu-i18n],[
- AS_IF([test "${ICU_CFLAGS_overriden}" = no], [
- ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"])
- ], [
- AC_PATH_PROG([ICU_CONFIG],[icu-config])
- AC_MSG_CHECKING([ICU installation])
- AS_IF([${ICU_CONFIG} --cflags >/dev/null 2>&1],[
- ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
- ICU_LIBS=`${ICU_CONFIG} --ldflags`
- AC_MSG_RESULT([found])],[
- AC_MSG_ERROR([libicu config program icu-config not found])])]
-)
+PKG_CHECK_MODULES([ICU],[icu-i18n icu-uc])
AC_SUBST(ICU_CFLAGS)
AC_SUBST(ICU_LIBS)