summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/uw-imap
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-12-31 15:15:26 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2015-01-08 12:04:26 +0100
commitad6e0184266241e28216681f6fa0b7dc48f79344 (patch)
tree3e1eed6fd58a6e5a1dc61ba3b28a50f60d6f2a28 /meta-oe/recipes-devtools/uw-imap
parent2b30fc6fe906d525b703e999138fcb9a0da150db (diff)
downloadmeta-openembedded-ad6e0184266241e28216681f6fa0b7dc48f79344.tar.gz
libc-client: rename to uw-imap, upgrade to 2007f
* Upgrade to 2007f * Rename to uw-imap; this is the name used by Fedora and is much more sensible than libc-client * Fix errors when linking the library against code compiled with -fPIC such as mod-php (patch from Fedora). * Add a security patch from Fedora * Rename files directory to uw-imap Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta-oe/recipes-devtools/uw-imap')
-rw-r--r--meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007e-shared.patch82
-rw-r--r--meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007f-format-security.patch20
-rw-r--r--meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch12
-rw-r--r--meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb41
4 files changed, 155 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007e-shared.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007e-shared.patch
new file mode 100644
index 000000000..4434e839f
--- /dev/null
+++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007e-shared.patch
@@ -0,0 +1,82 @@
1Fix linking libraries built with -fPIC with this library
2
3Patch borrowed from Fedora
4
5Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
6
7Upstream-Status: Pending
8
9diff -up imap-2007e/src/osdep/unix/Makefile.shared imap-2007e/src/osdep/unix/Makefile
10--- imap-2007e/src/osdep/unix/Makefile.shared 2009-07-07 19:28:02.909755512 -0500
11+++ imap-2007e/src/osdep/unix/Makefile 2009-07-07 19:29:35.870006799 -0500
12@@ -170,6 +170,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
13 EXTRADRIVERS='$(EXTRADRIVERS)' EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
14 PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
15
16+# Need this for the shared library rule to work correctly
17+.SUFFIXES: .o .so
18+SOFILES=${BINARIES:.o=.so}
19+
20
21 # Here if no make argument established
22
23@@ -845,18 +849,24 @@ vu2: # VAX Ultrix 2.3, etc.
24
25 # Build it!
26
27-build: clean once $(ARCHIVE)
28+build: clean once $(ARCHIVE) $(SHLIBNAME)
29
30-all: $(ARCHIVE)
31+all: $(ARCHIVE) $(SHLIBNAME)
32
33 $(ARCHIVE): $(BINARIES)
34 sh -c '$(RM) $(ARCHIVE) || true'
35 @$(CAT) ARCHIVE
36 @$(SH) ARCHIVE
37
38-.c.o:
39- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
40+$(SHLIBNAME): $(SOFILES)
41+ gcc -shared -Wl,-soname,$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS`
42+ ln -s $(SHLIBNAME) lib$(SHLIBBASE).so
43
44+.c.so: osdep.h
45+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` ${@:.so=.c} -o $@
46+
47+.c.o:
48+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` $*.c
49
50 # Cleanup
51
52@@ -895,8 +905,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
53
54
55 # OS-dependent
56-
57-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
58+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
59 osdep.h env_unix.h tcp_unix.h \
60 osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
61 auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
62@@ -910,12 +919,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
63 write.c sslstdio.c \
64 strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
65 OSCFLAGS
66+
67+osdep.o: $(OSDEPS)
68+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
69+ @echo ========================================================================
70 @echo Building OS-dependent module
71 @echo If you get No such file error messages for files x509.h, ssl.h,
72 @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
73 @echo is not installed on your system. Either install OpenSSL first
74 @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
75- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
76+ @echo ========================================================================
77+
78+osdep.so: $(OSDEPS)
79+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `cat OSCFLAGS` -c osdep.c -o $@
80
81 osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
82 $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007f-format-security.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007f-format-security.patch
new file mode 100644
index 000000000..6ec04761a
--- /dev/null
+++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/imap-2007f-format-security.patch
@@ -0,0 +1,20 @@
1Fix error found with "-Werror=format-security" flag
2
3Patch borrowed from Fedora
4
5Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
6
7Upstream-Status: Pending
8
9diff -Naur imap-2007f.orig/src/osdep/unix/flocklnx.c imap-2007f/src/osdep/unix/flocklnx.c
10--- imap-2007f.orig/src/osdep/unix/flocklnx.c 2011-07-23 02:20:11.000000000 +0200
11+++ imap-2007f/src/osdep/unix/flocklnx.c 2014-04-14 19:17:46.429000000 +0200
12@@ -57,7 +57,7 @@
13 case ENOLCK: /* lock table is full */
14 sprintf (tmp,"File locking failure: %s",strerror (errno));
15 mm_log (tmp,WARN); /* give the user a warning of what happened */
16- if (!logged++) syslog (LOG_ERR,tmp);
17+ if (!logged++) syslog (LOG_ERR, "%s", tmp);
18 /* return failure if non-blocking lock */
19 if (op & LOCK_NB) return -1;
20 sleep (5); /* slow down in case it loops */
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch
new file mode 100644
index 000000000..f729ee207
--- /dev/null
+++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/quote_cctype.patch
@@ -0,0 +1,12 @@
1diff -urN imap-2007.orig/Makefile imap-2007/Makefile
2--- imap-2007.orig/Makefile 2007-12-20 23:11:10.000000000 +0100
3+++ imap-2007/Makefile 2008-03-19 14:08:47.000000000 +0100
4@@ -690,7 +690,7 @@
5 @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
6 @echo Rebuilding c-client for `$(CAT) OSTYPE`...
7 @$(TOUCH) SPECIALS
8- $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
9+ $(CD) c-client;$(MAKE) all CC="`$(CAT) CCTYPE`" \
10 CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
11
12 rebuildclean:
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb
new file mode 100644
index 000000000..e1a987710
--- /dev/null
+++ b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb
@@ -0,0 +1,41 @@
1SUMMARY = "UW c-client library for mail protocols"
2SECTION = "devel"
3
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a6a4ddbb7cd2999f6827ee143f6fcd97"
6
7DEPENDS = "openssl libpam"
8
9SRC_URI = "ftp://ftp.cac.washington.edu/imap/imap-${PV}.tar.gz \
10 file://quote_cctype.patch \
11 file://imap-2007e-shared.patch \
12 file://imap-2007f-format-security.patch \
13 "
14
15SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
16SRC_URI[sha256sum] = "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28"
17
18S = "${WORKDIR}/imap-${PV}"
19
20EXTRA_OEMAKE = "CC='${CC}'"
21
22HEADERS = "src/c-client/*.h src/osdep/unix/*.h c-client/auths.c c-client/linkage.c c-client/linkage.h c-client/osdep.h"
23
24do_compile() {
25 echo "SSLINCLUDE=${STAGING_INCDIR} SSLLIB=${STAGING_LIBDIR}" > ${S}/SPECIALS
26 oe_runmake lnp
27}
28
29do_install() {
30 install -d ${D}${includedir}/c-client
31 install ${HEADERS} ${D}${includedir}/c-client
32 install -d ${D}${libdir}
33 install c-client/c-client.a ${D}${libdir}/libc-client.a
34}
35
36RPROVIDES_${PN} = "libc-client"
37RREPLACES_${PN} = "libc-client"
38RCONFLICTS_${PN} = "libc-client"
39
40ALLOW_EMPTY_${PN} = "1"
41