NEW: x11/st

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

NEW: x11/st

Joerg Jung
Hi!

please find attached a port for st-0.1.1

Description:
st is a simple virtual terminal emulator for X which sucks less.

More info:
http://st.suckless.org/

Port is attached or can be downloaded from:
https://www.umaxx.net/src/st.tar.gz

The port and patches are modeled after other suckless ports (dwm).

I'm not sure about the tic -s part as this seems to change
terminfo database in base and this change is not reverted on
port uninstall. Any hints/suggestions how to handle this?

Please test, comment and give OKs.

Regards,

Joerg

st.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Nicholas Marriott-2
You could install the terminfo file under share/ and point people at it
so they can run tic themselves to either install it globally or in
~/.terminfo.



On Fri, Sep 16, 2011 at 01:28:10PM +0200, Joerg Zinke wrote:

> Hi!
>
> please find attached a port for st-0.1.1
>
> Description:
> st is a simple virtual terminal emulator for X which sucks less.
>
> More info:
> http://st.suckless.org/
>
> Port is attached or can be downloaded from:
> https://www.umaxx.net/src/st.tar.gz
>
> The port and patches are modeled after other suckless ports (dwm).
>
> I'm not sure about the tic -s part as this seems to change
> terminfo database in base and this change is not reverted on
> port uninstall. Any hints/suggestions how to handle this?
>
> Please test, comment and give OKs.
>
> Regards,
>
> Joerg


Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Joerg Jung
In reply to this post by Joerg Jung
On Fri, 16 Sep 2011 13:28:10 +0200
Joerg Zinke <[hidden email]> wrote:

> please find attached a port for st-0.1.1
>
> Description:
> st is a simple virtual terminal emulator for X which sucks less.
>
> More info:
> http://st.suckless.org/
>
> Port is attached or can be downloaded from:
> https://www.umaxx.net/src/st.tar.gz
>
> The port and patches are modeled after other suckless ports (dwm).
>
> I'm not sure about the tic -s part as this seems to change
> terminfo database in base and this change is not reverted on
> port uninstall. Any hints/suggestions how to handle this?
>
> Please test, comment and give OKs.
Please find an updated version with minor cleanup and WANTLIB filled in
attached and at the URL mentioned above.

Regards,

Joerg

st.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Joerg Jung
In reply to this post by Nicholas Marriott-2
Hey,

On Fri, 16 Sep 2011 12:39:11 +0100
Nicholas Marriott <[hidden email]> wrote:

> You could install the terminfo file under share/ and point people at it
> so they can run tic themselves to either install it globally or in
> ~/.terminfo.

Mhmm... but it would be better to have it working out-of-box after
install, right?

What about adding these generated files manually to PLIST?
/usr/share/terminfo/s/st
/usr/share/terminfo/s/st-256

Are there more files modified after the tic -s st.info call?
terminfo.db or something?

Thanks,
Regards,

Joerg

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

stanleylieber
In reply to this post by Joerg Jung
On Fri, Sep 16, 2011 at 6:28 AM, Joerg Zinke <[hidden email]> wrote:

> Hi!
>
> please find attached a port for st-0.1.1
>
> Description:
> st is a simple virtual terminal emulator for X which sucks less.
>
> More info:
> http://st.suckless.org/
>
> Port is attached or can be downloaded from:
> https://www.umaxx.net/src/st.tar.gz
>
> The port and patches are modeled after other suckless ports (dwm).
>
> I'm not sure about the tic -s part as this seems to change
> terminfo database in base and this change is not reverted on
> port uninstall. Any hints/suggestions how to handle this?
>
> Please test, comment and give OKs.
>
> Regards,
>
> Joerg

Built and tested on amd64. No problems so far.

-sl

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Nicholas Marriott-2
In reply to this post by Joerg Jung
No tic won't modify terminfo.db, all it does is install the files in
/usr/share/terminfo (or ~/.terminfo w/o -s).

You could add them to PLIST I guess, only thing is /usr/share/terminfo
doesn't exist by default. We could make ncurses search
/usr/local/share/terminfo as well if necessary.

Of course the nicest thing would be if upstream would get their terminfo
entry into ncurses itself like everyone else, then we would get it into
base with all the rest.


On Fri, Sep 16, 2011 at 08:57:28PM +0200, Joerg Zinke wrote:

> Hey,
>
> On Fri, 16 Sep 2011 12:39:11 +0100
> Nicholas Marriott <[hidden email]> wrote:
>
> > You could install the terminfo file under share/ and point people at it
> > so they can run tic themselves to either install it globally or in
> > ~/.terminfo.
>
> Mhmm... but it would be better to have it working out-of-box after
> install, right?
>
> What about adding these generated files manually to PLIST?
> /usr/share/terminfo/s/st
> /usr/share/terminfo/s/st-256
>
> Are there more files modified after the tic -s st.info call?
> terminfo.db or something?
>
> Thanks,
> Regards,
>
> Joerg

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Joerg Jung
Hi,

okay, I've contacted suckless community on this topic:
http://lists.suckless.org/dev/1109/9327.html

So, I would like to move on with the PLIST approach but
I think since we are talking about ports data it makes
more sense to put the files under:
/usr/local/share/termino/s/*
instead of /usr/share/terminfo/s/*

The directory can be installed/created by
the Port itself if required. So how hard is it to change
the ncurses/terminfo search path? Simple diff?

Regards,
Joerg

Am 17.09.2011 um 01:52 schrieb Nicholas Marriott:

> No tic won't modify terminfo.db, all it does is install the files in
> /usr/share/terminfo (or ~/.terminfo w/o -s).
>
> You could add them to PLIST I guess, only thing is /usr/share/terminfo
> doesn't exist by default. We could make ncurses search
> /usr/local/share/terminfo as well if necessary.
>
> Of course the nicest thing would be if upstream would get their terminfo
> entry into ncurses itself like everyone else, then we would get it into
> base with all the rest.
>
>
> On Fri, Sep 16, 2011 at 08:57:28PM +0200, Joerg Zinke wrote:
>> Hey,
>>
>> On Fri, 16 Sep 2011 12:39:11 +0100
>> Nicholas Marriott <[hidden email]> wrote:
>>
>>> You could install the terminfo file under share/ and point people at it
>>> so they can run tic themselves to either install it globally or in
>>> ~/.terminfo.
>>
>> Mhmm... but it would be better to have it working out-of-box after
>> install, right?
>>
>> What about adding these generated files manually to PLIST?
>> /usr/share/terminfo/s/st
>> /usr/share/terminfo/s/st-256
>>
>> Are there more files modified after the tic -s st.info call?
>> terminfo.db or something?
>>
>> Thanks,
>> Regards,
>>
>> Joerg
>

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

David Coppa
On Mon, Sep 19, 2011 at 12:21 PM,  <[hidden email]> wrote:

> Hi,
>
> okay, I've contacted suckless community on this topic:
> http://lists.suckless.org/dev/1109/9327.html
>
> So, I would like to move on with the PLIST approach but
> I think since we are talking about ports data it makes
> more sense to put the files under:
> /usr/local/share/termino/s/*
> instead of /usr/share/terminfo/s/*
>
> The directory can be installed/created by
> the Port itself if required. So how hard is it to change
> the ncurses/terminfo search path? Simple diff?

It's just a matter of changing TERMINFO_DIRS from:

#define TERMINFO_DIRS "/usr/share/terminfo"

to:

#define TERMINFO_DIRS "/usr/share/terminfo:/usr/local/share/terminfo"

into src/lib/libcurses/ncurses_cfg.h

ciao,
David

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Nicholas Marriott-2
I'm ok with doing this.

You can compile it there using tic with -o.

Note that tic makes the directories 777 so umask needs to be correct,
not sure if the package makefiles ensure this


On Mon, Sep 19, 2011 at 12:54:20PM +0200, David Coppa wrote:

> On Mon, Sep 19, 2011 at 12:21 PM,  <[hidden email]> wrote:
> > Hi,
> >
> > okay, I've contacted suckless community on this topic:
> > http://lists.suckless.org/dev/1109/9327.html
> >
> > So, I would like to move on with the PLIST approach but
> > I think since we are talking about ports data it makes
> > more sense to put the files under:
> > /usr/local/share/termino/s/*
> > instead of /usr/share/terminfo/s/*
> >
> > The directory can be installed/created by
> > the Port itself if required. So how hard is it to change
> > the ncurses/terminfo search path? Simple diff?
>
> It's just a matter of changing TERMINFO_DIRS from:
>
> #define TERMINFO_DIRS "/usr/share/terminfo"
>
> to:
>
> #define TERMINFO_DIRS "/usr/share/terminfo:/usr/local/share/terminfo"
>
> into src/lib/libcurses/ncurses_cfg.h
>
> ciao,
> David

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

David Coppa
On Mon, Sep 19, 2011 at 8:12 PM, Nicholas Marriott
<[hidden email]> wrote:
> I'm ok with doing this.

I think we should bump ncurses minor as well.

This is required so we can tighten library dependency for the ports
that will use the new /usr/local/share/terminfo dir.

For example, I'd like to patch rxvt-unicode to use its "rxvt-unicode"
terminfo database entry instead of "rxvt-256color" as it is now...

cheers,
David

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Bryan Steele-2
In reply to this post by Joerg Jung
Just my opinion, but st is still fairly early in its development stage, all
user customization is done using by editing config.h like dwm.

        * Font configuration.
        * Background, foreground and cursor colour.
        * etc.

I've also noticed a random segfault on OpenBSD/i386 -current that still occurs
in recent hg exports.

In this case, it crashes while starting vi.
gdb bt:
#0  xdraws (s=0xcfbe2b08 "@ vibQn\0060", base=
      {c = "@\004\031", mode = 32 ' ', fg = 1126178848, bg = 1397048399,
      state = 69 'E'}, x=34, y=1, charlen=1, bytelen=1) at st.c:1686
#1  0x1c002638 in drawregion (x1=0, y1=Variable "y1" is not available.) at
st.c:1775
...

The values for fg/bg are bogus, if you cap them at 255 in drawregion before the
call to xdraws it no longer crashes.

From what I can see, it also lacks scrolling at the moment, so you have to use
tmux or screen for that.

-Bryan.

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Joerg Jung
Hi,

On Tue, 20 Sep 2011 12:04:31 -0400
Brynet <[hidden email]> wrote:

> Just my opinion, but st is still fairly early in its development stage, all
> user customization is done using by editing config.h like dwm.
>
> * Font configuration.
> * Background, foreground and cursor colour.
> * etc.

These are the facts, not your opinion :)
 

> I've also noticed a random segfault on OpenBSD/i386 -current that still occurs
> in recent hg exports.
>
> In this case, it crashes while starting vi.
> gdb bt:
> #0  xdraws (s=0xcfbe2b08 "@ vibQn\0060", base=
>       {c = "@\004\031", mode = 32 ' ', fg = 1126178848, bg = 1397048399,
>       state = 69 'E'}, x=34, y=1, charlen=1, bytelen=1) at st.c:1686
> #1  0x1c002638 in drawregion (x1=0, y1=Variable "y1" is not available.) at
> st.c:1775
> ...
>
> The values for fg/bg are bogus, if you cap them at 255 in drawregion before the
> call to xdraws it no longer crashes.

Works for me and I'm not able to reproduce this here as you provided
not enough information.
May it be possible that you have tweaked your config.h in a wrong way?
Have you reported this to upstream?
 
> From what I can see, it also lacks scrolling at the moment, so you have to use
> tmux or screen for that.

I think you are wrong with this assumption.

Regards,
Joerg

Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Stuart Henderson
In reply to this post by Joerg Jung
On 2011-09-16, Joerg Zinke <[hidden email]> wrote:
> please find attached a port for st-0.1.1

Please set DIST_SUBDIR for this and regen distinfo, 0.1.1.tar.gz is
a very poor filename for a distfile so it should go into a subdirectory
of distfiles.


Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

Joerg Jung
On Wed, 21 Sep 2011 10:53:52 +0000 (UTC)
Stuart Henderson <[hidden email]> wrote:

> On 2011-09-16, Joerg Zinke <[hidden email]> wrote:
> > please find attached a port for st-0.1.1
>
> Please set DIST_SUBDIR for this and regen distinfo, 0.1.1.tar.gz is
> a very poor filename for a distfile so it should go into a subdirectory
> of distfiles.

Yes, right.

Please find attached a tweaked version which sets DIST_SUBDIR and
installs terminfo to /usr/local/share/terminfo/. This requires
recent -current to be recognized with curses.

OK, to commit?

Thanks,
Regards,

Joerg



st.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NEW: x11/st

David Coppa
On Wed, Sep 21, 2011 at 1:52 PM, Joerg Zinke <[hidden email]> wrote:

> On Wed, 21 Sep 2011 10:53:52 +0000 (UTC)
> Stuart Henderson <[hidden email]> wrote:
>
>> On 2011-09-16, Joerg Zinke <[hidden email]> wrote:
>> > please find attached a port for st-0.1.1
>>
>> Please set DIST_SUBDIR for this and regen distinfo, 0.1.1.tar.gz is
>> a very poor filename for a distfile so it should go into a subdirectory
>> of distfiles.
>
> Yes, right.
>
> Please find attached a tweaked version which sets DIST_SUBDIR and
> installs terminfo to /usr/local/share/terminfo/. This requires
> recent -current to be recognized with curses.
>
> OK, to commit?

Zap "-Os" from CFLAGS and it's ok for me to import it.

ciao,
David