Skip to content

Commit

Permalink
ci: install crypto++
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Aug 27, 2024
1 parent 6b2cb58 commit 6e17d8f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,27 @@ jobs:
with:
ocaml-compiler: ${{ matrix.ocaml-version }}

- run: sudo apt install libcrypto++-dev libminiupnpc-dev libnatpmp-dev libgd-dev
if: matrix.os == 'ubuntu-latest'

- run: brew install cryptopp miniupnpc libnatpmp gd
if: matrix.os == 'macos-latest'

- run: |
echo "C_INCLUDE_PATH=$HOMEBREW_PREFIX/include:$C_INCLUDE_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
# https://cygwin.com/packages/ doesn't have cryptopp and many other packages
# I guess should build with mingw?
- 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"
if: matrix.os == 'windows-latest'

- run: |
echo $CPATH
echo $C_INCLUDE_PATH
echo $LIBRARY_PATH
- run: opam pin add mldonkey.dev . --no-action

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

- run: opam exec -- make

Expand Down
7 changes: 5 additions & 2 deletions mldonkey.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ Supported networks include:
* HTTP/FTP
MLdonkey core runs as a background daemon and provides several control
interfaces : telnet, web, and binary protocol for third party GUIs."""
maintainer: "ygrek@autistici.org"
maintainer: "root@ygrek.org"
authors: "mldonkey team"
license: "GPL-2.0-only"
homepage: "http://github.com/ygrek/mldonkey"
dev-repo: "git+https://github.com/ygrek/mldonkey.git"
bug-reports: "https://github.com/ygrek/mldonkey/issues"
# mldonkey has many optional components (most of which depend on system libraries),
# this set of dependencies here represents one arbitrary selection
depends: [
"ocaml" {>= "4.03.0"}
"camlp4"
"conf-gd" {optional} # graphical stats
"conf-m4"
"conf-zlib"
"num"
"num" # technically optional, enables bittorrent
]
build: [
["./configure" "--enable-debug" "--prefix" prefix]
Expand Down
8 changes: 4 additions & 4 deletions src/utils/lib/CryptoPP.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <crypto++/rsa.h>
#include <crypto++/osrng.h>
#include <crypto++/base64.h>
#include <crypto++/cryptlib.h>
#include <cryptopp/rsa.h>
#include <cryptopp/osrng.h>
#include <cryptopp/base64.h>
#include <cryptopp/cryptlib.h>

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

Expand Down

0 comments on commit 6e17d8f

Please sign in to comment.