Remove a hack that was added to the autoconf script to workaround a test
not working properly when systrace was enabled now that the systrace filter has been fixed so posix_openpt() works. ok dcoppa@
This commit is contained in:
parent
b4128594aa
commit
91515693ab
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2013/03/11 11:35:48 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2013/03/13 00:20:56 brad Exp $
|
||||
|
||||
COMMENT= BitTorrent library written in C++
|
||||
|
||||
DISTNAME= libtorrent-0.12.9
|
||||
REVISION= 1
|
||||
REVISION= 2
|
||||
EPOCH= 0
|
||||
SHARED_LIBS += torrent 20.0 # .14.1
|
||||
CATEGORIES= net devel
|
||||
@ -22,8 +22,7 @@ LIB_DEPENDS= devel/libsigc++-2
|
||||
|
||||
USE_LIBTOOL= Yes
|
||||
|
||||
AUTOCONF_VERSION= 2.68
|
||||
CONFIGURE_STYLE= autoconf
|
||||
CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
|
||||
--enable-static \
|
||||
--with-kqueue \
|
||||
|
@ -1,73 +0,0 @@
|
||||
$OpenBSD: patch-scripts_checks_m4,v 1.5 2012/12/10 15:05:12 dcoppa Exp $
|
||||
|
||||
|
||||
When USE_SYSTRACE is set to Yes, systrace causes the check to fail
|
||||
and KQUEUE_SOCKET_ONLY is wrongly set to 1:
|
||||
|
||||
---8<---
|
||||
|
||||
checking for kqueue support... yes
|
||||
checking whether kqueue supports pipes and ptys... systrace: deny user: dcoppa, prog: /home/dcoppa/ports/pobj/libtorrent-0.12.9/libtorrent-0.12.9/conftest, pid: 17964(0)[16449], policy: /usr/bin/env, filters: 241, syscall: native-fswrite(5), filename: /dev/ptm
|
||||
no
|
||||
checking for fallocate... no
|
||||
|
||||
---8<---
|
||||
|
||||
$ grep KQUEUE_SOCKET_ONLY $(make show=WRKBUILD)/config.h
|
||||
#define KQUEUE_SOCKET_ONLY 1
|
||||
|
||||
|
||||
--- scripts/checks.m4.orig Fri Apr 6 15:17:41 2012
|
||||
+++ scripts/checks.m4 Fri Apr 6 15:19:11 2012
|
||||
@@ -93,51 +93,12 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
|
||||
])
|
||||
])
|
||||
|
||||
-AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
|
||||
- AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
|
||||
-
|
||||
- AC_RUN_IFELSE(
|
||||
- [[#include <fcntl.h>
|
||||
- #include <stdlib.h>
|
||||
- #include <unistd.h>
|
||||
- #include <sys/event.h>
|
||||
- #include <sys/time.h>
|
||||
- int main() {
|
||||
- struct kevent ev[2], ev_out[2];
|
||||
- struct timespec ts = { 0, 0 };
|
||||
- int pfd[2], pty[2], kfd, n;
|
||||
- char buffer[9001];
|
||||
- if (pipe(pfd) == -1) return 1;
|
||||
- if (fcntl(pfd[1], F_SETFL, O_NONBLOCK) == -1) return 2;
|
||||
- while ((n = write(pfd[1], buffer, sizeof(buffer))) == sizeof(buffer));
|
||||
- if ((pty[0]=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3;
|
||||
- if ((pty[1]=grantpt(pty[0])) == -1) return 4;
|
||||
- EV_SET(ev+0, pfd[1], EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL);
|
||||
- EV_SET(ev+1, pty[1], EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL);
|
||||
- if ((kfd = kqueue()) == -1) return 5;
|
||||
- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6;
|
||||
- if (ev_out[0].flags & EV_ERROR) return 7;
|
||||
- if (ev_out[1].flags & EV_ERROR) return 8;
|
||||
- read(pfd[0], buffer, sizeof(buffer));
|
||||
- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9;
|
||||
- return 0;
|
||||
- }
|
||||
- ]],
|
||||
- [
|
||||
- AC_MSG_RESULT(yes)
|
||||
- ], [
|
||||
- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.)
|
||||
- AC_MSG_RESULT(no)
|
||||
- ])
|
||||
-])
|
||||
-
|
||||
AC_DEFUN([TORRENT_WITH_KQUEUE], [
|
||||
AC_ARG_WITH(kqueue,
|
||||
[ --with-kqueue enable kqueue. [[default=no]]],
|
||||
[
|
||||
if test "$withval" = "yes"; then
|
||||
TORRENT_CHECK_KQUEUE
|
||||
- TORRENT_CHECK_KQUEUE_SOCKET_ONLY
|
||||
fi
|
||||
])
|
||||
])
|
Loading…
x
Reference in New Issue
Block a user