2 # Copyright (C) 2006-2015 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
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
16 PKG_HASH
:=4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8
18 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
>
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=LICENCE
21 PKG_CPE_ID
:=cpe
:/a
:pcre
:pcre
27 CONFIG_PACKAGE_libpcrecpp \
28 CONFIG_PCRE_JIT_ENABLED
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/host-build.mk
33 define Package
/libpcre
/default
36 URL
:=https
://www.pcre.org
/
39 define Package
/libpcre
/config
40 source
"$(SOURCE)/Config.in"
43 define Package
/libpcre
44 $(call Package
/libpcre
/default
)
45 TITLE
:=A Perl Compatible Regular Expression library
48 define Package
/libpcre16
49 $(call Package
/libpcre
/default
)
50 TITLE
:=A Perl Compatible Regular Expression library
(16bit support
)
53 define Package
/libpcre32
54 $(call Package
/libpcre
/default
)
55 TITLE
:=A Perl Compatible Regular Expression library
(32bit support
)
58 define Package
/libpcrecpp
59 $(call Package
/libpcre
/default
)
60 TITLE
:=C
++ wrapper for Perl Compatible Regular Expression library
61 DEPENDS
:=+libpcre
+libstdcpp
64 HOST_CONFIGURE_ARGS
+= \
67 --enable-unicode-properties \
69 --with-match-limit-recursion
=16000 \
72 TARGET_CFLAGS
+= $(FPIC
)
76 --enable-unicode-properties \
79 $(if
$(CONFIG_PCRE_JIT_ENABLED
),--enable-jit
,--disable-jit
) \
80 --with-match-limit-recursion
=16000 \
81 --$(if
$(CONFIG_PACKAGE_libpcrecpp
),en
,dis
)able-cpp
84 CFLAGS
="$(TARGET_CFLAGS)"
86 define Build
/InstallDev
87 $(INSTALL_DIR
) $(1)/usr
/bin
88 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pcre-config
$(1)/usr
/bin
/
89 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr
/bin
/pcre-config
91 $(INSTALL_DIR
) $(2)/bin
92 $(LN
) $(STAGING_DIR
)/usr
/bin
/pcre-config
$(2)/bin
94 $(INSTALL_DIR
) $(1)/usr
/include
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/pcre
*.h
$(1)/usr
/include/
97 $(INSTALL_DIR
) $(1)/usr
/lib
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre
*.
{a
,so
*} $(1)/usr
/lib
/
100 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpcre
*.
pc $(1)/usr
/lib
/pkgconfig
/
104 define Package
/libpcre
/install
105 $(INSTALL_DIR
) $(1)/usr
/lib
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre
{,posix
}.so.
* $(1)/usr
/lib
/
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre.so
$(1)/usr
/lib
/
110 define Package
/libpcre16
/install
111 $(INSTALL_DIR
) $(1)/usr
/lib
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre16.so
* $(1)/usr
/lib
/
115 define Package
/libpcre32
/install
116 $(INSTALL_DIR
) $(1)/usr
/lib
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcre32.so
* $(1)/usr
/lib
/
120 define Package
/libpcrecpp
/install
121 $(INSTALL_DIR
) $(1)/usr
/lib
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcrecpp.so.
* $(1)/usr
/lib
/
125 $(eval
$(call BuildPackage
,libpcre
))
126 $(eval
$(call BuildPackage
,libpcre16
))
127 $(eval
$(call BuildPackage
,libpcre32
))
128 $(eval
$(call BuildPackage
,libpcrecpp
))
129 $(eval
$(call HostBuild
))