summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/postfix/files/makedefs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/postfix/files/makedefs.patch')
-rw-r--r--meta-networking/recipes-daemons/postfix/files/makedefs.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/postfix/files/makedefs.patch b/meta-networking/recipes-daemons/postfix/files/makedefs.patch
new file mode 100644
index 000000000..32c31b024
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/makedefs.patch
@@ -0,0 +1,116 @@
11)remove RANLIB, SYSLIBS, AR and get them from env.
2
32)reference sysroot when searching header files
43)include sysroot path instead of absolute include path
5for Linux2 and Linux3 systems.
64)for non-native build, search STAGING_BASELIBDIR/LIBDIR
7 native build, search host library path for nsl and resolv library
8 which comes from libc
9
10Upstreamstatus: Inappropriate [embedded specific]
11
12Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
13---
14 makedefs | 27 +++++++++++----------------
15 1 files changed, 11 insertions(+), 16 deletions(-)
16
17diff --git a/makedefs b/makedefs
18index dd5f256..e6fb795 100644
19--- a/makedefs
20+++ b/makedefs
21@@ -87,9 +87,6 @@
22
23 # Defaults for most sane systems
24
25-RANLIB=ranlib
26-SYSLIBS=
27-AR=ar
28 ARFL=rv
29
30 # Ugly function to make our error message more visible among the
31@@ -293,12 +290,12 @@ case "$SYSTEM.$RELEASE" in
32 case "$CCARGS" in
33 *-DNO_DB*) ;;
34 *-DHAS_DB*) ;;
35- *) if [ -f /usr/include/db.h ]
36+ *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
37 then
38 : we are all set
39- elif [ -f /usr/include/db/db.h ]
40+ elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
41 then
42- CCARGS="$CCARGS -I/usr/include/db"
43+ CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
44 else
45 # No, we're not going to try db1 db2 db3 etc.
46 # On a properly installed system, Postfix builds
47@@ -307,12 +304,12 @@ case "$SYSTEM.$RELEASE" in
48 echo "Install the appropriate db*-devel package first." 1>&2
49 exit 1
50 fi
51- SYSLIBS="-ldb"
52+ SYSLIBS="$SYSLIBS -ldb"
53 ;;
54 esac
55 for name in nsl resolv $GDBM_LIBS
56 do
57- for lib in /usr/lib64 /lib64 /usr/lib /lib
58+ for lib in $BUILD_SYSROOT_NSL_PATH
59 do
60 test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
61 SYSLIBS="$SYSLIBS -l$name"
62@@ -332,7 +329,7 @@ case "$SYSTEM.$RELEASE" in
63 if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ]
64 then
65 :
66- elif [ ! -e /usr/include/sys/epoll.h ]
67+ elif [ ! -e "$BUILD_SYSROOT"/usr/include/sys/epoll.h ]
68 then
69 echo CCARGS="$CCARGS -DNO_EPOLL"
70 else
71@@ -356,8 +353,6 @@ int main(int argc, char **argv)
72 }
73 EOF
74 ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
75- ./makedefs.test 2>/dev/null ||
76- CCARGS="$CCARGS -DNO_EPOLL"
77 rm -f makedefs.test makedefs.test.[co]
78 fi;;
79 esac
80@@ -366,12 +361,12 @@ EOF
81 case "$CCARGS" in
82 *-DNO_DB*) ;;
83 *-DHAS_DB*) ;;
84- *) if [ -f /usr/include/db.h ]
85+ *) if [ -f "$BUILD_SYSROOT"/usr/include/db.h ]
86 then
87 : we are all set
88- elif [ -f /usr/include/db/db.h ]
89+ elif [ -f "$BUILD_SYSROOT"/usr/include/db/db.h ]
90 then
91- CCARGS="$CCARGS -I/usr/include/db"
92+ CCARGS="$CCARGS -I"$BUILD_SYSROOT"/usr/include/db"
93 else
94 # On a properly installed system, Postfix builds
95 # by including <db.h> and by linking with -ldb
96@@ -379,7 +374,7 @@ EOF
97 echo "Install the appropriate db*-devel package first." 1>&2
98 exit 1
99 fi
100- SYSLIBS="-ldb"
101+ SYSLIBS="$SYSLIBS -ldb"
102 ;;
103 esac
104 for name in nsl resolv
105@@ -415,7 +410,7 @@ EOF
106 esac
107 for name in nsl resolv
108 do
109- for lib in /usr/lib64 /lib64 /usr/lib /lib
110+ for lib in $BUILD_SYSROOT_NSL_PATH
111 do
112 test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
113 SYSLIBS="$SYSLIBS -l$name"
114--
1151.7.1
116