freebsd-ports/japanese/less/files/patch-filename.c
Norikatsu Shigemura 63b5551f53 o Add support .xz/.lzma (required xz and lzma commands).
o MAKE_JOBS_SAFE confirmed.
o Fix typo (s/DOCDIR/DOCSDIR/g).
o Bump PORTREVISION, accordingly.

Inspired by:	import of liblzma, xz, xzdec, lzmainfo by mm@
2010-05-10 14:23:54 +00:00

18 lines
689 B
C

--- filename.c.orig 2010-05-10 23:08:16.800855000 +0900
+++ filename.c 2010-05-10 23:10:53.231134025 +0900
@@ -802,9 +802,15 @@
else if (strcmp(".gz", &filename[length - 3]) == 0 ||
strcmp(".GZ", &filename[length - 3]) == 0)
return ("| gzip -cd %s");
+ else if (strcmp(".xz", &filename[length - 3]) == 0 ||
+ strcmp(".XZ", &filename[length - 3]) == 0)
+ return ("| xz -cd %s");
else if (strcmp(".bz2", &filename[length - 4]) == 0 ||
strcmp(".BZ2", &filename[length - 4]) == 0)
return ("| bzip2 -cd %s");
+ else if (strcmp(".lzma", &filename[length - 5]) == 0 ||
+ strcmp(".LZMA", &filename[length - 5]) == 0)
+ return ("| lzma -cd %s");
else
return (NULL);
}