[oe-commits] Bian Naimeng : smbnetfs: using PKG_CHECK_MODULES to found headers and libraries for smbclient

git at git.openembedded.org git at git.openembedded.org
Mon Aug 24 12:02:36 UTC 2015


Module: meta-openembedded.git
Branch: master-next
Commit: a1b4fa0aaf86c1f7e8097ac81ddb9ea4a6544672
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=a1b4fa0aaf86c1f7e8097ac81ddb9ea4a6544672

Author: Bian Naimeng <biannm at cn.fujitsu.com>
Date:   Fri Jun 19 11:08:08 2015 +0800

smbnetfs: using PKG_CHECK_MODULES to found headers and libraries for smbclient

After samba was upgraded to 4.x, headers of smbclient were installed into include/samba-4.0/,
so we should using PKG_CHECK_MODULES to found headers and libraries for smbclient to avoid
error as below.

 ${WORKDIR}/git/src/samba.c
   | smbnetfs/git-r0/git/src/smb_conn_srv.c:12:26: fatal error: libsmbclient.h: No such file or directory  #include <libsmbclient.h>
   |                           ^
   | compilation terminated.
   | make[2]: *** [smb_conn_srv.o] Error 1
   | make[2]: *** Waiting for unfinished jobs....

Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 ...CK_MODULES-to-found-headers-and-libraries.patch | 42 ++++++++++++++++++++++
 .../recipes-filesystems/smbnetfs/smbnetfs_git.bb   |  3 +-
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch b/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
new file mode 100644
index 0000000..f05f09f
--- /dev/null
+++ b/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs/Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch
@@ -0,0 +1,42 @@
+From 7a524d49b3d4459280f18942df2980603400ec52 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm at cn.fujitsu.com>
+Date: Fri, 19 Jun 2015 11:54:44 +0900
+Subject: [PATCH] Using PKG_CHECK_MODULES to found headers and libraries of
+ smbclient
+
+Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
+---
+ configure.in    | 5 +++++
+ src/Makefile.am | 3 +++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index ce21aef..ecd7119 100644
+--- a/configure.in
++++ b/configure.in
+@@ -125,6 +125,11 @@ AC_CHECK_LIB(smbclient, smbc_setOptionUserData,
+     )]
+ )
+ 
++dnl *****************************************************************
++dnl *** Check libsmbclient by pkgconfig to get cflags and ldflags ***
++dnl *****************************************************************
++PKG_CHECK_MODULES(SMBCLIENT, smbclient)
++
+ dnl ******************
+ dnl *** Final step ***
+ dnl ******************
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 41519d8..9fc97e9 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -16,3 +16,6 @@ smbnetfs_SOURCES = \
+ 	event.c			event.h			\
+ 	reconfigure.c		reconfigure.h		\
+ 	main.c
++
++smbnetfs_CFLAGS=${SMBCLIENT_CFLAGS}
++smbnetfs_LDFLAGS=${SMBCLIENT_LDFLAGS}
+-- 
+1.8.4.2
+
diff --git a/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb b/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
index a0eddbc..f1420fb 100644
--- a/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
+++ b/meta-filesystems/recipes-filesystems/smbnetfs/smbnetfs_git.bb
@@ -17,7 +17,8 @@ PKGV = "${GITPKGVTAG}"
 SRCREV = "ace1c519d45fe488b9b7e6cc77a2bcadb6c83464"
 
 SRC_URI = "git://smbnetfs.git.sourceforge.net/gitroot/smbnetfs/smbnetfs;branch=master \
-           file://configure.patch"
+           file://configure.patch \
+           file://Using-PKG_CHECK_MODULES-to-found-headers-and-libraries.patch"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring=yes,--with-gnome-keyring=no,libgnome-keyring"



More information about the Openembedded-commits mailing list