Browse Source

libpcre: import from packages, add myself as the maintainer

This adds the pcre, aka libpcre package from the old svn tree. Ive
updated the package to the last version end checked that it builds with
various plattforms. The patch 750-pcre_config_cross.patch is not longer
necessary, so I removed him.

The old package needs to be removed from the svn package tree.

Signed-off-by: Thomas Heil <heil@terminal-consulting.de>
Thomas Heil 10 years ago
parent
commit
eeab7d20fc
1 changed files with 90 additions and 0 deletions
  1. 90
    0
      libs/pcre/Makefile

+ 90
- 0
libs/pcre/Makefile View File

@@ -0,0 +1,90 @@
1
+#
2
+# Copyright (C) 2006-2011 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:=pcre
11
+PKG_VERSION:=8.35
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_URL:=@SF/pcre
16
+PKG_MD5SUM:=6aacb23986adccd9b3bc626c00979958
17
+PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
18
+
19
+PKG_LICENSE:=BSD-3c
20
+PKG_LICENSE_FILES:=LICENCE
21
+
22
+PKG_FIXUP:=autoreconf
23
+
24
+PKG_INSTALL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/libpcre/default
29
+  SECTION:=libs
30
+  CATEGORY:=Libraries
31
+  URL:=http://www.pcre.org/
32
+endef
33
+
34
+define Package/libpcre
35
+  $(call Package/libpcre/default)
36
+  TITLE:=A Perl Compatible Regular Expression library
37
+endef
38
+
39
+define Package/libpcrecpp
40
+  $(call Package/libpcre/default)
41
+  TITLE:=C++ wrapper for Perl Compatible Regular Expression library
42
+  DEPENDS:=+libpcre +libstdcpp
43
+endef
44
+
45
+
46
+TARGET_CFLAGS += $(FPIC)
47
+
48
+CONFIGURE_ARGS += \
49
+	--enable-utf8 \
50
+	--enable-unicode-properties \
51
+
52
+ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
53
+  CONFIGURE_ARGS+= --enable-cpp
54
+else
55
+  CONFIGURE_ARGS+= --disable-cpp
56
+endif
57
+
58
+MAKE_FLAGS += \
59
+	CFLAGS="$(TARGET_CFLAGS)"
60
+
61
+define Build/InstallDev
62
+	$(INSTALL_DIR) $(1)/usr/bin
63
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
64
+
65
+	$(INSTALL_DIR) $(2)/bin
66
+	$(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
67
+
68
+	$(INSTALL_DIR) $(1)/usr/include
69
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
70
+
71
+	$(INSTALL_DIR) $(1)/usr/lib
72
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib//
73
+
74
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
75
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
76
+
77
+endef
78
+
79
+define Package/libpcre/install
80
+	$(INSTALL_DIR) $(1)/usr/lib
81
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
82
+endef
83
+
84
+define Package/libpcrecpp/install
85
+	$(INSTALL_DIR) $(1)/usr/lib
86
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
87
+endef
88
+
89
+$(eval $(call BuildPackage,libpcre))
90
+$(eval $(call BuildPackage,libpcrecpp))