From e84ee0cc0b951093130d3c64103c176fbfe2ea38 Mon Sep 17 00:00:00 2001 From: David Gautier Date: Thu, 27 Feb 2020 00:51:11 +0100 Subject: [PATCH] Makes the gem installation work on linux --- ext/extconf.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index 1316096..400c956 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -3,8 +3,15 @@ $CFLAGS << " -Wextra -Wall -Wno-unused-parameter -std=gnu99 " unless RUBY_PLATFORM =~ /mingw/ - $CFLAGS << " " << `freetype-config --cflags`.chomp - $LDFLAGS << " " << `freetype-config --libs`.chomp + if RUBY_PLATFORM =~ /linux/ + $CFLAGS << " " << `pkg-config --cflags`.chomp + $CFLAGS << " " << "-I/usr/include/freetype2" + $LDFLAGS << " " << `pkg-config --libs`.chomp + $LDFLAGS << " " << "-L/usr/local/lib -lfreetype" + else + $CFLAGS << " " << `freetype-config --cflags`.chomp + $LDFLAGS << " " << `freetype-config --libs`.chomp + end end if RUBY_PLATFORM =~ /darwin/