Merge pull request #119046 from eduardosm/amule
amule: unbreak (except daemon), unstable-20201006 -> 2.3.3, use cmake
This commit is contained in:
commit
b50d86446a
|
@ -2,53 +2,46 @@
|
||||||
, enableDaemon ? false # build amule daemon
|
, enableDaemon ? false # build amule daemon
|
||||||
, httpServer ? false # build web interface for the daemon
|
, httpServer ? false # build web interface for the daemon
|
||||||
, client ? false # build amule remote gui
|
, client ? false # build amule remote gui
|
||||||
, fetchFromGitHub, stdenv, lib, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng
|
, fetchFromGitHub
|
||||||
, autoreconfHook, pkg-config, makeWrapper, libX11 }:
|
, stdenv
|
||||||
|
, lib
|
||||||
|
, cmake
|
||||||
|
, zlib
|
||||||
|
, wxGTK
|
||||||
|
, perl
|
||||||
|
, cryptopp
|
||||||
|
, libupnp
|
||||||
|
, gettext
|
||||||
|
, libpng
|
||||||
|
, autoreconfHook
|
||||||
|
, pkg-config
|
||||||
|
, makeWrapper
|
||||||
|
, libX11
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "amule";
|
pname = "amule";
|
||||||
version = "unstable-20201006";
|
version = "2.3.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "amule-project";
|
owner = "amule-project";
|
||||||
repo = "amule";
|
repo = "amule";
|
||||||
rev = "6f8951527eda670c7266984ce476061bfe8867fc";
|
rev = version;
|
||||||
sha256 = "12b44b6hz3mb7nsn6xhzvm726xs06xcim013i1appif4dr8njbx1";
|
sha256 = "1nm4vxgmisn1b6l3drmz0q04x067j2i8lw5rnf0acaapwlp8qwvi";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [ cmake gettext makeWrapper pkg-config ];
|
||||||
substituteInPlace src/libs/ec/file_generator.pl \
|
|
||||||
--replace /usr/bin/perl ${perl}/bin/perl
|
|
||||||
|
|
||||||
# autotools expects these to be in the root
|
|
||||||
cp docs/{AUTHORS,README} .
|
|
||||||
cp docs/Changelog ./ChangeLog
|
|
||||||
cp docs/Changelog ./NEWS
|
|
||||||
'';
|
|
||||||
|
|
||||||
preAutoreconf = ''
|
|
||||||
pushd src/pixmaps/flags_xpm >/dev/null
|
|
||||||
./makeflags.sh
|
|
||||||
popd >/dev/null
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkg-config ];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
zlib wxGTK perl cryptopp libupnp
|
zlib wxGTK perl cryptopp.dev libupnp
|
||||||
] ++ lib.optional httpServer libpng
|
] ++ lib.optional httpServer libpng
|
||||||
++ lib.optional client libX11;
|
++ lib.optional client libX11;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
cmakeFlags = [
|
||||||
|
"-DBUILD_MONOLITHIC=${if monolithic then "ON" else "OFF"}"
|
||||||
configureFlags = [
|
"-DBUILD_DAEMON=${if enableDaemon then "ON" else "OFF"}"
|
||||||
"--with-crypto-prefix=${cryptopp}"
|
"-DBUILD_REMOTEGUI=${if client then "ON" else "OFF"}"
|
||||||
"--disable-debug"
|
"-DBUILD_WEBSERVER=${if httpServer then "ON" else "OFF"}"
|
||||||
"--enable-optimize"
|
|
||||||
(lib.enableFeature monolithic "monolithic")
|
|
||||||
(lib.enableFeature enableDaemon "amule-daemon")
|
|
||||||
(lib.enableFeature client "amule-gui")
|
|
||||||
(lib.enableFeature httpServer "webserver")
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# aMule will try to `dlopen' libupnp and libixml, so help it
|
# aMule will try to `dlopen' libupnp and libixml, so help it
|
||||||
|
@ -75,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ phreedom ];
|
maintainers = with maintainers; [ phreedom ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
# Could not find crypto++ installation or sources.
|
# cmake fails: Cannot specify link libraries for target "wxWidgets::ADV" which is not built by this project.
|
||||||
broken = true;
|
broken = enableDaemon;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue