From d48d56f8314e6789ccfff2c269509da728c44db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 17 Jul 2018 12:39:57 +0200 Subject: [PATCH] autotools: Make install directories paths more consistent Install include files in $prefix/include/mutter-$apiversion/[clutter,cogl,...,meta]/, and datafiles in /usr/share/mutter-$apiversion/.... We still would conflict e.g. given that our gettext name is "mutter", and how keybindings are installed, but it's a step in the right direction. --- Makefile.am | 2 ++ clutter/clutter/Makefile.am | 4 ++-- clutter/clutter/mutter-clutter.pc.in | 8 ++++---- cogl/cogl-gles2/Makefile.am | 4 ++-- cogl/cogl-gles2/mutter-cogl-gles2.pc.in | 4 ++-- cogl/cogl-pango/Makefile.am | 4 ++-- cogl/cogl-pango/mutter-cogl-pango.pc.in | 4 ++-- cogl/cogl-path/Makefile.am | 4 ++-- cogl/cogl-path/mutter-cogl-path.pc.in | 4 ++-- cogl/cogl/Makefile.am | 4 ++-- cogl/cogl/mutter-cogl.pc.in | 4 ++-- configure.ac | 2 +- src/Makefile.am | 5 ++++- src/compositor/plugins/Makefile.am | 4 ++-- 14 files changed, 31 insertions(+), 26 deletions(-) diff --git a/Makefile.am b/Makefile.am index cc6a26ea4..a0fc51f74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +pkgdatadir = $(datadir)/mutter-$(LIBMUTTER_API_VERSION) +pkglibdir = $(libdir)/mutter-$(LIBMUTTER_API_VERSION) SUBDIRS = cogl clutter data src po doc diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am index 9bfc87458..1c2d5e591 100644 --- a/clutter/clutter/Makefile.am +++ b/clutter/clutter/Makefile.am @@ -32,7 +32,7 @@ AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS) INTROSPECTION_GIRS = # the base include path for headers -clutter_base_includedir = $(includedir)/mutter/clutter-$(LIBMUTTER_API_VERSION) +clutter_base_includedir = $(includedir)/mutter-$(LIBMUTTER_API_VERSION)/clutter clutter_includedir = $(clutter_base_includedir)/clutter clutter_deprecateddir = $(clutter_base_includedir)/clutter/deprecated @@ -567,7 +567,7 @@ nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h) clutter_deprecated_HEADERS = $(deprecated_h) -mutterlibdir = $(libdir)/mutter +mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@ mutterlib_LTLIBRARIES = libmutter-clutter-@LIBMUTTER_API_VERSION@.la libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \ diff --git a/clutter/clutter/mutter-clutter.pc.in b/clutter/clutter/mutter-clutter.pc.in index 2a93161fd..68ad77f77 100644 --- a/clutter/clutter/mutter-clutter.pc.in +++ b/clutter/clutter/mutter-clutter.pc.in @@ -1,9 +1,9 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@/mutter -includedir=@includedir@/mutter - apiversion=@LIBMUTTER_API_VERSION@ +libdir=@libdir@/mutter-${apiversion} +includedir=@includedir@/mutter-${apiversion} + requires=@CLUTTER_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@ requires_private=@CLUTTER_REQUIRES_PRIVATE@ backends=@CLUTTER_BACKENDS@ @@ -19,6 +19,6 @@ Name: Mutter Clutter Description: Mutter's Clutter Private Library Version: @MUTTER_VERSION@ Libs: -L${libdir} -lmutter-clutter-${apiversion} -Cflags: -I${includedir}/clutter-${apiversion} +Cflags: -I${includedir}/clutter Requires: ${requires} Requires.private: ${requires_private} diff --git a/cogl/cogl-gles2/Makefile.am b/cogl/cogl-gles2/Makefile.am index 4cba75bbe..faada2db0 100644 --- a/cogl/cogl-gles2/Makefile.am +++ b/cogl/cogl-gles2/Makefile.am @@ -4,7 +4,7 @@ NULL = DISTCLEANFILES = -mutterlibdir = $(libdir)/mutter +mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@ mutterlib_LTLIBRARIES = libmutter-cogl-gles2-@LIBMUTTER_API_VERSION@.la AM_CPPFLAGS = \ @@ -23,7 +23,7 @@ libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \ -export-dynamic \ -export-symbols-regex "^gl*" -coglgles2includedir = $(includedir)/mutter/cogl/cogl-gles2/GLES2 +coglgles2includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@/cogl/cogl-gles2/GLES2 coglgles2include_HEADERS = \ GLES2/gl2.h \ GLES2/gl2ext.h \ diff --git a/cogl/cogl-gles2/mutter-cogl-gles2.pc.in b/cogl/cogl-gles2/mutter-cogl-gles2.pc.in index d9e75cd79..8c8c3783a 100644 --- a/cogl/cogl-gles2/mutter-cogl-gles2.pc.in +++ b/cogl/cogl-gles2/mutter-cogl-gles2.pc.in @@ -1,8 +1,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@/mutter -includedir=@includedir@/mutter apiversion=@LIBMUTTER_API_VERSION@ +libdir=@libdir@/mutter-${apiversion} +includedir=@includedir@/mutter-${apiversion} requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@ Name: Cogl diff --git a/cogl/cogl-pango/Makefile.am b/cogl/cogl-pango/Makefile.am index b89877d0f..bc23c16d1 100644 --- a/cogl/cogl-pango/Makefile.am +++ b/cogl/cogl-pango/Makefile.am @@ -22,7 +22,7 @@ source_h_priv = \ cogl-pango-pipeline-cache.h \ $(NULL) -mutterlibdir = $(libdir)/mutter +mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@ mutterlib_LTLIBRARIES = libmutter-cogl-pango-@LIBMUTTER_API_VERSION@.la libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_priv) @@ -45,7 +45,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) -cogl_base_includedir = $(includedir)/mutter +cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@ cogl_pangoheadersdir = $(cogl_base_includedir)/cogl/cogl-pango cogl_pangoheaders_HEADERS = $(source_h) diff --git a/cogl/cogl-pango/mutter-cogl-pango.pc.in b/cogl/cogl-pango/mutter-cogl-pango.pc.in index da12c94fb..9c146b948 100644 --- a/cogl/cogl-pango/mutter-cogl-pango.pc.in +++ b/cogl/cogl-pango/mutter-cogl-pango.pc.in @@ -1,8 +1,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@/mutter -includedir=@includedir@/mutter apiversion=@LIBMUTTER_API_VERSION@ +libdir=@libdir@/mutter-${apiversion} +includedir=@includedir@/mutter-${apiversion} requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@ Name: Cogl diff --git a/cogl/cogl-path/Makefile.am b/cogl/cogl-path/Makefile.am index 418af3739..323c5845d 100644 --- a/cogl/cogl-path/Makefile.am +++ b/cogl/cogl-path/Makefile.am @@ -64,7 +64,7 @@ glib_enum_c = cogl-path-enum-types.c glib_enum_headers = $(source_1_x_h) include $(top_srcdir)/build/autotools/Makefile.am.enums -mutterlibdir = $(libdir)/mutter +mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@ mutterlib_LTLIBRARIES = libmutter-cogl-path-@LIBMUTTER_API_VERSION@.la libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h) @@ -89,7 +89,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) -cogl_base_includedir = $(includedir)/mutter +cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@ cogl_pathheadersdir = $(cogl_base_includedir)/cogl/cogl-path cogl_pathheaders_HEADERS = $(source_h) nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h diff --git a/cogl/cogl-path/mutter-cogl-path.pc.in b/cogl/cogl-path/mutter-cogl-path.pc.in index a2ad303b5..6da697e86 100644 --- a/cogl/cogl-path/mutter-cogl-path.pc.in +++ b/cogl/cogl-path/mutter-cogl-path.pc.in @@ -1,8 +1,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@/mutter -includedir=@includedir@/mutter apiversion=@LIBMUTTER_API_VERSION@ +libdir=@libdir@/mutter-${apiversion} +includedir=@includedir@/mutter-${apiversion} requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@ Name: Cogl diff --git a/cogl/cogl/Makefile.am b/cogl/cogl/Makefile.am index cac20a3c9..a814d561f 100644 --- a/cogl/cogl/Makefile.am +++ b/cogl/cogl/Makefile.am @@ -421,7 +421,7 @@ cogl_sources_c += \ winsys/cogl-winsys-egl-private.h endif -mutterlibdir = $(libdir)/mutter +mutterlibdir = $(libdir)/mutter-@LIBMUTTER_API_VERSION@ mutterlib_LTLIBRARIES = libmutter-cogl-@LIBMUTTER_API_VERSION@.la libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS) @@ -447,7 +447,7 @@ cogl_headers = \ cogl-pango.h \ $(NULL) -cogl_base_includedir = $(includedir)/mutter +cogl_base_includedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@ cogldeprecatedincludedir = $(cogl_base_includedir)/cogl/cogl/deprecated cogldeprecatedinclude_HEADERS = $(cogl_deprecated_h) $(cogl_deprecated_nonintrospected_h) diff --git a/cogl/cogl/mutter-cogl.pc.in b/cogl/cogl/mutter-cogl.pc.in index 6251b3019..115d6a25f 100644 --- a/cogl/cogl/mutter-cogl.pc.in +++ b/cogl/cogl/mutter-cogl.pc.in @@ -1,8 +1,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@/mutter -includedir=@includedir@/mutter apiversion=@LIBMUTTER_API_VERSION@ +libdir=@libdir@/mutter-${apiversion} +includedir=@includedir@/mutter-${apiversion} requires=@COGL_PKG_REQUIRES@ Name: Cogl diff --git a/configure.ac b/configure.ac index 1af7dbb83..7c9694708 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AC_SUBST(LIBMUTTER_API_VERSION) # Make the mutter versions visible to the cogl and clutter subdirs export LIBMUTTER_API_VERSION MUTTER_VERSION -MUTTER_PLUGIN_DIR="$libdir/$PACKAGE/plugins" +MUTTER_PLUGIN_DIR="$libdir/mutter-$LIBMUTTER_API_VERSION/plugins" AC_SUBST(MUTTER_PLUGIN_DIR) # Honor aclocal flags diff --git a/src/Makefile.am b/src/Makefile.am index 1424c8f72..66aa02649 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,9 @@ # Flag build for parallelism; see https://savannah.gnu.org/patch/?6905 .AUTOPARALLEL: +pkgdatadir = $(datadir)/mutter-$(LIBMUTTER_API_VERSION) +pkglibdir = $(libdir)/mutter-$(LIBMUTTER_API_VERSION) + lib_LTLIBRARIES = libmutter-@LIBMUTTER_API_VERSION@.la SUBDIRS=compositor/plugins @@ -586,7 +589,7 @@ libmutterinclude_base_headers = \ $(libmutterinclude_headers) \ $(libmutterinclude_built_headers) -libmutterincludedir = $(includedir)/mutter/meta +libmutterincludedir = $(includedir)/mutter-@LIBMUTTER_API_VERSION@/meta libmutterinclude_HEADERS = \ $(libmutterinclude_headers) diff --git a/src/compositor/plugins/Makefile.am b/src/compositor/plugins/Makefile.am index 811bcba92..5702a5fc1 100644 --- a/src/compositor/plugins/Makefile.am +++ b/src/compositor/plugins/Makefile.am @@ -1,5 +1,5 @@ - -pkglibdir = $(MUTTER_PLUGIN_DIR) +pkgdatadir = $(datadir)/mutter-$(LIBMUTTER_API_VERSION) +pkglibdir = $(libdir)/mutter-$(LIBMUTTER_API_VERSION) AM_CPPFLAGS = \ $(MUTTER_CFLAGS) \