From 080059b491f3d925aca2052c371d8823321dfcf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de>
Date: Fri, 20 May 2022 12:43:33 +0200
Subject: [PATCH] Fix oppulance

If starting from scratch the archive file isn't there in do_fetch;
in this case, we can make use of the folder where the freshly
downloaded resources are cloned to.
---
 packages/oppulance/package.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/packages/oppulance/package.py b/packages/oppulance/package.py
index ffc1acab..159140c7 100644
--- a/packages/oppulance/package.py
+++ b/packages/oppulance/package.py
@@ -41,18 +41,23 @@ class Oppulance(Package):
                 git='https://github.com/electronicvisions/{}'.format(res),
                 tag=release['tag'],
                 expand=False,
+                placement=res
             )
 
     def do_fetch(self, mirror_only=False):
         super(Oppulance, self).do_fetch(mirror_only)
         mkdirp(self.stage.source_path)
         tar = which('tar')
+        ln = which('ln')
         bash = which('bash')
         with working_dir(self.stage.source_path):
             for key in self.resources:
                 for res in self.resources[key]:
-                    tar('xf', res.fetcher.stage.archive_file)
-            tar('xf', self.stage.archive_file)
+                    if res.fetcher.stage.archive_file:
+                        tar('xf', res.fetcher.stage.archive_file)
+                    else:
+                        # freshly download
+                        ln('-sf', res.fetcher.stage.source_path, res.name)
             bash('gcc/ci/00_download_prerequisites.sh')
 
     def install(self, spec, prefix):
@@ -60,6 +65,6 @@ class Oppulance(Package):
         bash('binutils-gdb/ci/00_build_install.sh')
         bash('gcc/ci/01_build_install_freestanding.sh')
         bash('newlib/ci/00_build_install.sh')
-        bash('oppulance/ci/00_build_install_libstdc++.sh')
+        bash('ci/00_build_install_libstdc++.sh')
         mkdirp(spec.prefix)
         install_tree('install/.', spec.prefix)
-- 
GitLab