2 # Copyright (C) 2015-2016 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.gz
15 PKG_SOURCE_URL
:=https
://pypi.python.org
/packages
/source
/p
/pycparser
16 PKG_HASH
:=7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(BUILD_VARIANT
)-$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_UNPACK
=$(HOST_TAR
) -C
$(PKG_BUILD_DIR
) --strip-components
=1 -xzf
$(DL_DIR
)/$(PKG_SOURCE
)
21 HOST_BUILD_DEPENDS
:=python-ply
/host
22 ifdef CONFIG_PACKAGE_python-pycparser
23 HOST_BUILD_DEPENDS
+=python
/host
25 ifdef CONFIG_PACKAGE_python3-pycparser
26 HOST_BUILD_DEPENDS
+=python3
/host
29 PKG_LICENSE
:=BSD-3-Clause
30 PKG_LICENSE_FILES
:=LICENSE
31 PKG_MAINTAINER
:=Jeffery To
<jeffery.to@gmail.com
>
33 include $(INCLUDE_DIR
)/host-build.mk
34 include $(INCLUDE_DIR
)/package.mk
35 $(call include_mk
, python-package.mk
)
36 $(call include_mk
, python3-package.mk
)
38 define Package
/python-pycparser
/Default
42 URL
:=https
://github.com
/eliben
/pycparser
45 define Package
/python-pycparser
46 $(call Package
/python-pycparser
/Default
)
47 TITLE
:=python-pycparser
48 DEPENDS
:=+python-light
+python-ply
52 define Package
/python3-pycparser
53 $(call Package
/python-pycparser
/Default
)
54 TITLE
:=python3-pycparser
55 DEPENDS
:=+python3-light
+python3-ply
59 define Package
/python-pycparser
/description
60 pycparser is a parser for the C language
, written in pure Python. It is a
61 module designed to be easily integrated into applications that need to parse
65 define Package
/python3-pycparser
/description
66 $(call Package
/python-pycparser
/description
)
71 ifdef CONFIG_PACKAGE_python-pycparser
72 define Host
/Compile
/python-pycparser
73 $(call Build
/Compile
/HostPyMod
,,install --prefix="" --root
="$(STAGING_DIR_HOSTPKG)")
77 ifdef CONFIG_PACKAGE_python3-pycparser
78 define Host
/Compile
/python3-pycparser
79 $(call Build
/Compile
/HostPy3Mod
,,install --prefix="" --root
="$(STAGING_DIR_HOSTPKG)")
84 $(call Host
/Compile
/python-pycparser
)
85 $(call Host
/Compile
/python3-pycparser
)
91 $(eval
$(call HostBuild
))
93 $(eval
$(call PyPackage
,python-pycparser
))
94 $(eval
$(call BuildPackage
,python-pycparser
))
96 $(eval
$(call Py3Package
,python3-pycparser
))
97 $(eval
$(call BuildPackage
,python3-pycparser
))