Changeset View
Standalone View
www/h2o/Makefile
# Created by: Dave Cottlehuber <dch@skunkwerks.at> | # Created by: Dave Cottlehuber <dch@skunkwerks.at> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= h2o | PORTNAME= h2o | ||||
PORTVERSION= 2.2.2 | PORTVERSION= 2.2.2 | ||||
jrm: DISTVERSION, plus order | |||||
PORTREVISION= 1 | |||||
DISTVERSIONPREFIX= v | DISTVERSIONPREFIX= v | ||||
PORTREVISION= 2 | |||||
CATEGORIES= www | CATEGORIES= www | ||||
MAINTAINER= dch@skunkwerks.at | MAINTAINER= dch@skunkwerks.at | ||||
COMMENT= Optimized HTTP2 server with support for HTTP/1.x | COMMENT= Optimized HTTP2 server with support for HTTP/1.x | ||||
LICENSE= MIT | LICENSE= MIT | ||||
USE_GITHUB= yes | |||||
USES= cmake:noninja compiler:c11 cpe perl5 shebangfix ssl | USES= cmake:noninja compiler:c11 cpe perl5 shebangfix ssl | ||||
CPE_VENDOR= h2o_project | CPE_VENDOR= h2o_project | ||||
USE_GITHUB= yes | |||||
USE_PERL5= run | USE_PERL5= run | ||||
SHEBANG_FILES= share/h2o/start_server | SHEBANG_FILES= share/h2o/start_server | ||||
Done Inline ActionsNitpicking: If you want to follow Chapter 14. of the Porter's Handbook, maybe this. USES= cmake:noninja compiler:c11 cpe perl5 shebangfix ssl SHEBANG_FILES= share/h2o/start_server jrm: Nitpicking: If you want to follow Chapter 14. of the Porter's Handbook, maybe this. | |||||
PORTDOCS= README.md | PORTDOCS= README.md | ||||
jrmUnsubmitted Done Inline ActionsTo use PORTDOCS, you need to add OPTIONS_DEFINE=DOCS. jrm: To use `PORTDOCS`, you need to add `OPTIONS_DEFINE=DOCS`. | |||||
dchAuthorUnsubmitted Done Inline Actionsdo you mean from a policy perspective so people can disable all DOCS generation, or functionally, like it doesn't work correctly without it? Maybe referring to this?
dch: do you mean from a policy perspective so people can disable all DOCS generation, or… | |||||
jrmUnsubmitted Done Inline ActionsYes, policy. I was quoting mat@ from a one of your recent diffs, but maybe it would be clearer to say, it makes sense to add a DOCS option when setting PORTDOCS. jrm: Yes, policy. I was quoting mat@ from a one of your recent diffs, but maybe it would be clearer… | |||||
matUnsubmitted Not Done Inline ActionsIt is not so much a policy as a reality, PORTDOCS will not work properly if you do not have a DOCS option. mat: It is not so much a policy as a reality, PORTDOCS will not work properly if you do not have a… | |||||
jrmUnsubmitted Not Done Inline ActionsGood to know. What specifically will not work properly? In this case, if we remove the DOCS option and move the lines from the post-install-DOCS-on target to the post-install target all seems fine. jrm: Good to know. What specifically will not work properly? In this case, if we remove the DOCS… | |||||
SUB_FILES= ${PORTNAME} | SUB_FILES= ${PORTNAME} | ||||
SUB_LIST+= H2O_USER=${H2O_USER} \ | SUB_LIST+= H2O_USER=${H2O_USER} \ | ||||
H2O_GROUP=${H2O_GROUP} \ | H2O_GROUP=${H2O_GROUP} \ | ||||
H2O_LOGDIR=${H2O_LOGDIR} | H2O_LOGDIR=${H2O_LOGDIR} | ||||
PLIST_SUB= H2O_USER=${H2O_USER} \ | PLIST_SUB= H2O_USER=${H2O_USER} \ | ||||
H2O_GROUP=${H2O_GROUP} \ | H2O_GROUP=${H2O_GROUP} \ | ||||
H2O_LOGDIR=${H2O_LOGDIR} | H2O_LOGDIR=${H2O_LOGDIR} | ||||
H2O_USER?= www | H2O_USER?= www | ||||
H2O_GROUP?= www | H2O_GROUP?= www | ||||
H2O_LOGDIR= /var/log/${PORTNAME}/ | H2O_LOGDIR= /var/log/${PORTNAME}/ | ||||
USE_RC_SUBR= ${PORTNAME} | USE_RC_SUBR= ${PORTNAME} | ||||
OPTIONS_DEFINE= MRUBY | OPTIONS_DEFINE= MRUBY | ||||
OPTIONS_DEFAULT= MRUBY | OPTIONS_DEFAULT= MRUBY | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
Done Inline ActionsNo need to add DOCS to OPTIONS_DEFAULT, because, as you wrote above, it will be included by default. You can confirm this by removing it and doing make -VOPTIONS_DEFAULT. jrm: No need to add DOCS to OPTIONS_DEFAULT, because, as you wrote above, it will be included by… | |||||
MRUBY_DESC= Build with mruby handler support | MRUBY_DESC= Build with mruby handler support | ||||
CMAKE_ARGS+= -DEXTRA_LIBRARIES=OFF -DWITHOUT_LIBS=ON -DWITH_BUNDLED_SSL=OFF | CMAKE_ARGS+= -DEXTRA_LIBRARIES=OFF -DWITHOUT_LIBS=ON -DWITH_BUNDLED_SSL=OFF | ||||
CMAKE_VERBOSE= yes | CMAKE_VERBOSE= yes | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
Done Inline ActionsRemove jrm: Remove | |||||
MRUBY_CMAKE_ON= -DWITH_MRUBY=ON | MRUBY_CMAKE_ON= -DWITH_MRUBY=ON | ||||
MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF | MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF | ||||
.if ${PORT_OPTIONS:MMRUBY} | .if ${PORT_OPTIONS:MMRUBY} | ||||
Done Inline ActionsMRUBY_USE=ruby=yes jrm: MRUBY_USE=ruby=yes | |||||
Done Inline ActionsThis took me a few reads to understand but I've got it now. thanks! dch: This took me a few reads to understand but I've got it now. thanks! | |||||
USE_RUBY= yes | USE_RUBY= yes | ||||
RUBY_NO_RUN_DEPENDS= yes | RUBY_NO_RUN_DEPENDS= yes | ||||
USES+= bison | USES+= bison | ||||
.endif | .endif | ||||
jrmUnsubmitted Done Inline ActionsMRUBY_CMAKE_ON= -DWITH_MRUBY=ON jrm: MRUBY_CMAKE_ON= -DWITH_MRUBY=ON
MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF
MRUBY_USES= bison… | |||||
jrmUnsubmitted Done Inline ActionsErr.. not MRUBY_USE_RUBY= yes, but MRUBY_USE=RUBY jrm: Err.. not `MRUBY_USE_RUBY= yes`, but `MRUBY_USE=RUBY` | |||||
jrmUnsubmitted Done Inline ActionsAlso, I think you can use MRUBY_CMAKE_BOOL=WITH_MRUBY in place of MRUBY_CMAKE_ON= -DWITH_MRUBY=ON MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF jrm: Also, I think you can use `MRUBY_CMAKE_BOOL=WITH_MRUBY` in place of
```
MRUBY_CMAKE_ON=… | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's|exec perl|exec ${LOCALBASE}/bin/perl|' \ | @${REINPLACE_CMD} -e 's|exec perl|exec ${LOCALBASE}/bin/perl|' \ | ||||
${WRKSRC}/share/h2o/annotate-backtrace-symbols \ | ${WRKSRC}/share/h2o/annotate-backtrace-symbols \ | ||||
${WRKSRC}/share/h2o/fetch-ocsp-response \ | ${WRKSRC}/share/h2o/fetch-ocsp-response \ | ||||
${WRKSRC}/share/h2o/kill-on-close \ | ${WRKSRC}/share/h2o/kill-on-close \ | ||||
${WRKSRC}/share/h2o/start_server | ${WRKSRC}/share/h2o/start_server | ||||
post-install: | post-install: | ||||
${MKDIR} ${STAGEDIR}${DOCSDIR} \ | ${MKDIR} ${STAGEDIR}${DOCSDIR} \ | ||||
${STAGEDIR}${ETCDIR} \ | ${STAGEDIR}${ETCDIR} \ | ||||
${STAGEDIR}${H2O_LOGDIR} | ${STAGEDIR}${H2O_LOGDIR} | ||||
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} | ||||
${INSTALL_DATA} \ | ${INSTALL_DATA} \ | ||||
${FILESDIR}/${PORTNAME}.conf.sample \ | ${FILESDIR}/${PORTNAME}.conf.sample \ | ||||
${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample | ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample | ||||
jrmUnsubmitted Done Inline Actionspost-install: ${FILESDIR}/${PORTNAME}.conf.sample \ ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample post-install-DOCS-on: jrm: post-install:
${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${H2O_LOGDIR}
${INSTALL_DATA} \… | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
DISTVERSION, plus order