Skip to content

Commit

Permalink
recipes: Add libevent. [skip appveyor]
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Sep 7, 2016
1 parent bf20201 commit 05dd677
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
31 changes: 31 additions & 0 deletions recipes/libevent/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Needed to ensure our OpenSSL and
# not the system one is used on OS X.
export LIBRARY_PATH="${PREFIX}/lib"

export CFLAGS="-I${PREFIX}/include ${CFLAGS}"
export CPPFLAGS="-I${PREFIX}/include ${CPPFLAGS}"
export LDFLAGS="-L${PREFIX}/lib ${LDFLAGS}"

# Set the fallback library environment variable.
if [[ `uname` == 'Darwin' ]];
then
export LIBRARY_SEARCH_VAR=DYLD_FALLBACK_LIBRARY_PATH
else
export LIBRARY_SEARCH_VAR=LD_LIBRARY_PATH
fi


chmod +x ./autogen.sh

./autogen.sh
./configure --prefix="${PREFIX}"
make

#
# Seems to hand on Mac builds. So have commented it for now.
#
#eval ${LIBRARY_SEARCH_VAR}="${PREFIX}/lib" make check

make install
63 changes: 63 additions & 0 deletions recipes/libevent/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{% set version = "2.0.22" %}

package:
name: libevent
version: {{ version }}

source:
fn: libevent-{{ version }}.tar.gz
url: https://github.com/libevent/libevent/archive/release-{{ version }}-stable.tar.gz
sha256: ab89639b0819befb1d8b293d52047c6955f8d1c9150c2b22a0e6247930eb9128

build:
number: 0
skip: True # [win]

requirements:
build:
- toolchain
- autoconf
- automake
- libtool
- pkg-config
- openssl 1.0.*

run:
- openssl 1.0.*

test:
commands:
{% set libs = [
"libevent",
"libevent_core",
"libevent_extra",
"libevent_openssl",
"libevent_pthreads"
] %}

{% for each_lib in libs %}
- test -f "${PREFIX}/lib/{{ each_lib }}.a"
- test -f "${PREFIX}/lib/{{ each_lib }}.dylib" # [osx]
- test -f "${PREFIX}/lib/{{ each_lib }}.so" # [linux]
- test -f "${PREFIX}/lib/{{ each_lib }}.la"
{% endfor %}

{% set pkgconfigs = [
"libevent",
"libevent_openssl",
"libevent_pthreads"
] %}

{% for each_pkgconfig in pkgconfigs %}
- test -f "${PREFIX}/lib/pkgconfig/{{ each_pkgconfig }}.pc"
{% endfor %}

about:
home: http://libevent.org/
license: BSD 3-Clause
license_file: LICENSE
summary: A terminal multiplexer.

extra:
recipe-maintainers:
- jakirkham

0 comments on commit 05dd677

Please sign in to comment.