aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-03-07 23:25:02 +0800
committerbapt <bapt@FreeBSD.org>2014-03-07 23:25:02 +0800
commitaa8d28aa0918fc369f62751d129c7043ed2f7dd2 (patch)
tree043f1daa0baf31f4f7adaff3e8baa2387b6cf442 /Mk/Uses
parent1101c3f1b729c0d1535f3b4ee841f83309581719 (diff)
downloadfreebsd-ports-gnome-aa8d28aa0918fc369f62751d129c7043ed2f7dd2.tar.gz
freebsd-ports-gnome-aa8d28aa0918fc369f62751d129c7043ed2f7dd2.tar.zst
freebsd-ports-gnome-aa8d28aa0918fc369f62751d129c7043ed2f7dd2.zip
Add USES=zip and USES=zip:infozip
To handle the zip archives from distfiles Reviewed by: mat, antoine
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/zip.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/Mk/Uses/zip.mk b/Mk/Uses/zip.mk
new file mode 100644
index 000000000000..2a475cc01360
--- /dev/null
+++ b/Mk/Uses/zip.mk
@@ -0,0 +1,26 @@
+# $FreeBSD$
+#
+# handle zip archives
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: zip
+# Usage: USES=zip[:infozip]
+#
+.if !defined(_INCLUDE_USES_ZIP_Mk)
+_INCLUDE_USES_ZIP_MK= yes
+
+zip_ARGS?= none
+
+EXTRACT_SUFX= .zip
+
+.if ${zip_ARGS} == infozip
+EXTRACT_DEPENDS+= ${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
+
+EXTRACT_CMD?= ${UNZIP_CMD}
+EXTRACT_BEFORE_ARGS?= -qo
+EXTRACT_AFTER_ARGS?= -d ${WRKDIR}
+.elif ${zip_ARGS} != none
+IGNORE= Incorrect 'USES+=zip:${zip_ARGS}' expecting 'USES+=zip[:infozip]'
+.endif
+.endif