Skip to contentSkip to conversation

package/joe: Add package for the JOE editor

PATCH New Alan Ott 2 participants 5 messages Feb 2, 2014 – Feb 3, 2014

lore
Share & tools
lore

Alan Ott

author
#0 lore raw

PATCH 1/1 package/joe: Add package for the JOE editor

JOE is an easy-to-use, full-screen, terminal-based text editor.

http://joe-editor.sf.net

---
 package/joe/Config.in | 20 ++++++++++++++++++++
 package/joe/joe.mk    | 22 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 package/joe/Config.in
 create mode 100644 package/joe/joe.mk
package/joe/Config.in new file +20 -0
new file mode 100644
index 0000000..e15b0f2
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_JOE
+	bool "joe"
+	help
+	  Joe's Own Editor
+
+	  JOE is an easy-to-use, full featured terminal-based screen editor.
+	  Its behavior is a blending of WordStar and GNU-EMACS (but it does
+	  not use code from either program).  It is a great editor for new
+	  users or as an alternative to vi.
+
+	  http://joe-editor.sf.net
+
+config BR2_PACKAGE_JOE_FULL
+	bool "full install of rc and syntax highlighting files"
+	depends on BR2_PACKAGE_JOE
+	default y
+	help
+	  Install all rc and syntax highlighting files. Without this option
+	  only the joe binary is installed, which contains a default
+	  configuration.
package/joe/joe.mk new file +22 -0
new file mode 100644
index 0000000..9725dc7
@@ -0,0 +1,22 @@
+################################################################################
+#
+# joe - Joe's Own Editor
+#
+################################################################################
+
+JOE_VERSION = 3.7
+JOE_SITE = http://downloads.sourceforge.net/project/joe-editor/JOE%20sources/joe-$(JOE_VERSION)
+JOE_LICENSE = GPLv1+
+JOE_LICENSE_FILES = COPYING
+JOE_MAKE_ENV =
+JOE_CONF_OPT = --disable-curses
+JOE_CONF_ENV =
+JOE_DEPENDENCIES =
+
+ifneq ($(BR2_PACKAGE_JOE_FULL),y)
+define JOE_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 $(@D)/joe $(TARGET_DIR)/usr/bin/joe
+endef
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 package/joe: Add package for the JOE editor

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alan" == Alan Ott <[email protected]> writes:

JOE is an easy-to-use, full-screen, terminal-based text editor.
http://joe-editor.sf.net

Thanks, see below for a few comments.

Quoted 4 lines
---
 package/joe/Config.in | 20 ++++++++++++++++++++
 package/joe/joe.mk    | 22 ++++++++++++++++++++++

You forgot to add it to package/Config.in

Quoted 36 lines
 2 files changed, 42 insertions(+)
 create mode 100644 package/joe/Config.in
 create mode 100644 package/joe/joe.mk
package/joe/Config.in new file +20 -0
new file mode 100644
index 0000000..e15b0f2
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_JOE
+	bool "joe"
+	help
+	  Joe's Own Editor
+
+	  JOE is an easy-to-use, full featured terminal-based screen editor.
+	  Its behavior is a blending of WordStar and GNU-EMACS (but it does
+	  not use code from either program).  It is a great editor for new
+	  users or as an alternative to vi.
+
+	  http://joe-editor.sf.net
+
+config BR2_PACKAGE_JOE_FULL
+	bool "full install of rc and syntax highlighting files"
+	depends on BR2_PACKAGE_JOE
+	default y
+	help
+	  Install all rc and syntax highlighting files. Without this option
+	  only the joe binary is installed, which contains a default
+	  configuration.
package/joe/joe.mk new file +0 -0
new file mode 100644
index 0000000..9725dc7

package/joe/joe.mk line 3

Quoted 3 lines
package/joe/joe.mk new file +3 -0
@@ -0,0 +1,22 @@
+################################################################################
+#
+# joe - Joe's Own Editor

We normally only have the package name here.

package/joe/joe.mk line 14

Quoted 11 lines
package/joe/joe.mk new file +11 -0
+#
+################################################################################
+
+JOE_VERSION = 3.7
+JOE_SITE = http://downloads.sourceforge.net/project/joe-editor/JOE%20sources/joe-$(JOE_VERSION)
+JOE_LICENSE = GPLv1+
+JOE_LICENSE_FILES = COPYING
+JOE_MAKE_ENV =
+JOE_CONF_OPT = --disable-curses
+JOE_CONF_ENV =
+JOE_DEPENDENCIES =

undefined variables in make expands to nothing, so you can drop these.

We do have ncurses in buildroot, so it should enable support for it if ncurses is enabled.

I did a test build for uClibc and I see it uses the XSI math bessel functions which are not enabled for default, so I added a patch to disable those if needed.

Committed with these issues fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
author
#2 lore raw

PATCH 1/1 package/joe: Add package for the JOE editor

Quoted 7 lines · Peter Korsgaard
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alan" == Alan Ott <[email protected]> writes:

JOE is an easy-to-use, full-screen, terminal-based text editor.
http://joe-editor.sf.net

Thanks, see below for a few comments.

You forgot to add it to package/Config.in

Oops.

Quoted 3 lines

We do have ncurses in buildroot, so it should enable support for it if ncurses is enabled.

What you have is fine, but it's worth mentioning that curses support doesn't actually help joe anymore. If you grep through the joe source, it only includes ncurses in one file, and doesn't actually use anything out of it. The resulting binary even from a "use curses" build doesn't actually even link to the ncurses library (it's optimized out by the linker).

Quoted 3 lines

I did a test build for uClibc and I see it uses the XSI math bessel functions which are not enabled for default, so I added a patch to disable those if needed.

Awesome!

Quoted 1 line

Committed with these issues fixed, thanks.

Thanks for the fixup and commit, and for all your work on Buildroot.

Alan.

#3 lore raw

PATCH 1/1 package/joe: Add package for the JOE editor

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alan" == Alan Ott <[email protected]> writes:

Hi,

Quoted 9 lines
Quoted 2 lines

We do have ncurses in buildroot, so it should enable support for it if ncurses is enabled.

What you have is fine, but it's worth mentioning that curses support doesn't actually help joe anymore. If you grep through the joe source, it only includes ncurses in one file, and doesn't actually use anything out of it. The resulting binary even from a "use curses" build doesn't actually even link to the ncurses library (it's optimized out by the linker).

Ok, it would have been good to mention that in a comment. I only did a test build to ensure that configure detected it and the final executable ended up getting linked with it, which was the case:

./output/host/usr/bin/arm-linux-readelf -a output/target/usr/bin/joe | \
grep NEEDED

 0x00000001 (NEEDED)                     Shared library: [libm.so.0]
 0x00000001 (NEEDED)                     Shared library: [libncurses.so.5]
 0x00000001 (NEEDED)                     Shared library: [libutil.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]
Quoted 9 lines
Quoted 3 lines

I did a test build for uClibc and I see it uses the XSI math bessel functions which are not enabled for default, so I added a patch to disable those if needed.

Awesome!

Quoted 1 line

Committed with these issues fixed, thanks.

Thanks for the fixup and commit, and for all your work on Buildroot.

You're welcome and thanks!

Signature · 1 line
Bye, Peter Korsgaard
author
#4 lore raw

PATCH 1/1 package/joe: Add package for the JOE editor

Quoted 4 lines · Peter Korsgaard
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alan" == Alan Ott <[email protected]> writes:

We do have ncurses in buildroot, so it should enable support for it if ncurses is enabled.

Quoted 8 lines
Quoted 6 lines

What you have is fine, but it's worth mentioning that curses support doesn't actually help joe anymore. If you grep through the joe source, it only includes ncurses in one file, and doesn't actually use anything out of it. The resulting binary even from a "use curses" build doesn't actually even link to the ncurses library (it's optimized out by the linker).

Ok, it would have been good to mention that in a comment.

Hi Peter,

Sorry about that. :(

Quoted 10 lines

I only did a
test build to ensure that configure detected it and the final executable ended up getting linked with it, which was the case:

./output/host/usr/bin/arm-linux-readelf -a output/target/usr/bin/joe | \
grep NEEDED

  0x00000001 (NEEDED)                     Shared library: [libm.so.0]
  0x00000001 (NEEDED)                     Shared library: [libncurses.so.5]
  0x00000001 (NEEDED)                     Shared library: [libutil.so.0]
  0x00000001 (NEEDED)                     Shared library: [libc.so.0]

Strange. It doesn't do that on x86:

alan at ato:~/work/joe-3.7$ readelf -a joe |grep NEEDED

  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libtinfo.so.5]
  0x0000000000000001 (NEEDED)             Shared library: [libutil.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

And I even checked the link step with make V=1:
gcc -g -O2 -o joe ... -lm -lncurses -lutil

If you want me to change it from the way it is, let me know.

Alan.