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
:=http
://www.dabeaz.com
/ply
16 PKG_HASH
:=0d7e2940b9c57151392fceaa62b0865c45e06ce1e36687fd8d03f011a907f43e
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
)
22 ifdef CONFIG_PACKAGE_python-ply
23 HOST_BUILD_DEPENDS
+=python
/host
25 ifdef CONFIG_PACKAGE_python3-ply
26 HOST_BUILD_DEPENDS
+=python3
/host
29 PKG_LICENSE
:=BSD-3-Clause
30 PKG_LICENSE_FILES
:=README.md
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-ply
/Default
42 URL
:=http
://www.dabeaz.com
/ply
/
45 define Package
/python-ply
46 $(call Package
/python-ply
/Default
)
48 DEPENDS
:=+python-light
52 define Package
/python3-ply
53 $(call Package
/python-ply
/Default
)
55 DEPENDS
:=+python3-light
59 define Package
/python-ply
/description
60 PLY is a
100% Python implementation of the common parsing tools
lex
64 define Package
/python3-ply
/description
65 $(call Package
/python-ply
/description
)
70 ifdef CONFIG_PACKAGE_python-ply
71 define Host
/Compile
/python-ply
72 $(call Build
/Compile
/HostPyMod
,,install --prefix="" --root
="$(STAGING_DIR_HOSTPKG)")
76 ifdef CONFIG_PACKAGE_python3-ply
77 define Host
/Compile
/python3-ply
78 $(call Build
/Compile
/HostPy3Mod
,,install --prefix="" --root
="$(STAGING_DIR_HOSTPKG)")
83 $(call Host
/Compile
/python-ply
)
84 $(call Host
/Compile
/python3-ply
)
90 $(eval
$(call HostBuild
))
92 $(eval
$(call PyPackage
,python-ply
))
93 $(eval
$(call BuildPackage
,python-ply
))
95 $(eval
$(call Py3Package
,python3-ply
))
96 $(eval
$(call BuildPackage
,python3-ply
))