Apply by doing: cd /usr/ports/infrastructure/mk patch -p0 < /path/to/lzma.diff The ports Makefiles contain "EXTRACT_SUFX= .tar.lzma" which will automatically pick up lzma as a build time dependency. Index: bsd.port.mk =================================================================== RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.937 diff -u -r1.937 bsd.port.mk --- bsd.port.mk 15 May 2008 10:09:29 -0000 1.937 +++ bsd.port.mk 16 May 2008 17:21:24 -0000 @@ -571,6 +571,7 @@ TAR ?= /bin/tar UNZIP ?= unzip BZIP2 ?= bzip2 +LZMA ?= lzma MAKE_ENV += EXTRA_SYS_MK_INCLUDES="" @@ -1007,8 +1008,13 @@ (defined(PATCHFILES) && !empty(_PATCHFILES:M*.bz2)) _USE_BZIP2 ?= Yes .endif +.if !empty(EXTRACT_ONLY:M*.tar.lzma) || \ + (defined(PATCHFILES) && !empty(_PATCHFILES:M*.lzma)) +_USE_LZMA ?= Yes +.endif _USE_ZIP ?= No _USE_BZIP2 ?= No +_USE_LZMA ?= No EXTRACT_CASES ?= @@ -1025,6 +1031,11 @@ EXTRACT_CASES += *.tar.bz2|*.tbz2) \ ${BZIP2} -dc ${FULLDISTDIR}/$$archive | ${TAR} xf -;; .endif +.if ${_USE_LZMA:L} != "no" +BUILD_DEPENDS += :lzma-*:archivers/lzma +EXTRACT_CASES += *.tar.lzma) \ + ${LZMA} -dc ${FULLDISTDIR}/$$archive | ${TAR} xf -;; +.endif EXTRACT_CASES += *.tar) \ ${TAR} xf ${FULLDISTDIR}/$$archive;; EXTRACT_CASES += *.shar.gz|*.shar.Z|*.sh.gz|*.sh.Z) \