mirror of
https://github.com/RubyMetric/chsrc
synced 2025-08-13 15:59:32 +08:00
Fix lang recipes
This commit is contained in:
parent
5c44b140e4
commit
097097c664
@ -71,7 +71,20 @@
|
|||||||
#include "recipe/lang/Go.c"
|
#include "recipe/lang/Go.c"
|
||||||
#include "recipe/lang/Java.c"
|
#include "recipe/lang/Java.c"
|
||||||
|
|
||||||
|
#include "recipe/lang/Rust/common.h"
|
||||||
|
#include "recipe/lang/Rust/rustup.c"
|
||||||
|
#include "recipe/lang/Rust/Cargo.c"
|
||||||
|
|
||||||
|
#include "recipe/lang/Dart/common.h"
|
||||||
|
#include "recipe/lang/Dart/Pub.c"
|
||||||
|
#include "recipe/lang/Dart/Flutter.c"
|
||||||
|
|
||||||
|
#include "recipe/lang/Haskell.c"
|
||||||
|
#include "recipe/lang/OCaml.c"
|
||||||
|
#include "recipe/lang/R.c"
|
||||||
|
#include "recipe/lang/Julia.c"
|
||||||
|
#include "recipe/lang/NuGet.c"
|
||||||
|
#include "recipe/lang/Clojure.c"
|
||||||
|
|
||||||
#include "rawstr4c.h"
|
#include "rawstr4c.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ pl_clojure_prelude ()
|
|||||||
chef_set_sous_chefs (this, 0);
|
chef_set_sous_chefs (this, 0);
|
||||||
chef_set_contributors (this, 0);
|
chef_set_contributors (this, 0);
|
||||||
|
|
||||||
chef_allow_local_mode (this, Can, NULL, NULL);
|
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||||
chef_forbid_english(this);
|
chef_forbid_english(this);
|
||||||
chef_allow_user_define(this);
|
chef_allow_user_define(this);
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
#define PL_Dart_Flutter_Speed_URL_Postfix "/flutter_infra_release/releases/stable/linux/flutter_linux_v1.0.0-stable.tar.xz"
|
|
||||||
|
|
||||||
def_target(pl_dart_flutter);
|
def_target(pl_dart_flutter);
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -27,20 +25,15 @@ pl_dart_flutter_prelude (void)
|
|||||||
chef_allow_english(this);
|
chef_allow_english(this);
|
||||||
chef_allow_user_define(this);
|
chef_allow_user_define(this);
|
||||||
|
|
||||||
chef_set_note ("2024-09-14: 不得不将Dart和Flutter拆分为两个Target,因为3家教育网镜像站给出的 Dart 和 Flutter 换源URL模式都不一样",
|
|
||||||
"2024-09-14: Had to split Dart and Flutter into two Targets, because the 3 educational network mirror sites have different URL patterns for Dart and Flutter source switching");
|
|
||||||
|
|
||||||
def_sources_begin()
|
def_sources_begin()
|
||||||
{&upstream, "https://storage.googleapis.com", "https://storage.googleapis.com" PL_Dart_Flutter_Speed_URL_Postfix},
|
{&upstream, "https://storage.googleapis.com", FeedByPrelude},
|
||||||
{&FlutterCN, "https://storage.flutter-io.cn", DelegateToMirror},
|
{&FlutterCN, "https://storage.flutter-io.cn", FeedByPrelude},
|
||||||
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn", NULL }, /* 官方文档也没有给后缀,怀疑是否存在问题 */
|
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn", FeedByPrelude }, /* 官方文档也没有给后缀,怀疑是否存在问题 */
|
||||||
|
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/flutter", FeedByPrelude},
|
||||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/flutter",
|
{&Nju, "https://mirror.nju.edu.cn/flutter", FeedByPrelude}
|
||||||
"https://mirrors.tuna.tsinghua.edu.cn/flutter" PL_Dart_Flutter_Speed_URL_Postfix},
|
|
||||||
|
|
||||||
{&Nju, "https://mirror.nju.edu.cn/flutter",
|
|
||||||
"https://mirror.nju.edu.cn/flutter" PL_Dart_Flutter_Speed_URL_Postfix}
|
|
||||||
def_sources_end()
|
def_sources_end()
|
||||||
|
|
||||||
|
chsrc_set_sources_speed_measure_url_with_postfix (this, "/flutter_infra_release/releases/stable/linux/flutter_linux_v1.0.0-stable.tar.xz");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +55,7 @@ pl_dart_flutter_getsrc (char *option)
|
|||||||
void
|
void
|
||||||
pl_dart_flutter_setsrc (char *option)
|
pl_dart_flutter_setsrc (char *option)
|
||||||
{
|
{
|
||||||
chsrc_yield_source_and_confirm (pl_dart_flutter);
|
use_this_source(pl_dart_flutter);
|
||||||
|
|
||||||
char *w = NULL;
|
char *w = NULL;
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
@ -29,7 +29,7 @@ pl_dart_prelude (void)
|
|||||||
{&upstream, "https://pub.dev", FeedByPrelude},
|
{&upstream, "https://pub.dev", FeedByPrelude},
|
||||||
{&FlutterCN, "https://pub.flutter-io.cn", FeedByPrelude},
|
{&FlutterCN, "https://pub.flutter-io.cn", FeedByPrelude},
|
||||||
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub", FeedByPrelude},
|
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub", FeedByPrelude},
|
||||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub", FeedByPrelude,
|
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub", FeedByPrelude},
|
||||||
{&Nju, "https://mirror.nju.edu.cn/dart-pub", FeedByPrelude}
|
{&Nju, "https://mirror.nju.edu.cn/dart-pub", FeedByPrelude}
|
||||||
def_sources_end()
|
def_sources_end()
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ pl_dart_getsrc (char *option)
|
|||||||
void
|
void
|
||||||
pl_dart_setsrc (char *option)
|
pl_dart_setsrc (char *option)
|
||||||
{
|
{
|
||||||
chsrc_yield_source_and_confirm (pl_dart);
|
use_this_source(pl_dart);
|
||||||
|
|
||||||
char *w = NULL;
|
char *w = NULL;
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
@ -23,8 +23,6 @@ pl_julia_prelude ()
|
|||||||
chef_allow_english(this);
|
chef_allow_english(this);
|
||||||
chef_allow_user_define(this);
|
chef_allow_user_define(this);
|
||||||
|
|
||||||
chef_set_note ("Julia的换源可以通过两种方式: 1. 写入 startup.jl 2. 使用环境变量。我们采用第一种", NULL);
|
|
||||||
|
|
||||||
def_sources_begin()
|
def_sources_begin()
|
||||||
{&upstream, NULL, DelegateToUpstream},
|
{&upstream, NULL, DelegateToUpstream},
|
||||||
{&Pku, "https://mirrors.pku.edu.cn/julia", DelegateToMirror},
|
{&Pku, "https://mirrors.pku.edu.cn/julia", DelegateToMirror},
|
||||||
|
@ -23,8 +23,6 @@ pl_nuget_prelude ()
|
|||||||
chef_forbid_english(this);
|
chef_forbid_english(this);
|
||||||
chef_forbid_user_define(this);
|
chef_forbid_user_define(this);
|
||||||
|
|
||||||
chef_set_note ("暂时未实现该换源功能,可参照 https://mirrors.huaweicloud.com/mirrorDetail/5ebf85de07b41baf6d0882ab?mirrorName=nuget&catalog=language", NULL);
|
|
||||||
|
|
||||||
def_sources_begin()
|
def_sources_begin()
|
||||||
{&upstream, "https://www.nuget.org/api/v3/", DelegateToUpstream},
|
{&upstream, "https://www.nuget.org/api/v3/", DelegateToUpstream},
|
||||||
{&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3", DelegateToMirror}
|
{&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3", DelegateToMirror}
|
||||||
@ -39,6 +37,9 @@ pl_nuget_getsrc (char *option)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂时未实现该换源功能,可参照 https://mirrors.huaweicloud.com/mirrorDetail/5ebf85de07b41baf6d0882ab?mirrorName=nuget&catalog=language
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
pl_nuget_setsrc (char *option)
|
pl_nuget_setsrc (char *option)
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,7 @@ pl_r_prelude ()
|
|||||||
chef_forbid_english(this);
|
chef_forbid_english(this);
|
||||||
chef_allow_user_define(this);
|
chef_allow_user_define(this);
|
||||||
|
|
||||||
chef_set_note ("以下注释的,是不含有bioconductor的镜像站,我们在换cran的同时,也直接帮助用户换bioconductor", NULL);
|
// 以下注释的,是不含有bioconductor的镜像站,我们在换cran的同时,也直接帮助用户换bioconductor
|
||||||
|
|
||||||
def_sources_begin()
|
def_sources_begin()
|
||||||
{&upstream, NULL, DelegateToUpstream},
|
{&upstream, NULL, DelegateToUpstream},
|
||||||
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/", DelegateToMirror},
|
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/", DelegateToMirror},
|
||||||
@ -65,7 +64,7 @@ pl_r_getsrc (char *option)
|
|||||||
void
|
void
|
||||||
pl_r_setsrc (char *option)
|
pl_r_setsrc (char *option)
|
||||||
{
|
{
|
||||||
chsrc_yield_source_and_confirm (pl_r);
|
use_this_source(pl_r);
|
||||||
|
|
||||||
char *bioconductor_url = xy_str_delete_suffix (xy_str_delete_suffix (source.url, "cran/"), "CRAN/");
|
char *bioconductor_url = xy_str_delete_suffix (xy_str_delete_suffix (source.url, "cran/"), "CRAN/");
|
||||||
bioconductor_url = xy_2strjoin(bioconductor_url, "bioconductor");
|
bioconductor_url = xy_2strjoin(bioconductor_url, "bioconductor");
|
||||||
|
@ -25,9 +25,8 @@ pl_rust_cargo_prelude (void)
|
|||||||
chef_forbid_english (this);
|
chef_forbid_english (this);
|
||||||
chef_allow_user_define(this);
|
chef_allow_user_define(this);
|
||||||
|
|
||||||
chef_set_note ("以下都支持稀疏索引,我们换源时都将默认添加 `sparse+`。链接末尾的 `/` 不能缺少",
|
|
||||||
"All sources support sparse index, we will add `sparse+` by default when changing sources. The trailing `/` in URLs cannot be missing");
|
|
||||||
|
|
||||||
|
// 以下都支持稀疏索引,我们换源时都将默认添加 `sparse+`。链接末尾的 `/` 不能缺少
|
||||||
def_sources_begin()
|
def_sources_begin()
|
||||||
{&upstream, "https://crates.io/", "https://crates.io/api/v1/crates/windows/0.58.0/download"},
|
{&upstream, "https://crates.io/", "https://crates.io/api/v1/crates/windows/0.58.0/download"},
|
||||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/", DelegateToMirror},
|
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/", DelegateToMirror},
|
||||||
|
@ -42,7 +42,7 @@ pl_rust_rustup_prelude (void)
|
|||||||
def_sources_end()
|
def_sources_end()
|
||||||
|
|
||||||
// 20MB大小
|
// 20MB大小
|
||||||
chsrc_set_sources_speed_measure_url_with_postfix (this, "/dist/2025-06-26/cargo-1.88.0-x86_64-unknown-illumos.tar.gz")
|
chsrc_set_sources_speed_measure_url_with_postfix (this, "/dist/2025-06-26/cargo-1.88.0-x86_64-unknown-illumos.tar.gz");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user