From 34ef2fca94fb4c368c536b28558222bfd9e4e11d Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Wed, 25 Apr 2018 08:24:10 +0700 Subject: [PATCH] cinnamon-session: switch to meson. Signed-off-by: Willy Sudiarto Raharjo --- cinnamon-session/be5e7380ae.patch | 42 ++++++++++++++++++++ cinnamon-session/cinnamon-session.SlackBuild | 32 ++++++++------- cinnamon-session/meson.patch | 21 ++++++++++ 3 files changed, 81 insertions(+), 14 deletions(-) create mode 100644 cinnamon-session/be5e7380ae.patch create mode 100644 cinnamon-session/meson.patch diff --git a/cinnamon-session/be5e7380ae.patch b/cinnamon-session/be5e7380ae.patch new file mode 100644 index 0000000..5511232 --- /dev/null +++ b/cinnamon-session/be5e7380ae.patch @@ -0,0 +1,42 @@ +From be5e7380ae69a2620ecf488250ce7e48d51c6338 Mon Sep 17 00:00:00 2001 +From: itzexor +Date: Fri, 20 Apr 2018 20:01:56 -0700 +Subject: [PATCH] build: fix PKGDATADIR define / use only one define + +we need to prepend the prefix to get a full path, and there's +no reason to have 3 names for the same thing. +--- + cinnamon-session/csm-inhibit-dialog.c | 2 +- + meson.build | 6 +----- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/cinnamon-session/csm-inhibit-dialog.c b/cinnamon-session/csm-inhibit-dialog.c +index 15d2f8d..aec31e4 100644 +--- a/cinnamon-session/csm-inhibit-dialog.c ++++ b/cinnamon-session/csm-inhibit-dialog.c +@@ -1075,7 +1075,7 @@ csm_inhibit_dialog_init (CsmInhibitDialog *dialog) + + error = NULL; + if (!gtk_builder_add_from_file (dialog->priv->xml, +- GTKBUILDER_DIR "/" GTKBUILDER_FILE, ++ PKGDATADIR "/" GTKBUILDER_FILE, + &error)) { + if (error) { + g_warning ("Could not load inhibitor UI file: %s", +diff --git a/meson.build b/meson.build +index 4761c6e..b56c544 100644 +--- a/meson.build ++++ b/meson.build +@@ -143,11 +143,7 @@ conf.set('ENABLE_IPV6', have_ipv6) + + rootInclude = include_directories('.') + +-pkgdatadir = join_paths(get_option('datadir'), meson.project_name()) +- +-conf.set_quoted('GTKBUILDER_DIR', pkgdatadir) +-conf.set_quoted('DATA_DIR', pkgdatadir) +-conf.set_quoted('PKGDATADIR', pkgdatadir) ++conf.set_quoted('PKGDATADIR', join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())) + conf.set_quoted('LIBEXECDIR', get_option('libexecdir')) + conf.set_quoted('LOCALE_DIR', join_paths(get_option('prefix'), get_option('localedir'))) + diff --git a/cinnamon-session/cinnamon-session.SlackBuild b/cinnamon-session/cinnamon-session.SlackBuild index 48a149a..39696cb 100644 --- a/cinnamon-session/cinnamon-session.SlackBuild +++ b/cinnamon-session/cinnamon-session.SlackBuild @@ -72,23 +72,27 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; patch -p1 < $CWD/timeout.patch +patch -p1 < $CWD/be5e7380ae.patch +patch -p1 < $CWD/meson.patch +sed -i "s|||g" cinnamon-session/csm-consolekit.c +sed -i "s|||g" cinnamon-session/csm-logout-dialog.c -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./autogen.sh \ +mkdir -p build +cd build +meson setup \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --libexecdir=/usr/lib${LIBDIRSUFFIX}/cinnamon-session \ - --sysconfdir=/etc \ - --localstatedir=/var \ + --buildtype=release \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --disable-schemas-compile \ - --enable-gconf \ - --build=$ARCH-slackware-linux + --buildtype=plain \ + -Dwith-gconf=false \ + -Dwith-docbook=false \ + .. -make -make install DESTDIR=$PKG + ninja + DESTDIR=$PKG ninja install +cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -105,7 +109,7 @@ mkdir -p $PKG/usr/share/apps/kdm/sessions ln -sf /usr/share/xsessions/cinnamon.desktop $PKG/usr/share/apps/kdm/sessions/ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING INSTALL README* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING README* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc/$PRGNAM-$VERSION/ -type f -exec chmod 644 {} \; chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/cinnamon-session/meson.patch b/cinnamon-session/meson.patch new file mode 100644 index 0000000..2f3b43d --- /dev/null +++ b/cinnamon-session/meson.patch @@ -0,0 +1,21 @@ +--- cinnamon-session-3.8.1/cinnamon-session/meson.build.old 2018-04-25 19:32:35.259283056 +0700 ++++ cinnamon-session-3.8.1/cinnamon-session/meson.build 2018-04-25 19:37:46.064298856 +0700 +@@ -77,6 +77,7 @@ + xext, + xrender, + xtest, ++ upower_old, + # elogind, + ], + link_with: [ +@@ -86,7 +87,9 @@ + install: true, + ) + +- ++# We only support old upower ++# https://bugzilla.gnome.org/show_bug.cgi?id=710383 ++upower_old = dependency('upower-glib', version: '<0.99.0', required: false) + + # test('inhibit', + # executable('test-inhibit',