From 01c5ca14fa0245a17e9915f6b40c2bcad66dbeea Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Fri, 14 Aug 2020 13:00:59 +0530 Subject: [PATCH 1/3] Add patch to fix build on OpenBSD OpenBSD uses a different path for X11 (and related) libs. And the default gcc is like 4.2 (from 2007!) -- egcc is a newer version. --- makefile | 2 +- patches/openbsd.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 patches/openbsd.patch diff --git a/makefile b/makefile index dd26b9a..f1ad80c 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ default: - gcc herbe.c -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -lm -o herbe + egcc herbe.c -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -lm -o herbe install: default cp herbe /usr/local/bin diff --git a/patches/openbsd.patch b/patches/openbsd.patch new file mode 100644 index 0000000..73e9c1f --- /dev/null +++ b/patches/openbsd.patch @@ -0,0 +1,11 @@ +diff --git a/makefile b/makefile +index dd26b9a..f1ad80c 100644 +--- a/makefile ++++ b/makefile +@@ -1,5 +1,5 @@ + default: +- gcc herbe.c -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -lm -o herbe ++ egcc herbe.c -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -lm -o herbe + + install: default + cp herbe /usr/local/bin From 6151544335b1658113e6a638763a3022a8317202 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Fri, 14 Aug 2020 18:40:46 +0530 Subject: [PATCH 2/3] Revert changes to makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index f1ad80c..dd26b9a 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ default: - egcc herbe.c -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -lm -o herbe + gcc herbe.c -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -lm -o herbe install: default cp herbe /usr/local/bin From 484b44ed57a8ce3db97dcd0e480d8e3b75677c76 Mon Sep 17 00:00:00 2001 From: Samuel Dudik Date: Thu, 27 Aug 2020 18:46:30 +0200 Subject: [PATCH 3/3] Remove patch folder, add changes directly to Makefile --- Makefile | 2 +- patches/openbsd.patch | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 patches/openbsd.patch diff --git a/Makefile b/Makefile index 3225e36..eb5b382 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -pthread +CFLAGS = -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -pthread PREFIX ?= /usr/local CC ?= cc diff --git a/patches/openbsd.patch b/patches/openbsd.patch deleted file mode 100644 index 73e9c1f..0000000 --- a/patches/openbsd.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/makefile b/makefile -index dd26b9a..f1ad80c 100644 ---- a/makefile -+++ b/makefile -@@ -1,5 +1,5 @@ - default: -- gcc herbe.c -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -lm -o herbe -+ egcc herbe.c -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -lm -o herbe - - install: default - cp herbe /usr/local/bin