public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-06-19 22:34 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-06-19 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     148fc783d6c6d00ea35e56e861cb5bc42d8a49c2
Author:     Philip DeMonaco <phil <AT> demona <DOT> co>
AuthorDate: Sat Aug 29 16:47:13 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Jun 19 22:33:47 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=148fc783

feat: include all features when pulling metadata

Optional package dependencies are not included when pulling metadata. In
some cases these packages are still required to actually build even when
those flags are turned off.

This change effectively adds `--all-features` to the call of cargo
metadata.

I don't know if this is due to a change in behavior from cargo build,
however, it seems prudent to include all possible dependencies.

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/lib.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib.rs b/src/lib.rs
index 637846e..b7616b7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,6 +13,7 @@ mod metadata;
 use anyhow::{format_err, Context, Result};
 use cargo_lock::Lockfile;
 use cargo_metadata::MetadataCommand;
+use cargo_metadata::CargoOpt;
 use std::collections::BTreeSet;
 use std::fs::OpenOptions;
 use std::io::Write;
@@ -56,6 +57,8 @@ fn generate_lockfile(manifest_path: Option<PathBuf>) -> Result<()> {
 pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> {
     let mut cmd = MetadataCommand::new();
 
+    cmd.features(CargoOpt::AllFeatures);
+
     if let Some(path) = manifest_path.as_ref() {
         cmd.manifest_path(path);
     }


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-02  6:57 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-02  6:57 UTC (permalink / raw
  To: gentoo-commits

commit:     cd1c4256051eee97ea922d431c5c1547e4809bbd
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 29 14:03:18 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Aug  2 06:56:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=cd1c4256

Do not call a proc macro helper before it is defined

See rust#79202 <https://github.com/rust-lang/rust/issues/79202>
Closes: https://github.com/gentoo/cargo-ebuild/pull/9

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/main.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index dbf73ee..94aa1af 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,6 +24,7 @@ struct Args {
     manifest_path: Option<PathBuf>,
 }
 
+#[derive(StructOpt, Debug)]
 #[structopt(
     name = "cargo-ebuild",
     bin_name = "cargo",
@@ -31,7 +32,6 @@ struct Args {
     about = "Generates an ebuild for a given Cargo project",
     global_settings(&[AppSettings::ColoredHelp])
 )]
-#[derive(StructOpt, Debug)]
 enum Opt {
     #[structopt(name = "ebuild")]
     /// Generates an ebuild for a given Cargo project


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-03  4:58 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-03  4:58 UTC (permalink / raw
  To: gentoo-commits

commit:     b4314edc5bb672f5e94dcbc996f443e98fdb4dba
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 04:56:53 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Aug  3 04:57:48 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=b4314edc

src/license.rs: add Apache-2.0-with-LLVM-exceptions

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/license.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/license.rs b/src/license.rs
index 0789829..f4a397f 100644
--- a/src/license.rs
+++ b/src/license.rs
@@ -12,6 +12,7 @@ static SPDX_TO_LICENSE: phf::Map<&'static str, &'static str> = phf_map! {
     "Apache-1.0" => "Apache-1.0",
     "Apache-1.1" => "Apache-1.1",
     "Apache-2.0" => "Apache-2.0",
+    "Apache-2.0 WITH LLVM-exception" => "Apache-2.0-with-LLVM-exceptions",
     "APL-1.0" => "APL-1.0",
     "APSL-2.0" => "APSL-2",
     "Artistic-1.0" => "Artistic",


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-25 15:35 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-25 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     b01082acb7bb01817247bd5947b9d59294a885fb
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 29 15:16:48 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 15:11:29 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=b01082ac

Move the bulk of the template to base.tera

Custom templates can just implement the blocks they care for

Signed-off-by: Luca Barbato <lu_zero <AT> gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/base.tera   | 33 +++++++++++++++++++++++++++++++++
 src/ebuild.tera | 28 +---------------------------
 src/lib.rs      |  2 ++
 3 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/base.tera b/src/base.tera
new file mode 100644
index 0000000..e1f4571
--- /dev/null
+++ b/src/base.tera
@@ -0,0 +1,33 @@
+{%- block header -%}
+# Copyright 2017-{{ this_year }} Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Auto-Generated by cargo-ebuild {{ cargo_ebuild_ver }}
+{% endblock %}
+EAPI={%- block eapi -%}7{%- endblock %}
+
+{% block crates -%}
+CRATES="
+{% for crate in crates -%}
+{{ crate }}
+{%- endfor -%}"
+{%- endblock %}
+
+inherit {% block inherit -%}cargo{%- endblock %}
+
+DESCRIPTION={%- block description -%}"{{ description | trim }}"{%- endblock %}
+# Double check the homepage as the cargo_metadata crate
+# does not provide this value so instead repository is used
+HOMEPAGE={%- block homepage -%}"{{ homepage }}"{%- endblock %}
+SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris ${CRATES})"{%- endraw %}{%- endblock %}
+# License set may be more restrictive as OR is not respected
+# use cargo-license for a more accurate license picture
+LICENSE={%- block license -%}"{{ license }}"{%- endblock %}
+SLOT={%- block slot -%}"0"{%- endblock %}
+KEYWORDS={%- block keyword -%}"~amd64"{%- endblock %}
+{% block variables -%}
+RESTRICT="mirror"
+{%- endblock %}
+
+{%- block phases -%}
+{%- endblock -%}

diff --git a/src/ebuild.tera b/src/ebuild.tera
index b83675d..9ba9906 100644
--- a/src/ebuild.tera
+++ b/src/ebuild.tera
@@ -1,27 +1 @@
-# Copyright 2017-{{ this_year }} Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Auto-Generated by cargo-ebuild {{ cargo_ebuild_ver }}
-
-EAPI=7
-
-CRATES="
-{% for crate in crates -%}
-{{ crate }}
-{%- endfor -%}"
-
-inherit cargo
-
-DESCRIPTION="{{ description | trim }}"
-# Double check the homepage as the cargo_metadata crate
-# does not provide this value so instead repository is used
-HOMEPAGE="{{ homepage }}"
-{% raw -%}
-SRC_URI="$(cargo_crate_uris ${CRATES})"
-{%- endraw %}
-# License set may be more restrictive as OR is not respected
-# use cargo-license for a more accurate license picture
-LICENSE="{{ license }}"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="mirror"
+{%- extends "base.tera" -%}

diff --git a/src/lib.rs b/src/lib.rs
index 8f53e17..db9d54b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -141,6 +141,8 @@ pub fn write_ebuild(
 
     let mut tera = tera::Tera::default();
     let mut context = tera::Context::from_serialize(ebuild_data)?;
+
+    tera.add_raw_template("base.tera", include_str!("base.tera"))?;
     if let Some(template) = template_path {
         tera.add_template_file(template, Some("ebuild.tera"))?;
     } else {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-25 15:35 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-25 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     821d3e4d82a50aa21f77427ac1f589bf6703e0d4
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  5 10:00:23 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 15:11:29 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=821d3e4d

Update the base template

Signed-off-by: Luca Barbato <lu_zero <AT> gentoo.org>
Closes: https://github.com/gentoo/cargo-ebuild/pull/10
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/base.tera | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/base.tera b/src/base.tera
index e1f4571..0c88c77 100644
--- a/src/base.tera
+++ b/src/base.tera
@@ -1,10 +1,10 @@
 {%- block header -%}
-# Copyright 2017-{{ this_year }} Gentoo Authors
+# Copyright {{ this_year }} Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Auto-Generated by cargo-ebuild {{ cargo_ebuild_ver }}
 {% endblock %}
-EAPI={%- block eapi -%}7{%- endblock %}
+EAPI={%- block eapi -%}8{%- endblock %}
 
 {% block crates -%}
 CRATES="
@@ -19,14 +19,13 @@ DESCRIPTION={%- block description -%}"{{ description | trim }}"{%- endblock %}
 # Double check the homepage as the cargo_metadata crate
 # does not provide this value so instead repository is used
 HOMEPAGE={%- block homepage -%}"{{ homepage }}"{%- endblock %}
-SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris ${CRATES})"{%- endraw %}{%- endblock %}
+SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris)"{%- endraw %}{%- endblock %}
 # License set may be more restrictive as OR is not respected
 # use cargo-license for a more accurate license picture
 LICENSE={%- block license -%}"{{ license }}"{%- endblock %}
 SLOT={%- block slot -%}"0"{%- endblock %}
 KEYWORDS={%- block keyword -%}"~amd64"{%- endblock %}
 {% block variables -%}
-RESTRICT="mirror"
 {%- endblock %}
 
 {%- block phases -%}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-25 15:35 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-25 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     fe6608425e6217097aab82b89d4a72b79d94c8da
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 29 14:24:27 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 15:11:28 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=fe660842

Add an option to provide a custom tera template

Signed-off-by: Luca Barbato <lu_zero <AT> gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/lib.rs  | 12 ++++++++++--
 src/main.rs |  5 ++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index 2ecb1f3..8f53e17 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -123,7 +123,11 @@ pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> {
     Ok(EbuildConfig::from_package(root_pkg, crates, licenses))
 }
 
-pub fn write_ebuild(ebuild_data: EbuildConfig, ebuild_path: impl AsRef<Path>) -> Result<()> {
+pub fn write_ebuild(
+    ebuild_data: EbuildConfig,
+    ebuild_path: impl AsRef<Path>,
+    template_path: Option<impl AsRef<Path>>,
+) -> Result<()> {
     // Open the file where we'll write the ebuild
     let mut file = OpenOptions::new()
         .write(true)
@@ -137,7 +141,11 @@ pub fn write_ebuild(ebuild_data: EbuildConfig, ebuild_path: impl AsRef<Path>) ->
 
     let mut tera = tera::Tera::default();
     let mut context = tera::Context::from_serialize(ebuild_data)?;
-    tera.add_raw_template("ebuild.tera", include_str!("ebuild.tera"))?;
+    if let Some(template) = template_path {
+        tera.add_template_file(template, Some("ebuild.tera"))?;
+    } else {
+        tera.add_raw_template("ebuild.tera", include_str!("ebuild.tera"))?;
+    }
 
     context.insert("cargo_ebuild_ver", env!("CARGO_PKG_VERSION"));
     context.insert("this_year", &time::OffsetDateTime::now_utc().year());

diff --git a/src/main.rs b/src/main.rs
index 94aa1af..fe8881c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -22,6 +22,9 @@ struct Args {
     #[structopt(name = "PATH", long = "manifest-path", parse(from_os_str))]
     /// Path to Cargo.toml.
     manifest_path: Option<PathBuf>,
+    #[structopt(name = "TEMPLATE", long = "template-path", short)]
+    /// Non-standard template
+    template_path: Option<PathBuf>,
 }
 
 #[derive(StructOpt, Debug)]
@@ -46,7 +49,7 @@ fn main() -> Result<()> {
 
     let ebuild_path = format!("{}-{}.ebuild", ebuild_data.name, ebuild_data.version);
 
-    write_ebuild(ebuild_data, &ebuild_path)?;
+    write_ebuild(ebuild_data, &ebuild_path, opt.template_path.as_ref())?;
 
     println!("Wrote: {}", ebuild_path);
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-08-26  7:51 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-08-26  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     162c0863a6742cb488632ee4aa2c4c427629a2cf
Author:     Leonardo Neumann <leonardo <AT> neumann <DOT> dev <DOT> br>
AuthorDate: Sat Aug 14 20:34:49 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Aug 26 07:40:36 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=162c0863

Use path references instead of owned counterparts

PathBuf is not necessary because the paths are not being modified. Since
generic monomorphization such as AsRef<Path> is a common source of code
bloat, I decided to use &Path instead.

Signed-off-by: Leonardo Neumann <leonardo <AT> neumann.dev.br>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/lib.rs  | 16 ++++++++--------
 src/main.rs |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index 29fd0c2..6b2d2d3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -16,17 +16,17 @@ use cargo_metadata::CargoOpt;
 use cargo_metadata::MetadataCommand;
 use std::collections::BTreeSet;
 use std::fs::OpenOptions;
-use std::path::{Path, PathBuf};
+use std::path::Path;
 
 use license::{normalize_license, split_spdx_license};
 use metadata::EbuildConfig;
 
-pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> {
+pub fn gen_ebuild_data(manifest_path: Option<&Path>) -> Result<EbuildConfig> {
     let mut cmd = MetadataCommand::new();
 
     cmd.features(CargoOpt::AllFeatures);
 
-    if let Some(path) = manifest_path.as_ref() {
+    if let Some(path) = manifest_path {
         cmd.manifest_path(path);
     }
 
@@ -89,18 +89,18 @@ pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> {
 
 pub fn write_ebuild(
     ebuild_data: EbuildConfig,
-    ebuild_path: impl AsRef<Path>,
-    template_path: Option<impl AsRef<Path>>,
+    ebuild_path: &Path,
+    template_path: Option<&Path>,
 ) -> Result<()> {
     // Open the file where we'll write the ebuild
     let mut file = OpenOptions::new()
         .write(true)
         .create(true)
         .truncate(true)
-        .open(&ebuild_path)
+        .open(ebuild_path)
         .context(format!(
             "Unable to create {}",
-            ebuild_path.as_ref().display()
+            ebuild_path.display()
         ))?;
 
     let mut tera = tera::Tera::default();
@@ -119,6 +119,6 @@ pub fn write_ebuild(
     tera.render_to("ebuild.tera", &context, &mut file)
         .context(format!(
             "Failed to write to {}",
-            ebuild_path.as_ref().display()
+            ebuild_path.display()
         ))
 }

diff --git a/src/main.rs b/src/main.rs
index fe8881c..12dd0e0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -45,11 +45,11 @@ fn main() -> Result<()> {
     let Opt::Ebuild(opt) = Opt::from_args();
 
     // compute the data from the package that the build needs
-    let ebuild_data = gen_ebuild_data(opt.manifest_path)?;
+    let ebuild_data = gen_ebuild_data(opt.manifest_path.as_deref())?;
 
     let ebuild_path = format!("{}-{}.ebuild", ebuild_data.name, ebuild_data.version);
 
-    write_ebuild(ebuild_data, &ebuild_path, opt.template_path.as_ref())?;
+    write_ebuild(ebuild_data, ebuild_path.as_ref(), opt.template_path.as_deref())?;
 
     println!("Wrote: {}", ebuild_path);
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2021-10-07 19:03 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-10-07 19:03 UTC (permalink / raw
  To: gentoo-commits

commit:     8730438cff7285a0d25345e60640b1c2535b5b81
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  7 18:43:47 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Oct  7 18:43:47 2021 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=8730438c

src/base.tera: update whitespace

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/base.tera | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/base.tera b/src/base.tera
index 0c88c77..fb665a3 100644
--- a/src/base.tera
+++ b/src/base.tera
@@ -20,6 +20,7 @@ DESCRIPTION={%- block description -%}"{{ description | trim }}"{%- endblock %}
 # does not provide this value so instead repository is used
 HOMEPAGE={%- block homepage -%}"{{ homepage }}"{%- endblock %}
 SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris)"{%- endraw %}{%- endblock %}
+
 # License set may be more restrictive as OR is not respected
 # use cargo-license for a more accurate license picture
 LICENSE={%- block license -%}"{{ license }}"{%- endblock %}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2023-01-04 19:51 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2023-01-04 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     9a2b4139a1d57fec1b21a363c5a6089133d002a8
Author:     Leonardo Neumann <leonardo <AT> neumann <DOT> dev <DOT> br>
AuthorDate: Fri Nov 11 17:01:52 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jan  4 19:51:06 2023 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=9a2b4139

Ignore SPDX parentheses and add crate name to the license error message

Closes: https://github.com/gentoo/cargo-ebuild/issues/27
Closes: https://github.com/gentoo/cargo-ebuild/pull/28
Signed-off-by: Leonardo Neumann <leonardo <AT> neumann.dev.br>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/lib.rs     | 5 +++--
 src/license.rs | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index 94ebf71..ec214c8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -78,8 +78,9 @@ pub fn gen_ebuild_data( manifest_path: Option<&Path>
                 } else {
                     // Add the unknown license name to be corrected manually
                     println!(
-                        "WARNING: unknown license \"{}\", please correct manually",
-                        &lic
+                        "WARNING: unknown license \"{}\" at package \"{}\", please correct manually",
+                        &lic,
+                        &pkg.name,
                     );
                     licenses.insert(lic.to_string());
                 }

diff --git a/src/license.rs b/src/license.rs
index f4a397f..99d5278 100644
--- a/src/license.rs
+++ b/src/license.rs
@@ -160,6 +160,9 @@ pub fn split_spdx_license(str: &str) -> Vec<&str> {
     str.split('/')
         .flat_map(|l| l.split(" OR "))
         .flat_map(|l| l.split(" AND "))
+        .flat_map(|l| l.split("("))
+        .flat_map(|l| l.split(")"))
+        .filter(|l| !l.is_empty())
         .map(str::trim)
         .collect()
 }


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2023-01-04 19:51 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2023-01-04 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     d65c3d294c396cfad45e6625a45ca8600671b21c
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  4 19:23:44 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jan  4 19:51:06 2023 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=d65c3d29

src/base.tera: add QA_FLAGS_IGNORED

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/base.tera | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/base.tera b/src/base.tera
index fb665a3..04623be 100644
--- a/src/base.tera
+++ b/src/base.tera
@@ -27,6 +27,10 @@ LICENSE={%- block license -%}"{{ license }}"{%- endblock %}
 SLOT={%- block slot -%}"0"{%- endblock %}
 KEYWORDS={%- block keyword -%}"~amd64"{%- endblock %}
 {% block variables -%}
+
+# rust does not use *FLAGS from make.conf, silence portage warning
+# update with proper path to binaries this crate installs, omit leading /
+QA_FLAGS_IGNORED="usr/bin/${PN}"
 {%- endblock %}
 
 {%- block phases -%}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] proj/cargo-ebuild:master commit in: src/
@ 2023-01-04 20:23 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2023-01-04 20:23 UTC (permalink / raw
  To: gentoo-commits

commit:     4c18117fc5edeb35fd1d8e4baea6a3314cad5488
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  4 20:19:08 2023 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jan  4 20:21:11 2023 +0000
URL:        https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=4c18117f

src/base.tera: update template again

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 src/base.tera | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/base.tera b/src/base.tera
index 04623be..16cba9b 100644
--- a/src/base.tera
+++ b/src/base.tera
@@ -26,12 +26,15 @@ SRC_URI={%- block src_uri -%}{% raw -%}"$(cargo_crate_uris)"{%- endraw %}{%- end
 LICENSE={%- block license -%}"{{ license }}"{%- endblock %}
 SLOT={%- block slot -%}"0"{%- endblock %}
 KEYWORDS={%- block keyword -%}"~amd64"{%- endblock %}
-{% block variables -%}
+{% block variables %}
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND=""
 
 # rust does not use *FLAGS from make.conf, silence portage warning
 # update with proper path to binaries this crate installs, omit leading /
 QA_FLAGS_IGNORED="usr/bin/${PN}"
-{%- endblock %}
+{% endblock %}
 
 {%- block phases -%}
 {%- endblock -%}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-04 20:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 15:35 [gentoo-commits] proj/cargo-ebuild:master commit in: src/ Georgy Yakovlev
  -- strict thread matches above, loose matches on Subject: below --
2023-01-04 20:23 Georgy Yakovlev
2023-01-04 19:51 Georgy Yakovlev
2023-01-04 19:51 Georgy Yakovlev
2021-10-07 19:03 Georgy Yakovlev
2021-08-26  7:51 Georgy Yakovlev
2021-08-25 15:35 Georgy Yakovlev
2021-08-25 15:35 Georgy Yakovlev
2021-08-03  4:58 Georgy Yakovlev
2021-08-02  6:57 Georgy Yakovlev
2021-06-19 22:34 Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox