Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/h2o/
Date: Thu, 03 Oct 2019 12:19:15
Message-Id: 1570104757.bc673827475cbd91f15b5700e1c7f16a86fdd9b1.hattya@gentoo
1 commit: bc673827475cbd91f15b5700e1c7f16a86fdd9b1
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 3 12:12:37 2019 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 3 12:12:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc673827
7
8 www-servers/h2o: new upstream release
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.16
11 Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
12
13 www-servers/h2o/Manifest | 1 +
14 www-servers/h2o/h2o-2.2.6.ebuild | 103 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 104 insertions(+)
16
17 diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest
18 index ddfd2ff20f2..b6f7c241492 100644
19 --- a/www-servers/h2o/Manifest
20 +++ b/www-servers/h2o/Manifest
21 @@ -1 +1,2 @@
22 DIST h2o-2.2.5.tar.gz 16257295 BLAKE2B 3c13796eaf9a0aca29bbff7c35fb36d0b5ef47da91f39f71614a89f2d4fea5b1ebbc8f4e3e50bf37a02a84c0fcd96d5ac0be20c83add274157af966134b2d185 SHA512 24b07140d24fbb7796038aab44f44be5ffabc6f2841954273e2ad9f1a864e5482051dd7abfa6446297a46b6868763114695fa4f123ee3175bdac53b4c1868bc2
23 +DIST h2o-2.2.6.tar.gz 16257760 BLAKE2B 8474751ca9832ddae2022710654ca58a93ebf9ca01afe934950209b04357b7548b05c598c49fe92684b2910fd6309d6fc3923a0b01cdeeb4b0dc65b08842255f SHA512 f2f28905c01782a0432c9dfdb2f21054e0a4741ac4c5f26802d4b439d0172840aa215aba5dc7c9af62275dcc24de105674a3819384dc38246e43ce3e8263eb20
24
25 diff --git a/www-servers/h2o/h2o-2.2.6.ebuild b/www-servers/h2o/h2o-2.2.6.ebuild
26 new file mode 100644
27 index 00000000000..58660077497
28 --- /dev/null
29 +++ b/www-servers/h2o/h2o-2.2.6.ebuild
30 @@ -0,0 +1,103 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI="6"
35 +CMAKE_MAKEFILE_GENERATOR="emake"
36 +SSL_DEPS_SKIP=1
37 +USE_RUBY="ruby24 ruby25 ruby26"
38 +
39 +inherit cmake-utils ruby-single ssl-cert systemd toolchain-funcs user
40 +
41 +DESCRIPTION="H2O - the optimized HTTP/1, HTTP/2 server"
42 +HOMEPAGE="https://h2o.examp1e.net/"
43 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="MIT"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="libressl +mruby"
49 +
50 +RDEPEND="dev-lang/perl
51 + sys-libs/zlib
52 + !libressl? ( dev-libs/openssl:0= )
53 + libressl? ( dev-libs/libressl:0= )"
54 +DEPEND="${RDEPEND}
55 + mruby? (
56 + ${RUBY_DEPS}
57 + || (
58 + dev-libs/onigmo
59 + dev-libs/oniguruma
60 + )
61 + sys-devel/bison
62 + virtual/pkgconfig
63 + )"
64 +
65 +PATCHES=(
66 + "${FILESDIR}"/${PN}-2.2-libressl-2.7.patch
67 + "${FILESDIR}"/${PN}-2.2-mruby.patch
68 +)
69 +
70 +pkg_setup() {
71 + enewgroup ${PN}
72 + enewuser ${PN} -1 -1 -1 ${PN}
73 +}
74 +
75 +src_prepare() {
76 + cmake-utils_src_prepare
77 +
78 + local ruby="ruby"
79 + if use mruby; then
80 + for ruby in ${RUBY_TARGETS_PREFERENCE}; do
81 + if has_version dev-lang/ruby:${ruby:4:1}.${ruby:5}; then
82 + break
83 + fi
84 + ruby=
85 + done
86 + [[ -z ${ruby} ]] && die "no suitable ruby version found"
87 + fi
88 +
89 + sed -i \
90 + -e "/INSTALL/s:\(/doc/${PN}\) :\1/html :" \
91 + -e "/INSTALL/s:\(/doc\)/${PN}:\1/${PF}:" \
92 + -e "s: ruby: ${ruby}:" \
93 + CMakeLists.txt
94 +
95 + sed -i "s:pkg-config:$(tc-getPKG_CONFIG):g" deps/mruby/lib/mruby/gem.rb
96 + tc-export CC
97 + export LD="$(tc-getCC)"
98 +}
99 +
100 +src_configure() {
101 + local mycmakeargs=(
102 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/${PN}
103 + -DWITH_MRUBY=$(usex mruby)
104 + -DWITHOUT_LIBS=ON
105 + )
106 + cmake-utils_src_configure
107 +}
108 +
109 +src_install() {
110 + cmake-utils_src_install
111 +
112 + keepdir /var/www/localhost/htdocs
113 +
114 + insinto /etc/${PN}
115 + doins "${FILESDIR}"/${PN}.conf
116 +
117 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
118 + systemd_dounit "${FILESDIR}"/${PN}.service
119 +
120 + insinto /etc/logrotate.d
121 + newins "${FILESDIR}"/${PN}.logrotate ${PN}
122 +
123 + keepdir /var/log/${PN}
124 + fowners ${PN}:${PN} /var/log/${PN}
125 + fperms 0750 /var/log/${PN}
126 +}
127 +
128 +pkg_postinst() {
129 + if [[ ! -f "${EROOT}"etc/ssl/${PN}/server.key ]]; then
130 + install_cert /etc/ssl/${PN}/server
131 + chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/server.*
132 + fi
133 +}