Skip to contentSkip to conversation

eigen: Fix pkg-config file prefix error

PATCH New Matt Flax 2 participants 3 messages Aug 16, 2018 – Aug 24, 2018

lore
Share & tools
lore

Matt Flax

author
#0 lore raw

PATCH 1/1 eigen: Fix pkg-config file prefix error

From: Matt Flax <[email protected]>

eigen generates a pkg-config file which has a broken prefix. This broken
prefix causes an incorrect path when other packages call
pkg-config --cflags eigen

This patch fixes the prefix in the generated eigen pc file and prjects
which depend on this pc file can now path correctly to the eigen include
directory at build time.

---
 package/eigen/eigen.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/eigen/eigen.mk +2 -1
index 89f54fb..84e6f3a 100644
@@ -23,7 +23,8 @@ endif
 # Generate the .pc file at build time
 define EIGEN_BUILD_CMDS
 	sed -r -e 's,^Version: .*,Version: $(EIGEN_VERSION),' \
-		-e 's,^Cflags: .*,Cflags: -I$(EIGEN_DEST_DIR),' \
+		-e 's,^Cflags: .*,Cflags: -I$$\{prefix\}\/include\/eigen3,' \
+		-e 's,^prefix.*,prefix=\/usr,' \
 		$(@D)/eigen3.pc.in >$(@D)/eigen3.pc
 endef
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 eigen: Fix pkg-config file prefix error

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Flax <[email protected]> writes:

From: Matt Flax <[email protected]>
eigen generates a pkg-config file which has a broken prefix. This broken
prefix causes an incorrect path when other packages call
pkg-config --cflags eigen

It wasn't clear from the description what this broken prefix was, so I had a look:

grep '^prefix=' build/eigen-3.3.4/eigen3.pc.in
prefix=@CMAKE_INSTALL_PREFIX@

Which is indeed no good.

Quoted 14 lines

This patch fixes the prefix in the generated eigen pc file and prjects
which depend on this pc file can now path correctly to the eigen include
directory at build time.

---
 package/eigen/eigen.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/eigen/eigen.mk +0 -0
index 89f54fb..84e6f3a 100644

package/eigen/eigen.mk endif · line 27

Quoted 6 lines
package/eigen/eigen.mk +2 -1
@@ -23,7 +23,8 @@ endif
 # Generate the .pc file at build time
 define EIGEN_BUILD_CMDS
 	sed -r -e 's,^Version: .*,Version: $(EIGEN_VERSION),' \
-		-e 's,^Cflags: .*,Cflags: -I$(EIGEN_DEST_DIR),' \
+		-e 's,^Cflags: .*,Cflags: -I$$\{prefix\}\/include\/eigen3,' \
+		-e 's,^prefix.*,prefix=\/usr,' \

Why are you escaping these '/' characters? The sed invocation uses , as seperator, so / isn't special.

Committed with these backslashes dropped and the commit message tweaked, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 eigen: Fix pkg-config file prefix error

In reply to Matt Flax
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matt" == Matt Flax <[email protected]> writes:

From: Matt Flax <[email protected]>
eigen generates a pkg-config file which has a broken prefix. This broken
prefix causes an incorrect path when other packages call
pkg-config --cflags eigen

Quoted 5 lines

This patch fixes the prefix in the generated eigen pc file and prjects
which depend on this pc file can now path correctly to the eigen include
directory at build time.

Committed to 2018.02.x and 2018.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard