Support stage

This commit is contained in:
Baptiste Daroussin 2014-04-09 12:39:38 +00:00
parent e00c29541c
commit 96a7afec4c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350692

View file

@ -14,18 +14,21 @@ COMMENT= Localized interface for Thunderbird
EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip
USES= zip:infozip gecko:thunderbird
USE_XPI= firefox linux-firefox
NO_BUILD= yes
NO_ARCH= yes
USE_SUBMAKE= yes
WDIR= langpack-*@thunderbird.mozilla.org
XPI_DISTNAMES= ${THUNDERBIRD_I18N_}
PLIST?= ${WRKDIR}/plist
PLISTD?= ${WRKDIR}/plist_dirs
PLISTF?= ${WRKDIR}/plist_files
NO_BUILD= yes
NO_ARCH= yes
USES= zip:infozip
USE_THUNDERBIRD= yes
USE_XPI= thunderbird linux-thunderbird
USE_SUBMAKE= yes
NO_STAGE= yes
.include "${.CURDIR}/Makefile.option"
.include <bsd.port.pre.mk>
@ -37,9 +40,6 @@ RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-swit
THUNDERBIRD_I18N_?= ${THUNDERBIRD_I18N}
WDIR= langpack-*@thunderbird.mozilla.org
XPI_DISTNAMES= ${THUNDERBIRD_I18N_}
.for dist in ${XPI_DISTNAMES}
XPI_ID_${dist}= langpack-${dist}@thunderbird.mozilla.org
.endfor
@ -61,21 +61,24 @@ do-extract:
${CAT} ${PLISTF} | ${SORT} >> ${PLIST}
${CAT} ${PLISTD} | ${SORT} -r >> ${PLIST}
do-install:
@${INSTALL} -d ${XPI_LIBDIR} ${XPI_SLDIRS_ALL}
@${CP} -R ${WRKSRC}/ ${XPI_LIBDIR}/
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${WDIR}/
@${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${WDIR}/
@for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q} ; }
@${MKDIR} ${STAGEDIR}${XPI_LIBDIR} ${STAGEDIR}${XPI_SLDIRS_ALL}
cd ${WRKSRC}; ${PAX} -rw . ${STAGEDIR}${XPI_LIBDIR}
${CHMOD} -R a+rX,go-w ${STAGEDIR}${XPI_LIBDIR}/${WDIR}/
@for e in ${STAGEDIR}${XPI_LIBDIR}/${WDIR}; do \
for _dir in ${XPI_LINKFARMS} ; do \
${LN} -sf $${_e##*/} ${STAGEDIR}$$_dir/ ${_Q} ; \
done \
done
@${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A}
@${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { \
${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q}; }' ${_A}
@${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ${XPI_LIBDIR}; { ${RM} -fR $$_dir/${WDIR} ; }' ${_A}
@${ECHO_CMD} '@unexec ${RMDIR} ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A}
@${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ${XPI_LIBDIR}; { ${RM} -f $$_dir/${WDIR} ; }' ${_A}
post-patch:
${FIND} ${WRKSRC} -name install.rdf -print0 | \
${XARGS} -0L1 ${REINPLACE_CMD} -i '' '/<?xml/,$$!d'
${XARGS} -0L1 ${REINPLACE_CMD} -i '' -e '/<?xml/,$$!d'
list-langs:
@fetch -qo- "https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME:S|-i18n||}/releases/${PORTVERSION}/linux-i686/xpi"|\
@ -83,4 +86,5 @@ list-langs:
${AWK} 'BEGIN{ORS=" "}{print $$1}END{printf "\nNumber of languages: %d\n",NR}'
.include "${.CURDIR}/../../www/xpi-adblock/Makefile.xpi"
.include <bsd.port.post.mk>