Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/413929dad5a0bffc41d0c66df9cc80689a23c00f
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/413929dad5a0bffc41d0c66df9cc80689a23c00f
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/413929dad5a0bffc41d0c66df9cc80689a23c00f

The branch, master has been updated
       via  413929dad5a0bffc41d0c66df9cc80689a23c00f (commit)
      from  0a3a40c23eeb22a4ec6e463ca2287df9e337f8ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=413929dad5a0bffc41d0c66df9cc80689a23c00f
commit 413929dad5a0bffc41d0c66df9cc80689a23c00f
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    Use pkg-config for freetype2 if available else fallback to old script

diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index d36728e..a99031e 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -23,17 +23,33 @@ CFLAGS += 
'-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
 
 LDFLAGS += -lm
 
+# freetype is optional but older versions do not use pkg-config
+ifeq ($(NETSURF_FB_FONTLIB),freetype)
+  NETSURF_USE_FREETYPE2 := AUTO
+  NETSURF_FEATURE_FREETYPE2_CFLAGS := -DFB_USE_FREETYPE
+
+  $(eval $(call pkg_config_find_and_add_enabled,FREETYPE2,freetype2,freetype2))
+
+  # try and use non pkg-config method
+  ifeq ($(NETSURF_USE_FREETYPE2),NO)
+    FREETYPE_CONFIG_EXISTS := $(shell freetype-config --cflags >/dev/null && 
echo yes)
+    ifeq ($(FREETYPE_CONFIG_EXISTS),yes)
+      NETSURF_USE_FREETYPE2 := YES
+      CFLAGS += $(shell freetype-config --cflags) 
$(NETSURF_FEATURE_FREETYPE2_CFLAGS)
+      LDFLAGS += $(shell freetype-config --libs)
+      $(info FT2.CNFG: freetype2 (freetype2)   enabled)
+    else
+      $(info FT2.CNFG: freetype2 (freetype2)   failed)
+      $(error Unable to find library for: freetype2)
+    endif
+  endif
+endif
+
 # non optional pkg-configed libs
 LDFLAGS += -Wl,--whole-archive
 $(eval $(call pkg_config_find_and_add,libnsfb,libnsfb))
 LDFLAGS += -Wl,--no-whole-archive
 
-# freetype is optional but does not use pkg-config
-ifeq ($(NETSURF_FB_FONTLIB),freetype)
-  CFLAGS += -DFB_USE_FREETYPE $(shell freetype-config --cflags)
-  LDFLAGS += $(shell freetype-config --libs)
-endif
-
 # ---------------------------------------------------------------------------
 # HOST specific feature flags
 # ---------------------------------------------------------------------------


-----------------------------------------------------------------------

Summary of changes:
 frontends/framebuffer/Makefile |   28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index d36728e..a99031e 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -23,17 +23,33 @@ CFLAGS += 
'-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
 
 LDFLAGS += -lm
 
+# freetype is optional but older versions do not use pkg-config
+ifeq ($(NETSURF_FB_FONTLIB),freetype)
+  NETSURF_USE_FREETYPE2 := AUTO
+  NETSURF_FEATURE_FREETYPE2_CFLAGS := -DFB_USE_FREETYPE
+
+  $(eval $(call pkg_config_find_and_add_enabled,FREETYPE2,freetype2,freetype2))
+
+  # try and use non pkg-config method
+  ifeq ($(NETSURF_USE_FREETYPE2),NO)
+    FREETYPE_CONFIG_EXISTS := $(shell freetype-config --cflags >/dev/null && 
echo yes)
+    ifeq ($(FREETYPE_CONFIG_EXISTS),yes)
+      NETSURF_USE_FREETYPE2 := YES
+      CFLAGS += $(shell freetype-config --cflags) 
$(NETSURF_FEATURE_FREETYPE2_CFLAGS)
+      LDFLAGS += $(shell freetype-config --libs)
+      $(info FT2.CNFG: freetype2 (freetype2)   enabled)
+    else
+      $(info FT2.CNFG: freetype2 (freetype2)   failed)
+      $(error Unable to find library for: freetype2)
+    endif
+  endif
+endif
+
 # non optional pkg-configed libs
 LDFLAGS += -Wl,--whole-archive
 $(eval $(call pkg_config_find_and_add,libnsfb,libnsfb))
 LDFLAGS += -Wl,--no-whole-archive
 
-# freetype is optional but does not use pkg-config
-ifeq ($(NETSURF_FB_FONTLIB),freetype)
-  CFLAGS += -DFB_USE_FREETYPE $(shell freetype-config --cflags)
-  LDFLAGS += $(shell freetype-config --libs)
-endif
-
 # ---------------------------------------------------------------------------
 # HOST specific feature flags
 # ---------------------------------------------------------------------------


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to