Merge pull request #11782 from gfrancesco/master
authorRosen Penev <rosenp@gmail.com>
Tue, 7 Apr 2020 11:16:56 +0000 (04:16 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 11:16:56 +0000 (04:16 -0700)
transmission: add init file STOP directive

15 files changed:
devel/meson/Makefile
lang/python/gunicorn/Makefile
lang/python/python-yaml/Makefile
lang/python/python3-package.mk
multimedia/graphicsmagick/Makefile
net/boinc/Makefile [new file with mode: 0644]
net/boinc/files/boinc-client.init [new file with mode: 0755]
net/boinc/files/global_prefs_override.xml [new file with mode: 0644]
net/boinc/files/remote_hosts.cfg [new file with mode: 0644]
sound/mpd/Makefile
sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch [deleted file]
sound/mpd/patches/020-fix-incorrect-rounding.patch [deleted file]
sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch [deleted file]
sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch [deleted file]
utils/quota/Makefile [new file with mode: 0644]

index 1df088083e1cf98c2cecb09e3037755fa242c9f9..b9af6f71c47fa23777836c8314c22f03fe50528f 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=meson
-PKG_VERSION:=0.53.2
+PKG_VERSION:=0.54.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=meson
-PKG_HASH:=3e8f830f33184397c2eb0b651ec502adb63decb28978bdc84b3558d71284c21f
+PKG_HASH:=dde5726d778112acbd4a67bb3633ab2ee75d33d1e879a6283a7b4a44c3363c27
 
 PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
 PKG_LICENSE:=Apache-2.0
index 5a82924e27d57114a732ef158862aafc50d8f5b7..75f3bef5761cc1abaf3717ef4871b7f3c4dc5370 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gunicorn
-PKG_VERSION:=19.9.0
-PKG_RELEASE=2
+PKG_VERSION:=20.0.4
+PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+PKG_HASH:=1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
@@ -32,6 +32,7 @@ endef
 
 define Package/python3-gunicorn
 $(call Package/gunicorn/Default)
+  TITLE:=WSGI HTTP Server for UNIX (library)
   DEPENDS:=+python3
   VARIANT:=python3
 endef
@@ -50,7 +51,7 @@ endef
 
 define Package/gunicorn3
 $(call Package/gunicorn/Default)
-  DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn
+  DEPENDS:=+python3 +python3-setuptools +python3-gunicorn
 endef
 
 define Package/gunicorn3/description
@@ -64,9 +65,7 @@ define Package/gunicorn3/install
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/gunicorn \
                $(1)/usr/bin/gunicorn3
-       $(INSTALL_BIN) \
-               $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \
-               $(1)/usr/bin/gunicorn3_paster
+       $(LN) gunicorn3 $(1)/usr/bin/gunicorn
        $(call Py3Shebang,$(1)/usr/bin/*)
 endef
 
index dbca6deb5cdbbca0c376a6b4eb00dd42e09965e3..cf0cb122508187555e081d95b7074a409f1f0a5f 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-yaml
-PKG_VERSION:=5.3
+PKG_VERSION:=5.3.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=PyYAML
-PKG_HASH:=e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615
+PKG_HASH:=b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
index d20d19801a0497d13209c329ba197c78d3d50095..0f5621c9f7feb59b590348af3b57ba0e3061a769 100644 (file)
@@ -126,7 +126,7 @@ define Build/Compile/Py3Mod
 endef
 
 PYTHON3_PKG_SETUP_DIR ?=
-PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
+PYTHON3_PKG_SETUP_GLOBAL_ARGS ?=
 PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON3_PKG_SETUP_VARS ?=
 
index 9769dc933425a1e19321543a5094b2307d875385..f7fd422906bdce05b6d1a0ad97bd21a183b20fc6 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=graphicsmagick
-PKG_VERSION:=1.3.34
+PKG_VERSION:=1.3.35
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
 PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/graphicsmagick
-PKG_HASH:=7e1904c924cc3574aecc7ca6879fc6cf01070859e3ca4a06182b3e0eb346a0c2
+PKG_HASH:=7fd0b49903eb35df4ab5ca76139ab3f023f47485a4913fbdcf5c642c6e5f01fc
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=Copyright.txt
diff --git a/net/boinc/Makefile b/net/boinc/Makefile
new file mode 100644 (file)
index 0000000..1efe723
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 2020 by Christian Dreihsig and Steffen Möller
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=boinc
+PKG_VERSION:=7.16.5
+PKG_VERSION_SHORT:=$(shell echo $(PKG_VERSION)| cut -f1,2 -d.)
+PKG_RELEASE:=1
+
+PKG_SOURCE_DATE:=2020-02-25
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/BOINC/boinc/tar.gz/client_release/$(PKG_VERSION_SHORT)/$(PKG_VERSION)?
+PKG_HASH:=33db60991b253e717c6124cce4750ae7729eaab4e54ec718b9e37f87012d668a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-client_release-$(PKG_VERSION_SHORT)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Christian Dreihsig <christian.dreihsig@t-online.de>, Steffen Moeller <moeller@debian.org>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:boinc_project:boinc
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=0
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/target.mk
+
+define Package/boinc
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=BOINC client
+  DEPENDS:=+curl +bzip2 +libstdcpp +libopenssl +zlib
+  USERID:=boinc:boinc
+  URL:=https://github.com/BOINC/boinc/
+endef
+
+define Package/boinc/description
+  The Berkeley Open Infrastructure for Network Computing (BOINC) is a
+  software platform for distributed computing: several initiatives of
+  various scientific disciplines all compete for the idle time of
+  desktop computers. The developers' web site at the University of
+  Berkeley serves as a common portal to the otherwise independently run
+  projects.
+  This package provides the BOINC core client program that is
+  required to participate in any project that uses BOINC to control what
+  projects to join and to determine constraints for the computation
+  like the percentage of CPU time. OpenWrt does not
+  provide the graphical BOINC Manager, but you can connect to this
+  machine from the BOINC Manager of your desktop computer.
+endef
+
+CONFIGURE_ARGS += \
+       --disable-server --disable-manager --enable-client --enable-libraries \
+       --disable-boinczip --enable-install-headers --enable-dynamic-client-linkage \
+       --with-boinc-platform=$(REAL_GNU_TARGET_NAME) \
+       --with-boinc-alt-platform=$(ARCH)-$(BOARD)-$(DEVICE_TYPE)-openwrt-$(TARGET_SUFFIX)
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/boinc
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/boinc/* $(1)/usr/include/boinc/
+       $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/boinc/ # project_specific_defines.h, config.h, version.h, svn_version.h
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/
+endef
+
+define Package/boinc/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/boinc-client.init $(1)/etc/init.d/boinc-client
+       $(INSTALL_DIR) $(1)/opt/boinc
+       $(CP) ./files/global_prefs_override.xml $(1)/opt/boinc/global_prefs_override.xml
+       $(CP) ./files/remote_hosts.cfg $(1)/opt/boinc/remote_hosts.cfg
+endef
+
+$(eval $(call BuildPackage,boinc))
diff --git a/net/boinc/files/boinc-client.init b/net/boinc/files/boinc-client.init
new file mode 100755 (executable)
index 0000000..b225ebd
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+BOINCEXE_NAME=boinc_client
+BOINCDIR=/opt/boinc/
+BOINCUSR=boinc
+BOINCEXE_OPTS="--check_all_logins --redirectio --dir $BOINCDIR"
+PID_FILE="var/run/$BOINCEXE_NAME.pid"
+
+start_service() {
+   # First Check that BOINCDIR exists...
+   if ! [ -d "$BOINCDIR" ]; then
+      if ! mkdir -p $BOINCDIR 2>/dev/null ; then
+         echo "ERROR: $BOINCDIR doesn't exist and couldn't be created"
+         return 1
+      fi
+   fi
+
+   # ... and that it is accessible by boinc
+   BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
+   if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
+      chown -R $BOINCUSR:$BOINCUSR $BOINCDIR
+      BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
+
+      if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
+         echo "User boinc can't access $BOINC_DIR"
+         return 3
+      fi
+   fi
+
+   # now use procd to start boinc
+   procd_open_instance $BOINCEXE_NAME
+
+   procd_set_param command $BOINCEXE_NAME
+   procd_append_param command $BOINCEXE_OPTS
+   procd_set_param user $BOINCUSR
+   procd_set_param limits core="unlimited"
+   procd_set_param stdout 1
+   procd_set_param stderr 1
+   procd_set_param pidfile $PID_FILE
+
+   procd_close_instance
+}
diff --git a/net/boinc/files/global_prefs_override.xml b/net/boinc/files/global_prefs_override.xml
new file mode 100644 (file)
index 0000000..0554d41
--- /dev/null
@@ -0,0 +1,4 @@
+<global_preferences>
+   <max_ncpus_pct>50.000000</max_ncpus_pct>
+   <disk_interval>21600.000000</disk_interval>
+<global_preferences>
diff --git a/net/boinc/files/remote_hosts.cfg b/net/boinc/files/remote_hosts.cfg
new file mode 100644 (file)
index 0000000..943aa76
--- /dev/null
@@ -0,0 +1,8 @@
+# This file contains a list of hostnames or IP addresses (one per line)
+# of remote hosts, that are allowed to connect and to control the local
+# BOINC core client via GUI RPCs.
+# Lines beginning with a # or a ; are treated like comments and will be
+# ignored.
+#
+#host.example.com
+#192.168.0.180
index 4977d92279de3b1aa65c0cafa63e7656f1cbc64e..9691122401fbe312b8fab235ff38a17d515e6206 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.21.20
-PKG_RELEASE:=2
+PKG_VERSION:=0.21.22
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
-PKG_HASH:=422ef0a996d961f3ebc6856395f3a855b45fa0059910e878fb98281007e510e1
+PKG_HASH:=565687d1899b585350cd66b603e46e5b79affc0a0e36d96d8953c6ccc6f69ba2
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-2.0-or-later
diff --git a/sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch b/sound/mpd/patches/010-treewide-use-boost-lround-when-std-round-is-unavaila.patch
deleted file mode 100644 (file)
index 20bda35..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-From 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 2 Feb 2020 21:21:57 -0800
-Subject: [PATCH] treewide: use boost::lround when std::round is unavailable
-
-This is the case with uClibc-ng currently.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/Stats.cxx                             |  4 +--
- src/command/PlayerCommands.cxx            |  5 ++-
- src/decoder/plugins/FaadDecoderPlugin.cxx |  3 +-
- src/mixer/plugins/WinmmMixerPlugin.cxx    |  2 +-
- src/output/plugins/HaikuOutputPlugin.cxx  |  3 +-
- src/pcm/PcmMix.cxx                           |  5 ++-
- src/player/CrossFade.cxx                  |  5 ++-
- src/util/Math.hxx                         | 41 +++++++++++++++++++++++
- 8 files changed, 52 insertions(+), 16 deletions(-)
- create mode 100644 src/util/Math.hxx
-
-diff --git a/src/Stats.cxx b/src/Stats.cxx
-index 2208312d7..7467a3a17 100644
---- a/src/Stats.cxx
-+++ b/src/Stats.cxx
-@@ -29,9 +29,9 @@
- #include "system/Clock.hxx"
- #include "Log.hxx"
- #include "time/ChronoUtil.hxx"
-+#include "util/Math.hxx"
- #include <chrono>
--#include <cmath>
- #ifndef _WIN32
- /**
-@@ -121,7 +121,7 @@ stats_print(Response &r, const Partition &partition)
- #else
-                (unsigned)std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - start_time).count(),
- #endif
--               std::lround(partition.pc.GetTotalPlayTime().count()));
-+               lround(partition.pc.GetTotalPlayTime().count()));
- #ifdef ENABLE_DATABASE
-       const Database *db = partition.instance.GetDatabase();
-diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
-index 7f3b4f296..4acb8f2ad 100644
---- a/src/command/PlayerCommands.cxx
-+++ b/src/command/PlayerCommands.cxx
-@@ -34,13 +34,12 @@
- #include "util/StringBuffer.hxx"
- #include "util/ScopeExit.hxx"
- #include "util/Exception.hxx"
-+#include "util/Math.hxx"
- #ifdef ENABLE_DATABASE
- #include "db/update/Service.hxx"
- #endif
--#include <cmath>
--
- #define COMMAND_STATUS_STATE            "state"
- #define COMMAND_STATUS_REPEAT           "repeat"
- #define COMMAND_STATUS_SINGLE           "single"
-@@ -154,7 +153,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
-       if (pc.GetCrossFade() > FloatDuration::zero())
-               r.Format(COMMAND_STATUS_CROSSFADE ": %lu\n",
--                       std::lround(pc.GetCrossFade().count()));
-+                       lround(pc.GetCrossFade().count()));
-       if (pc.GetMixRampDelay() > FloatDuration::zero())
-               r.Format(COMMAND_STATUS_MIXRAMPDELAY ": %f\n",
-diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx
-index 983103e0e..e1c9576d3 100644
---- a/src/decoder/plugins/FaadDecoderPlugin.cxx
-+++ b/src/decoder/plugins/FaadDecoderPlugin.cxx
-@@ -26,11 +26,11 @@
- #include "util/ScopeExit.hxx"
- #include "util/ConstBuffer.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "Log.hxx"
- #include <neaacdec.h>
--#include <cmath>
- #include <exception>
- #include <assert.h>
-diff --git a/src/mixer/plugins/WinmmMixerPlugin.cxx b/src/mixer/plugins/WinmmMixerPlugin.cxx
-index 9661d6551..905e650ef 100644
---- a/src/mixer/plugins/WinmmMixerPlugin.cxx
-+++ b/src/mixer/plugins/WinmmMixerPlugin.cxx
-@@ -20,13 +20,13 @@
- #include "mixer/MixerInternal.hxx"
- #include "output/OutputAPI.hxx"
- #include "output/plugins/WinmmOutputPlugin.hxx"
-+#include "util/Math.hxx"
- #include <mmsystem.h>
- #include <stdexcept>
- #include <assert.h>
--#include <math.h>
- #include <windows.h>
- class WinmmMixer final : public Mixer {
-diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
-index 952fb0c2f..01240aca9 100644
---- a/src/output/plugins/HaikuOutputPlugin.cxx
-+++ b/src/output/plugins/HaikuOutputPlugin.cxx
-@@ -22,6 +22,7 @@
- #include "../OutputAPI.hxx"
- #include "mixer/MixerList.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "system/Error.hxx"
- #include "Log.hxx"
-@@ -37,8 +38,6 @@
- #include <StringList.h>
- #include <SoundPlayer.h>
--#include <cmath>
--
- #include <string.h>
- #define UTF8_PLAY "\xE2\x96\xB6"
-diff --git a/src/pcm/PcmMix.cxx b/src/pcm/PcmMix.cxx
-index 17e34b005..59179f54e 100644
---- a/src/pcm/PcmMix.cxx
-+++ b/src/pcm/PcmMix.cxx
-@@ -22,11 +22,10 @@
- #include "Clamp.hxx"
- #include "Traits.hxx"
- #include "util/Clamp.hxx"
-+#include "util/Math.hxx"
- #include "PcmDither.cxx" // including the .cxx file to get inlined templates
--#include <cmath>
--
- #include <assert.h>
- template<SampleFormat F, class Traits=SampleTraits<F>>
-@@ -225,7 +224,7 @@ pcm_mix(PcmDither &dither, void *buffer1, const void *buffer2, size_t size,
-       s = sin(M_PI_2 * portion1);
-       s *= s;
--      int vol1 = std::lround(s * PCM_VOLUME_1S);
-+      int vol1 = lround(s * PCM_VOLUME_1S);
-       vol1 = Clamp<int>(vol1, 0, PCM_VOLUME_1S);
-       return pcm_add_vol(dither, buffer1, buffer2, size,
-diff --git a/src/player/CrossFade.cxx b/src/player/CrossFade.cxx
-index ce86d3f0a..8a91516f1 100644
---- a/src/player/CrossFade.cxx
-+++ b/src/player/CrossFade.cxx
-@@ -23,10 +23,9 @@
- #include "AudioFormat.hxx"
- #include "util/NumberParser.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "Log.hxx"
--#include <cmath>
--
- #include <assert.h>
- static constexpr Domain cross_fade_domain("cross_fade");
-@@ -112,7 +111,7 @@ CrossFadeSettings::Calculate(SignedSongTime total_time,
-       if (mixramp_delay <= FloatDuration::zero() ||
-           !mixramp_start || !mixramp_prev_end) {
--              chunks = std::lround(duration / chunk_duration);
-+              chunks = lround(duration / chunk_duration);
-       } else {
-               /* Calculate mixramp overlap. */
-               const auto mixramp_overlap_current =
-diff --git a/src/util/Math.hxx b/src/util/Math.hxx
-new file mode 100644
-index 000000000..bd856f5a9
---- /dev/null
-+++ b/src/util/Math.hxx
-@@ -0,0 +1,41 @@
-+/*
-+ * Copyright (C) 2018 Max Kellermann <max.kellermann@gmail.com>
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ *
-+ * - Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ *
-+ * - Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the
-+ * distribution.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
-+ * FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-+ * OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#ifndef MATH_HXX
-+#define MATH_HXX
-+
-+#ifdef __UCLIBC__
-+#include <boost/math/special_functions/round.hpp>
-+using boost::math::lround;
-+#else
-+#include <cmath>
-+using std::lround;
-+#endif
-+
-+#endif
diff --git a/sound/mpd/patches/020-fix-incorrect-rounding.patch b/sound/mpd/patches/020-fix-incorrect-rounding.patch
deleted file mode 100644 (file)
index 80e7a6c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-From ab5183cbc45818114cc4c226ace299a1fb917ab0 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 2 Feb 2020 16:34:09 -0800
-Subject: [PATCH] [clang-tidy] fix incorrect rounding
-
-Found with bugprone-incorrect-roundings
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/decoder/plugins/WavpackDecoderPlugin.cxx | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx
-index 77751167f..97824de75 100644
---- a/src/decoder/plugins/WavpackDecoderPlugin.cxx
-+++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "fs/Path.hxx"
- #include "util/Macros.hxx"
- #include "util/Alloc.hxx"
-+#include "util/Math.hxx"
- #include "util/ScopeExit.hxx"
- #include "util/RuntimeError.hxx"
-@@ -265,8 +266,7 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek)
-               if (samples_got == 0)
-                       break;
--              int bitrate = (int)(WavpackGetInstantBitrate(wpc) / 1000 +
--                                  0.5);
-+              int bitrate = lround(WavpackGetInstantBitrate(wpc) / 1000);
-               format_samples(chunk, samples_got * audio_format.channels);
-               cmd = client.SubmitData(nullptr, chunk,
diff --git a/sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch b/sound/mpd/patches/030-volume_mapping-get-rid-of-exp10-workaround.patch
deleted file mode 100644 (file)
index efa245e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6b3250a3fb4a854d19980868ed187ca21f0e5ed8 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Mon, 3 Feb 2020 15:26:50 -0800
-Subject: [PATCH] volume_mapping: get rid of exp10 workaround
-
-exp10 is a GNU function, is not part of C++, and is not available
-everywhere.
-
-pow(10,x) is an alternative that works just as well.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/mixer/plugins/volume_mapping.c | 11 +++--------
- 1 file changed, 3 insertions(+), 8 deletions(-)
-
-diff --git a/src/mixer/plugins/volume_mapping.c b/src/mixer/plugins/volume_mapping.c
-index 61a7138af..beecce640 100644
---- a/src/mixer/plugins/volume_mapping.c
-+++ b/src/mixer/plugins/volume_mapping.c
-@@ -34,11 +34,6 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
--#ifdef __UCLIBC__
--/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
--#define exp10(x) (exp((x) * log(10)))
--#endif /* __UCLIBC__ */
--
- #define MAX_LINEAR_DB_SCALE   24
- static inline bool use_linear_dB_scale(long dBmin, long dBmax)
-@@ -111,9 +106,9 @@ static double get_normalized_volume(snd_mixer_elem_t *elem,
-       if (use_linear_dB_scale(min, max))
-               return (value - min) / (double)(max - min);
--      normalized = exp10((value - max) / 6000.0);
-+      normalized = pow(10, (value - max) / 6000.0);
-       if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
--              min_norm = exp10((min - max) / 6000.0);
-+              min_norm = pow(10, (min - max) / 6000.0);
-               normalized = (normalized - min_norm) / (1 - min_norm);
-       }
-@@ -159,7 +154,7 @@ static int set_normalized_volume(snd_mixer_elem_t *elem,
-       }
-       if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
--              min_norm = exp10((min - max) / 6000.0);
-+              min_norm = pow(10, (min - max) / 6000.0);
-               volume = volume * (1 - min_norm) + min_norm;
-       }
-       value = lrint_dir(6000.0 * log10(volume), dir) + max;
diff --git a/sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch b/sound/mpd/patches/040-treewide-get-rid-of-C-math-function-usage.patch
deleted file mode 100644 (file)
index 27cbaa3..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-From 2a8e7c50743ec6a20c7bd9c8e84ccd36d59e69ad Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Mon, 3 Feb 2020 15:50:46 -0800
-Subject: [PATCH] treewide: get rid of C math function usage
-
-Boost does not seem to offer an overload for lrint.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- src/ReplayGainGlobal.cxx                    | 2 +-
- src/ReplayGainInfo.cxx                      | 3 +--
- src/decoder/Bridge.cxx                      | 5 +++--
- src/decoder/plugins/MpcdecDecoderPlugin.cxx | 3 +--
- src/mixer/plugins/AlsaMixerPlugin.cxx       | 3 +--
- src/mixer/plugins/SoftwareMixerPlugin.cxx   | 5 +++--
- src/util/Math.hxx                           | 6 ++++++
- 7 files changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/src/ReplayGainGlobal.cxx b/src/ReplayGainGlobal.cxx
-index 741381dcb..01ba8769d 100644
---- a/src/ReplayGainGlobal.cxx
-+++ b/src/ReplayGainGlobal.cxx
-@@ -21,11 +21,11 @@
- #include "ReplayGainConfig.hxx"
- #include "config/Param.hxx"
- #include "config/Data.hxx"
-+#include "util/Math.hxx"
- #include "util/RuntimeError.hxx"
- #include <assert.h>
- #include <stdlib.h>
--#include <math.h>
- static float
- ParsePreamp(const char *s)
-diff --git a/src/ReplayGainInfo.cxx b/src/ReplayGainInfo.cxx
-index a0685507a..76713aded 100644
---- a/src/ReplayGainInfo.cxx
-+++ b/src/ReplayGainInfo.cxx
-@@ -19,8 +19,7 @@
- #include "ReplayGainInfo.hxx"
- #include "ReplayGainConfig.hxx"
--
--#include <math.h>
-+#include "util/Math.hxx"
- float
- ReplayGainTuple::CalculateScale(const ReplayGainConfig &config) const noexcept
-diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx
-index 27d1a577a..7f9ffe02d 100644
---- a/src/decoder/Bridge.cxx
-+++ b/src/decoder/Bridge.cxx
-@@ -31,11 +31,11 @@
- #include "Log.hxx"
- #include "input/InputStream.hxx"
- #include "util/ConstBuffer.hxx"
-+#include "util/Math.hxx"
- #include "util/StringBuffer.hxx"
- #include <assert.h>
- #include <string.h>
--#include <math.h>
- DecoderBridge::~DecoderBridge()
- {
-@@ -591,7 +592,7 @@ DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info) noex
-                       const auto &tuple = new_replay_gain_info->Get(rgm);
-                       const auto scale =
-                               tuple.CalculateScale(dc.replay_gain_config);
--                      dc.replay_gain_db = 20.0 * log10f(scale);
-+                      dc.replay_gain_db = 20.0 * std::log10(scale);
-               }
-               replay_gain_info = *new_replay_gain_info;
-diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-index c19aee75c..4e9ef798e 100644
---- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-+++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "util/Domain.hxx"
- #include "util/Macros.hxx"
- #include "util/Clamp.hxx"
-+#include "util/Math.hxx"
- #include "util/ScopeExit.hxx"
- #include "Log.hxx"
-@@ -33,8 +34,6 @@
- #include <exception>
--#include <math.h>
--
- struct mpc_decoder_data {
-       InputStream &is;
-       DecoderClient *client;
-diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx
-index e3d774194..4b916319b 100644
---- a/src/mixer/plugins/AlsaMixerPlugin.cxx
-+++ b/src/mixer/plugins/AlsaMixerPlugin.cxx
-@@ -26,6 +26,7 @@
- #include "event/Call.hxx"
- #include "util/ASCII.hxx"
- #include "util/Domain.hxx"
-+#include "util/Math.hxx"
- #include "util/RuntimeError.hxx"
- #include "Log.hxx"
-@@ -35,8 +36,6 @@ extern "C" {
- #include <alsa/asoundlib.h>
--#include <math.h>
--
- #define VOLUME_MIXER_ALSA_DEFAULT             "default"
- #define VOLUME_MIXER_ALSA_CONTROL_DEFAULT     "PCM"
- static constexpr unsigned VOLUME_MIXER_ALSA_INDEX_DEFAULT = 0;
-diff --git a/src/mixer/plugins/SoftwareMixerPlugin.cxx b/src/mixer/plugins/SoftwareMixerPlugin.cxx
-index c394a9628..9c48279f9 100644
---- a/src/mixer/plugins/SoftwareMixerPlugin.cxx
-+++ b/src/mixer/plugins/SoftwareMixerPlugin.cxx
-@@ -22,8 +22,9 @@
- #include "filter/plugins/VolumeFilterPlugin.hxx"
- #include "pcm/Volume.hxx"
-+#include <cmath>
-+
- #include <assert.h>
--#include <math.h>
- class SoftwareMixer final : public Mixer {
-       Filter *filter = nullptr;
-@@ -73,7 +74,7 @@ PercentVolumeToSoftwareVolume(unsigned volume) noexcept
-       if (volume >= 100)
-               return PCM_VOLUME_1;
-       else if (volume > 0)
--              return pcm_float_to_volume((exp(volume / 25.0) - 1) /
-+              return pcm_float_to_volume((std::exp(volume / 25.0) - 1) /
-                                          (54.5981500331F - 1));
-       else
-               return 0;
-diff --git a/src/util/Math.hxx b/src/util/Math.hxx
-index bd856f5a9..2206b045f 100644
---- a/src/util/Math.hxx
-+++ b/src/util/Math.hxx
-@@ -31,10 +31,16 @@
- #define MATH_HXX
- #ifdef __UCLIBC__
-+#include <boost/math/special_functions/pow.hpp>
- #include <boost/math/special_functions/round.hpp>
-+using boost::math::iround;
-+using boost::math::pow;
- using boost::math::lround;
-+#define lrint iround
- #else
- #include <cmath>
-+using std::pow;
-+using std::lrint;
- using std::lround;
- #endif
diff --git a/utils/quota/Makefile b/utils/quota/Makefile
new file mode 100644 (file)
index 0000000..a67b4eb
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=quota
+PKG_VERSION:=4.05
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/linuxquota
+PKG_HASH:=ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/quota
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:= quota
+  URL:=https://sourceforge.net/projects/linuxquota/
+endef
+
+define Package/quota/description
+  Utility for managing Linux filesystem quotas
+endef
+
+CONFIGURE_ARGS += \
+       --disable-ext2direct
+
+define Package/quota/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,quota))