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

[waf] Path generation mistake in ibex.pc under MinGW #422

Closed
gchabert opened this issue Oct 28, 2019 · 2 comments
Closed

[waf] Path generation mistake in ibex.pc under MinGW #422

gchabert opened this issue Oct 28, 2019 · 2 comments
Assignees

Comments

@gchabert
Copy link
Contributor

Il y a une erreur dans la génération des paths du fichier ibex.pc sous Windows. Actuellement, j'obtiens ça:

prefix=c:\\MingW\\msys\\1.0\\home\\gchabert\\ibex-2.8.3
includedir=${prefix}/c:\\MingW\\msys\\1.0\\home\\gchabert\\ibex-2.8.3\\include
libdir=${prefix}/c:\\MingW\\msys\\1.0\\home\\gchabert\\ibex-2.8.3\\lib

alors que je devrais avoir ça:

prefix=c:\\MingW\\msys\\1.0\\home\\gchabert\\ibex-2.8.3
includedir=${prefix}/include
libdir=${prefix}/lib
@cyrilbouvier
Copy link
Contributor

Est-ce que cela fonctionne avec ce patch:

diff --git a/ibexutils.py b/ibexutils.py
index e256a539..d7e5d124 100644
--- a/ibexutils.py
+++ b/ibexutils.py
@@ -135,9 +135,14 @@ def to_unicode (s):
 
 @conf
 def path_pc_remove_prefix (conf, path):
-    if path.startswith (conf.env.PREFIX + "/"):
-      path = path[len(conf.env.PREFIX)+1:]
-    return escape_backslash_on_win32 (path)
+    if Utils.is_win32:
+      if path.startswith (conf.env.PREFIX + "\\"):
+        path = path[len(conf.env.PREFIX)+1:]
+      path = escape_backslash_on_win32 (path)
+    else:
+      if path.startswith (conf.env.PREFIX + "/"):
+        path = path[len(conf.env.PREFIX)+1:]
+    return path
 
 @conf
 def path_pc (conf, path):

gchabert pushed a commit that referenced this issue Oct 29, 2019
@gchabert
Copy link
Contributor Author

Oui! merci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants