diff options
author | marino <marino@FreeBSD.org> | 2016-08-28 05:34:27 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2016-08-28 05:34:27 +0800 |
commit | 1904a715b17568d6f68635d8bb6c5431dd3ed44a (patch) | |
tree | 69caa56dcce690635aebae23e000081ca6442594 /www/lessc | |
parent | 46106faf49cf40284930308481b60d822e1e307a (diff) | |
download | freebsd-ports-graphics-1904a715b17568d6f68635d8bb6c5431dd3ed44a.tar.gz freebsd-ports-graphics-1904a715b17568d6f68635d8bb6c5431dd3ed44a.tar.zst freebsd-ports-graphics-1904a715b17568d6f68635d8bb6c5431dd3ed44a.zip |
www/lessc: Moving building out of stage phase, fix stage-QA
This port would build and install in the stage phase, but building is
supposed to be complete by then. Moreover, stage QA checks complain
about thousands of "orphaned" files and symbolic links with absolute
paths. Fix all the problems by installing in a temporary build directory
and moving just the lessc files over the stage directory, and fix the
symbolic link by defining a relative path instead.
Functionally, the new package is the same as the old one, so no revbump
is required.
PR: 210567
Approved by: maintainer timeout (2 months)
Diffstat (limited to 'www/lessc')
-rw-r--r-- | www/lessc/Makefile | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/www/lessc/Makefile b/www/lessc/Makefile index 4ec068c7e94..0a50113dd4a 100644 --- a/www/lessc/Makefile +++ b/www/lessc/Makefile @@ -14,14 +14,26 @@ LICENSE= APACHE20 BUILD_DEPENDS= npm>=0:www/npm RUN_DEPENDS= npm>=0:www/npm -NO_BUILD= yes USE_GITHUB= yes GH_ACCOUNT= less GH_PROJECT= less.js +# npm install both builds and installs. To avoid building in the stage phase, +# allow npm to install in a temporary directory and move from there. +# Moreover, only a fraction of what is installed by npm needs to be packaged +do-build: + ${MKDIR} ${WRKDIR}/build-lib + (cd ${WRKDIR}/build-lib && \ + ${SETENV} HOME=${WRKDIR} npm install ${WRKSRC}) + do-install: - (cd ${STAGEDIR}${PREFIX}/lib ; ${SETENV} HOME=${WRKDIR} npm install ${WRKSRC}) - # this is a dirty hack - ${LN} -s ${PREFIX}/lib/node_modules/.bin/lessc ${STAGEDIR}${PREFIX}/bin/lessc + ${MKDIR} ${STAGEDIR}${PREFIX}/bin \ + ${STAGEDIR}${PREFIX}/lib/node_modules/.bin + ${MV} ${WRKDIR}/build-lib/node_modules/less \ + ${STAGEDIR}${PREFIX}/lib/node_modules + ${MV} ${WRKDIR}/build-lib/node_modules/.bin/lessc \ + ${STAGEDIR}${PREFIX}/lib/node_modules/.bin + (cd ${STAGEDIR}${PREFIX}/bin && \ + ${LN} -s ../lib/node_modules/.bin/lessc lessc) .include <bsd.port.mk> |