gst1-plugins-base: update to 1.22.8
[feed/packages.git] / libs / newt / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 # Copyright (C) 2011 SMBPhone Inc.
4 # Copyright (C) 2019-2020, 2023 Jeffery To
5 #
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
8 #
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=newt
13 PKG_VERSION:=0.52.24
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=https://releases.pagure.org/newt
18 PKG_HASH:=5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb
19
20 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
21 PKG_LICENSE:=LGPL-2.0-only
22 PKG_LICENSE_FILES:=COPYING
23 PKG_CPE_ID:=cpe:/a:fedorahosted:newt
24
25 PKG_BUILD_PARALLEL:=1
26 PKG_INSTALL:=1
27 PYTHON3_PKG_BUILD:=0
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31 include ../../lang/python/python3-package.mk
32
33 define Package/newt/Default
34 TITLE:=Newt
35 URL:=https://pagure.io/newt
36 endef
37
38 define Package/newt/Default/description
39 Newt is a programming library for color text mode, widget based user
40 interfaces. Newt can be used to add stacked windows, entry widgets,
41 checkboxes, radio buttons, labels, plain text fields, scrollbars, etc.,
42 to text mode user interfaces. Newt is based on the slang library.
43 endef
44
45 define Package/libnewt
46 $(call Package/newt/Default)
47 SECTION:=libs
48 CATEGORY:=Libraries
49 TITLE+= library
50 DEPENDS:=+libslang2 $(INTL_DEPENDS)
51 endef
52
53 define Package/libnewt/description
54 $(call Package/newt/Default/description)
55 endef
56
57 define Package/whiptail
58 $(call Package/newt/Default)
59 SECTION:=utils
60 CATEGORY:=Utilities
61 TITLE:=Display dialog boxes from shell scripts
62 DEPENDS:=+libnewt +libpopt +libslang2
63 endef
64
65 define Package/whiptail/description
66 A lightweight replacement for the dialog command (dialog boxes from shell
67 scripts), based on libnewt.
68 endef
69
70 define Package/python3-newt
71 $(call Package/newt/Default)
72 SECTION:=lang
73 CATEGORY:=Languages
74 SUBMENU:=Python
75 TITLE+= module for Python
76 DEPENDS:=+libnewt +python3-light
77 endef
78
79 define Package/python3-newt/description
80 $(call Package/newt/Default/description)
81
82 This is the Newt module for Python 3.
83 endef
84
85 CONFIGURE_ARGS+= \
86 --enable-largefile \
87 --with-python=python$(PYTHON3_VERSION) \
88 --without-tcl \
89 --without-gpm-support \
90 --with-colorsfile=/etc/newt/palette
91
92 CONFIGURE_VARS += $(if $(CONFIG_BUILD_NLS),ac_cv_lib_c_gettext=no)
93
94 MAKE_VARS+= PYTHON_CONFIG_PATH="$(STAGING_DIR)/host/bin"
95
96 define Build/InstallDev
97 $(INSTALL_DIR) $(1)/usr/include
98 $(CP) $(PKG_INSTALL_DIR)/usr/include/newt.h $(1)/usr/include/
99
100 $(INSTALL_DIR) $(1)/usr/lib
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.{a,so*} $(1)/usr/lib/
102
103 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
104 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnewt.pc $(1)/usr/lib/pkgconfig/
105 endef
106
107 define Package/libnewt/install
108 $(INSTALL_DIR) $(1)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.so* $(1)/usr/lib/
110 endef
111
112 define Package/whiptail/install
113 $(INSTALL_DIR) $(1)/usr/bin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whiptail $(1)/usr/bin/
115 endef
116
117 # Don't install files from usr/bin
118 Py3Package/python3-newt/install:=:
119
120 $(eval $(call BuildPackage,libnewt))
121 $(eval $(call BuildPackage,whiptail))
122
123 $(eval $(call Py3Package,python3-newt))
124 $(eval $(call BuildPackage,python3-newt))
125 $(eval $(call BuildPackage,python3-newt-src))