Skip to content

Commit 6e17d8f

Browse files
committed
ci: install crypto++
1 parent 6b2cb58 commit 6e17d8f

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.github/workflows/workflow.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@ jobs:
4949
with:
5050
ocaml-compiler: ${{ matrix.ocaml-version }}
5151

52+
- run: sudo apt install libcrypto++-dev libminiupnpc-dev libnatpmp-dev libgd-dev
53+
if: matrix.os == 'ubuntu-latest'
54+
55+
- run: brew install cryptopp miniupnpc libnatpmp gd
56+
if: matrix.os == 'macos-latest'
57+
58+
- run: |
59+
echo "C_INCLUDE_PATH=$HOMEBREW_PREFIX/include:$C_INCLUDE_PATH" >> $GITHUB_ENV
60+
echo "LIBRARY_PATH=$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
61+
if: matrix.os == 'macos-latest'
62+
63+
# https://cygwin.com/packages/ doesn't have cryptopp and many other packages
64+
# I guess should build with mingw?
65+
- run: D:\\cygwin\\setup-x86_64.exe "--root" "D:\\cygwin" "--quiet-mode" "unattended" "--no-shortcuts" "--no-startmenu" "--no-desktop" "--no-admin" "--no-version-check" "--no-write-registry" "--packages" "mingw64-x86_64-gd"
66+
if: matrix.os == 'windows-latest'
67+
68+
- run: |
69+
echo $CPATH
70+
echo $C_INCLUDE_PATH
71+
echo $LIBRARY_PATH
72+
5273
- run: opam pin add mldonkey.dev . --no-action
5374

5475
# not needed, opam install will do it automatically
@@ -59,7 +80,7 @@ jobs:
5980
# https://github.com/ocaml/setup-ocaml/issues/815#issuecomment-2204838759
6081
# SHELLOPTS workaround for windows
6182
# setting SHELLOPTS via GITHUB_ENV didn't work for some reason
62-
- run: opam exec -- env SHELLOPTS=igncr sh ./configure --enable-debug
83+
- run: opam exec -- env SHELLOPTS=igncr sh ./configure --enable-debug --enable-upnp-natpmp
6384

6485
- run: opam exec -- make
6586

mldonkey.opam

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ Supported networks include:
99
* HTTP/FTP
1010
MLdonkey core runs as a background daemon and provides several control
1111
interfaces : telnet, web, and binary protocol for third party GUIs."""
12-
maintainer: "ygrek@autistici.org"
12+
maintainer: "root@ygrek.org"
1313
authors: "mldonkey team"
1414
license: "GPL-2.0-only"
1515
homepage: "http://github.com/ygrek/mldonkey"
1616
dev-repo: "git+https://github.com/ygrek/mldonkey.git"
1717
bug-reports: "https://github.com/ygrek/mldonkey/issues"
18+
# mldonkey has many optional components (most of which depend on system libraries),
19+
# this set of dependencies here represents one arbitrary selection
1820
depends: [
1921
"ocaml" {>= "4.03.0"}
2022
"camlp4"
23+
"conf-gd" {optional} # graphical stats
2124
"conf-m4"
2225
"conf-zlib"
23-
"num"
26+
"num" # technically optional, enables bittorrent
2427
]
2528
build: [
2629
["./configure" "--enable-debug" "--prefix" prefix]

src/utils/lib/CryptoPP.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include <crypto++/rsa.h>
2-
#include <crypto++/osrng.h>
3-
#include <crypto++/base64.h>
4-
#include <crypto++/cryptlib.h>
1+
#include <cryptopp/rsa.h>
2+
#include <cryptopp/osrng.h>
3+
#include <cryptopp/base64.h>
4+
#include <cryptopp/cryptlib.h>
55

66
// Standard stuff from other gpl clients, external for mldonkey.
77

0 commit comments

Comments
 (0)