blob: 92c43773bfe7c47e2cfcbf6b75cc322e76dc22ca [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2014-2015 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libev
11PKG_VERSION:=4.33
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
16PKG_HASH:=507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea
17PKG_LICENSE:=BSD-2-Clause or GPL-2.0-or-later
18PKG_LICENSE_FILES:=LICENSE
19PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
20
21PKG_BUILD_PARALLEL:=1
22PKG_FIXUP:=autoreconf
23PKG_INSTALL:=1
24PKG_BUILD_FLAGS:=no-mips16
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/libev
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=High-performance event loop
32 URL:=http://software.schmorp.de/pkg/libev.html
33endef
34
35define Package/libev/description
36 A full-featured and high-performance event loop that is loosely modelled after
37 libevent, but without its limitations and bugs.
38endef
39
40TARGET_CFLAGS += $(FPIC)
41
42CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45
46define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(1)/usr/include/ev_event_compat.h
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/ev.h $(1)/usr/include/
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/ev++.h $(1)/usr/include/
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{a,so*} $(1)/usr/lib/
53endef
54
55define Package/libev/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/
58endef
59
60$(eval $(call BuildPackage,libev))