Sfoglia il codice sorgente

poco:add package for the Poco C++ library

POrtable COmponents is a Modern, powerful open source C++ class libraries
for building network- and internet-based applications that run on desktop,
 server, mobile and embedded systems.

Original Makefile -->
https://dev.openwrt.org/browser/packages/libs/poco/Makefile

add license
add maintainer
update URL to latest github stable version (1.7.0)
change patch to the configure file
add a patch to build with musl-libc

Signed-off-by: Jean-Michel Julien <jean-michel.julien@trilliantinc.com>
jmjulien 9 anni fa
parent
commit
6123f54c95

+ 64
- 0
libs/poco/Makefile Vedi File

@@ -0,0 +1,64 @@
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
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=poco
11
+PKG_VERSION:=1.7.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://pocoproject.org/releases/poco-1.7.0
16
+PKG_MD5SUM:=dbbc98ab95910cc31bf4f1ffff9ac572
17
+
18
+PKG_LICENSE:=BSL-1.0
19
+PKG_LICENSE_FILES:=LICENSE
20
+
21
+PKG_INSTALL:=1
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+
25
+define Package/poco
26
+  SECTION:=libs
27
+  CATEGORY:=Libraries
28
+  TITLE:=Poco C++ libraries
29
+  URL:=http://www.pocoproject.org/
30
+  DEPENDS:=+libstdcpp +libpthread +librt
31
+  MAINTAINER:=Jean-Michel Julien <jean-michel.julien@trilliantinc.com>
32
+endef
33
+
34
+define Package/poco/description
35
+  POrtable COmponents, a modern and powerful open source C++ class libraries
36
+  and frameworks for building network and internet-based applications that
37
+  run on desktop, server and embedded systems.
38
+endef
39
+
40
+CONFIGURE_ARGS += \
41
+	--config=Linux \
42
+	--no-tests \
43
+	--no-samples \
44
+	--no-fpenvironment \
45
+	--no-sharedmemory \
46
+	--no-wstring \
47
+	--poquito \
48
+	--minimal \
49
+	--shared
50
+
51
+define Package/poco/install
52
+	$(INSTALL_DIR) $(1)/usr/lib
53
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/
54
+endef
55
+
56
+define Build/InstallDev
57
+	$(INSTALL_DIR) $(1)/usr/include
58
+	$(CP) -r $(PKG_INSTALL_DIR)/usr/include/Poco $(1)/usr/include/
59
+
60
+	$(INSTALL_DIR) $(1)/usr/lib
61
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/
62
+endef
63
+
64
+$(eval $(call BuildPackage,poco))

+ 15
- 0
libs/poco/patches/100-configure.patch Vedi File

@@ -0,0 +1,15 @@
1
+--- a/configure
2
++++ b/configure
3
+@@ -231,9 +231,9 @@
4
+		;;
5
+
6
+	*)
7
+-		showhelp
8
+-		exit 1
9
+-		;;
10
++#		showhelp
11
++#		exit 1
12
++#		;;
13
+	esac
14
+
15
+ 	shift

+ 11
- 0
libs/poco/patches/200-strerror.patch Vedi File

@@ -0,0 +1,11 @@
1
+--- a/Foundation/src/Error.cpp
2
++++ b/Foundation/src/Error.cpp
3
+@@ -66,7 +66,7 @@
4
+		   without -D_GNU_SOURCE is needed, otherwise the GNU version is
5
+		   preferred.
6
+		*/
7
+-#if defined _GNU_SOURCE && !POCO_ANDROID
8
++#if (defined _GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__)) && !POCO_ANDROID
9
+		char errmsg[256] = "";
10
+		return std::string(strerror_r(errorCode, errmsg, 256));
11
+ #elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID