mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
- Update to 1.3.1
- Trim Makefile header - Update maintainer address - Enhance COMMENT description - Remove ABI version in LIB_DEPENDS - Replace tabular by space in WWW entry (pkg-descr)
This commit is contained in:
parent
b409ddc0ca
commit
bd63afca97
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319695
6 changed files with 55 additions and 62 deletions
|
@ -1,31 +1,26 @@
|
||||||
# New ports collection makefile for: py-bjoern
|
# Created by: Olivier Duchateau <duchateau.olivier@gmail.com>
|
||||||
# Date created: 2011-10-23
|
|
||||||
# Whom: Olivier Duchateau <duchateau.olivier@gmail.com>
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
|
|
||||||
PORTNAME= bjoern
|
PORTNAME= bjoern
|
||||||
PORTVERSION= 1.2
|
PORTVERSION= 1.3.1
|
||||||
CATEGORIES= www python
|
CATEGORIES= www python
|
||||||
MASTER_SITES= CHEESESHOP
|
MASTER_SITES= CHEESESHOP
|
||||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||||
|
|
||||||
MAINTAINER= duchateau.olivier@gmail.com
|
MAINTAINER= olivierd@FreeBSD.org
|
||||||
COMMENT= A screamingly fast Python WSGI server
|
COMMENT= Fast Python WSGI server
|
||||||
|
|
||||||
LICENSE= BSD
|
LICENSE= BSD
|
||||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
||||||
|
|
||||||
LIB_DEPENDS= ev.4:${PORTSDIR}/devel/libev
|
LIB_DEPENDS= ev:${PORTSDIR}/devel/libev
|
||||||
|
|
||||||
USE_PYTHON= 2.6+
|
USE_PYTHON= 2.6+
|
||||||
USE_PYDISTUTILS= yes
|
USE_PYDISTUTILS= yes
|
||||||
|
|
||||||
|
CFLAGS+= -I${LOCALBASE}/include
|
||||||
|
LDFLAGS+= -L${LOCALBASE}/lib -lc
|
||||||
|
|
||||||
PLIST_FILES= %%PYTHON_SITELIBDIR%%/${PORTNAME}.so
|
PLIST_FILES= %%PYTHON_SITELIBDIR%%/${PORTNAME}.so
|
||||||
|
|
||||||
post-patch:
|
|
||||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
|
||||||
${WRKSRC}/setup.py
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
SHA256 (bjoern-1.2.tar.gz) = 9a4cf18fbcab49a0b53e98c9b1837df311af1ec58f711fcf91172b83e07b1e20
|
SHA256 (bjoern-1.3.1.tar.gz) = e21391c1f52c088554bf62ce54f8af2889412d41f44847ecf05495b6d0a6dd6e
|
||||||
SIZE (bjoern-1.2.tar.gz) = 22811
|
SIZE (bjoern-1.3.1.tar.gz) = 25811
|
||||||
|
|
44
www/py-bjoern/files/patch-bjoern__portable_sendfile.c
Normal file
44
www/py-bjoern/files/patch-bjoern__portable_sendfile.c
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
See sendfile(2)
|
||||||
|
|
||||||
|
--- ./bjoern/portable_sendfile.c.orig 2012-07-23 14:46:30.000000000 +0000
|
||||||
|
+++ ./bjoern/portable_sendfile.c 2013-06-02 18:17:34.000000000 +0000
|
||||||
|
@@ -2,13 +2,16 @@
|
||||||
|
|
||||||
|
#define SENDFILE_CHUNK_SIZE 16*1024
|
||||||
|
|
||||||
|
+#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
|
+
|
||||||
|
+ #include <sys/types.h>
|
||||||
|
+ #include <sys/socket.h>
|
||||||
|
+ #include <sys/uio.h>
|
||||||
|
+
|
||||||
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
/* OS X */
|
||||||
|
|
||||||
|
- #include <sys/socket.h>
|
||||||
|
- #include <sys/types.h>
|
||||||
|
-
|
||||||
|
ssize_t portable_sendfile(int out_fd, int in_fd) {
|
||||||
|
off_t len = SENDFILE_CHUNK_SIZE;
|
||||||
|
if(sendfile(in_fd, out_fd, 0, &len, NULL, 0) == -1)
|
||||||
|
@@ -18,6 +21,19 @@
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
+ /* FreeBSD */
|
||||||
|
+
|
||||||
|
+ ssize_t portable_sendfile(int out_fd, int in_fd) {
|
||||||
|
+ off_t len = SENDFILE_CHUNK_SIZE;
|
||||||
|
+ if(sendfile(in_fd, out_fd, 0, SENDFILE_CHUNK_SIZE, NULL, &len, 0) == -1)
|
||||||
|
+ return -1;
|
||||||
|
+ return len;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
/* Linux */
|
||||||
|
|
||||||
|
#include <sys/sendfile.h>
|
|
@ -1,32 +0,0 @@
|
||||||
--- bjoern/server.c.orig 2011-03-23 19:02:58.000000000 +0100
|
|
||||||
+++ bjoern/server.c 2011-12-17 22:10:03.000000000 +0100
|
|
||||||
@@ -1,11 +1,17 @@
|
|
||||||
-#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#ifdef WANT_SIGINT_HANDLING
|
|
||||||
# include <sys/signal.h>
|
|
||||||
#endif
|
|
||||||
+#if defined(__FreeBSD__)
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <sys/socket.h>
|
|
||||||
+#include <sys/uio.h>
|
|
||||||
+#elif defined(__linux__)
|
|
||||||
+#include <sys/socket.h>
|
|
||||||
#include <sys/sendfile.h>
|
|
||||||
+#endif
|
|
||||||
#include <ev.h>
|
|
||||||
#include "common.h"
|
|
||||||
#include "wsgi.h"
|
|
||||||
@@ -294,7 +300,9 @@
|
|
||||||
Py_ssize_t bytes_sent = sendfile(
|
|
||||||
request->client_fd,
|
|
||||||
request->current_chunk_p, /* current_chunk_p stores the file fd */
|
|
||||||
- NULL, SENDFILE_CHUNK_SIZE
|
|
||||||
+ NULL, SENDFILE_CHUNK_SIZE,
|
|
||||||
+ NULL, NULL,
|
|
||||||
+ SF_NODISKIO
|
|
||||||
);
|
|
||||||
if(bytes_sent == -1)
|
|
||||||
return handle_nonzero_errno(request);
|
|
|
@ -1,14 +0,0 @@
|
||||||
--- setup.py.orig 2011-04-23 23:23:14.000000000 +0200
|
|
||||||
+++ setup.py 2011-10-23 17:12:46.000000000 +0200
|
|
||||||
@@ -8,8 +8,9 @@
|
|
||||||
bjoern_extension = Extension(
|
|
||||||
'bjoern',
|
|
||||||
sources = SOURCE_FILES,
|
|
||||||
- libraries = ['ev'],
|
|
||||||
- include_dirs = ['http-parser'],
|
|
||||||
+ library_dirs = ['%%LOCALBASE%%/lib'],
|
|
||||||
+ libraries = ['c', 'ev'],
|
|
||||||
+ include_dirs = ['/usr/include', '%%LOCALBASE%%/include', 'http-parser'],
|
|
||||||
define_macros = [('WANT_SENDFILE', '1'),
|
|
||||||
('WANT_SIGINT_HANDLING', '1')],
|
|
||||||
extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-Wall',
|
|
|
@ -2,4 +2,4 @@ bjoern, is a fast and ultra-lightweight asynchronous HTTP/1.1 WSGI server. It
|
||||||
uses Marc Lehmann's hight performance libev event loop and Ryan Dahl's
|
uses Marc Lehmann's hight performance libev event loop and Ryan Dahl's
|
||||||
http-parser.
|
http-parser.
|
||||||
|
|
||||||
WWW: https://github.com/jonashaag/bjoern
|
WWW: https://github.com/jonashaag/bjoern
|
||||||
|
|
Loading…
Add table
Reference in a new issue