1
0
Fork 0
Browse Source

USES=7z: convert p7zip to 7-zip

PR:		260866
Tested by:	mtree -R time -K sha256 in korean/nanumfonts-otf
main
Jan Beich 7 months ago
parent
commit
c0c4550edc
  1. 40
      Mk/Uses/7z.mk
  2. 4
      games/nwndata/Makefile
  3. 2
      korean/nanumfonts-otf/Makefile

40
Mk/Uses/7z.mk

@ -2,9 +2,9 @@
#
# Feature: 7z
# Usage: USES=7z or USES=7z:ARGS
# Valid ARGS: p7zip, partial
# Valid ARGS: 7-zip, partial
#
# p7zip Extract using 7z(1) instead of bsdtar(1)
# 7-zip Extract using 7zz(1) instead of bsdtar(1)
# partial Extract only files tagged with :7z or in EXTRACT_ONLY_7z
#
# MAINTAINER: jbeich@FreeBSD.org
@ -12,42 +12,42 @@
.if !defined(_INCLUDE_USES_7Z_MK)
_INCLUDE_USES_7Z_MK= yes
P7ZIP_CMD?= 7z
P7ZIP_BEFORE_ARGS?= x -bd -y -o${P7ZIP_WRKDIR} >/dev/null
P7ZIP_AFTER_ARGS?= # empty
P7ZIP_WRKDIR?= ${EXTRACT_WRKDIR}
7-ZIP_CMD?= 7zz
7-ZIP_BEFORE_ARGS?= x -bd -y -o${7-ZIP_WRKDIR} >/dev/null
7-ZIP_AFTER_ARGS?= # empty
7-ZIP_WRKDIR?= ${EXTRACT_WRKDIR}
.if !empty(7z_ARGS:Np7zip:Npartial)
IGNORE= USES=7z has invalid arguments: ${7z_ARGS:Np7zip:Npartial}
.if !empty(7z_ARGS:N7-zip:Npartial)
IGNORE= USES=7z has invalid arguments: ${7z_ARGS:N7-zip:Npartial}
.endif
.if ${7z_ARGS:Mp7zip}
EXTRACT_DEPENDS+= ${P7ZIP_CMD}:archivers/p7zip
.if ${7z_ARGS:M7-zip}
EXTRACT_DEPENDS+= ${7-ZIP_CMD}:archivers/7-zip
.endif
.if ! ${7z_ARGS:Mpartial}
EXTRACT_SUFX?= .7z
.endif
.if ${7z_ARGS:Mp7zip} && ! ${7z_ARGS:Mpartial}
EXTRACT_CMD?= ${P7ZIP_CMD}
EXTRACT_BEFORE_ARGS?= ${P7ZIP_BEFORE_ARGS}
EXTRACT_AFTER_ARGS?= ${P7ZIP_AFTER_ARGS}
.if ${7z_ARGS:M7-zip} && ! ${7z_ARGS:Mpartial}
EXTRACT_CMD?= ${7-ZIP_CMD}
EXTRACT_BEFORE_ARGS?= ${7-ZIP_BEFORE_ARGS}
EXTRACT_AFTER_ARGS?= ${7-ZIP_AFTER_ARGS}
.endif
.if ! ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY)
.if ! ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY)
EXTRACT_ONLY+= ${EXTRACT_ONLY_7z}
.endif
.if ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial}
.if ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial}
EXTRACT_ONLY?= ${DISTFILES:N*\:*7z*:C/:.*//}
EXTRACT_ONLY_7z?= ${DISTFILES:M*\:*7z*:C/:.*//}
_USES_extract+= 520:do-p7zip-extract
do-p7zip-extract:
_USES_extract+= 520:do-7-zip-extract
do-7-zip-extract:
@for file in ${EXTRACT_ONLY_7z}; do \
if ! ${P7ZIP_CMD} ${P7ZIP_BEFORE_ARGS} \
${_DISTDIR}/$$file ${P7ZIP_AFTER_ARGS}; \
if ! ${7-ZIP_CMD} ${7-ZIP_BEFORE_ARGS} \
${_DISTDIR}/$$file ${7-ZIP_AFTER_ARGS}; \
then \
exit 1; \
fi; \

4
games/nwndata/Makefile

@ -28,7 +28,7 @@ NWNVER= 1.61
NWNREV= 0
NWN_DIAMOND= yes
USES= 7z:p7zip zip
USES= 7z:7-zip zip
PLIST_SUB+= DIAMOND="" ORIGINAL="@comment "
.else
@ -45,7 +45,7 @@ WRKSRC= ${WRKDIR}/nwn
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
.if defined(NWN_DIAMOND)
${LOCALBASE}/bin/${P7ZIP_CMD} e -y -x'r!*.dll' -x'r!*.exe'\
${LOCALBASE}/bin/${7-ZIP_CMD} e -y -x'r!*.dll' -x'r!*.exe'\
-o${WRKSRC}/Kingmaker ${CDROM_MOUNT}/KingmakerSetup.exe
.for zipfile in Data_Shared.zip Data_linux.zip data/XP1.zip data/XP2.zip
(cd ${STAGEDIR}${DATADIR} && ${UNZIP_NATIVE_CMD}\

2
korean/nanumfonts-otf/Makefile

@ -22,7 +22,7 @@ EXTRACT_SUBDIR= \$$WINDIR/Fonts
NO_ARCH= yes
NO_BUILD= yes
USES= 7z:p7zip fonts
USES= 7z:7-zip fonts
FONTTYPE?= otf
FONTFORMAT?= OpenType

Loading…
Cancel
Save