diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-04-26 10:31:42 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-04-26 10:31:42 +0000 |
commit | 1541c46d28ed83b20cdafb1691599865a3883332 (patch) | |
tree | 861fc26beadd171a836b276e32495f94e2208b29 | |
parent | 1276bce554d3faa3f0d4f5e9ebdf5e9aff474b88 (diff) | |
download | aports-1541c46d28ed83b20cdafb1691599865a3883332.tar.gz aports-1541c46d28ed83b20cdafb1691599865a3883332.tar.bz2 aports-1541c46d28ed83b20cdafb1691599865a3883332.tar.xz |
main/dbus: backport fixes for x11 detection
backport upstream fixes for detection of x11
6 files changed, 189 insertions, 1 deletions
diff --git a/main/dbus/0001-build-Treat-with-x-yes-the-same-as-with-x-auto.patch b/main/dbus/0001-build-Treat-with-x-yes-the-same-as-with-x-auto.patch new file mode 100644 index 0000000000..2d2530e5f0 --- /dev/null +++ b/main/dbus/0001-build-Treat-with-x-yes-the-same-as-with-x-auto.patch @@ -0,0 +1,27 @@ +From 99cc28e0eb1a37233c0f7d3595175d1f331550e7 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Tue, 1 Mar 2022 15:56:30 +0100 +Subject: [PATCH 1/5] build: Treat --with-x[=yes] the same as --with-x=auto + +Previously, --with-x would disable the check for X11 libraries, which +was not intended. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index fa75e930..847e95fb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1115,7 +1115,7 @@ if test "x$dbus_win" = xyes; then + + enable_x11_autolaunch=no + have_x11=no +-else if test "x$with_x" = xauto; then ++else if test "x$with_x" != xno; then + PKG_CHECK_MODULES([X], [x11], + [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])], + [ have_x11=no ]) +-- +2.36.0 + diff --git a/main/dbus/0002-Move-DBUS_X_-definitions-into-PKG_CHECK_MODULES-bloc.patch b/main/dbus/0002-Move-DBUS_X_-definitions-into-PKG_CHECK_MODULES-bloc.patch new file mode 100644 index 0000000000..9f871864bb --- /dev/null +++ b/main/dbus/0002-Move-DBUS_X_-definitions-into-PKG_CHECK_MODULES-bloc.patch @@ -0,0 +1,37 @@ +From 51e468d828785cbc7060678f6f257723ba11cd10 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Tue, 1 Mar 2022 16:01:29 +0100 +Subject: [PATCH 2/5] Move DBUS_X_* definitions into PKG_CHECK_MODULES block + +--- + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 847e95fb..a51e7265 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1117,15 +1117,15 @@ if test "x$dbus_win" = xyes; then + have_x11=no + else if test "x$with_x" != xno; then + PKG_CHECK_MODULES([X], [x11], +- [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])], ++ [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library]) ++ have_x11=yes ++ DBUS_X_LIBS="$X_LIBS" ++ DBUS_X_CFLAGS="$X_CFLAGS" ++ ], + [ have_x11=no ]) + + if test "x$have_x11" = xno; then + AC_MSG_WARN([Couldn't found X11, tried with pkg-config.]) +- else +- have_x11=yes +- DBUS_X_LIBS="$X_LIBS" +- DBUS_X_CFLAGS="$X_CFLAGS" + fi + else + AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [ +-- +2.36.0 + diff --git a/main/dbus/0003-Emit-an-error-when-with-x-was-given-but-no-X11-libs-.patch b/main/dbus/0003-Emit-an-error-when-with-x-was-given-but-no-X11-libs-.patch new file mode 100644 index 0000000000..e0c5cad5ab --- /dev/null +++ b/main/dbus/0003-Emit-an-error-when-with-x-was-given-but-no-X11-libs-.patch @@ -0,0 +1,37 @@ +From 17c88a894499da64460a0ef76db1d8b88ceb9eeb Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Tue, 1 Mar 2022 16:05:52 +0100 +Subject: [PATCH 3/5] Emit an error when --with-x was given but no X11 libs + were found + +--- + configure.ac | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a51e7265..4420c6d3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1121,12 +1121,13 @@ else if test "x$with_x" != xno; then + have_x11=yes + DBUS_X_LIBS="$X_LIBS" + DBUS_X_CFLAGS="$X_CFLAGS" +- ], +- [ have_x11=no ]) +- +- if test "x$have_x11" = xno; then +- AC_MSG_WARN([Couldn't found X11, tried with pkg-config.]) +- fi ++ ], [ ++ AS_IF([test "x$with_x" = xyes], ++ [AC_MSG_ERROR([Couldn't find X11, tried with pkg-config.])], ++ [AC_MSG_WARN([Couldn't find X11, tried with pkg-config.])] ++ ) ++ have_x11=no ++ ]) + else + AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [ + AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible]) +-- +2.36.0 + diff --git a/main/dbus/0004-Add-have_x11-no-if-without-x-was-given-to-make-later.patch b/main/dbus/0004-Add-have_x11-no-if-without-x-was-given-to-make-later.patch new file mode 100644 index 0000000000..9cfa9de488 --- /dev/null +++ b/main/dbus/0004-Add-have_x11-no-if-without-x-was-given-to-make-later.patch @@ -0,0 +1,25 @@ +From bf3cb42c6db1f4479467d66a111b08a98afef31b Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Tue, 1 Mar 2022 16:08:06 +0100 +Subject: [PATCH 4/5] Add have_x11=no if --without-x was given to make later + checks happy + +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 4420c6d3..8816a950 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1129,6 +1129,7 @@ else if test "x$with_x" != xno; then + have_x11=no + ]) + else ++ have_x11=no + AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [ + AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible]) + ]) +-- +2.36.0 + diff --git a/main/dbus/0005-Convert-if-calls-to-AS_IF-macro-for-the-block-that-h.patch b/main/dbus/0005-Convert-if-calls-to-AS_IF-macro-for-the-block-that-h.patch new file mode 100644 index 0000000000..1059b94741 --- /dev/null +++ b/main/dbus/0005-Convert-if-calls-to-AS_IF-macro-for-the-block-that-h.patch @@ -0,0 +1,52 @@ +From c71f013a64cd7f6de4c9cf3cf3b236239d713eb1 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Tue, 1 Mar 2022 16:11:05 +0100 +Subject: [PATCH 5/5] Convert "if" calls to AS_IF macro for the block that + handles X11 + +--- + configure.ac | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8816a950..91bd898c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1108,14 +1108,14 @@ AC_ARG_ENABLE([x11-autolaunch], + AS_HELP_STRING([--enable-x11-autolaunch], [build with X11 auto-launch support]), + [], [enable_x11_autolaunch=auto]) + +-if test "x$dbus_win" = xyes; then +- if test "x$enable_x11_autolaunch" = xyes; then ++AS_IF([test "x$dbus_win" = xyes], [ ++ AS_IF([test "x$enable_x11_autolaunch" = xyes], [ + AC_MSG_ERROR([X11 auto-launch is not supported on Windows]) +- fi ++ ]) + + enable_x11_autolaunch=no + have_x11=no +-else if test "x$with_x" != xno; then ++], [test "x$with_x" != xno], [ + PKG_CHECK_MODULES([X], [x11], + [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library]) + have_x11=yes +@@ -1128,13 +1128,12 @@ else if test "x$with_x" != xno; then + ) + have_x11=no + ]) +-else ++], [ + have_x11=no + AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [ + AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible]) + ]) +-fi +-fi ++]) + + if test "x$enable_x11_autolaunch,$have_x11" = xyes,no; then + AC_MSG_ERROR([X11 auto-launch requires X headers/libraries]) +-- +2.36.0 + diff --git a/main/dbus/APKBUILD b/main/dbus/APKBUILD index 1d0630ba9d..84a819a21f 100644 --- a/main/dbus/APKBUILD +++ b/main/dbus/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=dbus pkgver=1.14.0 -pkgrel=0 +pkgrel=1 pkgdesc="Freedesktop.org message bus system" url="https://www.freedesktop.org/Software/dbus" arch="all" @@ -31,6 +31,11 @@ subpackages=" $pkgname-openrc " source="https://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.xz + 0001-build-Treat-with-x-yes-the-same-as-with-x-auto.patch + 0002-Move-DBUS_X_-definitions-into-PKG_CHECK_MODULES-bloc.patch + 0003-Emit-an-error-when-with-x-was-given-but-no-X11-libs-.patch + 0004-Add-have_x11-no-if-without-x-was-given-to-make-later.patch + 0005-Convert-if-calls-to-AS_IF-macro-for-the-block-that-h.patch $pkgname.initd $pkgname.confd " @@ -97,6 +102,11 @@ x11() { sha512sums=" 9bf17a3ebb3cf44722c6fbf24ee56e9dc14d6882fc312f26c7f07459d969424bc2fb63a229139e011804ecc479a8f0eb1a0c83286f8d5a664c5979d12634179f dbus-1.14.0.tar.xz +d7c9ca341af0672621b3793ae51118d1b3ab4d1cd4cb8f8ad6b209e713c8e6446c2641c250ba82be42bb5ad3b7812e85165315a0997e4e298c8f8a265cbdcb3a 0001-build-Treat-with-x-yes-the-same-as-with-x-auto.patch +6e8cdbef3c4263d9a2a878cbbc09511c68a02bc9b16d4d7e3a5e39e07e8dce9ec25ce5c7a7c77bda89e7a2af93246d5cbfd503406acb082d8189936c7d6076dd 0002-Move-DBUS_X_-definitions-into-PKG_CHECK_MODULES-bloc.patch +eb53caf763fa11d2d9be6e9a4a09e93ea021d1764f401fb3d18f4ef656efacfda231efe2618adb704d15d881846785fea266c1d9700adc3cb38792cee823cf34 0003-Emit-an-error-when-with-x-was-given-but-no-X11-libs-.patch +20163c93695c4286f3634941e959dc3b1289ab8d056d528ed35ccb7e71c5706377f72d514f9609bf5f51e9f573b9a996c64631bd2079ad12ae7cf0b2e69f227f 0004-Add-have_x11-no-if-without-x-was-given-to-make-later.patch +723ba846da40883d7b1d2fd6e48822b427a5f29e9530854e90f2d761cbba711711b3013ed2b824576cdc529726c7bb39f8a5c9cc779222efb8e016c5d9d18332 0005-Convert-if-calls-to-AS_IF-macro-for-the-block-that-h.patch 0db5c0804b5aa19c8d7e517b1c6d11b9b52d96477d4d26769c01a31765491ff12897b5634455ee57d978ea30e2d71c5df5ed3eecd5435983d8ab1128ff516315 dbus.initd 3f063efa672a900ed04bc7224ba31b3ced91bb98ae096a3ce12552a0b6e2c38ddb445edb4876518f9be4140a5d901dc62080e95aab4346d89dbf329ebec33cb3 dbus.confd " |