2 # Copyright (C) 2006-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/pcre
16 PKG_MD5SUM
:=ef907b8792ec7f90f0dcd773848f0b3b
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libpcre
/default
27 URL
:=http
://www.pcre.org
/
30 define Package
/libpcre
31 $(call Package
/libpcre
/default
)
32 TITLE
:=A Perl Compatible Regular Expression library
35 define Package
/libpcrecpp
36 $(call Package
/libpcre
/default
)
37 TITLE
:=C
++ wrapper for Perl Compatible Regular Expression library
42 TARGET_CFLAGS
+= $(FPIC
)
46 --enable-unicode-properties \
48 ifneq ($(CONFIG_PACKAGE_libpcrecpp
),)
49 CONFIGURE_ARGS
+= --enable-cpp
51 CONFIGURE_ARGS
+= --disable-cpp
55 CFLAGS
="$(TARGET_CFLAGS)"
57 define Build
/InstallDev
58 $(INSTALL_DIR
) $(1)/usr
/bin
59 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pcre-config
$(1)/usr
/bin
/
61 $(INSTALL_DIR
) $(2)/bin
62 $(LN
) $(STAGING_DIR
)/usr
/bin
/pcre-config
$(2)/bin
64 $(INSTALL_DIR
) $(1)/usr
/include
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcre
*.h
$(1)/usr
/include/
67 $(INSTALL_DIR
) $(1)/usr
/lib
68 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre
*.
{a
,so
*} $(1)/usr
/lib
//
70 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpcre
*.
pc $(1)/usr
/lib
/pkgconfig
/
75 define Package
/libpcre
/install
76 $(INSTALL_DIR
) $(1)/usr
/lib
77 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre
{,posix
}.so.
* $(1)/usr
/lib
/
80 define Package
/libpcrecpp
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcrecpp.so.
* $(1)/usr
/lib
/
85 $(eval
$(call BuildPackage
,libpcre
))
86 $(eval
$(call BuildPackage
,libpcrecpp
))