Commit 1665c641 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui Committed by Felix Häcker

Bundle libtranmission in the flatpak manifest

parent ca75f18e
[submodule "submodules/transmission"]
path = submodules/transmission
url = https://github.com/transmission/transmission.git
#!/bin/bash
cd submodules
echo "Generate libtransmission build files..."
cmake -Blibtransmission -Htransmission -DINSTALL_LIB=ON -DENABLE_DAEMON=OFF -DENABLE_UTILS=OFF -DENABLE_TESTS=OFF -DENABLE_GTK=OFF -DENABLE_QT=OFF -DINSTALL_DOC=OFF
echo "Build libtransmission..."
cd libtransmission
make
\ No newline at end of file
......@@ -31,12 +31,78 @@
],
"modules" : [
{
"name" : "libevent",
"sources" : [
"name": "libtransmission",
"buildsystem": "cmake-ninja",
"config-opts":[
"-DINSTALL_LIB=ON",
"-DENABLE_DAEMON=OFF",
"-DENABLE_UTILS=OFF",
"-DENABLE_TESTS=OFF",
"-DENABLE_GTK=OFF",
"-DENABLE_QT=OFF",
"-DINSTALL_DOC=OFF"
],
"sources": [{
"type": "git",
"url": "https://github.com/transmission/transmission.git",
"commit": "3d9fd25269ccfc1dacf9c5cd23a3d232e0085150"
}],
"modules": [
{
"type" : "git",
"url" : "https://github.com/libevent/libevent",
"branch" : "release-2.1.8-stable"
"name": "libnatpmp",
"buildsystem": "cmake-ninja",
"sources": [{
"type": "git",
"url": "https://github.com/transmission/libnatpmp",
"commit": "4d3b9d87bbe7549830c212ce840600619abcf887"
}]
},
{
"name": "libevent",
"sources": [
{
"type": "archive",
"url": "https://github.com/transmission/libevent/archive/release-2.1.8-stable.tar.gz",
"sha256": "316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d"
}
]
},
{
"name": "libb64",
"buildsystem": "cmake-ninja",
"sources": [{
"type": "git",
"url": "https://github.com/transmission/libb64",
"commit": "8456a5b5c99ef4544a2ed8e8f20a2fb673dd4192"
}]
},
{
"name": "dht",
"buildsystem": "cmake-ninja",
"sources": [{
"type": "git",
"url": "https://github.com/transmission/dht",
"commit": "25e12bb39eea3d433602de6390796fec8a8f3620"
}]
},
{
"name": "miniupnpc",
"buildsystem": "cmake-ninja",
"sources": [{
"type": "git",
"url": "https://github.com/transmission/miniupnpc",
"commit": "e37cde82e8673a5e71bae43086828704fd5eeac1"
}]
},
{
"name": "libutp",
"buildsystem": "cmake-ninja",
"sources": [{
"type": "git",
"url": "https://github.com/transmission/libutp",
"commit": "fda9f4b3db97ccb243fcbed2ce280eb4135d705b"
}]
}
]
},
......
......@@ -5,15 +5,6 @@ project(
meson_version: '>= 0.40.0'
)
message('Build libtransmission. Please wait, this will take a moment…')
build = run_command('sh', 'build-aux/build_libtransmission.sh')
if build.returncode() != 0
message('Build of libtransmission failed. Make sure you have cloned all GIT submodules recursively with \"git clone --recurse-submodules\"')
error(build.stderr())
else
message(build.stdout())
message('Build libtransmission - OK!')
endif
gnome = import('gnome')
i18n = import('i18n')
......@@ -31,8 +22,25 @@ gio_dep = dependency('gio-2.0')
gio_unix_dep = dependency('gio-unix-2.0')
gtk_dep = dependency('gtk+-3.0', version : '>=3.20.10')
handy_dep = dependency('libhandy-0.0')
transmission_lib = meson.get_compiler('c').find_library('transmission')
transmission_vapi = meson.get_compiler('vala').find_library('transmission', dirs: vapi_dir)
transmission_dep = declare_dependency(
dependencies: [
meson.get_compiler('c').find_library('b64'),
meson.get_compiler('c').find_library('utp'),
meson.get_compiler('c').find_library('miniupnpc'),
meson.get_compiler('c').find_library('dht'),
meson.get_compiler('c').find_library('natpmp'),
meson.get_compiler('c').find_library('event'),
meson.get_compiler('c').find_library('libcurl'),
meson.get_compiler('c').find_library('libcrypto'),
meson.get_compiler('c').find_library('libpthread'),
meson.get_compiler('c').find_library('libz'),
transmission_vapi,
transmission_lib
])
subdir('submodules')
subdir('data')
subdir('po')
subdir('src')
......
......@@ -9,7 +9,7 @@
// + Torrent queue support
//
[CCode (cheader_filename = "libtransmission/transmission.h", lower_case_cprefix = "tr_", cprefix = "TR_")]
[CCode (cheader_filename = "transmission/transmission.h", lower_case_cprefix = "tr_", cprefix = "TR_")]
namespace Transmission {
[CCode (cname = "TR_SHA_DIGEST_LENGTH")]
......@@ -473,14 +473,14 @@ namespace Transmission {
[CCode (cname = "tr_sessionLoadSettings")]
public bool load_default_settings (ref variant_dict dictionary, string config_dir, string app_name);
[CCode (cheader_filename = "libtransmission/transmission.h,libtransmission/variant.h", cprefix = "TR_VARIANT_FMT_", cname = "tr_variant_fmt", has_type_id = false)]
[CCode (cheader_filename = "transmission/transmission.h,transmission/variant.h", cprefix = "TR_VARIANT_FMT_", cname = "tr_variant_fmt", has_type_id = false)]
public enum VariantFormat {
BENC,
JSON,
JSON_LEAN
}
[CCode (cheader_filename = "libtransmission/transmission.h,libtransmission/error.h", cname = "tr_error", free_function = "tr_errorFree", has_type_id = false)]
[CCode (cheader_filename = "transmission/transmission.h,transmission/error.h", cname = "tr_error", free_function = "tr_errorFree", has_type_id = false)]
public struct Error {
int code;
string message;
......@@ -492,7 +492,7 @@ namespace Transmission {
* An object that acts like a union for integers, strings, lists, dictionaries, booleans, and floating-point numbers. The structure is named benc due to the historical reason that it was originally tightly coupled with bencoded data. It currently supports being parsed from, and serialized to, both bencoded notation and json notation.
*
*/
[CCode (cheader_filename = "libtransmission/transmission.h,libtransmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
[CCode (cheader_filename = "transmission/transmission.h,transmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
public struct variant {
[CCode (cname = "tr_variantLoadFile")]
public static int load_file (out variant variant, VariantFormat mode, string filename);
......@@ -571,7 +571,7 @@ namespace Transmission {
[CCode (cname = "tr_variantIsReal")]
public bool is_real ();
}
[CCode (cheader_filename = "libtransmission/transmission.h,libtransmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
[CCode (cheader_filename = "transmission/transmission.h,transmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
public struct variant_list : variant {
[CCode (cname = "tr_variantInitList")]
public variant_list (size_t reserveCount);
......@@ -602,7 +602,7 @@ namespace Transmission {
[CCode (cname = "tr_variantListRemove")]
public bool remove (size_t n);
}
[CCode (cheader_filename = "libtransmission/transmission.h,libtransmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
[CCode (cheader_filename = "transmission/transmission.h,transmission/variant.h", cname = "tr_variant", free_function = "tr_variantFree", has_type_id = false)]
public struct variant_dict : variant {
[CCode (cname = "tr_variantInitDict")]
public variant_dict (size_t reserve_count);
......@@ -1195,9 +1195,9 @@ namespace Transmission {
DBG;
[CCode (cname = "tr_setMessageLevel")]
public void activate ();
[CCode (cname = "getMessageLevel", cheader_filename = "libtransmission/utils.h")]
[CCode (cname = "getMessageLevel", cheader_filename = "transmission/utils.h")]
public static MessageLevel get_current ();
[CCode (cname = "msgLoggingIsActive", cheader_filename = "libtransmission/utils.h")]
[CCode (cname = "msgLoggingIsActive", cheader_filename = "transmission/utils.h")]
public bool is_logging_active ();
}
......@@ -2062,13 +2062,13 @@ namespace Transmission {
public class Torrent {
[PrintfFormat]
[CCode (header_filename = "libtransmission/utils.h", cname = "tr_torerr")]
[CCode (header_filename = "transmission/utils.h", cname = "tr_torerr")]
public void show_error (string fmt, ...);
[PrintfFormat]
[CCode (header_filename = "libtransmission/utils.h", cname = "tr_torinf")]
[CCode (header_filename = "transmission/utils.h", cname = "tr_torinf")]
public void show_info (string fmt, ...);
[PrintfFormat]
[CCode (header_filename = "libtransmission/utils.h", cname = "tr_tordbg")]
[CCode (header_filename = "transmission/utils.h", cname = "tr_tordbg")]
public void show_debug (string fmt, ...);
/**
......@@ -2463,7 +2463,7 @@ namespace Transmission {
public void make_file (string outputFile, tracker_info[] trackers, string comment, bool is_private);
}
[CCode (cheader_filename = "libtransmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
[CCode (cheader_filename = "transmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
namespace Log {
[CCode (cname = "TR_MAX_MSG_LOG")]
public const int MAX_MSG_LOG;
......@@ -2508,7 +2508,7 @@ namespace Transmission {
public unowned string get_log_time ([CCode (array_length_type = "size_t")] char[] buf);
}
[CCode (cheader_filename = "libtransmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
[CCode (cheader_filename = "transmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
namespace Path {
/**
* Rich Salz's classic implementation of shell-style pattern matching for?, \, [], and * characters.
......@@ -2570,7 +2570,7 @@ namespace Transmission {
public bool is_same_file (string filename1, string filename2);
}
[CCode (cheader_filename = "libtransmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
[CCode (cheader_filename = "transmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
namespace Time {
[CCode (cname = "struct event", cprefix = "tr_", has_type_id = false)]
......@@ -2614,7 +2614,7 @@ namespace Transmission {
public time_t get_time ();
}
[CCode (cheader_filename = "libtransmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
[CCode (cheader_filename = "transmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
namespace Url {
/**
......@@ -2637,7 +2637,7 @@ namespace Transmission {
public int parse (string url, int url_len, out string scheme, out string host, out int port, out string path);
}
[CCode (cheader_filename = "libtransmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
[CCode (cheader_filename = "transmission/utils.h", cprefix = "tr_", lower_case_cprefix = "tr_")]
namespace String {
/**
* Make a copy of 'str' whose non-utf8 content has been corrected or stripped
......
b64_lib = meson.get_compiler('c').find_library('b64', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'third-party', 'b64', 'lib'))
utp_lib = meson.get_compiler('c').find_library('utp', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'third-party', 'utp', 'lib'))
miniupnpc_lib = meson.get_compiler('c').find_library('miniupnpc', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'third-party', 'miniupnpc', 'lib'))
dht_lib = meson.get_compiler('c').find_library('dht', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'third-party', 'dht', 'lib'))
natpmp_lib = meson.get_compiler('c').find_library('natpmp', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'third-party', 'natpmp', 'lib'))
event_lib = meson.get_compiler('c').find_library('event')
curl_lib = meson.get_compiler('c').find_library('libcurl')
crypto_lib = meson.get_compiler('c').find_library('libcrypto')
pthread_lib = meson.get_compiler('c').find_library('libpthread', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'libtransmission'))
zlib_lib = meson.get_compiler('c').find_library('libz', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'libtransmission'))
transmission_include = include_directories('transmission/')
transmission_lib = meson.get_compiler('c').find_library('libtransmission', dirs: join_paths (meson.source_root (), 'submodules', 'libtransmission', 'libtransmission'))
transmission_vapi = meson.get_compiler('vala').find_library('transmission', dirs: vapi_dir)
transmission_dep = declare_dependency(include_directories: [transmission_include], dependencies: [pthread_lib, b64_lib, utp_lib, miniupnpc_lib, dht_lib, natpmp_lib, curl_lib, crypto_lib, event_lib, zlib_lib, transmission_vapi, transmission_lib])
\ No newline at end of file
Subproject commit 4a4233feae0655d8a9a0e9810d74fadc722b4237
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment