aboutsummaryrefslogtreecommitdiff
path: root/libs/libxerces-c/Makefile
blob: 176b7d264ae450a11d1b8a350a734a0841686532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=xerces-c
PKG_VERSION:=3.2.4
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
PKG_HASH:=075bc57940da0f9be6dd183c550c8ce0b9833e4550dc382048377a1a5e3b2bd9

PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/libxerces-c/Default
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Validating XML parser library for C++
  URL:=https://xerces.apache.org/
endef

define Package/libxerces-c
$(call Package/libxerces-c/Default)
  DEPENDS:=$(ICONV_DEPENDS) +libstdcpp
endef

define Package/libxerces-c-samples
$(call Package/libxerces-c/Default)
  TITLE+= (samples)
  DEPENDS+=+libxerces-c
endef

define Package/libxerces-c/description
  Xerces-C++ is a validating XML parser written in a portable subset of
  C++. Xerces-C++ makes it easy to give your application the ability
  to read and write XML data. A shared library is provided for parsing,
  generating, manipulating, and validating XML documents. Xerces-C++ is
  faithful to the XML 1.0 recommendation and associated standards (DOM
  1.0, DOM 2.0, SAX 1.0, SAX 2.0, Namespaces, XML Schema Part 1 and
  Part 2). It also provides experimental implementations of XML 1.1
  and DOM Level 3.0. The parser provides high performance, modularity,
  and scalability.
endef

define Package/libxerces-c-samples/description
  Validating XML parser library for C++ (samples)
endef

CMAKE_OPTIONS += \
	-DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON \
	-Dmessage-loader=inmemory \
	-Dnetwork-accessor=socket \
	-Dtranscoder=iconv

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include/xercesc
	$(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
	$(INSTALL_DIR) $(1)/usr/lib/cmake/XercesC
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/XercesC/* $(1)/usr/lib/cmake/XercesC
	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc
	$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/xerces-c.pc
	$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/xerces-c.pc
endef

define Package/libxerces-c/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
endef

define Package/libxerces-c-samples/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef

$(eval $(call BuildPackage,libxerces-c))
$(eval $(call BuildPackage,libxerces-c-samples))