Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 20254) +++ trunk/scconfig/Rev.h (revision 20255) @@ -1 +1 @@ -static const int myrev = 20254; +static const int myrev = 20255; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 20254) +++ trunk/scconfig/Rev.tab (revision 20255) @@ -1,4 +1,4 @@ -20254 configure plugin frame for ttf import +20255 configure plugin frame for ttf import 20249 configure central gettimeofday() wrapper to fix a compilation bug on IRIX 20233 configure new plugin: act_draw 20188 configure dad() action Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 20254) +++ trunk/scconfig/hooks.c (revision 20255) @@ -342,7 +342,7 @@ /* Runs when things should be detected for the target system */ int hook_detect_target() { - int need_gtklibs = 0, want_glib = 0, want_gtk, want_gtk2, want_gtk3, want_gd, want_stroke, need_inl = 0, want_cairo, want_xml2, has_gtk2 = 0, has_gtk3 = 0, want_gl; + int need_gtklibs = 0, want_glib = 0, want_gtk, want_gtk2, want_gtk3, want_gd, want_stroke, need_inl = 0, want_cairo, want_xml2, has_gtk2 = 0, has_gtk3 = 0, want_gl, want_freetype2; const char *host_ansi, *host_ped, *target_ansi, *target_ped, *target_pg, *target_no_pie; want_gtk2 = plug_is_enabled("hid_gtk2_gdk") || plug_is_enabled("hid_gtk2_gl"); @@ -352,6 +352,7 @@ want_stroke = plug_is_enabled("stroke"); want_cairo = plug_is_enabled("export_bboard") | plug_is_enabled("hid_gtk3_cairo"); want_xml2 = plug_is_enabled("io_eagle"); + want_freetype2 = plug_is_enabled("import_ttf"); /****** TODO #21: core depends on this plugin (yes, this is a bug) ******/ hook_custom_arg("buildin-lib_compat_help", NULL); @@ -461,6 +462,14 @@ } } + if (want_freetype2) { + require("libs/sul/freetype2/presents", 0, 0); + if (!istrue(get("libs/sul/freetype2/presents"))) { + report_repeat("WARNING: Since there's no libfreetype2 found, disabling the import_ttf plugin...\n"); + hook_custom_arg("Disable-import_ttf", NULL); + } + } + if (want_cairo) { require("libs/gui/cairo/presents", 0, 0); if (!istrue(get("libs/gui/cairo/presents"))) { Index: trunk/src_plugins/import_ttf/Plug.tmpasm =================================================================== --- trunk/src_plugins/import_ttf/Plug.tmpasm (revision 20254) +++ trunk/src_plugins/import_ttf/Plug.tmpasm (revision 20255) @@ -1,6 +1,14 @@ put /local/pcb/mod {import_ttf} put /local/pcb/mod/OBJS [@ $(PLUGDIR)/import_ttf/ttf.o @] +switch /local/pcb/export_png/controls + case {disable} end; + default + put /local/pcb/mod/LDFLAGS libs/sul/freetype2/ldflags + put /local/pcb/mod/CFLAGS libs/sul/freetype2/cflags + end +end + switch /local/pcb/import_ttf/controls case {buildin} include /local/pcb/tmpasm/buildin; end; case {plugin} include /local/pcb/tmpasm/plugin; end; Index: trunk/src_plugins/import_ttf/ttf.c =================================================================== --- trunk/src_plugins/import_ttf/ttf.c (revision 20254) +++ trunk/src_plugins/import_ttf/ttf.c (revision 20255) @@ -31,7 +31,11 @@ #include #include #include -#include +#include +#include +#include +#include +#include #include "board.h" #include "data.h"