pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


ksh93.cygport prototype
Posted by Anonymous on Sat 3rd Feb 2024 12:46
raw | new post
view followups (newest first): ksh93.cygport prototype by Anonymous

  1. #
  2. # ksh93.cygport
  3. #
  4. # Copyright (C) 2024, Roland Mainz
  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="GPL-3.0-or-later"
  13. HOMEPAGE="https://github.com/ksh93/ksh"
  14. VERSION=1.0.8
  15. RELEASE=0
  16.  
  17. PKG_NAMES="ksh"
  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="bin \
  23.                bin/ksh.exe \
  24.                bin/rksh.exe \
  25.                bin/shcomp.exe \
  26.                etc/ksh.kshrc \
  27.                usr/share/doc/ksh \
  28.                usr/share/man/man1"
  29.  
  30. ksh_devel_SUMMARY="Development files for AT&T ksh"
  31. ksh_devel_DESCRIPTION="This package contains development headers for AT&T ksh"
  32. ksh_devel_CATEGORY="Devel"
  33. ksh_devel_CONTENTS="usr/share/ksh"
  34.  
  35. SRC_URI="https://github.com/ksh93/ksh/archive/refs/tags/v1.0.8.zip"
  36.  
  37. PATCH_URI_BASE=""
  38.  
  39. BUILD_REQUIRES=" \
  40.    bash \
  41.    coreutils \
  42.    bison \
  43.    gcc-g++ \
  44.    libiconv-devel \
  45.    libintl-devel \
  46.    libncurses-devel \
  47.    make \
  48.    sed \
  49.    texinfo \
  50. "
  51.  
  52. CPPFLAGS=
  53. CYGCONF_ARGS=
  54. DIFF_EXCLUDES=
  55. DOCS=
  56.  
  57. src_compile()
  58. {
  59.     cd ${S}
  60.     sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./src/cmd/INIT/package.sh ./bin/package
  61.     if [[ "$ARCH" == 'i686' ]] ; then
  62.         export SHELL=/bin/bash HOSTTYPE="cygwin.i386"; \
  63.             /bin/bash ./bin/package make \
  64.                 CC="/usr/bin/cc -std=gnu17" CCFLAGS="-Os -g" SHELL="$SHELL" HOSTTYPE="$HOSTTYPE"
  65.     elif [[ "$ARCH" == 'x86_64' ]] ; then
  66.         export SHELL=/bin/bash HOSTTYPE="cygwin.i386-64"; \
  67.             /bin/bash ./bin/package make \
  68.                 CC="/usr/bin/cc -std=gnu17" CCFLAGS="-Os -g" SHELL="$SHELL" HOSTTYPE="$HOSTTYPE"
  69.     else
  70.         # unsupported arch!
  71.         false
  72.     fi
  73.  
  74.     printf '# /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells\n' >${S}/etc_ksh_kshrc
  75. }
  76.  
  77. #
  78. # install ksh, rksh, shcomp
  79. #
  80. src_install()
  81. {
  82.  
  83.     ls -lad ${B}
  84.     ls -lad ${D}
  85.     ls -lad ${S}
  86.  
  87.     /usr/bin/install -D -m0755 ${S}/arch/cygwin.i386-64/bin/ksh.exe ${D}/bin/ksh.exe
  88.     ln ${D}/bin/ksh.exe ${D}/bin/rksh.exe
  89.     ln ${D}/bin/ksh.exe ${D}/bin/ksh93.exe
  90.     ln ${D}/bin/ksh.exe ${D}/bin/rksh93.exe
  91.     /usr/bin/install -D -m0755 ${S}/arch/cygwin.i386-64/bin/ksh.exe ${D}/bin/shcomp.exe
  92.     /usr/bin/install -D -m0644 ${S}/arch/cygwin.i386-64/man/man1/sh.1 ${D}/share/man/man1/ksh.1
  93.     /usr/bin/install -D -m0644 ${S}/etc_ksh_kshrc ${D}/etc/ksh.kshrc
  94.  
  95.     for i in ${S}/src/cmd/ksh93/tests/* ; do
  96.         /usr/bin/install -D -m0644 $i ${D}/share/ksh/tests/$(basename "$i")
  97.     done
  98. }
  99.  
  100. CYGWIN_MAINTAINER=Roland%20Mainz
  101. CYGWIN_MAINTAINER_EMAIL=roland.mainz@nrubsig.org
  102.  
  103. CYGWIN_CO_MAINTAINER=Cedric%20Blancher
  104. CYGWIN_CO_MAINTAINER_EMAIL=cedric.blancher@gmail.com
  105.  
  106. # 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