b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 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 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=libev |
| 11 | PKG_VERSION:=4.33 |
| 12 | PKG_RELEASE:=2 |
| 13 | |
| 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 15 | PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/ |
| 16 | PKG_HASH:=507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea |
| 17 | PKG_LICENSE:=BSD-2-Clause or GPL-2.0-or-later |
| 18 | PKG_LICENSE_FILES:=LICENSE |
| 19 | PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au> |
| 20 | |
| 21 | PKG_BUILD_PARALLEL:=1 |
| 22 | PKG_FIXUP:=autoreconf |
| 23 | PKG_INSTALL:=1 |
| 24 | PKG_BUILD_FLAGS:=no-mips16 |
| 25 | |
| 26 | include $(INCLUDE_DIR)/package.mk |
| 27 | |
| 28 | define Package/libev |
| 29 | SECTION:=libs |
| 30 | CATEGORY:=Libraries |
| 31 | TITLE:=High-performance event loop |
| 32 | URL:=http://software.schmorp.de/pkg/libev.html |
| 33 | endef |
| 34 | |
| 35 | define 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. |
| 38 | endef |
| 39 | |
| 40 | TARGET_CFLAGS += $(FPIC) |
| 41 | |
| 42 | CONFIGURE_ARGS += \ |
| 43 | --enable-shared \ |
| 44 | --enable-static \ |
| 45 | |
| 46 | define 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/ |
| 53 | endef |
| 54 | |
| 55 | define Package/libev/install |
| 56 | $(INSTALL_DIR) $(1)/usr/lib |
| 57 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/ |
| 58 | endef |
| 59 | |
| 60 | $(eval $(call BuildPackage,libev)) |