* [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutes.
@ 2024-12-30 2:48 Homo via Guix-patches via
2024-12-30 3:30 ` [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutions gay--- via Guix-patches via
2024-12-30 5:00 ` bug#75185: [PATCH] gnu: plan9port: Fix fontsrv and font substitutes 宋文武 via Guix-patches via
0 siblings, 2 replies; 3+ messages in thread
From: Homo via Guix-patches via @ 2024-12-30 2:48 UTC (permalink / raw)
To: 75185; +Cc: Homo
src/libdraw/openfont.c already substitutes "/lib/font/bit/" to "$PLAN9/font/",
so it's not necessary to do that in [arguments].
* gnu/packages/patches/plan9port-fontsrv.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/plan9.scm (plan9port)[source]: Use it.
[arguments] Remove "/lib/font/bit" substitute and substitute more fonts.
Change-Id: Ic99b5ed29e13bcdfde62e065fb189a9c6b5a9580
---
gnu/local.mk | 1 +
gnu/packages/patches/plan9port-fontsrv.patch | 30 ++++++++++++++++
gnu/packages/plan9.scm | 36 +++++++++++++++-----
3 files changed, 58 insertions(+), 9 deletions(-)
create mode 100644 gnu/packages/patches/plan9port-fontsrv.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 84160f407a..5e37af1d8a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1959,6 +1959,7 @@ dist_patch_DATA = \
%D%/packages/patches/pdfpc-build-with-vala-0.56.patch \
%D%/packages/patches/pdl-2.019-glut-bitmap-fonts.patch \
%D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch \
+ %D%/packages/patches/plan9port-fontsrv.patch \
%D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
%D%/packages/patches/plasp-fix-normalization.patch \
%D%/packages/patches/plasp-include-iostream.patch \
diff --git a/gnu/packages/patches/plan9port-fontsrv.patch b/gnu/packages/patches/plan9port-fontsrv.patch
new file mode 100644
index 0000000000..60620508f4
--- /dev/null
+++ b/gnu/packages/patches/plan9port-fontsrv.patch
@@ -0,0 +1,30 @@
+Remove unnecessary check that prevents fontsrv from building.
+
+diff --git a/INSTALL b/INSTALL
+index bfc08d52..c84e750c 100755
+--- a/INSTALL
++++ b/INSTALL
+@@ -112,23 +112,6 @@ if [ `uname` = Darwin ]; then
+ rm -f ./a.out
+ fi
+
+-if [ `uname` != Darwin ]; then
+- # Determine whether fontsrv X11 files are available.
+- rm -f a.out
+- cc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/local/include/freetype2 \
+- -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 \
+- -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 src/cmd/fontsrv/x11.c >/dev/null 2>&1
+- if [ -f a.out ]; then
+- echo " fontsrv dependencies found."
+- echo "FONTSRV=fontsrv" >>$PLAN9/config
+- else
+- echo " fontsrv dependencies not found."
+- echo "FONTSRV=" >>$PLAN9/config
+- rm -f bin/fontsrv
+- fi
+- rm -f a.out
+-fi
+-
+ if [ -f LOCAL.config ]; then
+ echo Using LOCAL.config options:
+ sed 's/^/ /' LOCAL.config
diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm
index 5f6a47d5a7..f83e8c62bf 100644
--- a/gnu/packages/plan9.scm
+++ b/gnu/packages/plan9.scm
@@ -24,6 +24,7 @@ (define-module (gnu packages plan9)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages fontutils)
@@ -104,6 +105,7 @@ (define-public plan9port
(sha256
(base32
"01343jvn8kr63i78h8xlgscn6wihdsr44xzh1cylvhigjbqw8n2x"))
+ (patches (search-patches "plan9port-fontsrv.patch"))
(modules '((guix build utils)))
(snippet #~(for-each delete-file-recursively
'("font/luc" ;nonfree
@@ -118,16 +120,32 @@ (define-public plan9port
(lambda _
(let ((dest (string-append #$output "/plan9")))
(delete-file "src/cmd/mk/mk.pdf")
+ ;; TODO: substitute font in src/cmd/venti/srv/graph.c
(substitute* "src/cmd/acme/acme.c"
- (("/lib/font/bit/lucsans/euro.8.font")
- (string-append dest
- "/font/fixed/unicode.5x8.font"))
- (("/lib/font/bit/lucm/unicode.9.font")
- (string-append dest
- "/font/fixed/unicode.6x9.font")))
- (substitute* (find-files "src")
- (("/lib/font/bit")
- (string-append dest "/font")))
+ (("lucsans/euro.8.font")
+ "fixed/unicode.8x13.font")
+ (("lucm/unicode.9.font")
+ "fixed/unicode.9x15B.font"))
+ (substitute* "src/cmd/mnihongo/mnihongo.c"
+ (("pelm/unicode.9x24.font")
+ "fixed/unicode.10x20.font"))
+ (substitute* "src/cmd/rio/winwatch.c"
+ (("lucsans/unicode.8.font")
+ "fixed/unicode.8x13.font"))
+ (substitute* "src/cmd/draw/stats.c"
+ (("pelm/latin1.8.font")
+ "fixed/unicode.8x13.font"))
+ (substitute* "src/cmd/faces/main.c"
+ (("pelm/latin1.8.font")
+ "fixed/unicode.8x13.font"))
+ (substitute* "src/cmd/fossil/view.c"
+ (("lucsans/unicode.8.font")
+ "fixed/unicode.8x13.font")
+ (("lucidasans/unicode.8.font")
+ "fixed/unicode.8x13.font"))
+ (substitute* "src/cmd/scat/plot.c"
+ (("luc/unicode.6.font")
+ "fixed/unicode.6x9.font"))
(substitute* "bin/9c"
(("which")
(which "which")))
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutions.
2024-12-30 2:48 [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutes Homo via Guix-patches via
@ 2024-12-30 3:30 ` gay--- via Guix-patches via
2024-12-30 5:00 ` bug#75185: [PATCH] gnu: plan9port: Fix fontsrv and font substitutes 宋文武 via Guix-patches via
1 sibling, 0 replies; 3+ messages in thread
From: gay--- via Guix-patches via @ 2024-12-30 3:30 UTC (permalink / raw)
To: 75185
I forgot to mention the reasoning for using bigger fonts - because
removed fonts aren't so tiny.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#75185: [PATCH] gnu: plan9port: Fix fontsrv and font substitutes.
2024-12-30 2:48 [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutes Homo via Guix-patches via
2024-12-30 3:30 ` [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutions gay--- via Guix-patches via
@ 2024-12-30 5:00 ` 宋文武 via Guix-patches via
1 sibling, 0 replies; 3+ messages in thread
From: 宋文武 via Guix-patches via @ 2024-12-30 5:00 UTC (permalink / raw)
To: Homo; +Cc: 75185-done
Homo <gay@disroot.org> writes:
> src/libdraw/openfont.c already substitutes "/lib/font/bit/" to "$PLAN9/font/",
> so it's not necessary to do that in [arguments].
>
> * gnu/packages/patches/plan9port-fontsrv.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/plan9.scm (plan9port)[source]: Use it.
> [arguments] Remove "/lib/font/bit" substitute and substitute more fonts.
I replace the patch with a 'substitute' to remove 'rm -f bin/fontsrv' in
INSTALL, pushed to master now, thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-30 4:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-30 2:48 [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutes Homo via Guix-patches via
2024-12-30 3:30 ` [bug#75185] [PATCH] gnu: plan9port: Fix fontsrv and font substitutions gay--- via Guix-patches via
2024-12-30 5:00 ` bug#75185: [PATCH] gnu: plan9port: Fix fontsrv and font substitutes 宋文武 via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.