Skip to content

Commit

Permalink
Add XBPS docs (#1192)
Browse files Browse the repository at this point in the history
Co-authored-by: Archie <[email protected]>
  • Loading branch information
JuniorSuperTux and Jaskowicz1 authored Jul 8, 2024
1 parent 4a5a270 commit a439d69
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
"tparam",
"khanda",
"oclock",
"moai"
"moai",
"xbps"
],
"flagWords": [
"hte"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
[![D++ CI](https://github.com/brainboxdotcc/DPP/actions/workflows/ci.yml/badge.svg)](https://github.com/brainboxdotcc/DPP/actions/workflows/ci.yml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/brainboxdotcc/DPP/badge)](https://securityscorecards.dev/viewer/?uri=github.com/brainboxdotcc/DPP)
[![AUR version](https://img.shields.io/aur/version/dpp)](https://aur.archlinux.org/packages/dpp)
[![XBPS version](https://repology.org/badge/version-for-repo/void_x86_64/dpp-discord.svg?header=xbps)](https://github.com/void-linux/void-packages/blob/master/srcpkgs/dpp/template)
![vcpkg version](https://img.shields.io/vcpkg/v/dpp)
[![Homebrew version](https://img.shields.io/homebrew/v/libdpp)](https://formulae.brew.sh/formula/libdpp#default)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
Expand Down
1 change: 1 addition & 0 deletions docpages/03_installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ There are many ways to install D++, either from a package manager, or from sourc
* \subpage install-linux-rpm
* \subpage install-vcpkg
* \subpage install-arch-aur
* \subpage install-void-xbps
* \subpage install-windows-vs-zip
* \subpage install-xmake
* \subpage install-brew
Expand Down
43 changes: 43 additions & 0 deletions docpages/install/install-void-xbps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
\page install-void-xbps Installing from XBPS (Void Linux)

To install [D++ from XBPS source packages collection](https://github.com/void-linux/void-packages/blob/master/srcpkgs/dpp/template), follow the step below (as root):

```bash
xbps-install -Sy dpp-devel
```

This will install D++ development files and related libraries


You will now be able to use D++ by including its library on the command line:

```bash
g++ mybot.cpp -o mybot -ldpp
```

\include{doc} install_prebuilt_footer.dox

To build D++ with coroutine support as an XBPS package, follow the steps below. Ensure that [xbps-src is set up](https://github.com/void-linux/void-packages?tab=readme-ov-file#quick-start) beforehand:

```bash
# Inside the void-packages root folder
git checkout master && git pull
# Modifies the configure arguments to include coroutine support (-DDPP_CORO=ON)
grep -q 'configure_args=.*-DDPP_CORO=ON' srcpkgs/dpp/template || sed -i -e 's/\(configure_args="[^"]*\)"/\1 -DDPP_CORO=ON"/' srcpkgs/dpp/template
./xbps-src -K pkg dpp
```

Then as root:
```bash
# Inside the void-packages root folder
xbps-install --repository hostdir/binpkgs dpp-devel
```

This will do the following three things:
- Update the void-packages repository to the latest commit on master
- Patch the template file of D++ to enable coroutine support
- Build an XBPS package for D++ and install it

\note Cloning the void-packages repository may take some time

\include{doc} coro_warn.dox

0 comments on commit a439d69

Please sign in to comment.