Home | News | Download | Packages | Forum | Wiki | Github

[solved] St suckless terminal + patches + void repo


#21

The order of repo configuration files from top down in /etc/xbps.d determines the priority if a file exists in both repos. The order can be controlled with the number prefix or alphabetically.
Xbps installed st patched version I built with xbps-src from my local binpkgs,
/etc/xbps.d/00-repository-local.conf
repository=/home/rj/void-packages/hostdir/binpkgs
repository=/home/rj/void-packages/hostdir/binpkgs/nonfree

/etc/xbps.d/00-repository-main.conf
repository=http://repo3.voidlinux.eu/current

/etc/xbps.d/10-repository-nonfree.conf
repository=http://repo3.voidlinux.eu/current/nonfree


(Userx) #22

i just did that sed line for the templet thought that took care of EVERYTHING?
I wiped /opt/void-packages …~ let me do this again step by step per that comment above.

MOD: SED

root@voided/>>$sed ‘/depends=“ncurses”/a patch_args="-p1"’ template

Template file for ‘st’

pkgname=st
version=0.7
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="fontconfig-devel libX11-devel libXft-devel"
depends="ncurses"
patch_args="-p1"
short_desc="Simple terminal implementation for X"
maintainer='Juan RP xtraeme@voidlinux.eu
license="MIT"
homepage="http://st.suckless.org"
distfiles="http://dl.suckless.org/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=f7870d906ccc988926eef2cc98950a99cc78725b685e934c422c03c1234e6000

pre_build() {
sed -i ‘s|Liberation Mono|Monospace|g’ config.def.h
sed -i ‘s|^CFLAGS +=|override CFLAGS +=|g’ config.mk
sed -i ‘s|^LDFLAGS +=|override LDFLAGS +=|g’ config.mk
# We will use tic after install. See INSTALL.
sed -i ‘s|@tic -s st.info||g’ Makefile
}

post_install() {
vinstall st.info 644 usr/share/terminfo/s st.terminfo
vdoc README
vlicense LICENSE
}

still typing in term hold on …

tree:

userx@voided/>>$tree /opt/void-packages/srcpkgs/st
/opt/void-packages/srcpkgs/st
├── INSTALL
├── REMOVE
├── patches
│ └── st-scrollback-mouse-20160727-308bfbf.diff
└── template

OUTPUT:

userx@voided/>>$sudo xbps-src pkg st
[] Updating https://repo.voidlinux.eu/current/x86_64-repodata' ... [*] Updatinghttps://repo.voidlinux.eu/current/nonfree/x86_64-repodata’ …
x86_64-repodata: 12KB [avg rate: 583MB/s]
[
] Updating https://repo.voidlinux.eu/current/musl/x86_64-repodata' ... ERROR: [reposync] failed to fetch filehttps://repo.voidlinux.eu/current/musl/x
86_64-repodata’: Not Found
[] Updating https://repo.voidlinux.eu/current/musl/nonfree/x86_64-repodata' .. . ERROR: [reposync] failed to fetch filehttps://repo.voidlinux.eu/current/musl/n
onfree/x86_64-repodata’: Not Found
[
] Updating https://repo.voidlinux.eu/current/aarch64/x86_64-repodata' ... x86_64-repodata: 124KB [avg rate: 5284MB/s] [*] Updatinghttps://repo.voidlinux.eu/current/multilib/x86_64-repodata’ …
x86_64-repodata: 417KB [avg rate: 17GB/s]
[*] Updating `https://repo.voidlinux.eu/current/multilib/nonfree/x86_64-repodata
’ …
x86_64-repodata: 7998B [avg rate: 332MB/s]
=> Reconfiguring bootstrap packages…
glibc-locales: configuring …
Generating GNU libc locales…
en_US.UTF-8… done.
glibc-locales: configured successfully.
ca-certificates: configuring …
ca-certificates: configured successfully.
=> st-0.7_1: removing autodeps, please wait…
=> st-0.7_1: building …
[host] pkg-config-0.29.1_2: found (https://repo.voidlinux.eu/current)
[target] fontconfig-devel-2.12.1_1: found (https://repo.voidlinux.eu/current)
[target] libX11-devel-1.6.3_2: found (https://repo.voidlinux.eu/current)
[target] libXft-devel-2.3.2_1: found (https://repo.voidlinux.eu/current)
[runtime] ncurses>=0: found ncurses-6.0_2 (https://repo.voidlinux.eu/current)
=> st-0.7_1: installing host dependency ‘pkg-config-0.29.1_2’ …
=> st-0.7_1: installing target dependency ‘fontconfig-devel-2.12.1_1’ …
=> st-0.7_1: installing target dependency ‘libX11-devel-1.6.3_2’ …
=> st-0.7_1: installing target dependency ‘libXft-devel-2.3.2_1’ …
=> st-0.7_1: running do-fetch hook: 00-distfiles …
=> st-0.7_1: fetching distfile ‘st-0.7.tar.gz’…
looking up dl.suckless.org
connecting to dl.suckless.org:80
requesting http://dl.suckless.org/st/st-0.7.tar.gz
st-0.7.tar.gz: [41KB 9%] 163MB/s ETA: 00m00s
st-0.7.tar.gz: [41KB 19%] 53KB/s ETA: 00m04s
st-0.7.tar.gz: 41KB [avg rate: 273KB/s]
=> st-0.7_1: verifying checksum for distfile ‘st-0.7.tar.gz’… OK.
=> st-0.7_1: running do-extract hook: 00-distfiles …
=> st-0.7_1: extracting distfile(s), please wait…
=> st-0.7_1: running post-extract hook: 00-patches …
=> st-0.7_1: patching: st-scrollback-mouse-20160727-308bfbf.diff.
The text leading up to this was:

|diff --git a/config.def.h b/config.def.h
|index b41747f…5ab8d2e 100644
|— a/config.def.h

+++ b/config.def.h

File to patch:
Skip this patch? [y]
1 out of 1 hunk ignored
The text leading up to this was:

|diff --git a/st.c b/st.c
|index 2594c65…9744bcf 100644
|— a/st.c

+++ b/st.c

File to patch:
Skip this patch? [y]
3 out of 3 hunks ignored
=> ERROR: st-0.7_1: failed to run post-extract_00-patches() at line 34.


(Userx) #23

thanks [needs 10 chars or more to post] you


#24

http://st.suckless.org/patches/scrollback
This patch is the only one of the three that can be applied by itself:
http://st.suckless.org/patches/st-scrollback-20160727-308bfbf.diff
Apply the following patch on top of the previous to allow scrolling using Shift+MouseWheel.
This patch can only be applied if the previous patch is applied first:
http://st.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff
Apply the following patch on top of the previous two to allow scrollback using mouse wheel only when not in MODE_ALTSCREEN.
This patch can only be applied if the 2 previous patches have been applied:
http://st.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff


(Userx) #25

makes me wonder then why did Shampoo give indecation that the way he instructed that by doing it the way I was did no longer applied, because I did read that one then the other (i didn’t see the third ‘alt’ patch on that sight). So i just disreguared that this one first then the next one rule. I think, not recollecting completely, that first one was not taking either so that too helped me in disreguarding put that one on first rule.

So, now keeping with the order in which things need to be done. I guess one way to find out is to just do it and see what happens. Putting all three inside a directory (patches) then run xbps-src to see if that order is followed, or will one have to do this three times in a roll in order to add all three patches to the source? adding each patch running it, then removing that patch so it will not be in the way then adding the next one and running it again.

I think it was trying to do all three at once, one after the other, only that one was a old version. well nvertheless, back to the command line to find out.

NOPE:

userx@voided & patches >> $ls
st-scrollback-20160727-308bfbf.diff
st-scrollback-mouse-20160727-308bfbf.diff
st-scrollback-mouse-altscreen-20160727-308bfbf.diff

userx@voided & patches >> $sudo xbps-src pkg st
[] Updating https://repo.voidlinux.eu/current/x86_64-repodata' ... x86_64-repodata: 1110KB [avg rate: 2635KB/s] [*] Updatinghttps://repo.voidlinux.eu/current/nonfree/x86_64-repodata’ …
[
] Updating https://repo.voidlinux.eu/current/musl/x86_64-repodata' ... ERROR: [reposync] failed to fetch filehttps://repo.voidlinux.eu/current/musl/x
86_64-repodata’: Not Found
[] Updating https://repo.voidlinux.eu/current/musl/nonfree/x86_64-repodata' .. . ERROR: [reposync] failed to fetch filehttps://repo.voidlinux.eu/current/musl/n
onfree/x86_64-repodata’: Not Found
[
] Updating https://repo.voidlinux.eu/current/aarch64/x86_64-repodata' ... x86_64-repodata: 126KB [avg rate: 1522MB/s] [*] Updatinghttps://repo.voidlinux.eu/current/multilib/x86_64-repodata’ …
x86_64-repodata: 418KB [avg rate: 6582MB/s]
[*] Updating `https://repo.voidlinux.eu/current/multilib/nonfree/x86_64-repodata
’ …
=> st-0.7_1: removing autodeps, please wait…
=> st-0.7_1: building …
[host] pkg-config-0.29.1_2: found (https://repo.voidlinux.eu/current)
[target] fontconfig-devel-2.12.1_1: found (https://repo.voidlinux.eu/current)
[target] libX11-devel-1.6.3_2: found (https://repo.voidlinux.eu/current)
[target] libXft-devel-2.3.2_1: found (https://repo.voidlinux.eu/current)
[runtime] ncurses>=0: found ncurses-6.0_2 (https://repo.voidlinux.eu/current)
=> st-0.7_1: installing host dependency ‘pkg-config-0.29.1_2’ …
=> st-0.7_1: installing target dependency ‘fontconfig-devel-2.12.1_1’ …
=> st-0.7_1: installing target dependency ‘libX11-devel-1.6.3_2’ …
=> st-0.7_1: installing target dependency ‘libXft-devel-2.3.2_1’ …
=> st-0.7_1: running do-extract hook: 00-distfiles …
=> st-0.7_1: extracting distfile(s), please wait…
=> st-0.7_1: running post-extract hook: 00-patches …
=> st-0.7_1: patching: st-scrollback-20160727-308bfbf.diff.
The text leading up to this was:

|diff --git a/config.def.h b/config.def.h
|index b41747f…eae969e 100644
|— a/config.def.h

+++ b/config.def.h

File to patch:
Skip this patch? [y]
2 out of 2 hunks ignored
The text leading up to this was:

|diff --git a/st.c b/st.c
|index 2594c65…233d301 100644
|— a/st.c

+++ b/st.c

File to patch:
Skip this patch? [y]
23 out of 23 hunks ignored
=> ERROR: st-0.7_1: failed to run post-extract_00-patches() at line 34.

I think the biggest problem here MANYBE that it is 0.7_1 and not just plain Ole’ ver 0.7 . but I could be wrong. how does one get what version patch it is for by looking at it?

st-scrollback-20160727-308bfbf.diff

I do not see anything within that filename to easily indecate what version it is to be used on.

MOD ADDED: As we see here the source code off suckless web sight for ver 0.7 only works

userx@voided & st-0.7 >> $ls
FAQ Makefile arg.h st-scrollback-20160727-308bfbf.diff st.info
LEGACY README config.def.h st.1
LICENSE TODO config.mk st.c

userx@voided & st-0.7 >> $patch -p1 < st-scrollback-20160727-308bfbf.diff
patching file config.def.h
patching file st.c

userx@voided & st-0.7 >> $sudo make clean install
cleaning
st build options:
CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -DVERSION=“0.7” -D_XOPEN_SOURCE=600
LDFLAGS = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype -lfreetype
CC = cc
CC st.c
CC -o st
installing executable file to /usr/bin
installing manual page to /usr/share/man/man1
Please see the README file regarding the terminfo entry of st.
4 entries written to /usr/share/terminfo

on testing the scrollback worked using Shift + PgUp or Shift + PgDn

it is ver 0.7_1 in my copy of repos that has to be what is messing it up. YES?

PROBLEM:

2ND patch mouse wheel

userx@voided & st-0.7 >> $patch -p1 < st-scrollback-mouse-20160727-308bfbf.diff
patching file config.def.h
Hunk #1 succeeded at 152 (offset 1 line).
patching file st.c
Hunk #1 succeeded at 300 (offset -18 lines).
Hunk #2 succeeded at 960 (offset 7 lines).
Hunk #3 succeeded at 975 (offset 7 lines).

userx@voided & st-0.7 >> $sudo make clean install
cleaning
st build options:
CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -DVERSION=“0.7” -D_XOPEN_SOURCE=600
LDFLAGS = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype -lfreetype
CC = cc
CC st.c
st.c: In function ‘bpress’:
st.c:978:12: error: ‘mkeys’ undeclared (first use in this function)
for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
^
st.c:978:12: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:22: st.o] Error 1

So I googled ‘mkeys’ came up empty. what are they, what does that word define some way of using or eliminating key codes?

OK in source code it is defined here.

void
bpress(XEvent *e)
{
struct timespec now;
MouseShortcut *ms;
*MouseKey mk;

if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
    mousereport(e);
    return;
}
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
    if (e->xbutton.button == ms->b
            && match(ms->mask, e->xbutton.state)) {
        ttysend(ms->s, strlen(ms->s));
        return;
    }
}

errors here

for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
if (e->xbutton.button == mk->b
&& match(mk->mask, e->xbutton.state)) {
mk->func(&mk->arg);
return;
}
}

but doesn’t see it, now I got to brush off my limited programming knowleadge and go to the ‘recall center’ to try and fix it up? lol

I was just chekcing it out to see what I could see.


#26

eek, all this trouble for a “useless” terminal hehe,
it really shoud be a straight forward task.

my list:
-rw-rw-r-- 1 userx userx 5375 Aug 12 10:41 st-alpha-20160727.diff
-rw-rw-r-- 1 userx userx 282 Aug 12 10:40 st-clipboard-20160727.diff
-rw-rw-r-- 1 userx userx 453 Aug 12 10:43 st-no_bold_colors-20160727.diff
-rw-rw-r-- 1 userx userx 10362 Aug 12 10:42 st-scrollback-20160727.diff
-rw-rw-r-- 1 userx userx 1563 Aug 12 10:43 st-scrollback-mouse-20160727.diff
xbps-scr will patch st in this order all at once, there should not be any issues…


#27

well because I’m stupid and human too.
i believe i however said that it failed at build for me :wink: (guess i didn’t read threw the text at suckless.org well enough )

that “_1” at the end of “0.7_1” is the revision number. that gets added by the template. (i think that is just showing if the template has bin altered in some way after a privies template on the same version of the program)

how to see that st-scrollback-20160727-308bfbf.diff is a 0.7 ?:
it is a little bit of guess work, since the relise date of st 0.7 is (2016-08-11)
but the latest version of things at suckless seems to be written with a date, and older stuff with the version number. the rest is just hoping for the best that they match. :wink:


#28

Look at your xbps-src output:

Patching failed due to st-scrollback-20160727-308bfbf.diff
and st-scrollback-mouse-20160727-308bfbf.diff not being applied
prior to st-scrollback-mouse-20160727-308bfbf.diff


This is the proper output of xbps-src:

[rj@voidlinux void-packages]$ ls srcpkgs/st/patches
st-scrollback-20160727-308bfbf.diff
st-scrollback-mouse-20160727-308bfbf.diff
st-scrollback-mouse-altscreen-20160727-308bfbf.diff
[rj@voidlinux void-packages]$ ./xbps-src -f pkg st
[*] Updating `https://repo.voidlinux.eu/current/x86_64-repodata' ...
[*] Updating `https://repo.voidlinux.eu/current/nonfree/x86_64-repodata' ...
[*] Updating `https://repo.voidlinux.eu/current/musl/x86_64-repodata' ...
ERROR: [reposync] failed to fetch file `https://repo.voidlinux.eu/current/musl/x86_64-repodata': Not Found
[*] Updating `https://repo.voidlinux.eu/current/musl/nonfree/x86_64-repodata' ...
ERROR: [reposync] failed to fetch file `https://repo.voidlinux.eu/current/musl/nonfree/x86_64-repodata': Not Found
[*] Updating `https://repo.voidlinux.eu/current/aarch64/x86_64-repodata' ...
x86_64-repodata: 126KB [avg rate: 3083MB/s]
[*] Updating `https://repo.voidlinux.eu/current/multilib/x86_64-repodata' ...
x86_64-repodata: 418KB [avg rate: 9275MB/s]
[*] Updating `https://repo.voidlinux.eu/current/multilib/nonfree/x86_64-repodata' ...
=> st-0.7_1: removing autodeps, please wait...
=> st-0.7_1: building ...
   [host] pkg-config-0.29.1_2: found (https://repo.voidlinux.eu/current)
   [target] fontconfig-devel-2.12.1_1: found (https://repo.voidlinux.eu/current)
   [target] libX11-devel-1.6.3_2: found (https://repo.voidlinux.eu/current)
   [target] libXft-devel-2.3.2_1: found (https://repo.voidlinux.eu/current)
   [runtime] ncurses>=0: found ncurses-6.0_2 (https://repo.voidlinux.eu/current)
=> st-0.7_1: installing host dependency 'pkg-config-0.29.1_2' ...
=> st-0.7_1: installing target dependency 'fontconfig-devel-2.12.1_1' ...
=> st-0.7_1: installing target dependency 'libX11-devel-1.6.3_2' ...
=> st-0.7_1: installing target dependency 'libXft-devel-2.3.2_1' ...
=> st-0.7_1: running do-fetch hook: 00-distfiles ...
=> st-0.7_1: running do-extract hook: 00-distfiles ...
=> st-0.7_1: extracting distfile(s), please wait...
=> st-0.7_1: running post-extract hook: 00-patches ...
=> st-0.7_1: patching: st-scrollback-20160727-308bfbf.diff.
=> st-0.7_1: patching: st-scrollback-mouse-20160727-308bfbf.diff.
=> st-0.7_1: patching: st-scrollback-mouse-altscreen-20160727-308bfbf.diff.
=> st-0.7_1: running pre-configure hook: 00-gnu-configure-asneeded ...
=> st-0.7_1: running pre-configure hook: 01-override-config ...
=> st-0.7_1: running pre-configure hook: 02-script-wrapper ...
=> st-0.7_1: running pre-build hook: 02-script-wrapper ...
=> st-0.7_1: running pre_build ...
=> st-0.7_1: running do_build ...
cp config.def.h config.h
st build options:
CC st.c
CFLAGS   = -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1  -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe    -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -DVERSION="0.7" -D_XOPEN_SOURCE=600
LDFLAGS  = -specs=/void-packages/common/environment/configure/gccspecs/hardened-ld -Wl,-z,relro -Wl,-z,now -Wl,--as-needed     -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype -lfreetype
CC       = cc
CC -o st
=> st-0.7_1: running pre-install hook: 00-lib32 ...
=> st-0.7_1: running pre-install hook: 02-script-wrapper ...
=> st-0.7_1: running do_install ...
st build options:
CFLAGS   = -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1  -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe    -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -DVERSION="0.7" -D_XOPEN_SOURCE=600
LDFLAGS  = -specs=/void-packages/common/environment/configure/gccspecs/hardened-ld -Wl,-z,relro -Wl,-z,now -Wl,--as-needed     -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype -lfreetype
CC       = cc
installing executable file to /destdir//st-0.7/usr/bin
installing manual page to /destdir//st-0.7/usr/share/man/man1
Please see the README file regarding the terminfo entry of st.
=> st-0.7_1: running post_install ...
=> st-0.7_1: running post-install hook: 00-compress-info-files ...
=> st-0.7_1: running post-install hook: 00-uncompress-manpages ...
=> st-0.7_1: running post-install hook: 01-remove-localized-manpages ...
=> st-0.7_1: running post-install hook: 01-remove-misc ...
=> st-0.7_1: running post-install hook: 02-remove-libtool-archives ...
=> st-0.7_1: running post-install hook: 02-remove-perl-files ...
=> st-0.7_1: running post-install hook: 02-remove-python-bytecode-files ...
=> st-0.7_1: running post-install hook: 03-remove-empty-dirs ...
=> st-0.7_1: running post-install hook: 04-create-xbps-metadata-scripts ...
=> st-0.7_1: running post-install hook: 05-generate-gitrevs ...
=> st-0.7_1: running post-install hook: 06-strip-and-debug-pkgs ...
   Stripped position-independent executable: /usr/bin/st
=> st-0.7_1: running post-install hook: 98-lib32 ...
=> st-0.7_1: running pre-pkg hook: 03-rewrite-python-shebang ...
=> st-0.7_1: running pre-pkg hook: 04-generate-runtime-deps ...
   SONAME: libc.so.6 <-> glibc>=2.8_1
   SONAME: libm.so.6 <-> glibc>=2.8_1
   SONAME: libX11.so.6 <-> libX11>=1.2_1
   SONAME: libutil.so.1 <-> glibc>=2.8_1
   SONAME: libXft.so.2 <-> libXft>=2.1.13_1
   SONAME: libfontconfig.so.1 <-> fontconfig>=2.6.0_1
=> st-0.7_1: running pre-pkg hook: 05-prepare-32bit ...
=> st-0.7_1: running pre-pkg hook: 06-shlib-provides ...
=> st-0.7_1: running pre-pkg hook: 90-set-timestamps ...
=> st-0.7_1: setting mtimes to Thu Aug 11 14:55:13 EDT 2016
=> st-0.7_1: running pre-pkg hook: 99-pkglint ...
=> st-0.7_1: running do-pkg hook: 00-gen-pkg ...
=> Creating st-0.7_1.x86_64.xbps for repository /host/binpkgs ...
=> st-0.7_1: running post-pkg hook: 00-register-pkg ...
=> Registering st-0.7_1.x86_64.xbps into /host/binpkgs ...
index: added `st-0.7_1' (x86_64).
index: 36 packages registered.
=> st-0.7_1: removing autodeps, please wait...
=> st-0.7_1: cleaning build directory...
=> st: removing files from destdir...

All patches applied in the correct order:

=> st-0.7_1: running post-extract hook: 00-patches ...
=> st-0.7_1: patching: st-scrollback-20160727-308bfbf.diff.
=> st-0.7_1: patching: st-scrollback-mouse-20160727-308bfbf.diff.
=> st-0.7_1: patching: st-scrollback-mouse-altscreen-20160727-308bfbf.diff.

#29

Good day, everyone.

Sorry for bumping such an old thread but it seems to be exactly the topic I need.

Are there different templates for musl and glibc packages?

I had trouble with patching “st”, as the patches did not take any effect. So i dug my backup from the (I think) musl system and tried to compile the “st” from there.
It worked perfectly. I thought that it was due to some recent patch, but it does not look like there was any activity in the past ~year.

Templates and file structure are different, so I can only assume that musl and glibc versions are different somehow, because I can not think of another way, though I might be wrong.

Here’s a template from (i believe) my musl system:

# Template file for 'st'
pkgname=st
version=0.7
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="fontconfig-devel libX11-devel libXft-devel"
depends="ncurses"
short_desc="Simple terminal implementation for X"
maintainer='Juan RP <xtraeme@voidlinux.eu>'
license="MIT"
homepage="http://st.suckless.org"
distfiles="http://dl.suckless.org/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=f7870d906ccc988926eef2cc98950a99cc78725b685e934c422c03c1234e6000

pre_build() {
	sed -i 's|Liberation Mono|Monospace|g' config.def.h
	sed -i 's|^CFLAGS +=|override CFLAGS +=|g' config.mk
	sed -i 's|^LDFLAGS +=|override LDFLAGS +=|g' config.mk
	# We will use tic after install. See INSTALL.
	sed -i 's|@tic -s st.info||g' Makefile
}

post_install() {
	vinstall st.info 644 usr/share/terminfo/s st.terminfo
	vdoc README
	vlicense LICENSE
}

and files in the directory:

ls srcpkgs/st
INSTALL  REMOVE   template

Same data from the glibc one:

# Template file for 'st'
pkgname=st
version=0.7
revision=1
build_style=gnu-makefile
make_use_env=compliant
hostmakedepends="pkg-config"
makedepends="fontconfig-devel libX11-devel libXft-devel"
depends="ncurses"
short_desc="Simple terminal implementation for X"
maintainer='Juan RP <xtraeme@voidlinux.eu>'
license="MIT"
homepage="http://st.suckless.org"
distfiles="http://dl.suckless.org/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=f7870d906ccc988926eef2cc98950a99cc78725b685e934c422c03c1234e6000

pre_build() {
	cp ${FILESDIR}/config.h config.h
	# We will use tic after install. See INSTALL.
	sed -i 's|@tic -s st.info||g' Makefile
}

post_install() {
	vinstall st.info 644 usr/share/terminfo/s st.terminfo
	vdoc README
	vlicense LICENSE
}

and

ls /media/Transcend\ 1Tb/oldsystems/current_system/eichhorn/stuff/void-packages/srcpkgs/st/
INSTALL  REMOVE  files/  template

As you can see, not only the templates are different but there is a files directory in one of the versions.


(Masato the Empty) #30

Maybe it will clear things up if you know that there are no “versions” of the templates. There is one single git tree for void-packages, and that tree is used to build packages for all supported arches.

But know/remember that the tree is in constant flux. Directory contents change all the time.

Thus any differences you see between two void-packages trees that are otherwise unmodified locally comes down to the point in time that the tree represents; not the arch/build to which it was downloaded.


#31

Thanks for the clarification.

I double checked and you are correct. There was a commit fixing the template on the 14th of May and that particular version on my backup drive is from 14th of April.

I somehow ended up on different version initially that said last commit was ~10 month ago. My mistake.