blob: abeb6e803b9f3b47faeb9744a43a701029f8d7d8 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001DESCRIPTION = "TENEX C Shell, an enhanced version of Berkeley csh \
2 The TENEX C Shell is an enhanced version of the Berkeley Unix C shell. \
3 It includes all features of 4.4BSD C shell, plus a command-line editor, \
4 programmable word completion, spelling correction and more."
5
6HOMEPAGE = "http://www.tcsh.org/"
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://Copyright;md5=575cf2715c3bf894e1f79aec1d4eaaf5"
9SECTION = "base"
10DEPENDS = "ncurses virtual/crypt gettext-native"
11SRC_URI = " \
12 https://astron.com/pub/${BPN}/${BP}.tar.gz \
13 file://0001-Enable-system-malloc-on-all-linux.patch \
14 file://0002-Add-debian-csh-scripts.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050015"
Patrick Williams8e7b46e2023-05-01 14:19:06 -050016SRC_URI[sha256sum] = "13475c0fbeb74139d33ed793bf00ffbbb2ac2dc9fb1d44467a410760aba36664"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017
18EXTRA_OEMAKE += "CC_FOR_GETHOST='${BUILD_CC}'"
19inherit autotools
20
Patrick Williams213cb262021-08-07 19:21:33 -050021do_compile:prepend() {
Patrick Williams0ca19cc2021-08-16 14:03:13 -050022 oe_runmake CC_FOR_GETHOST='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' LDFLAGS='${BUILD_LDFLAGS}' gethost
Andrew Geissler82c905d2020-04-13 13:39:40 -050023}
24
Patrick Williams213cb262021-08-07 19:21:33 -050025do_install:append () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050026 oe_runmake install.man DESTDIR=${D}
27
28 install -d ${D}${base_bindir}
Patrick Williams03907ee2022-05-01 06:28:52 -050029 if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
30 ln -s /usr/bin/tcsh ${D}${base_bindir}/tcsh
31 ln -s /usr/bin/tcsh ${D}${base_bindir}/csh
32 fi
Andrew Geissler82c905d2020-04-13 13:39:40 -050033 install -d ${D}${sysconfdir}/csh/login.d
34 install -m 0644 ${S}/csh.cshrc ${S}/csh.login ${S}/csh.logout ${S}/complete.tcsh ${D}${sysconfdir}
35 install -D -m 0644 ${S}/csh-mode.el ${D}${datadir}/emacs/site-lisp/csh-mode.el
36}
37
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN} += "${datadir}/emacs/site-lisp/csh-mode.el"
Andrew Geissler82c905d2020-04-13 13:39:40 -050039
40
Patrick Williams213cb262021-08-07 19:21:33 -050041pkg_postinst:${PN} () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050042#!/bin/sh -e
43echo /usr/bin/tcsh >> $D/etc/shells
44echo /usr/bin/csh >> $D/etc/shells
45}
Andrew Geissler517393d2023-01-13 08:55:19 -060046BBCLASSEXTEND = "native nativesdk"