You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=apr-util
  9. PKG_VERSION:=1.6.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@APACHE/apr/
  13. PKG_HASH:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=Apache License
  16. PKG_CPE_ID:=cpe:/a:apache:apr-util
  17. PKG_FIXUP:=autoreconf
  18. PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/libaprutil
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+libapr +libexpat +libsqlite3 +libuuid $(ICONV_DEPENDS)
  26. TITLE:=Apache Portable Runtime Utility Library
  27. URL:=http://apr.apache.org/
  28. endef
  29. TARGET_CFLAGS += $(FPIC)
  30. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  31. CONFIGURE_ARGS += \
  32. --with-pgsql=no \
  33. --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
  34. --with-expat="$(STAGING_DIR)/usr" \
  35. --without-sqlite2 \
  36. --with-sqlite3="$(STAGING_DIR)/usr"
  37. ifdef $(CONFIG_BUILD_NLS)
  38. CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)"
  39. else
  40. CONFIGURE_ARGS += --without-iconv
  41. endif
  42. CONFIGURE_VARS += \
  43. ac_cv_file_dbd_apr_dbd_mysql_c=no \
  44. ac_cv_path_ODBC_CONFIG= \
  45. APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1"
  46. MAKE_FLAGS += \
  47. APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt"
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/
  50. $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \
  51. $(1)/usr/bin/
  52. $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
  53. $(1)/usr/include/apr-1/
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \
  55. $(1)/usr/lib/
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \
  57. $(1)/usr/lib/pkgconfig/
  58. $(SED) 's, -e \"s -I$$$$prefix/lib g\",,g' $(1)/usr/bin/apu-1-config
  59. $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apu-1-config
  60. $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apu-1-config
  61. $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apu-1-config
  62. $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apu-1-config
  63. endef
  64. define Package/libaprutil/install
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib/
  67. endef
  68. $(eval $(call BuildPackage,libaprutil))