diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-09-27 21:45:47 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-28 16:49:07 +0200 |
commit | 78b59b8302e79fad71bfff66d5b88db80527e6a1 (patch) | |
tree | 877b7bec05cebfa44db36af96b292874d20e3a39 | |
parent | gbuild: remove libraries handled by RepositoryExternal.mk (diff) | |
download | core-78b59b8302e79fad71bfff66d5b88db80527e6a1.tar.gz core-78b59b8302e79fad71bfff66d5b88db80527e6a1.zip |
gbuild: clean up usage of weird x11_extensions module etc.
Move libraries using those headers to RepositoryExternal.mk and
also move pkg-config invocation to configure.
Change-Id: I17a240fcba83a98f3f248f15b34d245f941c62e2
-rw-r--r-- | RepositoryExternal.mk | 62 | ||||
-rw-r--r-- | canvas/Library_cairocanvas.mk | 6 | ||||
-rw-r--r-- | config_host.mk.in | 2 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 1 | ||||
-rw-r--r-- | vcl/Library_vcl.mk | 7 | ||||
-rw-r--r-- | vcl/Library_vclplug_gen.mk | 23 |
8 files changed, 78 insertions, 27 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 05880d958992..d653b208dba2 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1940,6 +1940,68 @@ endef endif # SYSTEM_LIBORCUS + +### X11 stuff ### + +ifeq ($(GUIBASE),unx) + +# TODO: do we really need these X11 headers in the repo? +ifneq ($(filter X11_EXTENSIONS,$(BUILD_TYPE)),) + +define gb_LinkTarget__use_x11extensions +$(call gb_LinkTarget_use_packages,$(1),\ + x11_extensions_inc \ +) +endef + +else # !X11_EXTENSIONS + +gb_LinkTarget__use_x11extensions := + +endif # X11_EXTENSIONS + +ifeq ($(XRANDR_DLOPEN),FALSE) + +define gb_LinkTarget__use_Xrandr +$(call gb_LinkTarget__use_x11extensions,$(1)) + +$(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + $(XRANDR_CFLAGS) \ +) + +$(call gb_LinkTarget_add_libs,$(1),\ + $(XRANDR_LIBS) \ +) +endef + +else # XRANDR_DLOPEN + +define gb_LinkTarget__use_Xrandr +$(call gb_LinkTarget__use_x11extensions,$(1)) + +$(call gb_LinkTarget_add_defs,$(1),\ + -DXRANDR_DLOPEN \ +) +endef + +endif # XRANDR_DLOPEN + +define gb_LinkTarget__use_Xrender +$(call gb_LinkTarget__use_x11extensions,$(1)) + +$(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + $(XRENDER_CFLAGS) \ +) + +$(call gb_LinkTarget_add_libs,$(1),\ + $(XRENDER_LIBS) \ +) +endef + +endif # GUIBASE=unx + # MacOSX-only frameworks ############################################ # (in alphabetical order) diff --git a/canvas/Library_cairocanvas.mk b/canvas/Library_cairocanvas.mk index 85ea94cda4ed..a30333a3069f 100644 --- a/canvas/Library_cairocanvas.mk +++ b/canvas/Library_cairocanvas.mk @@ -91,7 +91,9 @@ $(eval $(call gb_Library_add_exception_objects,cairocanvas,\ canvas/source/cairo/cairo_textlayout \ )) -$(eval $(call gb_Library_use_external,cairocanvas,cairo)) +$(eval $(call gb_Library_use_externals,cairocanvas,\ + cairo \ +)) ifeq ($(OS),WNT) @@ -116,6 +118,8 @@ $(eval $(call gb_Library_add_exception_objects,cairocanvas,\ # freetype? fontconfig? -> test on Solaris $(eval $(call gb_Library_use_libraries,cairocanvas,\ X11 \ +)) +$(eval $(call gb_Library_use_externals,cairocanvas,\ Xrender \ )) endif diff --git a/config_host.mk.in b/config_host.mk.in index 81890c69a363..231009810aa1 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -654,5 +654,7 @@ export XMLLINT=@XMLLINT@ export XRANDR_CFLAGS=@XRANDR_CFLAGS@ export XRANDR_DLOPEN=@XRANDR_DLOPEN@ export XRANDR_LIBS=@XRANDR_LIBS@ +export XRENDER_CFLAGS=@XRENDER_CFLAGS@ +export XRENDER_LIBS=@XRENDER_LIBS@ export XSLTML_TARBALL=@XSLTML_TARBALL@ export XSLTPROC=@XSLTPROC@ diff --git a/configure.in b/configure.in index 17b13c61bf05..c1abd8aa2ddb 100644 --- a/configure.in +++ b/configure.in @@ -8535,6 +8535,7 @@ dnl =================================================================== AC_MSG_CHECKING([whether to use Xrender]) if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES(XRENDER, xrender) AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:], [AC_MSG_ERROR(libXrender not found or functional)], []) AC_MSG_CHECKING([which Xrender headers to use]) @@ -8548,6 +8549,8 @@ if test "$WANT_X11" = "yes" -a "$test_xrender" = "yes"; then else AC_MSG_RESULT([no]) fi +AC_SUBST(XRENDER_CFLAGS) +AC_SUBST(XRENDER_LIBS) dnl =================================================================== dnl Check for XRandr diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 1975a15ac2a0..ba4b4ab005c4 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -254,7 +254,6 @@ gb_Library_PLAINLIBS_NONE += \ ICE \ X11 \ Xext \ - Xrender \ gb_Library_FILENAMES := \ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index aca89d933099..4946cf29d55e 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -250,7 +250,6 @@ gb_Library_PLAINLIBS_NONE += \ ICE \ X11 \ Xext \ - Xrender \ gb_Library_FILENAMES := \ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index a7ee6ca8e3d9..ce6d41e4a107 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -44,12 +44,6 @@ endif $(eval $(call gb_Library_use_package,vcl,vcl_inc)) -ifneq ($(filter X11_EXTENSIONS,$(BUILD_TYPE)),) -$(eval $(call gb_Library_use_packages,vclplug_gen,\ - x11_extensions_inc \ -)) -endif - $(eval $(call gb_Library_use_custom_headers,vcl,vcl/generic/fontmanager)) $(eval $(call gb_Library_set_include,vcl,\ @@ -526,6 +520,7 @@ $(eval $(call gb_Library_use_externals,vcl,\ dbus \ fontconfig \ freetype \ + x11extensions \ )) endif diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index 0261c036465b..46c5f522820c 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -61,6 +61,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\ cairo \ icule \ icuuc \ + Xrender \ )) $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ @@ -111,23 +112,13 @@ $(eval $(call gb_Library_add_defs,vclplug_gen,\ ## handle RandR ifneq ($(ENABLE_RANDR),) -$(eval $(call gb_Library_add_defs,vclplug_gen,\ - -DUSE_RANDR \ -)) -ifeq ($(XRANDR_DLOPEN),FALSE) -$(eval $(call gb_Library_set_include,vclplug_gen,\ - $$(INCLUDE) \ - $$(XRANDR_CFLAGS) \ -)) -$(eval $(call gb_Library_add_libs,vclplug_gen,\ - $(XRANDR_LIBS) \ +$(eval $(call gb_Library_use_externals,vclplug_gen,\ + Xrandr \ )) -else $(eval $(call gb_Library_add_defs,vclplug_gen,\ - -DXRANDR_DLOPEN \ + -DUSE_RANDR \ )) endif -endif $(eval $(call gb_Library_add_defs,vclplug_gen,\ $(if $(VALGRIND_CFLAGS), \ @@ -172,11 +163,6 @@ endif endif endif -## handle Render linking -$(eval $(call gb_Library_add_libs,vclplug_gen,\ - $(shell pkg-config --libs xrender) \ -)) - ifeq ($(OS),LINUX) $(eval $(call gb_Library_use_libraries,vclplug_gen,\ dl \ @@ -184,4 +170,5 @@ $(eval $(call gb_Library_use_libraries,vclplug_gen,\ pthread \ )) endif + # vim: set noet sw=4 ts=4: |