Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support paths from macros extended to support binary relocation #36

Merged
merged 6 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions recipe/macro_path_binary_relocation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 8d90eee1109a79135b5858d0d7a5fcb0f6cab641 Mon Sep 17 00:00:00 2001
From: Diego <diego.ferigo@iit.it>
Date: Tue, 6 Jul 2021 15:47:04 +0200
Subject: [PATCH] Fix path in conda due to its binary relocation hacks

---
src/SystemPaths.cc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/SystemPaths.cc b/src/SystemPaths.cc
index f809686..16e6e66 100644
--- a/src/SystemPaths.cc
+++ b/src/SystemPaths.cc
@@ -235,6 +235,8 @@ void SystemPaths::AddFilePaths(const std::string &_path)
std::string SystemPaths::NormalizeDirectoryPath(const std::string &_path)
{
std::string path = _path;
+ path.erase(std::find(path.begin(), path.end(), '\0'), path.end());
+
// Use '/' because it works on Linux, OSX, and Windows
std::replace(path.begin(), path.end(), '\\', '/');
// Make last character '/'
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ source:
patches:
- librt_linkage.patch # [linux]
- framework.patch # [osx]
- macro_path_binary_relocation.patch

build:
number: 2
number: 3
run_exports:
- {{ pin_subpackage(name, max_pin='x') }}

Expand Down