Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui-apps/waybar: update to latest version 0.9.3 #17099

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-libs/date/Manifest
@@ -0,0 +1 @@
DIST date-3.0.0.tar.gz 822623 BLAKE2B 438a7a5c153c7c2d695fefc95bbd474ef507af2cd8182d1e7d54d482b0128c3f9c57582ed5b40ef46d8f6f5539228d20322c684b1e1b418e5ade3b4871bf4ec1 SHA512 03ba0faef68e053aba888591b9350af1a043ef543825c80b1ca3f0dc0448697f56286e561f1a2a59e684680d7fc1e51fd24955c4cc222fe28db64f56037dc1aa
55 changes: 55 additions & 0 deletions dev-libs/date/date-3.0.0.ebuild
@@ -0,0 +1,55 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

DESCRIPTION="A date and time library based on the C++11/14/17 <chrono> header"
HOMEPAGE="https://github.com/HowardHinnant/date"

SRC_URI="https://github.com/HowardHinnant/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"

LICENSE="MIT"
SLOT="0"
IUSE="only-c-locale test"
RESTRICT="!test? ( test )"

PATCHES=(
"${FILESDIR}"/${P}-c-locale-export.patch
JonasToth marked this conversation as resolved.
Show resolved Hide resolved
"${FILESDIR}"/${P}-version.patch
)

src_prepare() {
# The test cases are implicitly generated with CMake code, that parses
# the file names for ".cpp" and ".fail.cpp". Renaming the source files
# disables the test.

# This test case fails due to a stdlibc++ bug.
# Upstream bug: https://github.com/HowardHinnant/date/issues/388
mv "test/date_test/parse.pass.cpp" "test/date_test/parse.disabled" || ewarn "Can not deactivate test case, test failure expected"

# This test case fails only when the CMAKE_BUILD_TYPE=Gentoo.
# The behaviour seems very strange, but does not appear with a
# "valid" build type.
# Upstream bug: https://github.com/HowardHinnant/date/issues/604
mv "test/clock_cast_test/local_t.pass.cpp" "test/clock_cast_test/local_t.disabled" || ewarn "Can not deactivate test case, test failure expected"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely the right approach. You could do this in an "if use test;" conditional, but it's not needed.

It may be worth it to avoid confusing users if they're not running tests though?


cmake_src_prepare
}

src_configure() {
local mycmakeargs=(
-DBUILD_TZ_LIB=ON
-DUSE_SYSTEM_TZ_DB=ON
-DENABLE_DATE_TESTING=$(usex test)
-DCOMPILE_WITH_C_LOCALE=$(usex only-c-locale)
)
cmake_src_configure
}

src_test() {
cd "${BUILD_DIR}" || die
ninja testit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| die on external commands

}
90 changes: 90 additions & 0 deletions dev-libs/date/files/date-3.0.0-c-locale-export.patch
@@ -0,0 +1,90 @@
Fixes an compilation error when 'ONLY_C_LOCALE' is used to build the project.

Upstream-Bug: https://github.com/HowardHinnant/date/issues/589

--- a/CMakeLists.txt
JonasToth marked this conversation as resolved.
Show resolved Hide resolved
+++ b/CMakeLists.txt
@@ -76,10 +76,25 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
# public headers will get installed:
set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h )
endif ()
-target_compile_definitions( date INTERFACE
- #To workaround libstdc++ issue https://github.com/HowardHinnant/date/issues/388
- ONLY_C_LOCALE=$<IF:$<BOOL:${COMPILE_WITH_C_LOCALE}>,1,0>
- $<$<BOOL:${DISABLE_STRING_VIEW}>:HAS_STRING_VIEW=0> )
+
+# These used to be set with generator expressions,
+#
+# ONLY_C_LOCALE=$<IF:$<BOOL:${COMPILE_WITH_C_LOCALE}>,1,0>
+#
+# which expand in the output target file to, e.g.
+#
+# ONLY_C_LOCALE=$<IF:$<BOOL:FALSE>,1,0>
+#
+# This string is then (somtimes?) not correctly interpreted.
+if ( COMPILE_WITH_C_LOCALE )
+ # To workaround libstdc++ issue https://github.com/HowardHinnant/date/issues/388
+ target_compile_definitions( date INTERFACE ONLY_C_LOCALE=1 )
+else()
+ target_compile_definitions( date INTERFACE ONLY_C_LOCALE=0 )
+endif()
+if ( DISABLE_STRING_VIEW )
+ target_compile_definitions( date INTERFACE HAS_STRING_VIEW=0 )
+endif()

#[===================================================================[
tz (compiled) library
@@ -89,27 +104,40 @@ if( BUILD_TZ_LIB )
target_sources( date-tz
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/tz.h
- $<$<BOOL:${IOS}>:$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/ios.h>
PRIVATE
include/date/tz_private.h
- $<$<BOOL:${IOS}>:src/ios.mm>
src/tz.cpp )
+ if ( IOS )
+ target_sources( date-tz
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/ios.h
+ PRIVATE
+ src/ios.mm )
+ endif()
add_library( date::tz ALIAS date-tz )
target_link_libraries( date-tz PUBLIC date )
target_include_directories( date-tz PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include> )
- target_compile_definitions( date-tz
- PRIVATE
- AUTO_DOWNLOAD=$<IF:$<OR:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<BOOL:${MANUAL_TZ_DB}>>,0,1>
- HAS_REMOTE_API=$<IF:$<OR:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<BOOL:${MANUAL_TZ_DB}>>,0,1>
- $<$<AND:$<BOOL:${WIN32}>,$<BOOL:${BUILD_SHARED_LIBS}>>:DATE_BUILD_DLL=1>
- $<$<BOOL:${USE_TZ_DB_IN_DOT}>:INSTALL=.>
- PUBLIC
- USE_OS_TZDB=$<IF:$<AND:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<NOT:$<BOOL:${WIN32}>>,$<NOT:$<BOOL:${MANUAL_TZ_DB}>>>,1,0>
- INTERFACE
- $<$<AND:$<BOOL:${WIN32}>,$<BOOL:${BUILD_SHARED_LIBS}>>:DATE_USE_DLL=1> )
+
+ if ( USE_SYSTEM_TZ_DB OR MANUAL_TZ_DB )
+ target_compile_definitions( date-tz PRIVATE AUTO_DOWNLOAD=0 HAS_REMOTE_API=0 )
+ else()
+ target_compile_definitions( date-tz PRIVATE AUTO_DOWNLOAD=1 HAS_REMOTE_API=1 )
+ endif()
+
+ if ( USE_SYSTEM_TZ_DB AND NOT WIN32 AND NOT MANUAL_TZ_DB )
+ target_compile_definitions( date-tz PRIVATE INSTALL=. PUBLIC USE_OS_TZDB=1 )
+ else()
+ target_compile_definitions( date-tz PUBLIC USE_OS_TZDB=0 )
+ endif()
+
+ if ( WIN32 AND BUILD_SHARED_LIBS )
+ target_compile_definitions( date-tz PUBLIC DATE_BUILD_DLL=1 )
+ endif()
+
set(TZ_HEADERS include/date/tz.h)
+
if( IOS )
list(APPEND TZ_HEADERS include/date/ios.h)
endif( )
--
15 changes: 15 additions & 0 deletions dev-libs/date/files/date-3.0.0-version.patch
@@ -0,0 +1,15 @@
Fixes an oversight in the build-system versioning.

Upstream-Bug: https://github.com/HowardHinnant/date/issues/583

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@

cmake_minimum_required( VERSION 3.7 )

-project( date VERSION 2.4.1 )
+project( date VERSION 3.0.0 )

include( GNUInstallDirs )

20 changes: 20 additions & 0 deletions dev-libs/date/metadata.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="person">
<email>gentoo@jonas-toth.eu</email>
<name>Jonas Toth</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="only-c-locale">Build only the C locale</flag>
</use>
<upstream>
<remote-id type="github">HowardHinnant/date</remote-id>
<bugs-to>https://github.com/HowardHinnant/date/issues</bugs-to>
<changelog>https://github.com/HowardHinnant/date/releases</changelog>
</upstream>
</pkgmetadata>
1 change: 1 addition & 0 deletions gui-apps/waybar/Manifest
@@ -1 +1,2 @@
DIST waybar-0.8.0.tar.gz 112019 BLAKE2B b3b61e02a104599e8f9047f9e2f76ec57ef7dd164edca2afd7b0afbb6b2c2341e20d6175905eba525337df9215473afa6cf017f736bb2de24e4daa169a5af3ee SHA512 c670fd21a7d29396d8bbe1b7540ddbbe44a98f7fb49f8518e0cc302aa57e5bb993ff8306973a7b8ca4ec000a7ecc311872762a0782ce19e4bf4cff8ea09caccb
DIST waybar-0.9.3.tar.gz 135024 BLAKE2B d7b0090d0d7e25701ba7b76353737451e4ff8f145998b1a395e4c57e845be319380ac41b1a464bc7b5cc4d9ce037151bc9e7f37763ed1c0f42e945503668f1df SHA512 19dba92c5e430ce71567f149e5d208d594928a1d642584f606d55779d0a336ec4587e8a2e15698a25bdf0d26525f771d0a73b193f948bf9c1dfba5be350d4e78
11 changes: 10 additions & 1 deletion gui-apps/waybar/metadata.xml
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>gentoo@jonas-toth.eu</email>
<name>Jonas Toth</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="mpd">Enable support for the Music Player Daemon</flag>
<flag name="network">Enable libnl support for network related features</flag>
<flag name="popups">Enable popup support with gtk-layer-shell</flag>
<flag name="pulseaudio">Enable support for volume control via PulseAudio</flag>
<flag name="tray">Enable support for tray</flag>
</use>
<upstream>
Expand Down
61 changes: 61 additions & 0 deletions gui-apps/waybar/waybar-0.9.3.ebuild
@@ -0,0 +1,61 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit meson

DESCRIPTION="Highly customizable Wayland bar for Sway and Wlroots based compositors"
HOMEPAGE="https://github.com/Alexays/Waybar"

if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/Alexays/${PN^}.git"
else
SRC_URI="https://github.com/Alexays/${PN^}/archive/${PV}.tar.gz -> ${P}.tar.gz"
JonasToth marked this conversation as resolved.
Show resolved Hide resolved
KEYWORDS="~amd64"
fi
S="${WORKDIR}/${PN^}-${PV}"

LICENSE="MIT"
SLOT="0"
IUSE="mpd network popups pulseaudio tray +udev"

BDEPEND="
>=app-text/scdoc-1.9.2
virtual/pkgconfig
"
JonasToth marked this conversation as resolved.
Show resolved Hide resolved
DEPEND="
dev-cpp/gtkmm:3.0
dev-libs/jsoncpp:=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're missing a dep on x11-libs/gtk+:3[wayland]. I had a compile error about gdk/gdkwayland.h not being found without it.

I've added it because it's such a simple job, but be on the look out for others.

dev-libs/libinput:=
dev-libs/libsigc++:2
>=dev-libs/libfmt-5.3.0:=
>=dev-libs/spdlog-1.3.1:=
dev-libs/date
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a subslot to date and subscribed to it here with := to be rebuilt if its ABI changes.

dev-libs/wayland
dev-libs/wayland-protocols
gui-libs/wlroots
mpd? ( media-libs/libmpdclient )
network? ( dev-libs/libnl:3 )
popups? ( gui-libs/gtk-layer-shell )
pulseaudio? ( media-sound/pulseaudio )
tray? (
dev-libs/libdbusmenu[gtk3]
dev-libs/libappindicator
)
udev? ( virtual/libudev:= )
"
RDEPEND="${DEPEND}"

src_configure() {
local emesonargs=(
$(meson_feature mpd)
$(meson_feature network libnl)
$(meson_feature popups gtk-layer-shell)
$(meson_feature pulseaudio)
$(meson_feature tray dbusmenu-gtk)
$(meson_feature udev libudev)
)
meson_src_configure
}
24 changes: 12 additions & 12 deletions gui-apps/waybar/waybar-9999.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit meson

DESCRIPTION="Highly customizable Wayland bar for Sway and Wlroots based compositors."
DESCRIPTION="Highly customizable Wayland bar for Sway and Wlroots based compositors"
HOMEPAGE="https://github.com/Alexays/Waybar"

if [[ ${PV} == 9999 ]]; then
Expand All @@ -18,40 +18,40 @@ fi

LICENSE="MIT"
SLOT="0"
IUSE="mpd network pulseaudio tray +udev"
IUSE="mpd network popups pulseaudio tray +udev"

BDEPEND="
>=app-text/scdoc-1.9.2
virtual/pkgconfig
"

"
DEPEND="
dev-cpp/gtkmm:3.0
dev-libs/jsoncpp:=
dev-libs/libinput:=
dev-libs/libsigc++:2
>=dev-libs/libfmt-5.3.0:=
>=dev-libs/spdlog-1.3.1:=
dev-libs/date
dev-libs/wayland
dev-libs/wayland-protocols
gui-libs/wlroots
mpd? ( media-libs/libmpdclient )
network? ( dev-libs/libnl:3 )
popups? ( gui-libs/gtk-layer-shell )
pulseaudio? ( media-sound/pulseaudio )
tray? ( dev-libs/libdbusmenu[gtk3] )
tray? (
dev-libs/libdbusmenu[gtk3]
dev-libs/libappindicator
)
udev? ( virtual/libudev:= )
"

"
RDEPEND="${DEPEND}"

if [[ ${PV} != 9999 ]]; then
S="${WORKDIR}/${PN^}-${PV}"
fi

src_configure() {
local emesonargs=(
$(meson_feature mpd)
$(meson_feature network libnl)
$(meson_feature popups gtk-layer-shell)
$(meson_feature pulseaudio)
$(meson_feature tray dbusmenu-gtk)
$(meson_feature udev libudev)
Expand Down