pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


ksh93.cygport prototype
Posted by Anonymous on Sun 4th Feb 2024 14:28
raw | new post
view followups (newest first): ksh93.cygport prototype by Anonymous
modification of post by Anonymous (view diff)

  1. #
  2. # ksh93.cygport
  3. #
  4. # Copyright (C) 2024, Roland Mainz <roland.mainz@nrubsig.org>
  5. #
  6. # This file is free software; I give unlimited permission to copy and/or
  7. # distribute it, with or without modifications, as long as this notice is
  8. # preserved.
  9. #
  10.  
  11. NAME=ksh
  12. LICENSE="Eclipse Public License - v 2.0"
  13. HOMEPAGE="https://github.com/ksh93/ksh"
  14. VERSION=1.0.8
  15. RELEASE=0
  16.  
  17. PKG_NAMES="ksh ksh_devel"
  18.  
  19. ksh_SUMMARY="The AT&T Korn Shell"
  20. ksh_DESCRIPTION="Original version of the AT&T AST Korn Shell 93."
  21. ksh_CATEGORY="Base Shells"
  22. ksh_CONTENTS=" \
  23.                bin/ksh.exe \
  24.                bin/ksh93.exe \
  25.                bin/rksh.exe \
  26.                bin/rksh93.exe \
  27.                etc/ksh.kshrc \
  28.                usr/share/doc/ksh \
  29.                usr/share/man/man1 \
  30. "
  31.  
  32. ksh_devel_SUMMARY="Development files for AT&T ksh"
  33. ksh_devel_DESCRIPTION="This package contains development headers for AT&T ksh"
  34. ksh_devel_CATEGORY="Devel"
  35. ksh_devel_CONTENTS="usr/share/ksh \
  36.         bin/shcomp.exe \
  37. "
  38.  
  39. SRC_URI="https://github.com/ksh93/ksh/archive/refs/tags/v1.0.8.zip"
  40.  
  41. PATCH_URI_BASE=""
  42.  
  43. BUILD_REQUIRES=" \
  44.    bash \
  45.    coreutils \
  46.    bison \
  47.    gcc-g++ \
  48.    libiconv-devel \
  49.    libintl-devel \
  50.    libncurses-devel \
  51.    make \
  52.    sed \
  53.    texinfo \
  54. "
  55.  
  56. CPPFLAGS=
  57. CYGCONF_ARGS=
  58. DIFF_EXCLUDES=
  59. DOCS=
  60.  
  61. src_compile()
  62. {
  63.     cd ${S}
  64.     sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./src/cmd/INIT/package.sh ./bin/package
  65.     if [[ "$ARCH" == 'i686' ]] ; then
  66.         export SHELL=/bin/bash HOSTTYPE="cygwin.i386"; \
  67.             /bin/bash ./bin/package make \
  68.                 CC="/usr/bin/cc -std=gnu17" CCFLAGS="-Os -g" SHELL="$SHELL" HOSTTYPE="$HOSTTYPE"
  69.     elif [[ "$ARCH" == 'x86_64' ]] ; then
  70.         export SHELL=/bin/bash HOSTTYPE="cygwin.i386-64"; \
  71.             /bin/bash ./bin/package make \
  72.                 CC="/usr/bin/cc -std=gnu17" CCFLAGS="-Os -g" SHELL="$SHELL" HOSTTYPE="$HOSTTYPE"
  73.     else
  74.         # unsupported arch!
  75.         false
  76.     fi
  77.  
  78.     printf '# /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells\n' >${S}/etc_ksh_kshrc
  79. }
  80.  
  81. #
  82. # install ksh, rksh, shcomp
  83. #
  84. src_install()
  85. {
  86.  
  87.         ls -lad ${B}
  88.         ls -lad ${D}
  89.         ls -lad ${S}
  90.  
  91.         /usr/bin/install -D -m0755 ${S}/arch/cygwin.i386-64/bin/ksh.exe ${D}/bin/ksh.exe
  92.         ln ${D}/bin/ksh.exe ${D}/bin/rksh.exe
  93.         ln ${D}/bin/ksh.exe ${D}/bin/ksh93.exe
  94.         ln ${D}/bin/ksh.exe ${D}/bin/rksh93.exe
  95.         /usr/bin/install -D -m0755 ${S}/arch/cygwin.i386-64/bin/ksh.exe ${D}/bin/shcomp.exe
  96.         /usr/bin/install -D -m0644 ${S}/arch/cygwin.i386-64/man/man1/sh.1 ${D}/usr/share/man/man1/ksh.1
  97.         /usr/bin/install -D -m0644 ${S}/etc_ksh_kshrc ${D}/etc/ksh.kshrc
  98.  
  99.         for i in ${S}/src/cmd/ksh93/tests/* ; do
  100.                 /usr/bin/install -D -m0644 $i ${D}/usr/share/ksh/tests/$(basename "$i")
  101.         done
  102. }
  103.  
  104. CYGWIN_MAINTAINER=Roland%20Mainz
  105. CYGWIN_MAINTAINER_EMAIL=roland.mainz@nrubsig.org
  106.  
  107. CYGWIN_CO_MAINTAINER=Cedric%20Blancher
  108. CYGWIN_CO_MAINTAINER_EMAIL=cedric.blancher@gmail.com
  109.  
  110. # EOF.

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at