2009-11-08 02:04:16 +00:00
|
|
|
program="libkqueue"
|
2009-12-26 19:53:54 +00:00
|
|
|
version="0.4"
|
2010-02-06 00:16:58 +00:00
|
|
|
cflags="-fPIC -I./include -I./src/common -Wall -Werror"
|
2009-11-25 00:28:12 +00:00
|
|
|
sources="src/common/filter.c src/common/knote.c
|
|
|
|
src/common/kevent.c src/common/kqueue.c"
|
2009-11-09 01:24:49 +00:00
|
|
|
libdepends=""
|
2009-11-25 01:37:14 +00:00
|
|
|
deps="src/common/private.h"
|
2009-11-08 02:04:16 +00:00
|
|
|
mans="kqueue.2"
|
2009-11-11 02:41:45 +00:00
|
|
|
headers="src/common/private.h"
|
|
|
|
extra_dist="*.in"
|
2009-11-08 02:04:16 +00:00
|
|
|
subdirs="src include test"
|
|
|
|
|
2009-11-16 03:54:47 +00:00
|
|
|
# Package metadata
|
|
|
|
pkg_summary="Emulates the kqueue and kevent system calls"
|
|
|
|
pkg_description="Emulates the kqueue and kevent system calls"
|
|
|
|
license="BSD"
|
|
|
|
author="Mark Heily"
|
|
|
|
|
2009-11-08 02:04:16 +00:00
|
|
|
pre_configure_hook() {
|
|
|
|
if [ "$debug" = "yes" ] ; then
|
2010-02-06 00:16:58 +00:00
|
|
|
cflags="$cflags -g3 -O0 -DKQUEUE_DEBUG -rdynamic"
|
2009-11-25 00:28:12 +00:00
|
|
|
else
|
2010-02-06 00:16:58 +00:00
|
|
|
cflags="$cflags -g -O2 -fvisibility=hidden"
|
2009-11-08 02:04:16 +00:00
|
|
|
fi
|
|
|
|
|
2009-11-24 03:32:59 +00:00
|
|
|
optional_headers="err.h"
|
|
|
|
|
2009-11-18 01:22:29 +00:00
|
|
|
libdepends=" -L$libdir"
|
2009-11-08 02:04:16 +00:00
|
|
|
if [ $target = "linux" ] ; then
|
2009-11-09 01:24:49 +00:00
|
|
|
libdepends="$libdepends -lpthread -lrt"
|
2009-11-08 04:59:18 +00:00
|
|
|
required_headers="sys/epoll.h sys/inotify.h
|
|
|
|
sys/signalfd.h sys/timerfd.h sys/eventfd.h"
|
2009-11-08 02:04:16 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
post_configure_hook() {
|
|
|
|
finalize target "$target"
|
2009-11-19 03:38:32 +00:00
|
|
|
|
|
|
|
evfilt_signal="src/$target/signal.c"
|
|
|
|
evfilt_proc="src/$target/proc.c"
|
|
|
|
evfilt_socket="src/$target/socket.c"
|
|
|
|
evfilt_timer="src/$target/timer.c"
|
|
|
|
evfilt_user="src/$target/user.c"
|
|
|
|
evfilt_vnode="src/$target/vnode.c"
|
|
|
|
|
|
|
|
if [ $target = "linux" ] ; then
|
|
|
|
if [ "$have_sys_signalfd_h" != "yes" ] ; then
|
|
|
|
evfilt_signal="src/posix/signal.c"
|
|
|
|
fi
|
|
|
|
if [ "$have_sys_timerfd_h" != "yes" ] ; then
|
|
|
|
evfilt_timer="" # TODO: "src/posix/timer.c"
|
|
|
|
fi
|
|
|
|
if [ "$have_sys_eventfd_h" != "yes" ] ; then
|
|
|
|
evfilt_user="" # TODO: "src/posix/user.c"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2010-02-07 18:35:03 +00:00
|
|
|
sources="$sources src/$target/kevent.c src/$target/eventfd.c $evfilt_signal $evfilt_proc
|
2009-11-24 03:32:59 +00:00
|
|
|
$evfilt_socket $evfilt_timer $evfilt_user $evfilt_vnode"
|
2009-11-08 02:04:16 +00:00
|
|
|
}
|