diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2016-06-13 13:53:51 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2016-06-13 13:53:51 +0300 |
commit | e9c0b253faef56c66801b34fd8e642edfcb36272 (patch) | |
tree | fbe0e905660890a3e0381cc3961b25b5b5cf9e13 /app-mobilephone/sobexsrv/files | |
parent | dev-python/pyopencl: Bump (diff) | |
download | gentoo-e9c0b253faef56c66801b34fd8e642edfcb36272.tar.gz gentoo-e9c0b253faef56c66801b34fd8e642edfcb36272.tar.bz2 gentoo-e9c0b253faef56c66801b34fd8e642edfcb36272.zip |
app-mobilephone/sobexsrv: fixes and cleanups
- Fix bug 522748: openobex >= 1.6 removed unicode <-> ascii
conversion tools, so implement fallback using iconv -i.
- Port ebuild to EAPI 6.
- Fix multiple "make: jobserver unavailable issues".
- Properly support python script (add eclass, deps, shebang
fixing), install sample script.
Package-Manager: portage-2.3.0_rc1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-mobilephone/sobexsrv/files')
-rw-r--r-- | app-mobilephone/sobexsrv/files/sobexsrv-1.0.1-openobex16.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/app-mobilephone/sobexsrv/files/sobexsrv-1.0.1-openobex16.patch b/app-mobilephone/sobexsrv/files/sobexsrv-1.0.1-openobex16.patch new file mode 100644 index 000000000000..57fff87e4d2b --- /dev/null +++ b/app-mobilephone/sobexsrv/files/sobexsrv-1.0.1-openobex16.patch @@ -0,0 +1,49 @@ +--- sobexsrv-1.0.1/src/obexsrv.c.orig 2016-06-13 01:59:28.000000000 +0300 ++++ sobexsrv-1.0.1/src/obexsrv.c 2016-06-13 12:20:15.501101147 +0300 +@@ -32,6 +32,10 @@ + #include <langinfo.h> + #include <assert.h> + ++#if ((OPENOBEX_VERSION_MAJOR==1) && (OPENOBEX_VERSION_MINOR>=6)) ++#include <string.h> ++#endif ++ + #include "obexsrv.h" + #include "util.h" + #include "sdp.h" +@@ -46,7 +50,8 @@ + + void UnicodeToChar(uint8_t *c, const uint8_t *uc, int size) + { +- iconv_t dsc = iconv_open(nl_langinfo(CODESET),"UTF16BE"); ++ char *lang = nl_langinfo(CODESET); ++ iconv_t dsc = iconv_open(lang,"UTF16BE"); + size_t isiz,osiz; + char *ip = (char*)uc; + char *op = (char*)c; +@@ -54,7 +59,25 @@ + + if (iconv(dsc,&ip,&isiz,&op,&osiz) == -1) { + debug_printf("iconv: error %s\n", strerror(errno)); ++#if ((OPENOBEX_VERSION_MAJOR==1) && (OPENOBEX_VERSION_MINOR>=6)) ++ // try to convert ignoring errors ++ iconv_close(dsc); ++ debug_printf("iconv: characters that cannot be converted will be discarded\n"); ++ ++ // append "//IGNORE" ++ const char *const suf = "//IGNORE"; ++ size_t len = strlen(lang); ++ char *cd = malloc(len + 9); ++ memcpy(cd, lang, len); ++ memcpy(cd+len, suf, 8); ++ cd[len+8] = '\0'; ++ ++ dsc = iconv_open(cd,"UTF16BE"); ++ iconv(dsc,&ip,&isiz,&op,&osiz); ++ free(cd); ++#else + OBEX_UnicodeToChar(c,uc,size); ++#endif + } + iconv_close(dsc); + } |