Skip to content

Commit 56beac0

Browse files
dlmileslazka
andauthored
joe: Joe's own editor (#3695)
* joe: Joe's own editor * fixes --------- Co-authored-by: Christoph Reiter <[email protected]>
1 parent b6504b4 commit 56beac0

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

joe/0001-fix-build.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- joe-4.6/joe/tty.c.orig 2018-01-10 17:28:34.000000000 +0100
2+
+++ joe-4.6/joe/tty.c 2025-08-07 07:54:23.698861300 +0200
3+
@@ -952,7 +952,7 @@
4+
5+
/* Strange streams way */
6+
7+
-extern char *ptsname();
8+
+extern char *ptsname(int fd);
9+
10+
static char *getpty(int *ptyfd, int *ttyfd)
11+
{

joe/PKGBUILD

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Maintainer: Darryl L. Miles <[email protected]>
2+
3+
pkgname=joe
4+
pkgver=4.6
5+
pkgrel=1
6+
pkgdesc="Joe's own editor"
7+
arch=('any')
8+
url="https://joe-editor.sourceforge.io/"
9+
license=('spdx:GPL-2.0-or-later')
10+
depends=('ncurses')
11+
makedepends=('make' 'gcc' 'autotools' 'ncurses-devel')
12+
backup=('etc/joe/ftyperc' 'etc/joe/jicerc.ru' 'etc/joe/jmacsrc'
13+
'etc/joe/joerc' 'etc/joe/jpicorc' 'etc/joe/jstarrc' 'etc/joe/rjoerc')
14+
source=("https://downloads.sourceforge.net/joe-editor/${pkgname}-${pkgver}.tar.gz"
15+
"0001-fix-build.patch")
16+
sha256sums=('495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de'
17+
'a771b1a22aeb7baa2640f348f2454338ed71158ba6b7bb764f7e5704dbe60233')
18+
19+
prepare() {
20+
cd "${pkgname}-${pkgver}"
21+
22+
patch -p1 -i "${srcdir}/0001-fix-build.patch"
23+
}
24+
25+
build() {
26+
cd "${srcdir}/${pkgname}-${pkgver}"
27+
28+
# for grantpt()
29+
CFLAGS+=" -D_GNU_SOURCE"
30+
31+
# Moved joe's configure data into /usr/share/joe otherwise it pollutes the space
32+
./configure --prefix=/usr --sysconfdir=/etc --datarootdir=/usr/share/joe --mandir=/usr/share/man
33+
34+
# This symlink substitute is problematic, disable it.
35+
# LN_S = cp -pR
36+
find -type f -name Makefile -exec sed -i "s/LN_S = .*/LN_S = echo/" {} \;
37+
38+
make
39+
}
40+
41+
package() {
42+
cd "${srcdir}/${pkgname}-${pkgver}"
43+
44+
make DESTDIR="${pkgdir}" install
45+
46+
# Replace LN_S function, it is aliasing alternative binary names
47+
for i in jmacs jstar rjoe jpico ; do cp -p "${pkgdir}/usr/bin/joe" "${pkgdir}/usr/bin/$i" ; done
48+
49+
# Licenses
50+
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/README.md" "${pkgdir}/usr/share/licenses/${pkgname}/README.md"
51+
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
52+
}

0 commit comments

Comments
 (0)