From 094c6b3c22952f9eb8d4524e539655dfebb76cd1 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann <bwiedemann+opensusegit@suse.de> Date: Jun 09 2020 23:00:03 +0000 Subject: Update nvdock to rev 9 via SR 812690 https://build.opensuse.org/request/show/812690 by user michals + dimstar_suse --- diff --git a/.files b/.files index 82360e4..fa1fa3e 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 12d7762..91a1f90 100644 --- a/.rev +++ b/.rev @@ -56,4 +56,12 @@ <user>adrianSuSE</user> <comment>Split 13.2 from Factory</comment> </revision> + <revision rev="9" vrev="14"> + <srcmd5>e985e66878dad0ddbf618327d76a9d23</srcmd5> + <version>1.02</version> + <time>1591742891</time> + <user>dimstar_suse</user> + <comment></comment> + <requestid>812690</requestid> + </revision> </revisionlist> diff --git a/.servicemark b/.servicemark deleted file mode 100644 index a8fb26e..0000000 --- a/.servicemark +++ /dev/null @@ -1 +0,0 @@ -9933a9c08a729896682bf7da09bd719b diff --git a/nvdock-fix-gcc10-build.patch b/nvdock-fix-gcc10-build.patch new file mode 100644 index 0000000..5daa135 --- /dev/null +++ b/nvdock-fix-gcc10-build.patch @@ -0,0 +1,39 @@ +diff -ur nvdock-1.02.orig/src/nvdock.c nvdock-1.02/src/nvdock.c +--- nvdock-1.02.orig/src/nvdock.c 2020-06-07 23:45:25.322091577 +0200 ++++ nvdock-1.02/src/nvdock.c 2020-06-07 23:54:36.049756123 +0200 +@@ -33,6 +33,9 @@ + + #include "nvdock.h" + ++argstruct *arg; ++BobStatusIcon *bsi; ++ + void + bob_main_quit(void) { + gtk_main_quit(); +diff -ur nvdock-1.02.orig/src/nvdock.h nvdock-1.02/src/nvdock.h +--- nvdock-1.02.orig/src/nvdock.h 2020-06-07 23:45:25.322091577 +0200 ++++ nvdock-1.02/src/nvdock.h 2020-06-07 23:57:10.671907728 +0200 +@@ -83,8 +83,8 @@ + + } argstruct; + +-argstruct *arg; +-BobStatusIcon *bsi; ++extern argstruct *arg; ++extern BobStatusIcon *bsi; + + void argc_argv_parse(int argc, char **argv); + +diff -ur nvdock-1.02.orig/src/util.c nvdock-1.02/src/util.c +--- nvdock-1.02.orig/src/util.c 2020-06-07 23:45:25.322091577 +0200 ++++ nvdock-1.02/src/util.c 2020-06-08 00:02:32.440385202 +0200 +@@ -112,7 +112,7 @@ + + unsigned char len = strlen(string); + int a = 0, iter = 0; +- char new[len]; ++ char new[len+1]; + unsigned char newlen; + + while(a < len) { diff --git a/nvdock.changes b/nvdock.changes index 85e73b5..eafa861 100644 --- a/nvdock.changes +++ b/nvdock.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Sun Jun 7 21:34:54 UTC 2020 - Michal Suchanek <msuchanek@suse.com> + +- Use license compatibility cruft, cleanup spec file +- Fix build with gcc10 + * nvdock-fix-gcc10-build.patch + +------------------------------------------------------------------- Wed May 4 06:44:48 UTC 2011 - adam@mizerski.pl - added nvdock-1.02-datadir.patch.in diff --git a/nvdock.spec b/nvdock.spec index f5deb67..4a57c00 100644 --- a/nvdock.spec +++ b/nvdock.spec @@ -1,7 +1,7 @@ # # spec file for package nvdock # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,19 +12,17 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # - Name: nvdock Version: 1.02 -Release: 1 +Release: 0 Summary: Tray icon for launching NVIDIA Settings -Group: System/X11/Utilities - License: BSD-3-Clause -Url: http://www.opsat.net/development/nvdock/ +Group: System/X11/Utilities +URL: https://www.opsat.net/development/nvdock/ Source0: http://bobmajdakjr.googlecode.com/files/%{name}-%{version}.tar.bz2 # The provided Makefile sucks, so I did this one. -- adam@mizerski.pl Source1: Makefile @@ -33,9 +31,10 @@ Source2: %{name}.desktop Source3: %{name}-1.02-datadir.patch.in # PATCH-FIX-UPSTREAM nvdock-1.02-argptr.patch adam@mizerski.pl - Get rid of "warning: cast to pointer from integer of different size" Patch0: %{name}-1.02-argptr.patch - -BuildRequires: pkgconfig(gtk+-2.0) +Patch1: %{name}-fix-gcc10-build.patch +BuildRequires: pkgconfig BuildRequires: update-desktop-files +BuildRequires: pkgconfig(gtk+-2.0) %description Little NVIDIA tray icon. @@ -45,8 +44,8 @@ Also on the menu it will show the NVIDIA driver version, which is surely to come %prep %setup -q -%patch0 -p1 -sed -i "s|@DATADIR@|%{_datadir}|g" %{SOURCE3} | patch -p1 +sed -e "s|@DATADIR@|%{_datadir}|g" < %{SOURCE3} | patch -p1 +%autopatch -p1 %build make -C src -f %{SOURCE1} %{?_smp_mflags} @@ -57,14 +56,23 @@ install -m 644 -D data/nvdock.png %{buildroot}%{_datadir}/pixmaps/nvdock.png install -m 644 -D %{SOURCE2} %{buildroot}%{_datadir}/applications/nvdock.desktop %suse_update_desktop_file nvdock -%clean -rm -rf %{buildroot} +# Compatibility cruft +# there is no %%license prior to SLE12 +%if %{undefined _defaultlicensedir} +%define license %doc +%else +# filesystem before SLE12 SP3 lacks /usr/share/licenses +%if 0%(test ! -d %{_defaultlicensedir} && echo 1) +%define _defaultlicensedir %{_defaultdocdir} +%endif +%endif +# End of compatibility cruft %files -%defattr(-,root,root) %{_bindir}/nvdock %{_datadir}/pixmaps/nvdock.png %{_datadir}/applications/nvdock.desktop -%doc COPYING ChangeLog README TODO +%license COPYING +%doc ChangeLog README TODO %changelog