diff options
author | dinoex <dinoex@FreeBSD.org> | 2014-03-29 04:00:36 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2014-03-29 04:00:36 +0800 |
commit | bae51d59c9034ffcabab63b5bbb51ef67f7e0042 (patch) | |
tree | d0edfc4627b2ef4b067fda28be81f72a42fc7ce5 /www | |
parent | 9778be45288b59383fa4e5802c4dd93138fd457f (diff) | |
download | freebsd-ports-gnome-bae51d59c9034ffcabab63b5bbb51ef67f7e0042.tar.gz freebsd-ports-gnome-bae51d59c9034ffcabab63b5bbb51ef67f7e0042.tar.zst freebsd-ports-gnome-bae51d59c9034ffcabab63b5bbb51ef67f7e0042.zip |
- use STAGEDIR
- use OPTIONS_DEFINE
- move example httpd.conf
- remove obsolete RUBY_NO_RD_HTML
Diffstat (limited to 'www')
-rw-r--r-- | www/mod_ruby/Makefile | 51 | ||||
-rw-r--r-- | www/mod_ruby/pkg-message | 2 | ||||
-rw-r--r-- | www/mod_ruby/pkg-plist | 15 |
3 files changed, 27 insertions, 41 deletions
diff --git a/www/mod_ruby/Makefile b/www/mod_ruby/Makefile index 25d7477e390b..e74d329c27a9 100644 --- a/www/mod_ruby/Makefile +++ b/www/mod_ruby/Makefile @@ -12,14 +12,13 @@ DIST_SUBDIR= ruby MAINTAINER= dinoex@FreeBSD.org COMMENT= An Apache module that embeds Ruby interpreter within -NO_STAGE= yes - USES= perl5 USE_APACHE= 22 USE_RUBY= yes USE_PERL5= build -CONFIGURE_ARGS= --with-apxs="${APXS}" +CONFIGURE_ARGS= --with-apxs="${APXS}" \ + --with-apr-includes="`${LOCALBASE}/bin/apr-1-config --includedir`" CFLAGS+= -DONIG_ESCAPE_REGEX_T_COLLISION MAKE_ARGS= RUBY="${RUBY}" INSTALL_TARGET= site-install @@ -30,43 +29,39 @@ DOCS_EN= COPYING ChangeLog LEGAL LICENSE.apreq NOTICE \ README.en doc/default.css doc/*.en.* DOCS_JA= README.ja doc/default.css doc/*.ja.* -.include <bsd.port.pre.mk> +OPTIONS_DEFINE= PTHREADS DOCS EXAMPLES +OPTIONS_DEFAULT= +NO_OPTIONS_SORT=yes +OPTIONS_SUB=yes +PTHREADS_DESC= Build threaded module -.if ${APACHE_VERSION} > 20 -CONFIGURE_ARGS+= --with-apr-includes="`${LOCALBASE}/bin/apr-1-config --includedir`" -.endif +.include <bsd.port.options.mk> do-configure: - @cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} configure.rb ${CONFIGURE_ARGS} -.if !defined(WITHOUT_PTHREADS) && defined(WITH_PTHREADS) + cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} \ + configure.rb ${CONFIGURE_ARGS} +.if ${PORT_OPTIONS:MPTHREADS} # dirty hack to force mod_ruby.so linked with lpthread.so, otherwise unresolved # symbols happen - @${REINPLACE_CMD} -e 's|-pthread|-pthread -lpthread|' ${WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's|-pthread|-pthread -lpthread|' ${WRKSRC}/Makefile PKGNAMESUFFIX= -pthreads .endif -post-install: doc-install - ${INSTALL_DATA} ${WRKSRC}/examples/httpd.conf `${APXS} -q SYSCONFDIR`/httpd.conf.${PORTNAME} -# Would be nice if we could use PLIST_SUB here.. - ${REINPLACE_CMD} \ - -e 's,%%LIBEXECDIR%%,'`${APXS} -q LIBEXECDIR | ${SED} 's:${LOCALBASE}/::'`',g;' \ - -e 's,%%SYSCONFDIR%%,'`${APXS} -q SYSCONFDIR | ${SED} 's:${LOCALBASE}/::'`',g;' \ - ${TMPPLIST} - -doc-install: -.if !defined(NOPORTDOCS) -.if !defined(RUBY_NO_RD_HTML) - cd ${WRKSRC}/doc; ${MAKE} -.endif - ${MKDIR} ${RUBY_MODDOCDIR}/ja +post-install: +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR}/ja .for f in ${DOCS_EN} - ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/ .endfor .for f in ${DOCS_JA} - ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/ja/ .endfor .endif - @${CAT} ${PKGMESSAGE} +.if ${PORT_OPTIONS:MEXAMPLES} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/httpd.conf \ + ${STAGEDIR}${EXAMPLESDIR}/httpd.conf +.endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/www/mod_ruby/pkg-message b/www/mod_ruby/pkg-message index 75f7805e2f4b..7f75e605dcdb 100644 --- a/www/mod_ruby/pkg-message +++ b/www/mod_ruby/pkg-message @@ -2,7 +2,7 @@ Please edit your Apache configuration file to enable and set up this module. -Look at the file ${PREFIX}/etc/apache/httpd.conf.mod_ruby +Look at the file ${PREFIX}/share/examples/mod_ruby/httpd.conf and the documents held in ${PREFIX}/share/doc/ruby18/mod_ruby/ for indications on what to do. diff --git a/www/mod_ruby/pkg-plist b/www/mod_ruby/pkg-plist index 88d0f62f77dd..977a0586585c 100644 --- a/www/mod_ruby/pkg-plist +++ b/www/mod_ruby/pkg-plist @@ -10,36 +10,27 @@ %%RUBY_SITELIBDIR%%/apache/ruby-run.rb %%RUBY_SITELIBDIR%%/auto-reload.rb @dirrm %%RUBY_SITELIBDIR%%/apache -%%LIBEXECDIR%%/mod_ruby.so -%%SYSCONFDIR%%/httpd.conf.mod_ruby +%%APACHEMODDIR%%/mod_ruby.so %%PORTDOCS%%%%RUBY_MODDOCDIR%%/COPYING %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ChangeLog %%PORTDOCS%%%%RUBY_MODDOCDIR%%/LEGAL %%PORTDOCS%%%%RUBY_MODDOCDIR%%/LICENSE.apreq %%PORTDOCS%%%%RUBY_MODDOCDIR%%/NOTICE %%PORTDOCS%%%%RUBY_MODDOCDIR%%/README.en -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/classes.en.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/classes.en.rd %%PORTDOCS%%%%RUBY_MODDOCDIR%%/default.css -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/directives.en.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/directives.en.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/faq.en.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/faq.en.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/index.en.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/index.en.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/install.en.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/install.en.rd %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/README.ja %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/classes.ja.euc.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/classes.ja.jis.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/default.css %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/directives.ja.euc.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/directives.ja.jis.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/faq.ja.euc.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/faq.ja.jis.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/index.ja.euc.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/index.ja.jis.html %%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/install.ja.euc.rd -%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/install.ja.jis.html %%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%/ja %%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%% +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/httpd.conf +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% |