New package: pilot-link-0.12.5
This commit is contained in:
parent
3b30413e7b
commit
aeae0db934
14 changed files with 516 additions and 10 deletions
|
@ -2746,3 +2746,6 @@ libkea-dns++.so.1 libkea-1.1.0_1
|
||||||
libkea-util-io.so.0 libkea-1.1.0_1
|
libkea-util-io.so.0 libkea-1.1.0_1
|
||||||
libkea-threads.so.1 libkea-1.1.0_1
|
libkea-threads.so.1 libkea-1.1.0_1
|
||||||
libytnef.so.0 ytnef-1.8_1
|
libytnef.so.0 ytnef-1.8_1
|
||||||
|
libpisock.so.9 pilot-link-0.12.5_1
|
||||||
|
libpisync.so.1 pilot-link-0.12.5_1
|
||||||
|
libpitcl.so.0 pilot-link-0.12.5_1
|
||||||
|
|
1
srcpkgs/pilot-link-devel
Symbolic link
1
srcpkgs/pilot-link-devel
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
pilot-link
|
22
srcpkgs/pilot-link/patches/fix-ai_non_const.patch
Normal file
22
srcpkgs/pilot-link/patches/fix-ai_non_const.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
--- libpisock/address.c 2016-12-20 13:56:43.913681767 +0100
|
||||||
|
+++ libpisock/address.c 2016-12-20 13:57:47.512723493 +0100
|
||||||
|
@@ -260,7 +260,7 @@
|
||||||
|
*
|
||||||
|
***********************************************************************/
|
||||||
|
int
|
||||||
|
-pack_AddressAppInfo(const AddressAppInfo_t *ai, unsigned char *record, size_t len)
|
||||||
|
+pack_AddressAppInfo(AddressAppInfo_t *ai, unsigned char *record, size_t len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
size_t destlen = 4 + 16 * 22 + 2 + 2;
|
||||||
|
--- include/pi-address.h 2007-01-15 01:29:59.000000000 +0100
|
||||||
|
+++ include/pi-address.h 2016-12-20 14:05:35.094015860 +0100
|
||||||
|
@@ -82,7 +82,7 @@
|
||||||
|
extern int unpack_AddressAppInfo
|
||||||
|
PI_ARGS((AddressAppInfo_t *, const unsigned char *AppInfo, size_t len));
|
||||||
|
extern int pack_AddressAppInfo
|
||||||
|
- PI_ARGS((const AddressAppInfo_t *, unsigned char *AppInfo, size_t len));
|
||||||
|
+ PI_ARGS((AddressAppInfo_t *, unsigned char *AppInfo, size_t len));
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
};
|
33
srcpkgs/pilot-link/patches/fix-const_uchar.patch
Normal file
33
srcpkgs/pilot-link/patches/fix-const_uchar.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
--- libpisock/address.c 2007-01-15 01:29:59.000000000 +0100
|
||||||
|
+++ libpisock/address.c 2016-12-20 13:51:16.230458809 +0100
|
||||||
|
@@ -209,7 +209,7 @@
|
||||||
|
size_t i,
|
||||||
|
destlen = 4 + 16 * 22 + 2 + 2;
|
||||||
|
|
||||||
|
- unsigned char *start = record;
|
||||||
|
+ const unsigned char *start = record;
|
||||||
|
unsigned long r;
|
||||||
|
|
||||||
|
ai->type = address_v1;
|
||||||
|
--- libpisock/memo.c 2007-01-15 01:30:00.000000000 +0100
|
||||||
|
+++ libpisock/memo.c 2016-12-20 13:55:47.344644240 +0100
|
||||||
|
@@ -122,7 +122,7 @@
|
||||||
|
size_t len)
|
||||||
|
{
|
||||||
|
int i = unpack_CategoryAppInfo(&appinfo->category, record, len);
|
||||||
|
- unsigned char *start = record;
|
||||||
|
+ const unsigned char *start = record;
|
||||||
|
|
||||||
|
appinfo->type = memo_v1;
|
||||||
|
|
||||||
|
--- libpisock/todo.c 2007-01-15 01:30:00.000000000 +0100
|
||||||
|
+++ libpisock/todo.c 2016-12-20 14:33:36.738559189 +0100
|
||||||
|
@@ -232,7 +232,7 @@
|
||||||
|
unpack_ToDoAppInfo(ToDoAppInfo_t *appinfo, const unsigned char *record, size_t len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
- unsigned char *start = record;
|
||||||
|
+ const unsigned char *start = record;
|
||||||
|
|
||||||
|
appinfo->type = todo_v1;
|
||||||
|
|
11
srcpkgs/pilot-link/patches/fix-ifdef_syntax.patch
Normal file
11
srcpkgs/pilot-link/patches/fix-ifdef_syntax.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- include/pi-md5.h.in 2010-02-07 04:42:49.000000000 +0100
|
||||||
|
+++ include/pi-md5.h.in 2016-12-20 14:03:39.781946035 +0100
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
#if HAVE_STDINT_H
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
-#ifdef HAVE_INTTYPES_H || HAVE_STDINT_H
|
||||||
|
+#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
|
||||||
|
#define UINT8 uint8_t
|
||||||
|
#define UINT32 uint32_t
|
||||||
|
#else
|
49
srcpkgs/pilot-link/patches/fix-linuxusb_return_types.patch
Normal file
49
srcpkgs/pilot-link/patches/fix-linuxusb_return_types.patch
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
--- libpisock/linuxusb.c 2006-10-12 16:21:22.000000000 +0200
|
||||||
|
+++ libpisock/linuxusb.c 2016-12-20 14:17:56.216661746 +0100
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include "pi-debug.h"
|
||||||
|
#include "pi-source.h"
|
||||||
|
@@ -48,8 +48,8 @@
|
||||||
|
|
||||||
|
static int u_open(pi_socket_t *ps, struct pi_sockaddr *addr, size_t addrlen);
|
||||||
|
static int u_close(pi_socket_t *ps);
|
||||||
|
-static int u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags);
|
||||||
|
-static int u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
|
||||||
|
+static ssize_t u_write(pi_socket_t *ps, PI_CONST unsigned char *buf, size_t len, int flags);
|
||||||
|
+static ssize_t u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
|
||||||
|
static int u_poll(pi_socket_t *ps, int timeout);
|
||||||
|
static int u_flush(pi_socket_t *ps, int flags);
|
||||||
|
|
||||||
|
@@ -188,7 +188,7 @@
|
||||||
|
* Returns: Nothing
|
||||||
|
*
|
||||||
|
***********************************************************************/
|
||||||
|
-static int
|
||||||
|
-u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags)
|
||||||
|
+static ssize_t
|
||||||
|
+u_write(pi_socket_t *ps, PI_CONST unsigned char *buf, size_t len, int flags)
|
||||||
|
{
|
||||||
|
int total,
|
||||||
|
@@ -243,7 +243,7 @@
|
||||||
|
* Returns: number of bytes read
|
||||||
|
*
|
||||||
|
***********************************************************************/
|
||||||
|
-static int
|
||||||
|
+static ssize_t
|
||||||
|
u_read_buf (pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags)
|
||||||
|
{
|
||||||
|
struct pi_usb_data *data = (struct pi_usb_data *)ps->device->data;
|
||||||
|
@@ -281,7 +281,7 @@
|
||||||
|
* Returns: number of bytes read or negative otherwise
|
||||||
|
*
|
||||||
|
***********************************************************************/
|
||||||
|
-static int
|
||||||
|
+static ssize_t
|
||||||
|
u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags)
|
||||||
|
{
|
||||||
|
ssize_t rbuf = 0,
|
11
srcpkgs/pilot-link/patches/fix-strncat_overrun.patch
Normal file
11
srcpkgs/pilot-link/patches/fix-strncat_overrun.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- src/pilot-memos.c 2009-06-04 15:26:19.000000000 +0200
|
||||||
|
+++ src/pilot-memos.c 2016-12-20 15:20:12.137836228 +0100
|
||||||
|
@@ -113,7 +113,7 @@
|
||||||
|
mkdir(dirname, 0700);
|
||||||
|
|
||||||
|
/* Create a directory for the category */
|
||||||
|
- strncat(pathbuffer, dirname, MAXDIRNAMELEN);
|
||||||
|
+ strncat(pathbuffer, dirname, MAXDIRNAMELEN-2);
|
||||||
|
strncat(pathbuffer, "/", 1);
|
||||||
|
|
||||||
|
/* Should make sure category doesn't have slashes in it */
|
74
srcpkgs/pilot-link/patches/fix-swig_const_char_ptr.patch
Normal file
74
srcpkgs/pilot-link/patches/fix-swig_const_char_ptr.patch
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
--- bindings/Python/src/pisock_wrap.c 2006-03-24 21:07:52.000000000 +0100
|
||||||
|
+++ bindings/Python/src/pisock_wrap.c 2016-12-20 15:03:35.066297623 +0100
|
||||||
|
@@ -1211,7 +1211,7 @@
|
||||||
|
obj = pyobj;
|
||||||
|
if (PyCFunction_Check(obj)) {
|
||||||
|
/* here we get the method pointer for callbacks */
|
||||||
|
- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
|
||||||
|
+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
|
||||||
|
c = doc ? strstr(doc, "swig_ptr: ") : 0;
|
||||||
|
if (c) {
|
||||||
|
c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
|
||||||
|
@@ -5827,18 +5827,16 @@
|
||||||
|
|
||||||
|
static PyObject *_wrap_delete_PilotUser(PyObject *self, PyObject *args) {
|
||||||
|
PyObject *resultobj = NULL;
|
||||||
|
- struct PilotUser *arg1 = (struct PilotUser *) 0 ;
|
||||||
|
- struct PilotUser temp1 ;
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- arg1 = &temp1;
|
||||||
|
+ struct PilotUser *arg1 = (struct PilotUser *) malloc(sizeof(struct PilotUser));
|
||||||
|
+
|
||||||
|
+ if(!arg1) goto fail;
|
||||||
|
|
||||||
|
if(!PyArg_ParseTuple(args,(char *)":delete_PilotUser")) goto fail;
|
||||||
|
- free((char *) arg1);
|
||||||
|
|
||||||
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
|
|
||||||
|
if (arg1) resultobj = t_output_helper(resultobj, PyObjectFromPilotUser(arg1));
|
||||||
|
+ free(arg1);
|
||||||
|
|
||||||
|
return resultobj;
|
||||||
|
fail:
|
||||||
|
@@ -6337,18 +6335,16 @@
|
||||||
|
|
||||||
|
static PyObject *_wrap_delete_SysInfo(PyObject *self, PyObject *args) {
|
||||||
|
PyObject *resultobj = NULL;
|
||||||
|
- struct SysInfo *arg1 = (struct SysInfo *) 0 ;
|
||||||
|
- struct SysInfo temp1 ;
|
||||||
|
+ struct SysInfo *arg1 = (struct SysInfo *) malloc(sizeof(struct SysInfo));
|
||||||
|
|
||||||
|
-
|
||||||
|
- arg1 = &temp1;
|
||||||
|
+ if(!arg1) goto fail;
|
||||||
|
|
||||||
|
if(!PyArg_ParseTuple(args,(char *)":delete_SysInfo")) goto fail;
|
||||||
|
- free((char *) arg1);
|
||||||
|
|
||||||
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
|
|
||||||
|
if (arg1) resultobj = t_output_helper(resultobj, PyObjectFromSysInfo(arg1));
|
||||||
|
+ free(arg1);
|
||||||
|
|
||||||
|
return resultobj;
|
||||||
|
fail:
|
||||||
|
@@ -12905,7 +12905,7 @@
|
||||||
|
swig_type_info **types_initial) {
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; methods[i].ml_name; ++i) {
|
||||||
|
- char *c = methods[i].ml_doc;
|
||||||
|
+ const char *c = methods[i].ml_doc;
|
||||||
|
if (c && (c = strstr(c, "swig_ptr: "))) {
|
||||||
|
int j;
|
||||||
|
swig_const_info *ci = 0;
|
||||||
|
@@ -12909,7 +12909,7 @@
|
||||||
|
if (c && (c = strstr(c, "swig_ptr: "))) {
|
||||||
|
int j;
|
||||||
|
swig_const_info *ci = 0;
|
||||||
|
- char *name = c + 10;
|
||||||
|
+ const char *name = c + 10;
|
||||||
|
for (j = 0; const_table[j].type; ++j) {
|
||||||
|
if (strncmp(const_table[j].name, name,
|
||||||
|
strlen(const_table[j].name)) == 0) {
|
41
srcpkgs/pilot-link/patches/fix-unused_result.patch
Normal file
41
srcpkgs/pilot-link/patches/fix-unused_result.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
--- libpisock/serial.c 2006-10-12 16:21:22.000000000 +0200
|
||||||
|
+++ libpisock/serial.c 2016-12-20 14:38:46.477854828 +0100
|
||||||
|
@@ -364,6 +364,7 @@
|
||||||
|
begin:
|
||||||
|
if ((err = data->impl.open(ps, pa, addrlen)) < 0) {
|
||||||
|
int save_errno = errno;
|
||||||
|
+ char* result = NULL;
|
||||||
|
#ifdef MAXPATHLEN
|
||||||
|
char realport[MAXPATHLEN];
|
||||||
|
#else
|
||||||
|
@@ -374,8 +375,10 @@
|
||||||
|
# endif /* PATH_MAX */
|
||||||
|
#endif /* MAXPATHLEN */
|
||||||
|
|
||||||
|
- realpath(pa->pi_device, realport);
|
||||||
|
+ result = realpath(pa->pi_device, realport);
|
||||||
|
errno = save_errno;
|
||||||
|
+ if (result == NULL)
|
||||||
|
+ result == realport;
|
||||||
|
|
||||||
|
if (errno == ENOENT) {
|
||||||
|
LOG((PI_DBG_DEV, PI_DBG_LVL_ERR,
|
||||||
|
--- src/pilot-foto-treo600.c 2009-06-04 15:32:30.000000000 +0200
|
||||||
|
+++ src/pilot-foto-treo600.c 2016-12-20 15:24:35.897251325 +0100
|
||||||
|
@@ -86,8 +86,14 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req_uid && uid == req_uid) {
|
||||||
|
- memcpy(&req_uid, Pbuf, 4); /* get next req_uid for image 'block' */
|
||||||
|
- write(fd, Pbuf + 4, size - 4); /* The rest is just jpeg data */
|
||||||
|
+ size_t done;
|
||||||
|
+ memcpy(&req_uid, Pbuf, 4); /* get next req_uid for image 'block' */
|
||||||
|
+ done = write(fd, Pbuf + 4, size - 4); /* The rest is just jpeg data */
|
||||||
|
+ if (done != size - 4) {
|
||||||
|
+ fprintf(stderr," ERROR: Error writing '%s' size %d\n\n",
|
||||||
|
+ imgfilename, size - 4);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
13
srcpkgs/pilot-link/patches/musl-matherr.patch
Normal file
13
srcpkgs/pilot-link/patches/musl-matherr.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- bindings/Tcl/tclAppInit.c 2000-10-28 02:23:50.000000000 +0200
|
||||||
|
+++ bindings/Tcl/tclAppInit.c 2016-12-20 16:24:35.056230117 +0100
|
||||||
|
@@ -20,8 +20,10 @@
|
||||||
|
* Sun shared libraries to be used for Tcl.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#if defined(__GLIBC__)
|
||||||
|
extern int matherr();
|
||||||
|
int *tclDummyMathPtr = (int *) matherr;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
EXTERN int Pitcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
|
||||||
|
|
96
srcpkgs/pilot-link/patches/pilot-link-png14.diff
Normal file
96
srcpkgs/pilot-link/patches/pilot-link-png14.diff
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
--- ./src/pilot-read-veo.c.orig 2007-02-04 17:06:03.000000000 -0600
|
||||||
|
+++ ./src/pilot-read-veo.c 2010-02-19 12:52:30.000000000 -0600
|
||||||
|
@@ -41,10 +41,6 @@
|
||||||
|
|
||||||
|
#ifdef HAVE_PNG
|
||||||
|
# include "png.h"
|
||||||
|
-# if (PNG_LIBPNG_VER < 10201)
|
||||||
|
-# define png_voidp_NULL (png_voidp)NULL
|
||||||
|
-# define png_error_ptr_NULL (png_error_ptr)NULL
|
||||||
|
-# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
|
||||||
|
@@ -856,8 +852,8 @@
|
||||||
|
png_infop info_ptr;
|
||||||
|
|
||||||
|
png_ptr = png_create_write_struct
|
||||||
|
- (PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||||
|
- png_error_ptr_NULL, png_error_ptr_NULL);
|
||||||
|
+ (PNG_LIBPNG_VER_STRING, NULL,
|
||||||
|
+ NULL, NULL);
|
||||||
|
|
||||||
|
if (!png_ptr)
|
||||||
|
return;
|
||||||
|
--- ./src/pilot-read-notepad.c.orig 2007-02-04 17:06:02.000000000 -0600
|
||||||
|
+++ ./src/pilot-read-notepad.c 2010-02-19 12:53:03.000000000 -0600
|
||||||
|
@@ -39,10 +39,6 @@
|
||||||
|
|
||||||
|
#ifdef HAVE_PNG
|
||||||
|
#include "png.h"
|
||||||
|
-#if (PNG_LIBPNG_VER < 10201)
|
||||||
|
- #define png_voidp_NULL (png_voidp)NULL
|
||||||
|
- #define png_error_ptr_NULL (png_error_ptr)NULL
|
||||||
|
-#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *progname;
|
||||||
|
@@ -166,8 +162,8 @@
|
||||||
|
width = n->body.width + 8;
|
||||||
|
|
||||||
|
png_ptr = png_create_write_struct
|
||||||
|
- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||||
|
- png_error_ptr_NULL, png_error_ptr_NULL);
|
||||||
|
+ ( PNG_LIBPNG_VER_STRING, NULL,
|
||||||
|
+ NULL, NULL);
|
||||||
|
|
||||||
|
if(!png_ptr)
|
||||||
|
return;
|
||||||
|
--- ./src/pilot-read-screenshot.c.orig 2006-11-02 08:54:31.000000000 -0600
|
||||||
|
+++ ./src/pilot-read-screenshot.c 2010-02-19 12:50:44.000000000 -0600
|
||||||
|
@@ -40,10 +40,6 @@
|
||||||
|
|
||||||
|
#ifdef HAVE_PNG
|
||||||
|
# include "png.h"
|
||||||
|
-# if (PNG_LIBPNG_VER < 10201)
|
||||||
|
-# define png_voidp_NULL (png_voidp)NULL
|
||||||
|
-# define png_error_ptr_NULL (png_error_ptr)NULL
|
||||||
|
-# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4))
|
||||||
|
@@ -87,8 +83,8 @@
|
||||||
|
gray_buf = malloc( state->w );
|
||||||
|
|
||||||
|
png_ptr = png_create_write_struct
|
||||||
|
- (PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||||
|
- png_error_ptr_NULL, png_error_ptr_NULL);
|
||||||
|
+ (PNG_LIBPNG_VER_STRING, NULL,
|
||||||
|
+ NULL, NULL);
|
||||||
|
|
||||||
|
if (!png_ptr)
|
||||||
|
return;
|
||||||
|
--- ./src/pilot-read-palmpix.c.orig 2007-02-04 17:06:03.000000000 -0600
|
||||||
|
+++ ./src/pilot-read-palmpix.c 2010-02-19 12:51:10.000000000 -0600
|
||||||
|
@@ -42,10 +42,6 @@
|
||||||
|
|
||||||
|
#ifdef HAVE_PNG
|
||||||
|
#include "png.h"
|
||||||
|
-#if (PNG_LIBPNG_VER < 10201)
|
||||||
|
- #define png_voidp_NULL (png_voidp)NULL
|
||||||
|
- #define png_error_ptr_NULL (png_error_ptr)NULL
|
||||||
|
-#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *progname;
|
||||||
|
@@ -223,8 +219,8 @@
|
||||||
|
png_infop info_ptr;
|
||||||
|
|
||||||
|
png_ptr = png_create_write_struct
|
||||||
|
- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL,
|
||||||
|
- png_error_ptr_NULL, png_error_ptr_NULL);
|
||||||
|
+ ( PNG_LIBPNG_VER_STRING, NULL,
|
||||||
|
+ NULL, NULL);
|
||||||
|
|
||||||
|
if(!png_ptr)
|
||||||
|
return;
|
105
srcpkgs/pilot-link/patches/refactor-iconv_const_char_ptr.patch
Normal file
105
srcpkgs/pilot-link/patches/refactor-iconv_const_char_ptr.patch
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
The iconv() functions to convert to and from Pilot charset pass
|
||||||
|
a const char* as the source text, but iconv() expects a char**.
|
||||||
|
Create a local copy of the const char* and use that.
|
||||||
|
Also add sanity checks to avoid dereferencing NULL pointers.
|
||||||
|
|
||||||
|
--- libpisync/util.c 2006-08-25 14:33:25.000000000 +0200
|
||||||
|
+++ libpisync/util.c 2016-12-20 14:55:18.996691848 +0100
|
||||||
|
@@ -104,24 +104,44 @@
|
||||||
|
int bytes, char **ptext, const char * pi_charset)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_ICONV
|
||||||
|
+ char* ib;
|
||||||
|
char* ob;
|
||||||
|
iconv_t cd;
|
||||||
|
- size_t ibl, obl;
|
||||||
|
+ size_t tbl, ibl, obl;
|
||||||
|
+
|
||||||
|
+ if(NULL==text){
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ tbl = strlen(text) + 1;
|
||||||
|
+ ib = calloc(tbl, sizeof(char));
|
||||||
|
+ if(NULL==ib){
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ memcpy(ib, text, tbl);
|
||||||
|
|
||||||
|
if(NULL==pi_charset){
|
||||||
|
pi_charset = PILOT_CHARSET;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
cd = iconv_open(pi_charset, charset);
|
||||||
|
- if (cd==(iconv_t)-1)
|
||||||
|
+ if (cd==(iconv_t)-1) {
|
||||||
|
+ free(ib);
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
ibl = bytes;
|
||||||
|
obl = bytes * 4 + 1;
|
||||||
|
*ptext = ob = malloc(obl);
|
||||||
|
+ if(NULL==ob){
|
||||||
|
+ free(ib);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (iconv(cd, &text, &ibl, &ob, &obl) == (size_t)-1)
|
||||||
|
+ if (iconv(cd, &ib, &ibl, &ob, &obl) == (size_t)-1) {
|
||||||
|
+ free(ib);
|
||||||
|
+ free(ob);
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
+ free(ib);
|
||||||
|
*ob = '\0';
|
||||||
|
|
||||||
|
iconv_close(cd);
|
||||||
|
@@ -195,24 +215,44 @@
|
||||||
|
int bytes, char **text, const char * pi_charset)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_ICONV
|
||||||
|
+ char* ib;
|
||||||
|
char* ob;
|
||||||
|
iconv_t cd;
|
||||||
|
- size_t ibl, obl;
|
||||||
|
+ size_t tbl, ibl, obl;
|
||||||
|
+
|
||||||
|
+ if(NULL==ptext){
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ tbl = strlen(ptext) + 1;
|
||||||
|
+ ib = calloc(tbl, sizeof(char));
|
||||||
|
+ if(NULL==ib){
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ memcpy(ib, ptext, tbl);
|
||||||
|
|
||||||
|
if(NULL==pi_charset){
|
||||||
|
pi_charset = PILOT_CHARSET;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
cd = iconv_open(charset, pi_charset);
|
||||||
|
- if (cd==(iconv_t)-1)
|
||||||
|
+ if (cd==(iconv_t)-1) {
|
||||||
|
+ free(ib);
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
ibl = bytes;
|
||||||
|
obl = bytes * 4 + 1;
|
||||||
|
*text = ob = malloc(obl);
|
||||||
|
+ if(NULL==ob){
|
||||||
|
+ free(ib);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (iconv(cd, &ptext, &ibl, &ob, &obl) == (size_t)-1)
|
||||||
|
+ if (iconv(cd, &ib, &ibl, &ob, &obl) == (size_t)-1) {
|
||||||
|
+ free(ib);
|
||||||
|
+ free(ob);
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
+ free(ib);
|
||||||
|
*ob = '\0';
|
||||||
|
|
||||||
|
iconv_close(cd);
|
57
srcpkgs/pilot-link/template
Normal file
57
srcpkgs/pilot-link/template
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
# Template file for 'pilot-link'
|
||||||
|
pkgname=pilot-link
|
||||||
|
version=0.12.5
|
||||||
|
revision=1
|
||||||
|
build_style=gnu-configure
|
||||||
|
# XXX: Add perl bindings --with-perl and fix bindings/Perl/Makefile
|
||||||
|
configure_args="--enable-conduits --enable-libusb --enable-threads --disable-static
|
||||||
|
--disable-compile-werror --with-python --with-tcl=${XBPS_CROSS_BASE}/usr/lib"
|
||||||
|
hostmakedepends="automake libtool perl pkg-config tk"
|
||||||
|
makedepends="libbluetooth-devel libusb-devel libpng-devel popt-devel
|
||||||
|
python-devel tcl-devel readline-devel"
|
||||||
|
depends="tk"
|
||||||
|
conf_files="/etc/udev/rules.d/60-libpisock.rules"
|
||||||
|
short_desc="Suite of tools to connect your Palm or PalmOS® handheld"
|
||||||
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
||||||
|
license="GPL-2"
|
||||||
|
homepage="http://www.pilot-link.org/"
|
||||||
|
# Main site is unreachable (no address record).
|
||||||
|
#distfiles="http://downloads.pilot-link.org/${pkgname}-${version}.tar.bz2"
|
||||||
|
distfiles="https://fossies.org/linux/misc/old/${pkgname}-${version}.tar.bz2"
|
||||||
|
checksum=0e3e0ea4649c7c3441b8be738d5e68332a5e414df622e013daba8e29d78bde56
|
||||||
|
|
||||||
|
# Avoid error because of deprecation
|
||||||
|
CFLAGS="-Wno-deprecated-declarations"
|
||||||
|
LDFLAGS="-lm"
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
autoreconf -fi
|
||||||
|
}
|
||||||
|
post_configure() {
|
||||||
|
# --disable-compile-error does not seem to work so patch Makefiles
|
||||||
|
find -name Makefile -exec sed -i "{}" -e "s;-Werror;-Wno-error;g" \;
|
||||||
|
# Fix wrong perl Config.pm path
|
||||||
|
sed -i bindings/Perl/Makefile \
|
||||||
|
-e "s;/usr/lib/perl/5.10/Config.pm;/usr/lib/perl5/core_perl/Config.pm;"
|
||||||
|
}
|
||||||
|
post_install() {
|
||||||
|
local m
|
||||||
|
|
||||||
|
# Install udev rules for libpisock
|
||||||
|
vinstall doc/60-libpisock.rules 644 etc/udev/rules.d
|
||||||
|
|
||||||
|
# Install manual pages
|
||||||
|
for m in doc/man/*.1; do
|
||||||
|
vman ${m}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
pilot-link-devel_package() {
|
||||||
|
short_desc+=" - development files"
|
||||||
|
depends="${makedepends} ${sourcepkg}>=${version_revision}"
|
||||||
|
pkg_install() {
|
||||||
|
vmove usr/include
|
||||||
|
vmove usr/lib/pkgconfig
|
||||||
|
vmove usr/lib/*.so
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
--- qtwebengine/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h 2016-08-26 10:48:27.000000000 +0200
|
|
||||||
+++ qtwebengine/src/3rdparty/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h 2016-11-02 12:17:07.784214681 +0100
|
|
||||||
@@ -6,6 +6,7 @@
|
|
||||||
#define UI_EVENTS_OZONE_EVDEV_TOUCH_DEBUG_BUFFER_H_
|
|
||||||
|
|
||||||
#include <linux/input.h>
|
|
||||||
+#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "base/memory/scoped_ptr.h"
|
|
Loading…
Reference in a new issue