Compare commits
24 Commits
upstream/0
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
835eb89d6f | |
|
|
642d037adf | |
|
|
b248a86df8 | |
|
|
4daf58d97b | |
|
|
24ab61ee7a | |
|
|
3ac57b2e12 | |
|
|
b698a62577 | |
|
|
4c36534103 | |
|
|
3166b44dd9 | |
|
|
b15154c97a | |
|
|
a421d8d58e | |
|
|
0a919de9a0 | |
|
|
52f44cdcd1 | |
|
|
a2ebf2d72c | |
|
|
7c56c6be50 | |
|
|
bd499a2f7e | |
|
|
9e75db5628 | |
|
|
0fc6e13551 | |
|
|
0476baba1c | |
|
|
cbea120c84 | |
|
|
9ba88dcb63 | |
|
|
1495e96619 | |
|
|
cca964467a | |
|
|
d0a007a21d |
|
|
@ -50,7 +50,7 @@ target_include_directories(
|
|||
PUBLIC "./include"
|
||||
PRIVATE "./src")
|
||||
set_target_properties(hyprutils PROPERTIES VERSION ${hyprutils_VERSION}
|
||||
SOVERSION 5)
|
||||
SOVERSION 4)
|
||||
target_link_libraries(hyprutils PkgConfig::deps)
|
||||
|
||||
# tests
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
hyprutils (0.5.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version 0.5.1
|
||||
|
||||
-- Alan M Varghese (NyxTrail) <alan@digistorm.in> Sun, 02 Mar 2025 09:47:24 +0000
|
||||
|
||||
hyprutils (0.2.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version 0.2.3
|
||||
* Incorporate changes for upstream soversion update
|
||||
* Update Standards version to 4.7.0
|
||||
|
||||
-- Alan M Varghese (NyxTrail) <alan@digistorm.in> Fri, 11 Oct 2024 06:36:56 +0000
|
||||
|
||||
hyprutils (0.1.5-1) unstable; urgency=medium
|
||||
|
||||
* Initial release. (Closes: #1073158)
|
||||
|
||||
-- Alan M Varghese (NyxTrail) <alan@digistorm.in> Mon, 01 Jul 2024 05:30:04 +0000
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
Source: hyprutils
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Alan M Varghese (NyxTrail) <alan@digistorm.in>
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends:
|
||||
debhelper-compat (= 13),
|
||||
cmake,
|
||||
libpixman-1-dev,
|
||||
pkgconf,
|
||||
Standards-Version: 4.7.2
|
||||
Homepage: https://github.com/hyprwm/hyprutils
|
||||
Vcs-Browser: https://salsa.debian.org/NyxTrail/hyprutils
|
||||
Vcs-Git: https://salsa.debian.org/NyxTrail/hyprutils.git
|
||||
|
||||
Package: libhyprutils-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends:
|
||||
libhyprutils4 (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
Description: Utilities used across the Hyprland ecosystem (development files)
|
||||
Hyprutils is a small C++ library for utilities used across the Hyprland
|
||||
window manager ecosystem.
|
||||
.
|
||||
This package contains the development files.
|
||||
|
||||
Package: libhyprutils4
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends:
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: Utilities used across the Hyprland ecosystem (library)
|
||||
Hyprutils is a small C++ library for utilities used across the Hyprland
|
||||
window manager ecosystem.
|
||||
.
|
||||
This package contains the binary shared library.
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: https://github.com/hyprwm/hyprutils
|
||||
Upstream-Name: hyprutils
|
||||
Upstream-Contact: vaxerski <vaxry@vaxry.net>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright:
|
||||
2024-2025 Hypr Development
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files:
|
||||
debian/*
|
||||
Copyright:
|
||||
2024-2025 Alan M Varghese (NyxTrail) <alan@digistorm.in>
|
||||
License: BSD-3-Clause
|
||||
|
||||
License: BSD-3-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
.
|
||||
2. 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.
|
||||
.
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
.
|
||||
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 COPYRIGHT HOLDER 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.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[DEFAULT]
|
||||
debian-branch = debian/latest
|
||||
upstream-branch = upstream/latest
|
||||
pristine-tar = True
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
usr/lib
|
||||
usr/include
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
usr/include/*
|
||||
usr/lib/*/lib*.so
|
||||
usr/lib/*/pkgconfig/*
|
||||
|
|
@ -0,0 +1 @@
|
|||
usr/lib
|
||||
|
|
@ -0,0 +1 @@
|
|||
usr/lib/*/lib*.so.*
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
ifeq ($(DEB_HOST_ARCH),i386)
|
||||
export DEB_CXXFLAGS_MAINT_APPEND += -ffloat-store
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
|
||||
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Bug-Database: https://github.com/hyprwm/hyprutils/issues
|
||||
Bug-Submit: https://github.com/hyprwm/hyprutils/issues/new
|
||||
Repository-Browse: https://github.com/hyprwm/hyprutils
|
||||
Repository: https://github.com/hyprwm/hyprutils.git
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
version=4
|
||||
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \
|
||||
https://github.com/hyprwm/hyprutils/tags \
|
||||
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz
|
||||
|
|
@ -144,7 +144,7 @@ namespace Hyprutils {
|
|||
Impl_::impl_base* impl_ = nullptr;
|
||||
|
||||
private:
|
||||
/*
|
||||
/*
|
||||
no-op if there is no impl_
|
||||
may delete the stored object if ref == 0
|
||||
may delete and reset impl_ if ref == 0 and weak == 0
|
||||
|
|
@ -167,7 +167,7 @@ namespace Hyprutils {
|
|||
impl_->inc();
|
||||
}
|
||||
|
||||
/* destroy the pointed-to object
|
||||
/* destroy the pointed-to object
|
||||
if able, will also destroy impl */
|
||||
void destroyImpl() {
|
||||
// destroy the impl contents
|
||||
|
|
@ -185,11 +185,6 @@ namespace Hyprutils {
|
|||
static CSharedPointer<U> makeShared(Args&&... args) {
|
||||
return CSharedPointer<U>(new U(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
CSharedPointer<T> reinterpretPointerCast(const CSharedPointer<U>& ref) {
|
||||
return CSharedPointer<T>(ref.impl_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,6 @@ namespace Hyprutils {
|
|||
|
||||
void addEnv(const std::string& name, const std::string& value);
|
||||
|
||||
// only for async, sync doesn't make sense
|
||||
void setStdoutFD(int fd);
|
||||
// only for async, sync doesn't make sense
|
||||
void setStderrFD(int fd);
|
||||
|
||||
/* Run the process, synchronously, get the stdout and stderr. False on fail */
|
||||
bool runSync();
|
||||
|
||||
|
|
@ -36,7 +31,6 @@ namespace Hyprutils {
|
|||
std::vector<std::string> args;
|
||||
std::vector<std::pair<std::string, std::string>> env;
|
||||
pid_t grandchildPid = 0;
|
||||
int stdoutFD = -1, stderrFD = -1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -5,9 +5,6 @@
|
|||
using namespace Hyprutils::Animation;
|
||||
using namespace Hyprutils::Memory;
|
||||
|
||||
static const std::string DEFAULTBEZIERNAME = "default";
|
||||
static const std::string DEFAULTSTYLE = "";
|
||||
|
||||
#define SP CSharedPointer
|
||||
#define WP CWeakPointer
|
||||
|
||||
|
|
@ -46,6 +43,8 @@ bool Hyprutils::Animation::CBaseAnimatedVariable::enabled() const {
|
|||
}
|
||||
|
||||
const std::string& CBaseAnimatedVariable::getBezierName() const {
|
||||
static constexpr const std::string DEFAULTBEZIERNAME = "default";
|
||||
|
||||
if (const auto PCONFIG = m_pConfig.lock()) {
|
||||
const auto PVALUES = PCONFIG->pValues.lock();
|
||||
return PVALUES ? PVALUES->internalBezier : DEFAULTBEZIERNAME;
|
||||
|
|
@ -55,6 +54,8 @@ const std::string& CBaseAnimatedVariable::getBezierName() const {
|
|||
}
|
||||
|
||||
const std::string& CBaseAnimatedVariable::getStyle() const {
|
||||
static constexpr const std::string DEFAULTSTYLE = "";
|
||||
|
||||
if (const auto PCONFIG = m_pConfig.lock()) {
|
||||
const auto PVALUES = PCONFIG->pValues.lock();
|
||||
return PVALUES ? PVALUES->internalStyle : DEFAULTSTYLE;
|
||||
|
|
|
|||
|
|
@ -189,11 +189,6 @@ bool Hyprutils::OS::CProcess::runAsync() {
|
|||
|
||||
argsC.emplace_back(nullptr);
|
||||
|
||||
if (stdoutFD != -1)
|
||||
dup2(stdoutFD, 1);
|
||||
if (stderrFD != -1)
|
||||
dup2(stderrFD, 2);
|
||||
|
||||
execvp(binary.c_str(), (char* const*)argsC.data());
|
||||
_exit(0);
|
||||
}
|
||||
|
|
@ -235,11 +230,3 @@ const std::string& Hyprutils::OS::CProcess::stdErr() {
|
|||
const pid_t Hyprutils::OS::CProcess::pid() {
|
||||
return grandchildPid;
|
||||
}
|
||||
|
||||
void Hyprutils::OS::CProcess::setStdoutFD(int fd) {
|
||||
stdoutFD = fd;
|
||||
}
|
||||
|
||||
void Hyprutils::OS::CProcess::setStderrFD(int fd) {
|
||||
stderrFD = fd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using namespace Hyprutils::Memory;
|
|||
|
||||
int main(int argc, char** argv, char** envp) {
|
||||
SP<int> intPtr = makeShared<int>(10);
|
||||
SP<int> intPtr2 = makeShared<int>(-1337);
|
||||
SP<int> intPtr2 = makeShared<int>(1337);
|
||||
UP<int> intUnique = makeUnique<int>(420);
|
||||
|
||||
int ret = 0;
|
||||
|
|
@ -52,15 +52,5 @@ int main(int argc, char** argv, char** envp) {
|
|||
EXPECT(weak.expired(), true);
|
||||
EXPECT(weakUnique.expired(), true);
|
||||
|
||||
auto intPtr2AsUint = reinterpretPointerCast<unsigned int>(intPtr2);
|
||||
EXPECT(intPtr2.strongRef(), 4);
|
||||
EXPECT(intPtr2AsUint.strongRef(), 4);
|
||||
|
||||
EXPECT(*intPtr2AsUint > 0, true);
|
||||
EXPECT(*intPtr2AsUint, (unsigned int)(int)-1337);
|
||||
*intPtr2AsUint = 10;
|
||||
EXPECT(*intPtr2AsUint, 10);
|
||||
EXPECT(*intPtr2, 10);
|
||||
|
||||
return ret;
|
||||
}
|
||||
Loading…
Reference in New Issue