On Sun, 8 Jun 2018, Ulrich Wilkens wrote:

> On 06/10/18 03:29, Brent Busby wrote:
> > Jon Trulson <j...@radscan.com> writes:
> > 
> > > On 06/09/2018 05:40 PM, Chase via cdesktopenv-devel wrote:
> > 
> > > > Also, requiring ksh to build is a bit of a fault point for many
> > > > users, especially the ones on BSDs, how difficult would it be to
> > > > remove the requirement for ksh during the build process, using sh
> > > > instead, and then when everything is build, use dtksh for
> > > > installation?
> > > 
> > > IIRC, dtksh/ksh actually requires ksh to build.  I have no problem
> > > with not requiring that ksh be available in order to build CDE.
> > > 
> > > I tried it once many years ago and gave up.  I think dtksh was the
> > > main problem and it was going to be difficult/time consuming to
> > > disentangle. Feel free to investigate though :)
> > 
> > I don't know if dtksh is wanting some particular version of ksh, but
> > there is a package in FreeBSD called shells/ksh93.  It's not pdksh, but
> > a real Korn shell.  There are lots of warnings in the comments of its
> > Makefile saying that to build it, no GCC options should be set at all,
> > and since most users do have something in their /etc/make.conf of that
> > sort, that might be why it gives people problems.  I have successfully
> > installed it just a minute ago to see if it builds ok on a FreeBSD 10.4
> > machine, and I even had CPUTYPE?=nocona set in /etc/make.conf and it
> > built anyway.
> > 
> > You might be able to just require shells/ksh93 as a dependency.
> > 
> 
> The mentioned package is exactly what you need on FreeBSD (93u+ from
> 2012-08-01)
> Other Bsds and Linuxes have similar packages with the same version.
> 
> But the first systems are starting to remove ksh93 package from their
> official distribution.
> I've seen it on NetBSD and Arch Linux. So it might become a problem
> in future.

I took over the maintenance of ksh93 for FreeBSD and I have no intention
of dropping it, unless somebody knowing ksh93 internals wants to take over
of course.  One reason I took it over was my interest in getting
newer ksh93 into CDE.

There is a revived effort by RedHat maintainers and Kurtis Rader at
https://github.com/att/ast 

They have switched the build system to Meson (it's fast now) and applied
some patches (some of them I am not sure are good), so right now
I am just cherry picking good stuff into my "unofficial" release.

The latest is here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211164
- you are welcome to test. 

It should build mostly fine on FreeBSD 10.x, 11.x and -CURRENT.
It is not working on arm64 platform due to lack of sbrk() C library function.

Users of other OS's may just download my distfiles and try to build them by 
hand:

https://distfile.net/local-ports-distfiles/INIT.2014-12-24.tgz
https://distfile.net/local-ports-distfiles/ast-ksh.2018-05-20.tgz

The magic command to build it is

    ./bin/package make

ksh93 is embeddable, this means you can build four shared libraries
(sadly most packagers don't) and just use it any C program (just like tcl):

#include <shell.h>
#include <nval.h>
 
int main(int argc, char *argv[])
{
    Namval_t *np;
    Sfdouble_t res;
 
    Shell_t *shp = sh_init(argc, argv, 0);
    sh_trap(shp, "((xresult=$0*$1))", 0);
 
    np = nv_open("xresult", shp->var_tree, 0);
    res = nv_getnum(np);
    sfprintf(sfstderr,"%Lg\n", res);
    nv_close(np);
 
    return(0);
}

Here's BSDmakefile to build it:

PROG=embed
KSHDIST=${HOME}/sw/ast/arch/freebsd10.amd64
CFLAGS+=-I$(KSHDIST)/include/ast
LDFLAGS+=-L$(KSHDIST)/lib -Wl,-rpath=$(KSHDIST)/lib -last -lshell -ldll -lcmd
.include <bsd.prog.mk>

It seems that dtksh is just a couple of object files
that are linked with those 3 (or currently 4) shared libraries,
plus it uses ksh93.o files from the main distribution.

As a minimum, it should be possible to upgrade ksh93 in the CDE tree
- this could be done right now based on the above release.

Long term it might possible to use ksh93 installed in the system
as the dependency, provided include files, libraries, and ksh93.o
will be provided.

Marcin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to