cog1to / st-ligatures

Patches for ST (suckless terminal) that add support for ligatures drawing
52 stars 5 forks source link

Patch does not apply on st-0.8.2 #8

Closed remi-gelinas closed 4 years ago

remi-gelinas commented 4 years ago

Attempting to apply the latest patch (no compatibility patches, although the alpha-compatible patch has the same issue) to the st version 0.8.2 source results in a failure to apply the config.mk patch.

Applying through git apply --verbose or through patch -i results in the same failure:

Checking patch config.mk...
error: while searching for:
# includes and libs
INCS = -I$(X11INC) \
       `$(PKG_CONFIG) --cflags fontconfig` \
       `$(PKG_CONFIG) --cflags freetype2`
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender \
       `$(PKG_CONFIG) --libs fontconfig` \
       `$(PKG_CONFIG) --libs freetype2`

# flags
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600

error: patch failed: config.mk:15
error: config.mk: patch does not apply
cog1to commented 4 years ago

Looks like you're trying to apply alpha-compatible patch instead of original one without actually applying alpha patch first. clean 0.8.2 does not give me any errors:

> git checkout 0.8.2
HEAD is now at 75f92eb bump version to 0.8.2
> patch -i st-ligatures-20200406-28ad288.diff
patching file Makefile
patching file config.mk
patching file hb.c
patching file hb.h
patching file st.c
Hunk #1 succeeded at 2590 with fuzz 1 (offset 6 lines).
patching file st.h
patching file x.c
Hunk #2 succeeded at 987 (offset -45 lines).
Hunk #3 succeeded at 1146 (offset -87 lines).
Hunk #4 succeeded at 1256 (offset -84 lines).
> 
zeorin commented 4 years ago

In my case the alpha patch leaves line 19 of config.mk looking like this:

LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\

and line 35 of your alpha-compatible patch looks like this:

 LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender \

Note that there is a space missing between -lXrender and \ after the alpha patch is applied.

remi-gelinas commented 4 years ago

@zeorin Yup, that's the issue. I've updated the patch to expect the missing space in #9.