[gentoo-commits] repo/gentoo:master commit in: x11-misc/piedock/files/, x11-misc/piedock/

2022-06-12 Thread Sam James
commit: 8b81d328595e1d60c315490548f9b9b2cbac8dc0
Author: Sam James  gentoo  org>
AuthorDate: Sun Jun 12 10:02:49 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jun 12 10:36:24 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b81d328

x11-misc/piedock: fix build with GCC 12

Closes: https://bugs.gentoo.org/851516
Signed-off-by: Sam James  gentoo.org>

 .../piedock/files/piedock-1.6.9-gcc12-time.patch   | 31 ++
 x11-misc/piedock/piedock-1.6.9.ebuild  |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/x11-misc/piedock/files/piedock-1.6.9-gcc12-time.patch 
b/x11-misc/piedock/files/piedock-1.6.9-gcc12-time.patch
new file mode 100644
index ..5b8a2ea9feb9
--- /dev/null
+++ b/x11-misc/piedock/files/piedock-1.6.9-gcc12-time.patch
@@ -0,0 +1,31 @@
+https://github.com/markusfisch/PieDock/pull/19
+
+From c57d9fad9726086dafbc05abb243c14dcd1bab23 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 12 Jun 2022 11:08:19 +0100
+Subject: [PATCH] Fix build with GCC 12 (missing  include)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following build failure w/ GCC 12:
+```
+WindowManager.cpp: In static member function ‘static void 
PieDock::WindowManager::activate(Display*, Window)’:
+WindowManager.cpp:83:29: error: ‘time’ was not declared in this scope; did you 
mean ‘Time’?
+   83 | for (time_t start = time(0) + 2;
+  | ^~~~
+  | Time
+```
+
+Bug: https://bugs.gentoo.org/851516
+--- a/src/WindowManager.cpp
 b/src/WindowManager.cpp
+@@ -10,6 +10,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ 
+ using namespace PieDock;
+

diff --git a/x11-misc/piedock/piedock-1.6.9.ebuild 
b/x11-misc/piedock/piedock-1.6.9.ebuild
index 2f6dc152253d..cd38c36006d0 100644
--- a/x11-misc/piedock/piedock-1.6.9.ebuild
+++ b/x11-misc/piedock/piedock-1.6.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -39,6 +39,7 @@ DOCS=( res/${PN}rc.sample AUTHORS ChangeLog NEWS )
 PATCHES=(
"${FILESDIR}"/${PN}-1.6.1-signals.patch
"${FILESDIR}"/${PN}-1.6.9-freetype_pkgconfig.patch
+   "${FILESDIR}"/${PN}-1.6.9-gcc12-time.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: x11-misc/piedock/files/, x11-misc/piedock/

2018-05-11 Thread Lars Wendler
commit: c1ba5292f5bf1434770d5aea9abfc80b225a3a62
Author: Lars Wendler  gentoo  org>
AuthorDate: Fri May 11 21:28:43 2018 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Fri May 11 21:28:57 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1ba5292

x11-misc/piedock: Use pkg-config to find freetype.

Bug: https://bugs.gentoo.org/655530
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 .../files/piedock-1.6.9-freetype_pkgconfig.patch   | 45 ++
 x11-misc/piedock/piedock-1.6.9.ebuild  | 30 +++
 2 files changed, 67 insertions(+), 8 deletions(-)

diff --git a/x11-misc/piedock/files/piedock-1.6.9-freetype_pkgconfig.patch 
b/x11-misc/piedock/files/piedock-1.6.9-freetype_pkgconfig.patch
new file mode 100644
index 000..dc6dd41bccb
--- /dev/null
+++ b/x11-misc/piedock/files/piedock-1.6.9-freetype_pkgconfig.patch
@@ -0,0 +1,45 @@
+From 3f37592025333532e98bbe96c2b0903bb881b9c0 Mon Sep 17 00:00:00 2001
+From: Lars Wendler 
+Date: Fri, 11 May 2018 23:21:33 +0200
+Subject: [PATCH] Use pkg-config to find freetype
+
+As of freetype-2.9.1 the freetype-config file no longer gets installed
+by default.
+---
+ configure.ac | 13 -
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0c452ad..96a51e9 100644
+--- a/configure.ac
 b/configure.ac
+@@ -12,6 +12,7 @@ AC_LANG_CPLUSPLUS
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_INSTALL
++PKG_PROG_PKG_CONFIG
+ 
+ # Checks for mandatory libraries
+ AC_CHECK_LIB([X11], [XOpenDisplay], , AC_MSG_ERROR([libX11 not found]))
+@@ -47,15 +48,9 @@ AC_ARG_ENABLE(
+ 
+ # Checks for Freetype
+ if test "x$XFT" = "xtrue"; then
+-  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+-
+-  if test x$FREETYPE_CONFIG = xno; then
+-  AC_MSG_ERROR([*** freetype-config not found])
+-  fi
+-
+-  FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
+-  FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
+-  CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
++  PKG_CHECK_MODULES(FREETYPE, freetype2, [
++  CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
++  ], AC_MSG_ERROR([Cannot find freetype]))
+ fi
+ 
+ # Checks for Xrender
+-- 
+2.17.0
+

diff --git a/x11-misc/piedock/piedock-1.6.9.ebuild 
b/x11-misc/piedock/piedock-1.6.9.ebuild
index 01ba6137e9e..8a2ea62a150 100644
--- a/x11-misc/piedock/piedock-1.6.9.ebuild
+++ b/x11-misc/piedock/piedock-1.6.9.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=6
 
+inherit autotools
+
 DESCRIPTION="A little bit like the famous OS X dock but in shape of a pie menu"
 HOMEPAGE="
http://markusfisch.de/PieDock
@@ -30,19 +32,31 @@ RDEPEND="
x11-libs/gtk+:2
)
 "
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig"
+
 DOCS=( res/${PN}rc.sample AUTHORS ChangeLog NEWS )
+
 PATCHES=(
"${FILESDIR}"/${PN}-1.6.1-signals.patch
+   "${FILESDIR}"/${PN}-1.6.9-freetype_pkgconfig.patch
 )
-S=${WORKDIR}/PieDock-${PV}
+
+S="${WORKDIR}/PieDock-${PV}"
+
+src_prepare() {
+   default
+   eautoreconf
+}
 
 src_configure() {
-   econf \
-   $(use_enable gtk) \
-   --disable-kde \
-   --bindir="${EPREFIX}"/usr/bin \
-   --enable-xft \
-   --enable-xmu \
+   local myeconfargs=(
+   $(use_enable gtk)
+   --disable-kde
+   --bindir="${EPREFIX}"/usr/bin
+   --enable-xft
+   --enable-xmu
--enable-xrender
+   )
+   econf "${myeconfargs[@]}"
 }