diff options
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/h2o/Manifest | 1 | ||||
-rw-r--r-- | www-servers/h2o/h2o-2.2.5.ebuild | 97 |
2 files changed, 98 insertions, 0 deletions
diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest index b487dd622c17..7cce81ca8608 100644 --- a/www-servers/h2o/Manifest +++ b/www-servers/h2o/Manifest @@ -1 +1,2 @@ DIST h2o-2.2.4.tar.gz 16212596 BLAKE2B 0c2702fb3c7e85e7eae107294794f80cee02b6b2488bbc2e880ea356d8362f0de8f08c3c3d686512cbf9ae1558aed23354f44e27edaf449e43d5876940248296 SHA512 508ebe93b890f573e735d9b1f9c91a669144be3523e34fb7455227fd10b38e04a5db73e706fe8d05849fea3019e792754097871c073715c9eef4eae7c33560b5 +DIST h2o-2.2.5.tar.gz 16257295 BLAKE2B 3c13796eaf9a0aca29bbff7c35fb36d0b5ef47da91f39f71614a89f2d4fea5b1ebbc8f4e3e50bf37a02a84c0fcd96d5ac0be20c83add274157af966134b2d185 SHA512 24b07140d24fbb7796038aab44f44be5ffabc6f2841954273e2ad9f1a864e5482051dd7abfa6446297a46b6868763114695fa4f123ee3175bdac53b4c1868bc2 diff --git a/www-servers/h2o/h2o-2.2.5.ebuild b/www-servers/h2o/h2o-2.2.5.ebuild new file mode 100644 index 000000000000..91c20bba627a --- /dev/null +++ b/www-servers/h2o/h2o-2.2.5.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +CMAKE_MAKEFILE_GENERATOR="emake" +SSL_DEPS_SKIP=1 +USE_RUBY="ruby23 ruby24" + +inherit cmake-utils ruby-single ssl-cert systemd toolchain-funcs user + +DESCRIPTION="H2O - the optimized HTTP/1, HTTP/2 server" +HOMEPAGE="https://h2o.examp1e.net/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +mruby" + +RDEPEND="dev-lang/perl + sys-libs/zlib + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="${RDEPEND} + mruby? ( + ${RUBY_DEPS} + dev-libs/oniguruma + sys-devel/bison + virtual/pkgconfig + )" + +PATCHES=( "${FILESDIR}"/${PN}-2.2-mruby.patch ) + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + cmake-utils_src_prepare + + local ruby="ruby" + if use mruby; then + for ruby in ${RUBY_TARGETS_PREFERENCE}; do + if has_version dev-lang/ruby:${ruby:4:1}.${ruby:5}; then + break + fi + ruby= + done + [[ -z ${ruby} ]] && die "no suitable ruby version found" + fi + + sed -i \ + -e "/INSTALL/s:\(/doc/${PN}\) :\1/html :" \ + -e "/INSTALL/s:\(/doc\)/${PN}:\1/${PF}:" \ + -e "s: ruby: ${ruby}:" \ + CMakeLists.txt + + sed -i "s:pkg-config:$(tc-getPKG_CONFIG):g" deps/mruby/lib/mruby/gem.rb + tc-export CC + export LD="$(tc-getCC)" +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/${PN} + -DWITH_MRUBY=$(usex mruby) + -DWITHOUT_LIBS=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + keepdir /var/www/localhost/htdocs + + insinto /etc/${PN} + doins "${FILESDIR}"/${PN}.conf + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + fperms 0750 /var/log/${PN} +} + +pkg_postinst() { + if [[ ! -f "${EROOT}"etc/ssl/${PN}/server.key ]]; then + install_cert /etc/ssl/${PN}/server + chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/server.* + fi +} |