diff mbox

libgcrypt: install libgcrypt-config in host directory

Message ID 1341958748-9024-1-git-send-email-arnout@mind.be
State Rejected
Headers show

Commit Message

Arnout Vandecappelle July 10, 2012, 10:19 p.m. UTC
Packages depending on libgcrypt call libgcrypt-config to determine its
CFLAGS.  If libgcrypt-config happens to be installed on the host, this
will add /usr/include to the target include path.  So make sure
libgcrypt-config is in the host directory.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
 package/libgcrypt/libgcrypt.mk |    9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Thomas Petazzoni July 11, 2012, 9:24 a.m. UTC | #1
Le Wed, 11 Jul 2012 00:19:08 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a écrit :

> Packages depending on libgcrypt call libgcrypt-config to determine its
> CFLAGS.  If libgcrypt-config happens to be installed on the host, this
> will add /usr/include to the target include path.  So make sure
> libgcrypt-config is in the host directory.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

For most packages, we just leave the <foo>-config script in
$(STAGING_DIR), and then adjust their reverse dependencies .mk file to
point specifically to the $(STAGING_DIR) for that script.

I am not a big fan of doing otherwise specifically for libgcrypt.

Thomas
Arnout Vandecappelle July 11, 2012, 9:30 a.m. UTC | #2
On 07/11/12 11:24, Thomas Petazzoni wrote:
> Le Wed, 11 Jul 2012 00:19:08 +0200,
> "Arnout Vandecappelle (Essensium/Mind)"<arnout@mind.be>  a écrit :
>
>> Packages depending on libgcrypt call libgcrypt-config to determine its
>> CFLAGS.  If libgcrypt-config happens to be installed on the host, this
>> will add /usr/include to the target include path.  So make sure
>> libgcrypt-config is in the host directory.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind)<arnout@mind.be>
>
> For most packages, we just leave the<foo>-config script in
> $(STAGING_DIR), and then adjust their reverse dependencies .mk file to
> point specifically to the $(STAGING_DIR) for that script.
>
> I am not a big fan of doing otherwise specifically for libgcrypt.

  Unfortunately I forgot which was the dependency that triggered the error
in the first place...  Probably libxslt, so I'll try if I can reproduce it
with that package.

  Regards,
  Arnout
Thomas Petazzoni July 11, 2012, 9:43 a.m. UTC | #3
Le Wed, 11 Jul 2012 11:30:32 +0200,
Arnout Vandecappelle <arnout@mind.be> a écrit :

>   Unfortunately I forgot which was the dependency that triggered the error
> in the first place...  Probably libxslt, so I'll try if I can reproduce it
> with that package.

That would be good, thanks.

Thomas
diff mbox

Patch

diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk
index 68c6c47..2671819 100644
--- a/package/libgcrypt/libgcrypt.mk
+++ b/package/libgcrypt/libgcrypt.mk
@@ -17,4 +17,13 @@  LIBGCRYPT_CONF_OPT = \
 
 LIBGCRYPT_DEPENDENCIES = libgpg-error
 
+# libgcrypt doesn't use pkg-config but instead has its own
+# libgcrypt-config.  Install this in the host directory so
+# packages depending on libgcrypt can find it.
+define LIBGCRYPT_HOST_INSTALL_LIBGCRYPT_CONFIG
+	$(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/libgcrypt-config $(HOST_DIR)/usr/bin/libgcrypt-config
+endef
+
+LIBGCRYPT_POST_INSTALL_STAGING_HOOKS += LIBGCRYPT_HOST_INSTALL_LIBGCRYPT_CONFIG
+
 $(eval $(call AUTOTARGETS))