Enable LZMA as a secondary compression algorithm in sysutils/xdelta.

liblzma could already have been picked up as a hidden dependency.
Make this dependency explicit and enable the feature.

Get rid of a commented CONFIGURE_STYLE while here, by Kurt's request.

ok kmos@
This commit is contained in:
stsp 2022-07-25 08:23:26 +00:00
parent ed537f1630
commit f1a04f8b7f
2 changed files with 25 additions and 2 deletions

View File

@ -4,6 +4,7 @@ COMMENT = tool for RFC3284 delta compression
GH_ACCOUNT = jmacd
GH_PROJECT = xdelta
GH_TAGNAME = v3.0.11
REVISION = 0
CATEGORIES = sysutils devel
@ -19,11 +20,14 @@ WRKSRC = ${WRKDIST}/xdelta3
PERMIT_PACKAGE = Yes
# C++ is only for disabled regression test suite
WANTLIB = c m
WANTLIB = c lzma m pthread
LIB_DEPENDS = archivers/xz
#CONFIGURE_STYLE = autoconf
CONFIGURE_STYLE = autoreconf
CONFIGURE_ARGS = --with-liblzma=yes
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.15

View File

@ -0,0 +1,19 @@
Index: xdelta3/configure.ac
--- xdelta3/configure.ac.orig
+++ xdelta3/configure.ac
@@ -22,7 +22,15 @@ AC_ARG_WITH(
[USE_LIBLZMA=$withval],
[USE_LIBLZMA=auto])
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
+
if test "x$USE_LIBLZMA" != xno ; then
+ if test -n "$PKG_CONFIG"; then
+ LZMA_CFLAGS="`$PKG_CONFIG --cflags liblzma`"
+ CFLAGS="$CFLAGS $LZMA_CFLAGS"
+ LZMA_LDFLAGS="`$PKG_CONFIG --libs liblzma`"
+ LDFLAGS="$LDFLAGS $LZMA_LDFLAGS"
+ fi
AC_CHECK_HEADERS([lzma.h],,[
if test "x$with_liblzma" = xyes ; then
AC_MSG_FAILURE([liblzma includes were not found])