Skip to content

main: get font paths using fontconfig and make Makefile more packager friendly - #1

Open
AnInternetTroll wants to merge 1 commit into
yetanotherf0rked:mainfrom
AnInternetTroll:user/luca/fonts-and-linux
Open

main: get font paths using fontconfig and make Makefile more packager friendly#1
AnInternetTroll wants to merge 1 commit into
yetanotherf0rked:mainfrom
AnInternetTroll:user/luca/fonts-and-linux

Conversation

@AnInternetTroll

Copy link
Copy Markdown

By using fontconfig the program can find a font without hardcoding paths
which only work on some distros, but not others.

In addition, the Makefile is changed to allow for easier building and
changing where the package is installed.

Lastly, add a guix.scm file for easier development and as a proof of
concept on how to package simplefuckingtimer for distros.


I know this is a lot of changes and not all are necessary, so feel free
to only pick what you think is best.

I tried to keep the build system to one makefile, but of course the C++
world has a lot of opinions on this.

Shoutout to Eli Schwartz in particular for making a version with
autoconf
https://paste.xinu.at/eh8kfH/

I don't really feel comfortable enough with autoconf to use that one,
but feel free to use it.

Lastly, I also got it to build with void's build system with the
following template (also as a proof of concept, but also because void is
what I use)

This doesn't make sense to have in this repo, but it's a good point of
reference for how the program can be packaged in other distros.

# Template file for 'simplefuckingtimer'
pkgname=simplefuckingtimer
version=0
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="SDL2-devel SDL2_ttf-devel libX11-devel fontconfig-devel"
short_desc="Minimal timer for speedrunning on Linux. Start, Stop, Reset and Pause"
maintainer="Luca Matei Pintilie <luca@lucamatei.com>"
license="MIT"
homepage="https://github.com/yetanotherf0rked/simplefuckingtimer"
distfiles="https://github.com/AnInternetTroll/simplefuckingtimer/archive/refs/heads/user/luca/fonts-and-linux.tar.gz"
checksum=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

… friendly

By using fontconfig the program can find a font without hardcoding paths
which only work on some distros, but not others.

In addition, the Makefile is changed to allow for easier building and
changing where the package is installed.

Lastly, add a guix.scm file for easier development and as a proof of
concept on how to package simplefuckingtimer for distros.
@yetanotherf0rked

yetanotherf0rked commented Feb 28, 2025

Copy link
Copy Markdown
Owner

Thank you so much for your effort reviewing this piece of code
I took a quick look at your changes that are interesting, I'll test them (and get used to the solutions you're suggesting) asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants