This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 83a0cbc1b4 Some downloads are now tar.xz, which we haven't supported. 
Add in basic awareness and some framework for handling these.
83a0cbc1b4 is described below

commit 83a0cbc1b4cc991dd7434995008a399e13e11fe7
Author: Jim Jagielski <[email protected]>
AuthorDate: Thu Jun 11 08:30:59 2026 -0400

    Some downloads are now tar.xz, which we haven't supported. Add in basic
    awareness and some framework for handling these.
---
 main/configure.ac           | 20 ++++++++++++++++++++
 main/set_soenv.in           |  1 +
 main/solenv/inc/tg_ext.mk   | 12 ++++++++++++
 main/solenv/inc/unitools.mk |  1 +
 4 files changed, 34 insertions(+)

diff --git a/main/configure.ac b/main/configure.ac
index a86bf1fda2..ecc51a4cd6 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -1950,6 +1950,26 @@ fi
 
 AC_SUBST(GNUTAR)
 
+dnl ===================================================================
+dnl Search for xz, needed to unpack .tar.xz external dependency tarballs
+dnl ===================================================================
+AC_MSG_CHECKING([for xz])
+for a in $XZ xz; do
+      $a --version 2> /dev/null > /dev/null
+      if test $? -eq 0; then
+           XZ=$a
+           break
+      fi
+done
+if test -z "$XZ"; then
+    AC_MSG_RESULT([not found])
+    AC_MSG_WARN([xz not found - building with a .tar.xz external dependency 
will fail. Install xz-utils.])
+    echo "xz not found - building with a .tar.xz external dependency will 
fail. Install xz-utils." >> warn
+else
+    AC_MSG_RESULT($XZ)
+fi
+AC_SUBST(XZ)
+
 dnl ===================================================================
 dnl  Test the solaris compiler version
 dnl ===================================================================
diff --git a/main/set_soenv.in b/main/set_soenv.in
index 75f41fc2fc..a96ea2bcb8 100644
--- a/main/set_soenv.in
+++ b/main/set_soenv.in
@@ -1818,6 +1818,7 @@ ToFile( "FAKEROOT",          "@FAKEROOT@",       "e" );
 ToFile( "PKGMK",             "@PKGMK@",          "e" );
 ToFile( "GNUMAKE",           "@GNUMAKE@",        "e" );
 ToFile( "GNUTAR",            "@GNUTAR@",         "e" );
+ToFile( "XZ",                "@XZ@",             "e" );
 ToFile( "UPD",               $UPD,               "e" );
 ToFile( "WORK_STAMP",        $WORK_STAMP,        "e" );
 ToFile( "SOLARVER",          $SOLARVER,          "e" );
diff --git a/main/solenv/inc/tg_ext.mk b/main/solenv/inc/tg_ext.mk
index 55e296052a..cf666b394d 100644
--- a/main/solenv/inc/tg_ext.mk
+++ b/main/solenv/inc/tg_ext.mk
@@ -135,6 +135,18 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tgz
        @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
        @$(RENAME) $@.$(INPATH) $@
 
+$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.xz
+       @-$(RM) $@
+       @noop $(assign UNPACKCMD := $(XZ) -d -c $(subst,\,/ 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.xz) $(TARFILE_FILTER) | 
$(GNUTAR) -x$(tar_verbose_switch)f - )
+       @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
+       @$(RENAME) $@.$(INPATH) $@
+
+$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.txz
+       @-$(RM) $@
+       @noop $(assign UNPACKCMD := $(XZ) -d -c $(subst,\,/ 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).txz) $(TARFILE_FILTER) | 
$(GNUTAR) -x$(tar_verbose_switch)f - )
+       @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
+       @$(RENAME) $@.$(INPATH) $@
+
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar
        @-$(RM) $@
        @noop $(assign UNPACKCMD := $(GNUTAR) -x$(tar_verbose_switch)f 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar)
diff --git a/main/solenv/inc/unitools.mk b/main/solenv/inc/unitools.mk
index 87fde3ddd9..5996c468d2 100644
--- a/main/solenv/inc/unitools.mk
+++ b/main/solenv/inc/unitools.mk
@@ -178,6 +178,7 @@ MKDIRHIER*=mkdir$E -p
 RMDIR*=rmdir
 XARGS*=xargs
 GNUTAR*:=tar
+XZ*:=xz
 
 RM+=$(RMFLAGS)
 ADJUSTVISIBILITY*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/adjustvisibility

Reply via email to