diff --git a/srcpkgs/loksh/patches/makefile-fix-libbsd-config.patch b/srcpkgs/loksh/patches/makefile-fix-libbsd-config.patch new file mode 100644 index 00000000000..888181a2bf2 --- /dev/null +++ b/srcpkgs/loksh/patches/makefile-fix-libbsd-config.patch @@ -0,0 +1,13 @@ +--- Makefile ++++ Makefile +@@ -17,8 +17,8 @@ HEADERS = c_test.h charclass.h config.h edit.h expand.h ksh_limval.h lex.h \ + proto.h sh.h shf.h table.h tree.h tty.h + + ifeq (1,$(HAVE_LIBBSD)) +- CFLAGS += $(shell pkg-config --cflags libbsd-overlay) +- LDFLAGS += $(shell pkg-config --libs libbsd-overlay) ++ override CFLAGS += $(shell pkg-config --cflags libbsd-overlay) ++ override LDFLAGS += $(shell pkg-config --libs libbsd-overlay) + endif + + all: ksh diff --git a/srcpkgs/loksh/template b/srcpkgs/loksh/template new file mode 100644 index 00000000000..a55f8e51e83 --- /dev/null +++ b/srcpkgs/loksh/template @@ -0,0 +1,30 @@ +# Template file for 'loksh' +pkgname=loksh +version=6.1 +revision=1 +build_style=gnu-makefile +make_build_args="HAVE_LIBBSD=1 CFLAGS+=-fPIC LDFLAGS+=-pie" +make_install_args="BIN_NAME=loksh" +hostmakedepends="pkg-config" +makedepends="libbsd-devel" +short_desc="A Linux port of OpenBSD's ksh" +maintainer="Renato Aguiar " +license="Public Domain" +homepage="https://github.com/dimkr/loksh" +distfiles="https://github.com/dimkr/loksh/archive/${version}.tar.gz" +checksum=988a9ae4c33aa8ff9e9dbc42ad22678ce7bd46892b9150c37b0e656f8a6ee7f1 +register_shell="/bin/loksh" + +alternatives=" + ksh:ksh:/usr/bin/loksh + ksh:ksh.1:/usr/share/man/man1/loksh.1 + sh:sh:/usr/bin/loksh + sh:sh.1:/usr/share/man/man1/loksh-sh.1 +" + +post_install() { + vlicense LEGAL + + mv ${DESTDIR}/usr/share/man/man1/sh.1 \ + ${DESTDIR}/usr/share/man/man1/loksh-sh.1 +}