Files
haikuports/dev-libs/libevent/libevent-2.0.21.recipe
Augustin Cavalier 55dd9cf19d Rewrite ARCHITECTURES syntax to new HaikuPorter changes.
HaikuPorter now does not care what is in ARCHITECTURES when
building for a SECONDARY_ARCHITECTURE.
2015-08-04 12:00:38 -04:00

131 lines
4.2 KiB
Bash

SUMMARY="An event notification library"
DESCRIPTION="The libevent API provides a mechanism to execute a callback function when a \
specific event occurs on a file descriptor or after a timeout has been \
reached. Furthermore, libevent also support callbacks due to signals or \
regular timeouts.\
libevent is meant to replace the event loop found in event driven network \
servers. An application just needs to call event_dispatch() and then add or \
remove events dynamically without having to change the event loop."
HOMEPAGE="http://www.libevent.org/"
COPYRIGHT="2000-2007 Niels Provos
2005 Nick Mathewson, and other contributors."
LICENSE="BSD (3-clause)"
REVISION="7"
SOURCE_URI="https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz"
CHECKSUM_SHA256="22a530a8a5ba1cb9c080cba033206b17dacd21437762155c6d30ee6469f574f5"
SOURCE_DIR="libevent-${portVersion}-stable"
PATCHES="libevent-2.0.21.patch"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libevent${secondaryArchSuffix} = ${portVersion}
cmd:event_rpcgen.py$secondaryArchSuffix
lib:libevent$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_core_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_extra_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_pthreads_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_openssl_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_core$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_extra$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_pthreads$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_openssl$secondaryArchSuffix = 5.1.9 compat >= 5
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libgcc_s$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
cmd:python
"
# haiku${secondaryArchSuffix} doesn't define included libraries yet
# lib:libnetwork$secondaryArchSuffix
BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libz
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:python
"
BUILD()
{
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in
sed -i 's/TESTS = $(top_srcdir)/TESTS = {$sourceDir}/g' test/Makefile.am
libtoolize --force --copy --install
aclocal
autoconf
automake --add-missing
export CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS"
export CXXFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS"
export LDFLAGS="-lposix_error_mapper"
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libevent \
libevent_core \
libevent_extra \
libevent_pthreads \
libevent_openssl
cp .libs/libevent-*.so* \
.libs/libevent_core-*.so* \
.libs/libevent_extra-*.so* \
.libs/libevent_pthreads-*.so* \
.libs/libevent_openssl-*.so* \
$developLibDir
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
cmd:event_rpcgen.py
lib:libevent$secondaryArchSuffix = $portVersion
lib:libevent_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_core_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_extra_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_pthreads_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
lib:libevent_openssl_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_core_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_extra_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_pthreads_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_openssl_2.0$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_core$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_extra$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_pthreads$secondaryArchSuffix = 5.1.9 compat >= 5
devel:libevent_openssl$secondaryArchSuffix = 5.1.9 compat >= 5
"
REQUIRES_devel="
libevent$secondaryArchSuffix == $portVersion base
devel:libssl$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
"