1 |
commit: 0527ba7e6e43d985f73d600fdfe9ef10cd724abc |
2 |
Author: Jason Miller <aidenn0 <AT> geocities <DOT> com> |
3 |
AuthorDate: Fri Jan 29 07:30:20 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 29 09:29:34 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0527ba7e |
7 |
|
8 |
www-servers/mongrel2: New package |
9 |
|
10 |
Gentoo bug: #350826 |
11 |
|
12 |
Add jasom as Proxied maintainer. |
13 |
|
14 |
Package-Manager: portage-2.2.26 |
15 |
|
16 |
www-servers/mongrel2/Manifest | 1 + |
17 |
www-servers/mongrel2/files/systemtls.mak | 136 ++++++++++++++++++++++++++++ |
18 |
www-servers/mongrel2/metadata.xml | 16 ++++ |
19 |
www-servers/mongrel2/mongrel2-1.11.0.ebuild | 28 ++++++ |
20 |
4 files changed, 181 insertions(+) |
21 |
|
22 |
diff --git a/www-servers/mongrel2/Manifest b/www-servers/mongrel2/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..8ebca85 |
25 |
--- /dev/null |
26 |
+++ b/www-servers/mongrel2/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST v1.11.0.tar.gz 1060770 SHA256 dd7accbe4be25ee841b1d73e1fc2e6230e90f5783e1d25527037416e5f519c86 SHA512 60ee5036c2ac826a08bb1300969f5ad7ec2bc67c7f47635a3b458a0bad6d7e2fa37183c2708d512632c86101f537a4eb64eeef0775137705898480da70d61e90 WHIRLPOOL 928b50b5170ac8015bb63c623de644302329bd5ca47608a9f3dfd96b403c95f2ea78475b33b11f8c64403882d4130a5ba1658ba286b5339fbb174b2ebe93d3ba |
29 |
|
30 |
diff --git a/www-servers/mongrel2/files/systemtls.mak b/www-servers/mongrel2/files/systemtls.mak |
31 |
new file mode 100644 |
32 |
index 0000000..e449b76 |
33 |
--- /dev/null |
34 |
+++ b/www-servers/mongrel2/files/systemtls.mak |
35 |
@@ -0,0 +1,136 @@ |
36 |
+CFLAGS?=-g -O2 |
37 |
+CFLAGS += -Wall -Wextra -I./src -DNDEBUG -D_FILE_OFFSET_BITS=64 -pthread |
38 |
+LIBS+=-lzmq -ldl -lsqlite3 -lmbedtls -lmbedx509 -lmbedcrypto |
39 |
+PREFIX?=/usr/local |
40 |
+ |
41 |
+get_objs = $(addsuffix .o,$(basename $(wildcard $(1)))) |
42 |
+ |
43 |
+ASM=$(wildcard src/**/*.S src/*.S) |
44 |
+RAGEL_TARGETS=src/state.c src/http11/http11_parser.c |
45 |
+SOURCES=$(wildcard src/**/*.c src/*.c) $(RAGEL_TARGETS) |
46 |
+OBJECTS=$(patsubst %.c,%.o,${SOURCES}) $(patsubst %.S,%.o,${ASM}) |
47 |
+OBJECTS_NOEXT=$(filter-out ${OBJECTS_EXTERNAL},${OBJECTS}) |
48 |
+LIB_SRC=$(filter-out src/mongrel2.c,${SOURCES}) |
49 |
+LIB_OBJ=$(filter-out src/mongrel2.o,${OBJECTS}) |
50 |
+TEST_SRC=$(wildcard tests/*_tests.c) |
51 |
+TESTS=$(patsubst %.c,%,${TEST_SRC}) |
52 |
+MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}" LIBS="${LIBS}" DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" |
53 |
+ |
54 |
+all: builddirs bin/mongrel2 tests m2sh procer |
55 |
+ |
56 |
+${OBJECTS_NOEXT}: CFLAGS += ${NOEXTCFLAGS} |
57 |
+${OBJECTS}: |
58 |
+ |
59 |
+# |
60 |
+# CFLAGS_DEFS: The $(CC) flags required to obtain C pre-processor #defines, per: |
61 |
+# |
62 |
+# http://nadeausoftware.com/articles/2011/12/c_c_tip_how_list_compiler_predefined_macros |
63 |
+# |
64 |
+# It may be appropriate to copy some of these platform-specific CFLAGS_DEFS assignments into the |
65 |
+# appropriate platform target at the end of this file, eg: |
66 |
+# |
67 |
+# solaris: CFLAGS_DEF=... |
68 |
+# solaris: all |
69 |
+ |
70 |
+#CFLAGS_DEFS=-dM -E # Portland Group PGCC |
71 |
+#CFLAGS_DEFS=-xdumpmacros -E # Oracle Solaris Studio |
72 |
+#CFLAGS_DEFS=-qshowmacros -E # IBM XL C |
73 |
+CFLAGS_DEFS=-dM -E -x c # clang, gcc, HP C, Intel icc |
74 |
+ |
75 |
+.PHONY: builddirs |
76 |
+builddirs: |
77 |
+ @mkdir -p build |
78 |
+ @mkdir -p bin |
79 |
+ |
80 |
+bin/mongrel2: build/libm2.a src/mongrel2.o |
81 |
+ $(CC) $(CFLAGS) $(LDFLAGS) src/mongrel2.o -o $@ $< $(LIBS) |
82 |
+ |
83 |
+build/libm2.a: CFLAGS += -fPIC |
84 |
+build/libm2.a: ${LIB_OBJ} |
85 |
+ ar rcs $@ ${LIB_OBJ} |
86 |
+ ranlib $@ |
87 |
+ |
88 |
+clean: |
89 |
+ rm -rf build bin lib ${OBJECTS} ${TESTS} tests/config.sqlite |
90 |
+ rm -f tests/perf.log |
91 |
+ rm -f tests/test.pid |
92 |
+ rm -f tests/tests.log |
93 |
+ rm -f tests/empty.sqlite |
94 |
+ rm -f tools/lemon/lemon |
95 |
+ rm -f tools/m2sh/tests/tests.log |
96 |
+ rm -rf release-scripts/output |
97 |
+ find . \( -name "*.gcno" -o -name "*.gcda" \) -exec rm {} \; |
98 |
+ ${MAKE} -C tools/m2sh OPTLIB=${OPTLIB} clean |
99 |
+ ${MAKE} -C tools/filters OPTLIB=${OPTLIB} clean |
100 |
+ ${MAKE} -C tests/filters OPTLIB=${OPTLIB} clean |
101 |
+ ${MAKE} -C tools/config_modules OPTLIB=${OPTLIB} clean |
102 |
+ ${MAKE} -C tools/procer OPTLIB=${OPTLIB} clean |
103 |
+ |
104 |
+pristine: clean |
105 |
+ sudo rm -rf examples/python/build examples/python/dist examples/python/m2py.egg-info |
106 |
+ sudo find . -name "*.pyc" -exec rm {} \; |
107 |
+ ${MAKE} -C docs/manual clean |
108 |
+ cd docs/ && ${MAKE} clean |
109 |
+ ${MAKE} -C examples/kegogi clean |
110 |
+ rm -f logs/* |
111 |
+ rm -f run/* |
112 |
+ ${MAKE} -C tools/m2sh pristine |
113 |
+ ${MAKE} -C tools/procer pristine |
114 |
+ git submodule deinit -f src/mbedtls |
115 |
+ |
116 |
+.PHONY: tests |
117 |
+tests: tests/config.sqlite ${TESTS} test_filters filters config_modules |
118 |
+ sh ./tests/runtests.sh |
119 |
+ |
120 |
+tests/config.sqlite: src/config/config.sql src/config/example.sql src/config/mimetypes.sql |
121 |
+ sqlite3 $@ < src/config/config.sql |
122 |
+ sqlite3 $@ < src/config/example.sql |
123 |
+ sqlite3 $@ < src/config/mimetypes.sql |
124 |
+ |
125 |
+$(TESTS): %: %.c build/libm2.a |
126 |
+ $(CC) $(CFLAGS) -o $@ $< build/libm2.a $(LIBS) |
127 |
+ |
128 |
+src/state.c: src/state.rl src/state_machine.rl |
129 |
+src/http11/http11_parser.c: src/http11/http11_parser.rl |
130 |
+src/http11/httpclient_parser.c: src/http11/httpclient_parser.rl |
131 |
+ |
132 |
+check: |
133 |
+ @echo Files with potentially dangerous functions. |
134 |
+ @egrep '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)|stpn?cpy|a?sn?printf|byte_)' $(filter-out src/bstr/bsafe.c,${SOURCES}) |
135 |
+ |
136 |
+m2sh: build/libm2.a |
137 |
+ ${MAKE} ${MAKEOPTS} -C tools/m2sh all |
138 |
+ |
139 |
+procer: build/libm2.a |
140 |
+ ${MAKE} ${MAKEOPTS} -C tools/procer all |
141 |
+ |
142 |
+test_filters: build/libm2.a |
143 |
+ ${MAKE} ${MAKEOPTS} -C tests/filters all |
144 |
+ |
145 |
+filters: build/libm2.a |
146 |
+ ${MAKE} ${MAKEOPTS} -C tools/filters all |
147 |
+ |
148 |
+config_modules: build/libm2.a |
149 |
+ ${MAKE} ${MAKEOPTS} -C tools/config_modules all |
150 |
+ |
151 |
+# Try to install first before creating target directory and trying again |
152 |
+install: all |
153 |
+ install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ \ |
154 |
+ || ( install -d $(DESTDIR)/$(PREFIX)/bin/ \ |
155 |
+ && install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ ) |
156 |
+ ${MAKE} ${MAKEOPTS} -C tools/m2sh install |
157 |
+ ${MAKE} ${MAKEOPTS} -C tools/config_modules install |
158 |
+ ${MAKE} ${MAKEOPTS} -C tools/filters install |
159 |
+ ${MAKE} ${MAKEOPTS} -C tools/procer install |
160 |
+ |
161 |
+examples/python/mongrel2/sql/config.sql: src/config/config.sql src/config/mimetypes.sql |
162 |
+ cat src/config/config.sql src/config/mimetypes.sql > $@ |
163 |
+ |
164 |
+ragel: |
165 |
+ ragel -G2 src/state.rl |
166 |
+ ragel -G2 src/http11/http11_parser.rl |
167 |
+ ragel -G2 src/handler_parser.rl |
168 |
+ ragel -G2 src/http11/httpclient_parser.rl |
169 |
+ |
170 |
+%.o: %.S |
171 |
+ $(CC) $(CFLAGS) -c $< -o $@ |
172 |
|
173 |
diff --git a/www-servers/mongrel2/metadata.xml b/www-servers/mongrel2/metadata.xml |
174 |
new file mode 100644 |
175 |
index 0000000..82ce1c3 |
176 |
--- /dev/null |
177 |
+++ b/www-servers/mongrel2/metadata.xml |
178 |
@@ -0,0 +1,16 @@ |
179 |
+<?xml version="1.0" encoding="UTF-8"?> |
180 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
181 |
+<pkgmetadata> |
182 |
+ <maintainer type="project"> |
183 |
+ <email>proxy-maint@g.o</email> |
184 |
+ <name>proxy-mintainers</name> |
185 |
+ </maintainer> |
186 |
+ <maintainer type="person"> |
187 |
+ <email>Aidenn0@×××××××××.com</email> |
188 |
+ <name>Jason Miller</name> |
189 |
+ <description>Proxied maintainer; set to assignee in all bugs</description> |
190 |
+ </maintainer> |
191 |
+ <upstream> |
192 |
+ <remote-id type="github">mongrel2/mongrel2</remote-id> |
193 |
+ </upstream> |
194 |
+</pkgmetadata> |
195 |
|
196 |
diff --git a/www-servers/mongrel2/mongrel2-1.11.0.ebuild b/www-servers/mongrel2/mongrel2-1.11.0.ebuild |
197 |
new file mode 100644 |
198 |
index 0000000..7a3aa38 |
199 |
--- /dev/null |
200 |
+++ b/www-servers/mongrel2/mongrel2-1.11.0.ebuild |
201 |
@@ -0,0 +1,28 @@ |
202 |
+# Copyright 1999-2016 Gentoo Foundation |
203 |
+# Distributed under the terms of the GNU General Public License v2 |
204 |
+# $Id$ |
205 |
+ |
206 |
+EAPI=5 |
207 |
+ |
208 |
+DESCRIPTION="A language agnostic web server focused on web applications" |
209 |
+HOMEPAGE="http://mongrel2.org" |
210 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz" |
211 |
+ |
212 |
+LICENSE="BSD" |
213 |
+SLOT="0" |
214 |
+KEYWORDS="~amd64 ~x86" |
215 |
+IUSE="" |
216 |
+ |
217 |
+DEPEND="net-libs/zeromq |
218 |
+ >=net-libs/mbedtls-2.1[havege] |
219 |
+ dev-db/sqlite:3" |
220 |
+RDEPEND="${DEPEND}" |
221 |
+ |
222 |
+src_prepare() { |
223 |
+ cp "${FILESDIR}/systemtls.mak" Makefile || die |
224 |
+} |
225 |
+ |
226 |
+src_install() { |
227 |
+ emake install PREFIX=/usr DESTDIR=${D} || die |
228 |
+ dodoc README examples/configs/mongrel2.conf || die |
229 |
+} |