From ab9cd80db749ad38b22daaf54c5a669316ecdeed Mon Sep 17 00:00:00 2001 From: orbea Date: Fri, 8 Jan 2021 07:48:51 -0800 Subject: [PATCH] hiro: Don't depend on gtksourceview when building bsnes. Fixes https://github.com/bsnes-emu/bsnes/issues/137 --- bsnes/GNUmakefile | 6 ++++++ hiro/GNUmakefile | 32 ++++++++++++++++++++++++-------- hiro/components.hpp | 2 +- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/bsnes/GNUmakefile b/bsnes/GNUmakefile index 9450f39c..f49114a0 100644 --- a/bsnes/GNUmakefile +++ b/bsnes/GNUmakefile @@ -1,6 +1,7 @@ target := bsnes binary := application build := performance +sourceview := false openmp := true local := true flags += -I. -I.. @@ -12,6 +13,11 @@ ifeq ($(profile),true) options += -pg endif +# disable gtksourceview +ifeq ($(sourceview),false) + flags += -DHIRO_NO_SOURCEVIEW +endif + # binaries built with this flag are faster, but are not portable to multiple machines. ifeq ($(local),true) flags += -march=native diff --git a/hiro/GNUmakefile b/hiro/GNUmakefile index 04837b27..7d09d9a8 100755 --- a/hiro/GNUmakefile +++ b/hiro/GNUmakefile @@ -9,13 +9,21 @@ ifeq ($(platform),windows) endif ifeq ($(hiro),gtk2) - hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0) - hiro.options = $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0) + hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0) + hiro.options = $(shell pkg-config --libs gtk+-2.0) + ifneq ($(sourceview),false) + hiro.flags += $(shell pkg-config --cflags gtksourceview-2.0) + hiro.options += $(shell pkg-config --libs gtksourceview-2.0) + endif endif ifeq ($(hiro),gtk3) - hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0 gtksourceview-3.0) -Wno-deprecated-declarations - hiro.options = $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0) + hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0) -Wno-deprecated-declarations + hiro.options = $(shell pkg-config --libs gtk+-3.0) + ifneq ($(sourceview),false) + hiro.flags += $(shell pkg-config --cflags gtksourceview-3.0) + hiro.options += $(shell pkg-config --libs gtksourceview-3.0) + endif endif endif @@ -36,13 +44,21 @@ ifneq ($(filter $(platform),linux bsd),) endif ifeq ($(hiro),gtk2) - hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0) - hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0) + hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0) + hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-2.0) + ifneq ($(sourceview),false) + hiro.flags += $(shell pkg-config --cflags gtksourceview-2.0) + hiro.options += $(shell pkg-config --libs gtksourceview-2.0) + endif endif ifeq ($(hiro),gtk3) - hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0 gtksourceview-3.0) -Wno-deprecated-declarations - hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0) + hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0) -Wno-deprecated-declarations + hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0) + ifneq ($(sourceview),false) + hiro.flags += $(shell pkg-config --cflags gtksourceview-3.0) + hiro.options += $(shell pkg-config --libs gtksourceview-3.0) + endif endif ifeq ($(hiro),qt4) diff --git a/hiro/components.hpp b/hiro/components.hpp index 3f387181..60dc92ec 100644 --- a/hiro/components.hpp +++ b/hiro/components.hpp @@ -77,7 +77,7 @@ //platform-specific exclusions -#if defined(HIRO_WINDOWS) || defined(HIRO_COCOA) || defined(HIRO_QT) +#if defined(HIRO_WINDOWS) || defined(HIRO_COCOA) || defined(HIRO_QT) || defined(HIRO_NO_SOURCEVIEW) #undef Hiro_ComboEdit #undef Hiro_Console #undef Hiro_IconView