| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | include $(TOPDIR)/rules.mk |
| 2 | |
| 3 | PKG_NAME:=gperftools |
| 4 | PKG_VERSION:=2.16 |
| 5 | PKG_RELEASE:=1 |
| 6 | |
| 7 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 8 | PKG_SOURCE_URL:=https://codeload.github.com/gperftools/gperftools/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? |
| 9 | PKG_HASH:=737be182b4e42f5c7f595da2a7aa59ce0489a73d336d0d16847f2aa52d5221b4 |
| 10 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) |
| 11 | |
| 12 | PKG_MAINTAINER:=John Audia <therealgraysky@proton.me> |
| 13 | PKG_LICENSE:=BSD-3-Clause |
| 14 | PKG_LICENSE_FILES:=COPYING |
| 15 | |
| 16 | PKG_BUILD_FLAGS:=no-mips16 |
| 17 | PKG_INSTALL:=1 |
| 18 | PKG_BUILD_PARALLEL:=1 |
| 19 | |
| 20 | PKG_FIXUP:=autoreconf |
| 21 | |
| 22 | include $(INCLUDE_DIR)/package.mk |
| 23 | |
| 24 | define Package/gperftools-headers |
| 25 | CATEGORY:=Libraries |
| 26 | SECTION:=libs |
| 27 | TITLE:=Gperftools Headers |
| 28 | URL:=https://github.com/gperftools/gperftools |
| 29 | DEPENDS:= @!(mips||mips64||mipsel||powerpc) |
| 30 | endef |
| 31 | |
| 32 | define Package/gperftools-runtime |
| 33 | SECTION:=libs |
| 34 | CATEGORY:=Libraries |
| 35 | TITLE:=Gperftools Runtime |
| 36 | URL:=https://github.com/gperftools/gperftools |
| 37 | DEPENDS:= +libunwind +libstdcpp @!(mips||mips64||mipsel||powerpc) |
| 38 | endef |
| 39 | |
| 40 | define Package/gperftools-headers/description |
| 41 | Gperftools is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools. |
| 42 | This package contains the headers. |
| 43 | endef |
| 44 | |
| 45 | define Package/gperftools-runtime/description |
| 46 | Gperftools is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools. |
| 47 | This package contains the shared objects and bins. |
| 48 | endef |
| 49 | |
| 50 | CONFIGURE_ARGS += \ |
| 51 | --enable-frame-pointers \ |
| 52 | --enable-libunwind \ |
| 53 | --disable-deprecated-pprof |
| 54 | |
| 55 | define Build/InstallDev |
| 56 | $(INSTALL_DIR) $(1)/usr/lib |
| 57 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcmalloc.so* $(1)/usr/lib/ |
| 58 | endef |
| 59 | |
| 60 | define Package/gperftools-headers/install |
| 61 | $(INSTALL_DIR) $(1)/usr/include/gperftools |
| 62 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/gperftools/tcmalloc.h $(1)/usr/include/gperftools |
| 63 | endef |
| 64 | |
| 65 | define Package/gperftools-runtime/install |
| 66 | $(INSTALL_DIR) $(1)/usr/lib |
| 67 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcmalloc.so* $(1)/usr/lib/ |
| 68 | endef |
| 69 | $(eval $(call BuildPackage,gperftools-headers)) |
| 70 | $(eval $(call BuildPackage,gperftools-runtime)) |