Skip to contentSkip to conversation

add package for pdmenu

PATCH New Brock Williams 2 participants 2 messages Aug 28, 2017 – Aug 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 add package for pdmenu

---
Changes v2 -> v3:
- change to debian snapshot url

Changes v1 -> v2:
- feedback from Thomas Petazzoni
- add to DEVELOPERS
- fix sorting in Config.in
- change depends on to select
- fix whitespace / wrapping
- add hash file
- add comment header

 DEVELOPERS                 |  3 +++
 package/Config.in          |  1 +
 package/pdmenu/Config.in   | 15 +++++++++++++++
 package/pdmenu/pdmenu.hash |  1 +
 package/pdmenu/pdmenu.mk   | 15 +++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 package/pdmenu/Config.in
 create mode 100644 package/pdmenu/pdmenu.hash
 create mode 100644 package/pdmenu/pdmenu.mk
DEVELOPERS +3 -0
index 73686e2..f3e0dbd 100644
@@ -326,6 +326,9 @@ N:	Bogdan Radulescu <[email protected]>
 F:	package/iftop/
 F:	package/ncdu/
 
+N:	Brock Williams <[email protected]>
+F:	package/pdmenu/
+
 N:	Bryan Brinsko <[email protected]>
 F:	package/pps-tools/
 
package/Config.in +1 -0
index a512827..d837a08 100644
@@ -1837,6 +1837,7 @@ comment "Utilities"
 	source "package/lockfile-progs/Config.in"
 	source "package/logrotate/Config.in"
 	source "package/logsurfer/Config.in"
+	source "package/pdmenu/Config.in"
 	source "package/pinentry/Config.in"
 	source "package/ranger/Config.in"
 	source "package/screen/Config.in"
package/pdmenu/Config.in new file +15 -0
new file mode 100644
index 0000000..8f35f61
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PDMENU
+	bool "pdmenu"
+	depends on BR2_USE_MMU # slang
+	select BR2_PACKAGE_SLANG
+	help
+	  Pdmenu is a full screen menuing system for Unix. It is
+	  designed to be easy to use, and is suitable as a login shell
+	  for inexperienced users, or it can just be ran at the
+	  command line as a handy menu.
+
+	  Pdmenu features color support and GPM mouse support at the
+	  Linux console. It was developed on Linux, and has now been
+	  compiled on many other unixes without problems.
+
+	  https://joeyh.name/code/pdmenu/
package/pdmenu/pdmenu.hash new file +1 -0
new file mode 100644
index 0000000..be6d27a
@@ -0,0 +1 @@
+md5	0623b992572511d5fd90d481c426fa40	pdmenu_1.3.4.tar.gz
package/pdmenu/pdmenu.mk new file +15 -0
new file mode 100644
index 0000000..f3d9fba
@@ -0,0 +1,15 @@
+################################################################################
+#
+# pdmenu
+#
+################################################################################
+
+PDMENU_VERSION = 1.3.4
+PDMENU_SOURCE = pdmenu_$(PDMENU_VERSION).tar.gz
+PDMENU_SITE = http://snapshot.debian.org/archive/debian/20170828T160058Z/pool/main/p/pdmenu
+PDMENU_LICENSE = GPL-2.0+
+PDMENU_LICENSE_FILES = COPYING.GPLv2
+PDMENU_DEPENDENCIES = slang
+PDMENU_INSTALL_TARGET_OPTS = INSTALL_PREFIX=$(TARGET_DIR) install
+
+$(eval $(autotools-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/1 add package for pdmenu

Hello,

Quoted 1 line · Brock Williams

So, I applied your patch, but after fixing a number of issues. Some easy, some more complicated. See below.

package/pdmenu/pdmenu.hash

Quoted 6 lines
package/pdmenu/pdmenu.hash new file +0 -0
new file mode 100644
index 0000000..be6d27a
@@ -0,0 +1 @@

Missing comment above the hash that says where it comes from.

package/pdmenu/pdmenu.hash line 1

Quoted 1 line
package/pdmenu/pdmenu.hash new file +1 -0
+md5	0623b992572511d5fd90d481c426fa40	pdmenu_1.3.4.tar.gz

We use sha256 hashes when locally calculated, so I've added that.

I've also added the hash for the license file.

Quoted 6 lines
package/pdmenu/pdmenu.mk new file +0 -0
new file mode 100644
index 0000000..f3d9fba

package/pdmenu/pdmenu.mk line 10

Quoted 10 lines
package/pdmenu/pdmenu.mk new file +10 -0
@@ -0,0 +1,15 @@
+################################################################################
+#
+# pdmenu
+#
+################################################################################
+
+PDMENU_VERSION = 1.3.4
+PDMENU_SOURCE = pdmenu_$(PDMENU_VERSION).tar.gz
+PDMENU_SITE = http://snapshot.debian.org/archive/debian/20170828T160058Z/pool/main/p/pdmenu
+PDMENU_LICENSE = GPL-2.0+

Nowhere they say it's GPLv2 or later. They only include the license text of the GPLv2, with no further information. So the license is GPL-2.0 only.

package/pdmenu/pdmenu.mk line 11

Quoted 1 line
package/pdmenu/pdmenu.mk new file +1 -0
+PDMENU_LICENSE_FILES = COPYING.GPLv2

This file does not exist, it's doc/COPYING.

package/pdmenu/pdmenu.mk line 12

Quoted 1 line
package/pdmenu/pdmenu.mk new file +1 -0
+PDMENU_DEPENDENCIES = slang

Now the more complicated part is that the NLS handling was broken, in two situations:

* If NLS support is enabled with uClibc/musl, the gettext functions are located in an external library (not in the C library) called libintl, and pdmenu was not linking with it. I've added a first patch to fix this. I also had to add $(TARGET_NLS_DEPENDENCIES) to PDMENU_DEPENDENCIES to make sure host-gettext/gettext get defined as necessary.

* On the other hand, even if NLS support was disabled, pdmenu Makefile was trying to use the msgfmt tool on the build machine to generate .mo files from .po files, causing a build failure. I fixed that by adding another patch that only builds/installs .mo files if msgfmt is available.

Thanks for your contribution!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com