diff options
author | markd <markd> | 2007-01-26 01:50:54 +0000 |
---|---|---|
committer | markd <markd> | 2007-01-26 01:50:54 +0000 |
commit | a14eed2d0c809c75fdb126d3c1d4c4d6acf8e808 (patch) | |
tree | 4f835b593d463962083cef48086cfb7e608fb963 | |
parent | b44918cfaa74f05155b9f18aff00a34f7abae52b (diff) | |
download | pkgsrc-a14eed2d0c809c75fdb126d3c1d4c4d6acf8e808.tar.gz |
Update malsync to 2.2.0 and apply patches from Antoine Jacoutot to build
against pilot-link 0.12.x.
-rw-r--r-- | comms/malsync/Makefile | 5 | ||||
-rw-r--r-- | comms/malsync/distinfo | 12 | ||||
-rw-r--r-- | comms/malsync/patches/patch-aa | 8 | ||||
-rw-r--r-- | comms/malsync/patches/patch-ac | 16 | ||||
-rw-r--r-- | comms/malsync/patches/patch-ad | 247 |
5 files changed, 276 insertions, 12 deletions
diff --git a/comms/malsync/Makefile b/comms/malsync/Makefile index 07b1e435cf6..11f68bdff69 100644 --- a/comms/malsync/Makefile +++ b/comms/malsync/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.20 2006/02/05 23:08:27 joerg Exp $ +# $NetBSD: Makefile,v 1.21 2007/01/26 01:50:54 markd Exp $ # DISTNAME= ${PKGNAME_NOREV:S/-/_/}.src -PKGNAME= malsync-2.1.1 -PKGREVISION= 4 +PKGNAME= malsync-2.2.0 CATEGORIES= comms MASTER_SITES= http://www.tomw.org/malsync/ diff --git a/comms/malsync/distinfo b/comms/malsync/distinfo index d942729e414..03ef275e58b 100644 --- a/comms/malsync/distinfo +++ b/comms/malsync/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.5 2005/02/23 16:05:30 agc Exp $ +$NetBSD: distinfo,v 1.6 2007/01/26 01:50:54 markd Exp $ -SHA1 (malsync_2.1.1.src.tar.gz) = c2746f25cd7a10409c342f34675dd072b6ea1cdd -RMD160 (malsync_2.1.1.src.tar.gz) = 59f17609ec30fa156a604e476852f6bed393f9f3 -Size (malsync_2.1.1.src.tar.gz) = 171745 bytes -SHA1 (patch-aa) = 31179e60ebb301a612fc8339795d7e185667005f +SHA1 (malsync_2.2.0.src.tar.gz) = c8400205b3f8770c105c9f62afdba20c94b85c26 +RMD160 (malsync_2.2.0.src.tar.gz) = 14be8ba01c20969eed8d7b718284880e0bbd424f +Size (malsync_2.2.0.src.tar.gz) = 173851 bytes +SHA1 (patch-aa) = 412ed5a2257241cd41c3b56689965eb550f4374f SHA1 (patch-ab) = de38ceb03f777bac1f4612517850e023dee946b7 +SHA1 (patch-ac) = a0ffae72d282e6b9276b8e16b909010e6e9c9b1e +SHA1 (patch-ad) = 2c9f6f3b60ba1d198e6752c7f0ec239727ae78e7 diff --git a/comms/malsync/patches/patch-aa b/comms/malsync/patches/patch-aa index bf65e400f17..6dff16376c9 100644 --- a/comms/malsync/patches/patch-aa +++ b/comms/malsync/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.3 2003/01/13 18:29:52 wiz Exp $ +$NetBSD: patch-aa,v 1.4 2007/01/26 01:50:54 markd Exp $ ---- Makefile.orig Sun Nov 17 19:52:53 2002 +--- Makefile.orig 2003-05-31 11:42:14.000000000 +1200 +++ Makefile @@ -1,5 +1,7 @@ TARGET = malsync @@ -14,7 +14,7 @@ $NetBSD: patch-aa,v 1.3 2003/01/13 18:29:52 wiz Exp $ endif TREETOP = . --PILOT_LINK_DIR = $(TREETOP)/pilot-link-0.11.5 +-PILOT_LINK_DIR = $(TREETOP)/pilot-link-0.11.7 CFLAGS = -Wall -g -DMALSYNC -I$(TREETOP)/mal/common \ -I$(TREETOP)/mal/client/common -I$(PILOT_LINK_DIR)/include \ @@ -23,7 +23,7 @@ $NetBSD: patch-aa,v 1.3 2003/01/13 18:29:52 wiz Exp $ $(TARGET): $(OBJS) - $(CC) $(DYNLINK) $(CFLAGS) -o $@ $(OBJS) \ -- -L${PILOT_LINK_DIR}/libpisock/.libs -lpisock $(LINKLIBS) +- ${PILOT_LINK_DIR}/libpisock/.libs/libpisock.a $(LINKLIBS) + $(CC) $(DYNLINK) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) \ + -L${PILOT_LINK_DIR}/lib -lpisock $(LINKLIBS) clean: diff --git a/comms/malsync/patches/patch-ac b/comms/malsync/patches/patch-ac new file mode 100644 index 00000000000..59dd22332fc --- /dev/null +++ b/comms/malsync/patches/patch-ac @@ -0,0 +1,16 @@ +$NetBSD: patch-ac,v 1.1 2007/01/26 01:50:54 markd Exp $ + +--- mal/client/unix/MAL31DBConfig.c.orig 2002-02-10 08:15:48.000000000 +1300 ++++ mal/client/unix/MAL31DBConfig.c +@@ -20,11 +20,7 @@ + */ + + #include <MAL31DBConfig.h> +-#ifdef DARWIN + #include <stdlib.h> +-#else +-#include <malloc.h> +-#endif + + /*---------------------------------------------------------------------------*/ + void diff --git a/comms/malsync/patches/patch-ad b/comms/malsync/patches/patch-ad new file mode 100644 index 00000000000..e6a44138d84 --- /dev/null +++ b/comms/malsync/patches/patch-ad @@ -0,0 +1,247 @@ +$NetBSD: patch-ad,v 1.1 2007/01/26 01:50:54 markd Exp $ + +--- malsync.c.orig 2007-01-23 00:37:31.000000000 +1300 ++++ malsync.c +@@ -100,8 +100,7 @@ typedef struct { + int pilot_rHandle; + int pilot_RecIndex; + recordid_t id; +- uint8 *pilot_buffer; +- int pilot_buffer_size; ++ pi_buffer_t *pi_buf;
+ + /* Secure Network Library Stuff */ + AGBool hasseclib; +@@ -266,8 +265,8 @@ syncInfoFree(PalmSyncInfo * pInfo) + if (NULL != pInfo->userConfig) + AGUserConfigFree(pInfo->userConfig); + +- if (NULL != pInfo->pilot_buffer) +- free(pInfo->pilot_buffer); ++ if (NULL != pInfo->pi_buf)
++ pi_buffer_free (pInfo->pi_buf);
+ + if (NULL != pInfo->commandProcessor) + AGCommandProcessorFree(pInfo->commandProcessor); +@@ -290,9 +289,8 @@ syncInfoNew() + + bzero(pInfo, sizeof(PalmSyncInfo)); + +- pInfo->pilot_buffer_size = pbs; +- pInfo->pilot_buffer = (uint8 *)malloc(pbs); +- if (NULL == pInfo->pilot_buffer) ++ pInfo->pi_buf = pi_buffer_new (pbs);
++ if (NULL == pInfo->pi_buf)
+ goto fail; + + /* Allocate the platform calls record. */ +@@ -341,8 +339,7 @@ int16 readInt16(uint8 * p) + /*---------------------------------------------------------------------------*/ + static void + readAndUseDeviceInfoDatabase(AGDeviceInfo * devInfo, +- uint8 *dev_db_info_buffer, +- uint32 dev_db_info_buffer_size) ++ pi_buffer_t *pi_buf)
+ { + int database_id = 0; + long result; +@@ -373,13 +370,13 @@ readAndUseDeviceInfoDatabase(AGDeviceInf + int rc; + + rc = dlp_ReadRecordByIndex(sd, database_id, 0, +- (void *)dev_db_info_buffer, +- &id, &dev_db_info_buffer_size, ++ pi_buf,
++ &id,
+ &attr, &cat); + + + if (rc >= 0) { +- uint8 *p = dev_db_info_buffer; ++ uint8 *p = pi_buf->data;
+ int16 dev_db_info_version = readInt16(p); + p+=sizeof(int16); + devInfo->colorDepth = readInt32(p); +@@ -472,8 +469,7 @@ readDeviceInfo(PalmSyncInfo * pInfo) + } + + readAndUseDeviceInfoDatabase(devInfo, +- pInfo->pilot_buffer, +- pInfo->pilot_buffer_size); ++ pInfo->pi_buf);
+ + /* Override the color depth if the user wants low res images. */ + if (lowres) { +@@ -663,31 +659,36 @@ static int32 + readDeviceUserConfig32(int userConfigDBHandle, AGUserConfig **deviceUserConfig) + { + recordid_t id; +- int bufferSize = BUFFERSIZE; ++ pi_buffer_t *pi_buf;
+ int attr = 0; + int cat = 0; + int rc; +- uint8 buffer[BUFFERSIZE]; + AGBufferReader * r = NULL; + +- rc = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, (void *)buffer, +- &id, &bufferSize, &attr, &cat); ++ pi_buf = pi_buffer_new (BUFFERSIZE);
++
++ rc = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, pi_buf,
++ &id, &attr, &cat);
+ + if (rc < 0) { + if (verbose) + printf("readDeviceUserConfig: dlp_ReadRecordByIndex , err = %d\n", + rc); ++ pi_buffer_free (pi_buf);
+ return 0; + } + +- r = AGBufferReaderNew(buffer); ++ r = AGBufferReaderNew(pi_buf->data);
+ if (r) { + *deviceUserConfig = AGUserConfigNew(); + AGUserConfigReadData(*deviceUserConfig, (AGReader*)r); + AGBufferReaderFree(r); ++ pi_buffer_free (pi_buf);
+ return id; +- } else ++ } else {
++ pi_buffer_free (pi_buf);
+ return 0; ++ }
+ } + #define BUFFERSIZE 0xFFFF + /*---------------------------------------------------------------------------*/ +@@ -695,31 +696,36 @@ static int32 readDeviceUserConfig31(int + AGUserConfig **deviceUserConfig) + { + recordid_t id; +- int bufferSize = BUFFERSIZE; + int attr = 0; + int cat = 0; + int rc; +- uint8 buffer[BUFFERSIZE]; ++ pi_buffer_t *pi_buf;
+ AGBufferReader * r = NULL; + +- rc = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, (void *)buffer, +- &id, &bufferSize, &attr, &cat); ++ pi_buf = pi_buffer_new (BUFFERSIZE);
++
++ rc = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, pi_buf,
++ &id, &attr, &cat);
+ + if (rc < 0) { + if (verbose) + printf("readDeviceUserConfig: dlp_ReadRecordByIndex , err = %d\n", + rc); ++ pi_buffer_free (pi_buf);
+ return 0; + } + +- r = AGBufferReaderNew(buffer); ++ r = AGBufferReaderNew(pi_buf->data);
+ if (r) { + *deviceUserConfig = AGUserConfigNew(); + MAL31ReadUserData(*deviceUserConfig, (AGReader*)r); + AGBufferReaderFree(r); ++ pi_buffer_free (pi_buf);
+ return id; +- } else ++ } else {
++ pi_buffer_free (pi_buf);
+ return 0; ++ }
+ } + /*---------------------------------------------------------------------------*/ + static int32 readDeviceUserConfig(int userConfigDBHandle, +@@ -740,23 +746,25 @@ static void writeDeviceUserConfig(int us + { + + recordid_t id; +- int bufferSize = BUFFERSIZE; + int attr = 0; + int cat = 0; +- uint8 buffer[BUFFERSIZE]; + AGBufferWriter * w = NULL; ++
+ w = AGBufferWriterNew(0); + if (w) { + long result; ++ pi_buffer_t *pi_buf;
+ ++ pi_buf = pi_buffer_new (BUFFERSIZE);
++
+ if (threeone) { + MAL31WriteUserData(deviceUserConfig, (AGWriter*)w); + } else { + AGUserConfigWriteData(deviceUserConfig, (AGWriter*)w); + } + +- result = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, (void *)buffer, +- &id, &bufferSize, &attr, &cat); ++ result = dlp_ReadRecordByIndex(sd, userConfigDBHandle, 0, pi_buf,
++ &id, &attr, &cat);
+ + if (result < 0) + id = 0; +@@ -766,7 +774,7 @@ static void writeDeviceUserConfig(int us + AGBufferWriterGetBufferSize(w), + &id); + AGBufferWriterFree(w); +- ++ pi_buffer_free (pi_buf);
+ } + } + +@@ -1044,17 +1052,17 @@ getRecordBase(PalmSyncInfo * pInfo, AGBo + int32 result; + int att = 0; + int cat = 0; +- int size = pInfo->pilot_buffer_size; ++ //int size = pInfo->pi_buf->allocated;
+ int idx = pInfo->pilot_RecIndex++; + + result = (modonly) ? +- dlp_ReadNextModifiedRec (sd, pInfo->pilot_rHandle, pInfo->pilot_buffer, ++ dlp_ReadNextModifiedRec (sd, pInfo->pilot_rHandle, pInfo->pi_buf,
+ &pInfo->id, &idx, +- &size, &att, &cat) ++ &att, &cat)
+ : + dlp_ReadRecordByIndex(sd, pInfo->pilot_rHandle, idx, +- pInfo->pilot_buffer, &pInfo->id, +- &size, &att, &cat); ++ pInfo->pi_buf, &pInfo->id,
++ &att, &cat);
+ + if (result < 0) { + closeDatabase(pInfo); +@@ -1070,7 +1078,7 @@ getRecordBase(PalmSyncInfo * pInfo, AGBo + } + pInfo->record = AGRecordInit(pInfo->record, pInfo->id, + AGPalmPilotAttribsToMALMod((uint8)att), +- size, pInfo->pilot_buffer, 0, NULL); ++ pInfo->pi_buf->used, pInfo->pi_buf->data, 0, NULL);
+ + *record = pInfo->record; + return AGCLIENT_CONTINUE; +@@ -1363,7 +1371,6 @@ main(int argc, char *argv[]) + static void + Connect(PalmSyncInfo *pi) + { +- struct pi_sockaddr addr; + int ret; + + if (sd != 0) +@@ -1609,7 +1616,6 @@ fill_in_versioninfo(int sd, AGExpansionV + 0, + (void *)version_buffer, + &id, +- &version_buffer_size, + &attr, + &cat); + |