Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit c296ac1
Merge: 9a1e760 091c30a
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:29:57 2023 +0200

    Merge pull request aristocratos#590 from nobounce/dangling-reference-config

    Convert parameters and config keys to std::string_view

commit 9a1e760
Merge: 9c8af4d 22e64ca
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:20:18 2023 +0200

    Merge pull request aristocratos#602 from jfouquart/main

    Fix getting zfs pool name with '.' char in freebsd

commit 9c8af4d
Merge: 8a49d8c 2217cbe
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:18:55 2023 +0200

    Merge pull request aristocratos#601 from joske/cleanup

    [macos] don't check /sys on macos

commit 8a49d8c
Merge: 1556388 008fcd8
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:18:07 2023 +0200

    Merge pull request aristocratos#600 from joske/makefile

    [macos/freebsd] support gcc13

commit 1556388
Merge: 1b126f5 d17e1a2
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:14:00 2023 +0200

    Merge pull request aristocratos#599 from joske/main

    [macos] fix temp sensor on system with many cores

commit d17e1a2
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Fri Aug 25 16:18:39 2023 +0200

    fix some warnings

commit 4d8aa6b
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Fri Aug 25 15:52:58 2023 +0200

    fix core check

commit 22e64ca
Author: Jonathan Fouquart <jfouquart@hotmail.fr>
Date:   Fri Aug 25 09:37:49 2023 +0200

    Fix getting zfs pool name with '.' char in freebsd

commit 2217cbe
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 16:01:04 2023 +0200

    [macos] don't check /sys on macos

commit 008fcd8
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 16:05:00 2023 +0200

    also add g++13

commit 0fdca5e
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 15:54:07 2023 +0200

    support gcc13

commit dcbdb73
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 15:46:47 2023 +0200

    [macos] fix temp sensor on system with many cores

commit 1b126f5
Author: aristocratos <gnmjpl@gmail.com>
Date:   Fri Aug 4 01:08:27 2023 +0200

    Update Makefile for partial static compilation on freebsd

commit c8ec6bb
Author: aristocratos <gnmjpl@gmail.com>
Date:   Thu Aug 3 23:08:33 2023 +0200

    Fix freebsd nullptr changes and makefile for gcc12 and newer

commit 8a33aab
Merge: 94e5c02 e4abcef
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sun Jul 30 13:21:48 2023 +0200

    Merge pull request aristocratos#539 from nobounce/replace-NULL-nullptr

    Modernize using nullptr.

commit 94e5c02
Author: aristocratos <gnmjpl@gmail.com>
Date:   Thu Jul 27 20:51:21 2023 +0200

    Better text editing

commit 091c30a
Author: nobounce <steffen.winter@proton.me>
Date:   Thu Jul 27 14:17:54 2023 +0200

    Convert parameters and config keys to std::string_view

    Using std::string_view instead of std::string& silences a new warning
    from GCC 13, -Wdangling-reference

    Also switch return type of `getI` from int& to int, trivial types are
    cheaper to copy by value

commit e4abcef
Author: nobounce <steffen.winter@proton.me>
Date:   Wed Jul 26 16:19:17 2023 +0200

    Use nullptr instead of NULL.

    See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
    TLDR: NULL is of type int and relies on proper implicit pointer
    conversion which may lead to issues when using overloaded functions

    It is also considered a 'best practise' for modern C++ and
    conveys the programmers intention more precisly.

commit d53307f
Author: nobounce <steffen.winter@proton.me>
Date:   Sun Jul 23 19:53:36 2023 +0200

    Fix path to Linux CI file in itself

    The CI file has a list of dependent files including itself. The path was
    not updated when the CI was split into different files

commit 594f42b
Merge: aca2e4b 53d6eba
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Jul 26 15:38:01 2023 +0200

    Merge pull request aristocratos#584 from nobounce/nb/fix-ci-path

    Fix path to Linux CI file in itself

commit aca2e4b
Author: aristocratos <gnmjpl@gmail.com>
Date:   Wed Jul 26 14:38:48 2023 +0200

    Fix whitespace indent -> tab indent

commit 33faa01
Author: aristocratos <gnmjpl@gmail.com>
Date:   Wed Jul 26 14:34:15 2023 +0200

    Revert fmt submodule to static fmt folder in include

commit 53d6eba
Author: nobounce <steffen.winter@proton.me>
Date:   Sun Jul 23 19:53:36 2023 +0200

    Fix path to Linux CI file in itself

    The CI file has a list of dependent files including itself. The path was
    not updated when the CI was split into different files
  • Loading branch information
aristocratos committed Aug 26, 2023
1 parent 346c9e4 commit bd5d697
Show file tree
Hide file tree
Showing 41 changed files with 16,537 additions and 790 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- '!src/freebsd/**'
- 'include/**'
- 'Makefile'
- '.github/workflows/continuous-build.yml'
- '.github/workflows/continuous-build-linux.yml'
pull_request:
branches:
- main
Expand All @@ -23,7 +23,7 @@ on:
- '!src/freebsd/**'
- 'include/**'
- 'Makefile'
- '.github/workflows/continuous-build.yml'
- '.github/workflows/continuous-build-linux.yml'

jobs:
static-build:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "lib/fmt"]
path = lib/fmt
url = https://github.com/fmtlib/fmt
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ ifeq ($(CXX_IS_CLANG),true)
endif
ifeq ($(CLANG_WORKS),false)
#? Try to find a newer GCC version
ifeq ($(shell command -v g++-12 >/dev/null; echo $$?),0)
ifeq ($(shell command -v g++-13 >/dev/null; echo $$?),0)
CXX := g++-13
else ifeq ($(shell command -v g++13 >/dev/null; echo $$?),0)
CXX := g++13
else ifeq ($(shell command -v g++-12 >/dev/null; echo $$?),0)
CXX := g++-12
else ifeq ($(shell command -v g++12 >/dev/null; echo $$?),0)
CXX := g++12
Expand Down Expand Up @@ -89,15 +93,17 @@ ifneq ($(PLATFORM) $(ARCH),macos arm64)
endif

ifeq ($(STATIC),true)
ifeq ($(CXX_IS_CLANG),true)
ifeq ($(CXX_IS_CLANG) $(CLANG_WORKS),true true)
ifeq ($(shell $(CXX) -print-target-triple | grep gnu >/dev/null; echo $$?),0)
$(error $(shell printf "\033[1;91mERROR: \033[97m$(CXX) can't statically link glibc\033[0m"))
endif
else
override ADDFLAGS += -static-libgcc -static-libstdc++
endif
ifneq ($(PLATFORM),macos)
ifeq ($(PLATFORM_LC),linux)
override ADDFLAGS += -DSTATIC_BUILD -static -Wl,--fatal-warnings
else ifeq ($(PLATFORM_LC),freebsd)
override ADDFLAGS += -DSTATIC_BUILD
endif
endif

Expand All @@ -120,7 +126,10 @@ else ifeq ($(PLATFORM_LC),freebsd)
PLATFORM_DIR := freebsd
THREADS := $(shell getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
SU_GROUP := wheel
override ADDFLAGS += -lstdc++ -lm -lkvm -ldevstat -Wl,-rpath=/usr/local/lib/gcc11
override ADDFLAGS += -lm -lkvm -ldevstat -Wl,-rpath=/usr/local/lib/gcc$(CXX_VERSION_MAJOR)
ifneq ($(STATIC),true)
override ADDFLAGS += -lstdc++
endif
export MAKE = gmake
else ifeq ($(PLATFORM_LC),macos)
PLATFORM_DIR := osx
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If you want to help out, test for bugs/fix bugs or just try out the branches:
```bash
# Install and use Homebrew or MacPorts package managers for easy dependency installation
brew install coreutils make gcc@11
git clone --recursive https://github.com/aristocratos/btop.git
git clone https://github.com/aristocratos/btop.git
cd btop
git checkout OSX
gmake
Expand All @@ -84,7 +84,7 @@ gmake
**FreeBSD**
```bash
sudo pkg install gmake gcc11 coreutils git
git clone --recursive https://github.com/aristocratos/btop.git
git clone https://github.com/aristocratos/btop.git
cd btop
git checkout freebsd
gmake
Expand Down Expand Up @@ -323,7 +323,7 @@ Also needs a UTF8 locale and a font that covers:
2. **Clone repository**
```bash
git clone --recursive https://github.com/aristocratos/btop.git
git clone https://github.com/aristocratos/btop.git
cd btop
```
Expand Down Expand Up @@ -404,7 +404,7 @@ Also needs a UTF8 locale and a font that covers:
## Compilation macOS OSX
Needs GCC 10 or higher, (GCC 11 or above strongly recommended for better CPU efficiency in the compiled binary).
GCC 12 needed for macOS Ventura. If you get linker errors on Ventura you'll need to upgrade your command line tools (Version 14.0) is bugged.

The makefile also needs GNU coreutils and `sed`.
Expand All @@ -420,14 +420,14 @@ Also needs a UTF8 locale and a font that covers:
2. **Clone repository**

```bash
git clone --recursive https://github.com/aristocratos/btop.git
git clone https://github.com/aristocratos/btop.git
cd btop
```

3. **Compile**

Append `VERBOSE=true` to display full compiler/linker commands.

Append `STATIC=true` for static compilation (only libgcc and libstdc++ will be static!).

Append `QUIET=true` for less verbose output.
Expand Down Expand Up @@ -506,14 +506,16 @@ Also needs a UTF8 locale and a font that covers:
2. **Clone repository**

```bash
git clone --recursive https://github.com/aristocratos/btop.git
git clone https://github.com/aristocratos/btop.git
cd btop
```

3. **Compile**

Append `VERBOSE=true` to display full compiler/linker commands.

Append `STATIC=true` for static compilation (only libgcc and libstdc++ will be static!).

Append `QUIET=true` for less verbose output.

Append `STRIP=true` to force stripping of debug symbols (adds `-s` linker flag).
Expand Down Expand Up @@ -620,7 +622,7 @@ Also needs a UTF8 locale and a font that covers:

```bash
sudo snap connect btop:removable-media
or
or
sudo snap connect btop-desktop:removable-media
```

Expand Down
27 changes: 27 additions & 0 deletions include/fmt/LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--- Optional exception to the license ---

As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into a machine-executable object form of such
source code, you may redistribute such embedded portions in such object form
without including the above copyright and permission notices.
Loading

0 comments on commit bd5d697

Please sign in to comment.