Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to use "libxft-bgra" on Gentoo?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Tue Jun 01, 2021 1:10 pm    Post subject: How to use "libxft-bgra" on Gentoo? Reply with quote

Hi,

I want to use dwm,st & dmenu with colored emojis, however, I'm not sure how i would apply the patch for the libxft package.

https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1.patch

https://aur.archlinux.org/packages/libxft-bgra/

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=libxft-bgra

Cheers!
_________________
Having problems compiling since 2021 :(
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Tue Jun 01, 2021 1:13 pm    Post subject: Reply with quote

Put patch in /etc/portage/patches/x11-libs/libXft-2.3.3 (if not exists create it) and rebuild libXft package
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
hjkl
Apprentice
Apprentice


Joined: 22 Apr 2021
Posts: 198
Location: Somewhere in Europe

PostPosted: Tue Jun 01, 2021 1:13 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Put patch in /etc/portage/patches/x11-libs/libXft-2.3.3 (if not exists create it) and rebuild libXft package



I'll try that.
_________________
Having problems compiling since 2021 :(
Back to top
View user's profile Send private message
ilovemushycupcakes
n00b
n00b


Joined: 17 Oct 2021
Posts: 1
Location: Malaysia

PostPosted: Sun Oct 17, 2021 10:19 am    Post subject: Re: How to use "libxft-bgra" on Gentoo? Reply with quote

First of all, sorry for bringing up the old post. I just wanted to make sure @hjkl and everyone got his/her suckless software working.
So, this question has been asked (though, the question is different from what @hjkl had asked, but all still have the same goal nonetheless.

Here's the link to the previous post.
[SOLVED] Emojis in gentoo and suckless tools like dwm

Here's the summary of that post (TL;DR):

Make sure your x11-libs/libXft is under the stable build 2.3.3 (not 2.3.4)
Place the "libXft-bgra" patch in '/etc/portage/patches/x11-libs/libXft/'
https://github.com/TheMainMMan/dwm/blob/master/x11-wm/dwm/libXft-patch/7808631e7a9a605d5fe7a1077129c658d9ec47fc.patch
Credits to "The Main Man" for creating the patch.
and patch libXft and then re-emerge dwm, st, dmenu.

Psst* Am not good at this but that post has generally helped me got the emoji working.

hjkl wrote:
I want to use dwm, st & dmenu with coloured emojis, however, I'm not sure how I would apply the patch for the libxft package.


To understand how to apply the patch, can visit this wiki
https://wiki.gentoo.org/wiki//etc/portage/patches
which has more in-depth details.

To know how to get the coloured emoji worked on dwm and dmenu, I suggest watching this video by Luke Smith.
https://youtu.be/0QkByBugq_4

Hope this helps you! :D Please do remember to mark the post as solved if got the emoji working.

hjkl wrote:
https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1.patch

Will try that patch after I finished my exam :)
_________________
if it ain't broke, break it!


Last edited by ilovemushycupcakes on Mon Oct 18, 2021 5:52 am; edited 1 time in total
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Mon Oct 18, 2021 3:30 am    Post subject: Reply with quote

@ilovemushycupcakes

I tried the patch by "The Main Man", it worked, but then I tried the
Quote:
https://gitlab.freedesktop.org/xorg/lib/libxft/merge_requests/1.patch
patch, it didn't work.

I got the following error message after running: ebuild libXft-2.3.3.ebuild clean prepare


Code:

 * Applying 1.patch ...
patching file src/xftrender.c
Hunk #2 succeeded at 155 with fuzz 1.
patching file src/xftrender.c
patching file src/xftfreetype.c
Hunk #1 succeeded at 514 (offset -9 lines).
Hunk #2 succeeded at 766 (offset -9 lines).
Hunk #3 succeeded at 823 (offset -9 lines).
Hunk #4 succeeded at 966 (offset -9 lines).
patching file src/xftglyphs.c
Hunk #3 FAILED at 95.
Hunk #14 FAILED at 782.
Hunk #16 FAILED at 834.
3 out of 18 hunks FAILED -- saving rejects to file src/xftglyphs.c.rej
patching file src/xftint.h
patching file src/xftrender.c
Hunk #2 FAILED at 143.
Hunk #4 succeeded at 338 with fuzz 2.
1 out of 9 hunks FAILED -- saving rejects to file src/xftrender.c.rej                                                  [ !! ]
 * ERROR: x11-libs/libXft-2.3.3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-libs/libXft-2.3.3/1.patch
 *
 * Call stack:
 *               ebuild.sh, line  127:  Called src_prepare
 *             environment, line 2534:  Called xorg-3_src_prepare
 *             environment, line 3550:  Called default
 *      phase-functions.sh, line  858:  Called default_src_prepare
 *      phase-functions.sh, line  923:  Called __eapi6_src_prepare
 *             environment, line  233:  Called eapply_user
 *             environment, line 1017:  Called eapply '/etc/portage/patches/x11-libs/libXft-2.3.3/1.patch'
 *             environment, line  987:  Called _eapply_patch '/etc/portage/patches/x11-libs/libXft-2.3.3/1.patch'
 *             environment, line  925:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-libs/libXft-2.3.3/1.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-libs/libXft-2.3.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-libs/libXft-2.3.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-libs/libXft-2.3.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/libXft-2.3.3/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-libs/libXft-2.3.3/work/libXft-2.3.3'
 * S: '/var/tmp/portage/x11-libs/libXft-2.3.3/work/libXft-2.3.3'
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Mon Oct 18, 2021 11:14 am    Post subject: Reply with quote

smartding wrote:
@ilovemushycupcakes

I tried the patch by "The Main Man", it worked, but then I tried the
Quote:
https://gitlab.freedesktop.org/xorg/lib/libxft/merge_requests/1.patch
patch, it didn't work.

I got the following error message after running: ebuild libXft-2.3.3.ebuild clean prepare

...

Current version on ~amd64 is libXft-2.3.4
put 1.patch to /etc/portage/patches/x11-libs/libXft-2.3.4/
and re-emerge x11-libs/libXft
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Wed Oct 20, 2021 2:16 am    Post subject: Reply with quote

@etnull

Applying 1.patch on 2.3.4 went smoothly.

It's interesting the libxft-bgra aur in archlinux applies this patch on 2.3.3 without any issue.
Back to top
View user's profile Send private message
jaskaran
n00b
n00b


Joined: 05 May 2021
Posts: 3

PostPosted: Mon Nov 29, 2021 8:37 pm    Post subject: Reply with quote

Glad I found this thread I was experiencing similar issues when I was trying to upgrade to `libXft-2.3.4` whilst I still had "The Main Man" patch in my `patches` dir. Removing the main man patch and including the 1.patch for 2.3.4 and then emerging libXft was the key for me.
Back to top
View user's profile Send private message
ThatOneOcto
n00b
n00b


Joined: 25 Apr 2022
Posts: 1

PostPosted: Mon Apr 25, 2022 1:24 am    Post subject: Reply with quote

Sorry for the necro post, but this didn't help me, in my dwm config these are what fonts I'm using in my dwm build and I still get colorless emojis
`static const char *fonts[] = { "Sarasa UI SC:size=10" "JetBrainsMono Nerd Font:style=Bold:size=10", "Noto Emoji Color:size=10" };`
_________________
Time? Never heard of it
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Mon Apr 25, 2022 11:39 am    Post subject: Reply with quote

ThatOneOcto wrote:
Sorry for the necro post, but this didn't help me, in my dwm config these are what fonts I'm using in my dwm build and I still get colorless emojis
`static const char *fonts[] = { "Sarasa UI SC:size=10" "JetBrainsMono Nerd Font:style=Bold:size=10", "Noto Emoji Color:size=10" };`


The purpose of this patch is make sure st and other suckless software don't crash when showing color emojis.

Are you sure the font you're using actually contains color emojis?
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Mon May 16, 2022 11:00 am    Post subject: Reply with quote

Hey everyone. I was trying to apply this patch recently, and like some of you, I couldn't get TheMainMMan's patch working, since that patch was made for libXft 2.3.3 and not the latest 2.3.4.

I modified the patch so that it works with 2.3.4: https://github.com/Razorfang/gentoo/blob/libxft-colored-emojis/x11-libs/libXft/files/bgra.patch

Just download the patch, put it in the folder /etc/portage/patches/x11-libs/libXft, re-emerge libXft, and it should work.

The re-emerge dwm if you're using that, like I am.

This worked for me and it allowed me to use colored emojis with conky in my dwm status bar.
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Mon May 16, 2022 11:56 am    Post subject: Reply with quote

LemonadeLlama wrote:
Hey everyone. I was trying to apply this patch recently, and like some of you, I couldn't get TheMainMMan's patch working, since that patch was made for libXft 2.3.3 and not the latest 2.3.4.

I modified the patch so that it works with 2.3.4: https://github.com/Razorfang/gentoo/blob/libxft-colored-emojis/x11-libs/libXft/files/bgra.patch

Just download the patch, put it in the folder /etc/portage/patches/x11-libs/libXft, re-emerge libXft, and it should work.

The re-emerge dwm if you're using that, like I am.

This worked for me and it allowed me to use colored emojis with conky in my dwm status bar.



The https://gitlab.freedesktop.org/xorg/lib/libxft/merge_requests/1.patch several replies above works for 2.3.4.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum