Github messages for voidlinux
 help / color / mirror / Atom feed
From: oreo639 <oreo639@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] upower: update to 0.99.17
Date: Sun, 03 Apr 2022 04:51:19 +0200	[thread overview]
Message-ID: <20220403025119.C2MqLqnyTzIUwWEZJ0PeiZFA_fvG0u13NVPrz2TCmbU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36485@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages upower
https://github.com/void-linux/void-packages/pull/36485

upower: update to 0.99.17
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36485.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-upower-36485.patch --]
[-- Type: text/x-diff, Size: 8423 bytes --]

From ccb8273042694f9a7b232fbae07e313ce6edf99b Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sat, 2 Apr 2022 18:51:49 -0700
Subject: [PATCH 1/2] upower: update to 0.99.17

---
 .../upower/patches/fix-gtk-doc-disable.patch  | 58 +++++++++++++++++++
 srcpkgs/upower/template                       | 35 +++++------
 2 files changed, 73 insertions(+), 20 deletions(-)
 create mode 100644 srcpkgs/upower/patches/fix-gtk-doc-disable.patch

diff --git a/srcpkgs/upower/patches/fix-gtk-doc-disable.patch b/srcpkgs/upower/patches/fix-gtk-doc-disable.patch
new file mode 100644
index 000000000000..5005d91e197e
--- /dev/null
+++ b/srcpkgs/upower/patches/fix-gtk-doc-disable.patch
@@ -0,0 +1,58 @@
+From 1003d5c2a69e6c28dcf68adf10181b5180b5defa Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Sun, 20 Mar 2022 15:32:55 -0700
+Subject: [PATCH] meson: Don't search for gtk-doc if disabled
+
+---
+ doc/meson.build | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+diff --git a/doc/meson.build b/doc/meson.build
+index dc93a16..5fc253c 100644
+--- a/doc/meson.build
++++ b/doc/meson.build
+@@ -27,21 +27,23 @@ version_xml = configure_file(
+     input: 'version.xml.in',
+     configuration: cdata)
+ 
+-gnome.gtkdoc('UPower',
+-    main_xml: 'upower-docs.xml',
+-    src_dir: meson.source_root() / 'libupower-glib',
+-    dependencies: [ libupower_glib_dep ],
+-    scan_args: ['--rebuild-types', '--rebuild-sections'],
+-    content_files: [
+-        version_xml,
+-        ifaces_refs,
+-        'man/UPower.xml',
+-        'man/upowerd.xml',
+-        'man/upower.xml',
+-        '../COPYING',
+-    ],
+-    ignore_headers: [
+-        'config.h',
+-    ],
+-    install: get_option('gtk-doc')
+-)
++if get_option('gtk-doc')
++  gnome.gtkdoc('UPower',
++      main_xml: 'upower-docs.xml',
++      src_dir: meson.source_root() / 'libupower-glib',
++      dependencies: [ libupower_glib_dep ],
++      scan_args: ['--rebuild-types', '--rebuild-sections'],
++      content_files: [
++          version_xml,
++          ifaces_refs,
++          'man/UPower.xml',
++          'man/upowerd.xml',
++          'man/upower.xml',
++          '../COPYING',
++      ],
++      ignore_headers: [
++          'config.h',
++      ],
++      install: true
++  )
++endif
+-- 
+GitLab
+
diff --git a/srcpkgs/upower/template b/srcpkgs/upower/template
index b87ec0d5f9e0..2e9ec285c8af 100644
--- a/srcpkgs/upower/template
+++ b/srcpkgs/upower/template
@@ -1,15 +1,15 @@
 # Template file for 'upower'
 pkgname=upower
-version=0.99.13
+version=0.99.17
 revision=1
-_distver="${version//./_}"
-wrksrc="upower-UPOWER_${_distver}"
-build_style=gnu-configure
+wrksrc="upower-v${version}"
 build_helper="gir"
-configure_args="--disable-static --with-backend=linux $(vopt_enable gir introspection)"
+build_style=meson
+configure_args="-Dos_backend=linux -Dsystemdsystemunitdir=no
+ -Dintrospection=$(vopt_if gir enabled disabled) $(vopt_bool gtk_doc gtk-doc)"
 conf_files="/etc/UPower/UPower.conf"
-hostmakedepends="automake gettext-devel glib-devel gobject-introspection gtk-doc
- intltool libtool libxslt pkg-config which"
+hostmakedepends="automake gettext gettext-devel glib-devel gobject-introspection
+ $(vopt_if gtk_doc gtk-doc) libtool docbook-xsl libxslt pkg-config which"
 makedepends="libusb-devel libgudev-devel dbus-glib-devel
  libimobiledevice-devel polkit-devel"
 checkdepends="python3-dbus python3-packaging"
@@ -17,23 +17,15 @@ short_desc="Abstraction for enumerating power devices"
 maintainer="cinerea0 <cinerea0@protonmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://upower.freedesktop.org"
-distfiles="https://gitlab.freedesktop.org/upower/upower/-/archive/UPOWER_${_distver}/upower-UPOWER_${_distver}.tar.bz2"
-checksum=3393944ce8124a888923d580d2867e6257e0209f7534cc3df2448ecae47d9f8d
+distfiles="https://gitlab.freedesktop.org/upower/upower/-/archive/v${version}/upower-v${version}.tar.bz2"
+checksum=de7177deb2ee23d9c505046c74a856564acab8fd1d39aa1541d123af5a99ca8d
 
 provides="upower0-${version}_${revision}"
 replaces="upower0>=0"
 
 # Package build options
-build_options="gir"
-build_options_default="gir"
-
-post_patch() {
-	vsed -i configure.ac -e '/PKG_CHECK_MODULES/s/libplist\b/libplist-2.0/'
-}
-
-pre_configure() {
-	NOCONFIGURE=1 ./autogen.sh
-}
+build_options="gir gtk_doc"
+build_options_default="gir" # gtk_doc build fails on ARM with meson 0.61.4
 
 libupower-glib3_package() {
 	short_desc+=" - runtime library"
@@ -49,9 +41,12 @@ upower-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
 		if [ "$build_option_gir" ]; then
 			vmove usr/share/gir-1.0
 		fi
-		vmove "usr/lib/*.so"
+		if [ "$build_option_gtk_doc" ]; then
+			vmove usr/share/gtk-doc
+		fi
 	}
 }

From 33a22eb132d0ff61cbd4abcea407d488e5b4b791 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sat, 2 Apr 2022 19:10:14 -0700
Subject: [PATCH 2/2] meson: fix traceback when gtkdoc doesn't have an
 exe_wrapper

---
 .../patches/fix-gtkdoc-exe_wrapper.patch      | 45 +++++++++++++++++++
 srcpkgs/meson/template                        |  2 +-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/meson/patches/fix-gtkdoc-exe_wrapper.patch

diff --git a/srcpkgs/meson/patches/fix-gtkdoc-exe_wrapper.patch b/srcpkgs/meson/patches/fix-gtkdoc-exe_wrapper.patch
new file mode 100644
index 000000000000..2743c3d98a3b
--- /dev/null
+++ b/srcpkgs/meson/patches/fix-gtkdoc-exe_wrapper.patch
@@ -0,0 +1,45 @@
+From 266e8acb5807b38a550cb5145cea0e19545a21d7 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Tue, 18 Jan 2022 07:44:18 -0500
+Subject: [PATCH] fix python traceback when gtkdoc needs an exe_wrapper but
+ doesn't have one
+
+In commit c88bfdbefc2f79ac2dfa9bff5847c350de5f5db8 we added support for
+an exe_wrapper to gtkdoc, which checked twice whether the environment
+says it is needed, and didn't check at all whether one was provided.
+
+The result:
+
+  File "/usr/lib/python3/dist-packages/mesonbuild/modules/gnome.py", line 1354, in gtkdoc
+    t_args.append('--run=' + ' '.join(state.environment.get_exe_wrapper().get_command()))
+AttributeError: 'NoneType' object has no attribute 'get_command'
+
+Instead, check whether we have a valid exe_wrapper (if we don't need
+one, then even when one is defined in the cross file, we get an
+EmptyExternalProgram) and if we do, use it.
+
+If we don't have one, but need one, then we revert back to the behavior
+before commit c88bfdbefc2f79ac2dfa9bff5847c350de5f5db8, which probably
+means "executing the doc target causes the command to error out with
+"Exec format error".
+---
+ mesonbuild/modules/gnome.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 59e84eccd08..2dbfb29e1f8 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -1417,8 +1417,10 @@ def abs_filenames(files: T.Iterable['FileOrString']) -> T.Iterator[str]:
+             t_args.append(f'--{program_name}={path}')
+         if namespace:
+             t_args.append('--namespace=' + namespace)
+-        if state.environment.need_exe_wrapper() and not isinstance(state.environment.get_exe_wrapper(), EmptyExternalProgram):
+-            t_args.append('--run=' + ' '.join(state.environment.get_exe_wrapper().get_command()))
++        # if not need_exe_wrapper, we get an EmptyExternalProgram. If none provided, we get NoneType
++        exe_wrapper = state.environment.get_exe_wrapper()
++        if not isinstance(exe_wrapper, (NoneType, EmptyExternalProgram)):
++            t_args.append('--run=' + ' '.join(exe_wrapper.get_command()))
+         t_args.append(f'--htmlargs={"@@".join(kwargs["html_args"])}')
+         t_args.append(f'--scanargs={"@@".join(kwargs["scan_args"])}')
+         t_args.append(f'--scanobjsargs={"@@".join(kwargs["scanobjs_args"])}')
diff --git a/srcpkgs/meson/template b/srcpkgs/meson/template
index adfa2d52f7ab..ae056d9c2fcc 100644
--- a/srcpkgs/meson/template
+++ b/srcpkgs/meson/template
@@ -1,7 +1,7 @@
 # Template file for 'meson'
 pkgname=meson
 version=0.61.4
-revision=2
+revision=3
 build_style=python3-module
 hostmakedepends="python3-devel python3-setuptools"
 depends="ninja python3-setuptools"

  parent reply	other threads:[~2022-04-03  2:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-03  1:53 [PR PATCH] " oreo639
2022-04-03  2:10 ` [PR PATCH] [Updated] " oreo639
2022-04-03  2:11 ` oreo639
2022-04-03  2:26 ` oreo639
2022-04-03  2:51 ` oreo639 [this message]
2022-04-03  3:02 ` oreo639
2022-04-03 15:50 ` paper42
2022-04-05  1:48 ` cinerea0
2022-04-09  1:52 ` cinerea0
2022-04-09  1:56 ` [PR PATCH] [Updated] " oreo639
2022-04-09  1:57 ` oreo639
2022-04-09  9:29 ` [PR REVIEW] " paper42
2022-04-09  9:29 ` paper42
2022-04-09 10:19 ` [PR PATCH] [Updated] " oreo639
2022-04-09 10:19 ` oreo639
2022-04-09 10:27 ` oreo639
2022-04-09 10:27 ` oreo639
2022-04-09 11:02 ` [PR PATCH] [Updated] " oreo639
2022-04-09 12:56 ` oreo639
2022-04-09 12:56 ` oreo639
2022-04-09 12:57 ` oreo639
2022-04-09 13:10 ` oreo639
2022-04-09 15:27 ` paper42
2022-04-09 16:03 ` [PR PATCH] [Updated] " oreo639
2022-04-09 16:08 ` oreo639
2022-04-09 16:15 ` oreo639
2022-04-09 19:42 ` oreo639
2022-04-10  8:55 ` [PR PATCH] [Merged]: " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220403025119.C2MqLqnyTzIUwWEZJ0PeiZFA_fvG0u13NVPrz2TCmbU@z \
    --to=oreo639@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).