Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

7
comms/malsync/DESCR Normal file
View File

@@ -0,0 +1,7 @@
MalSync is a bare bones utility to enable people who have Palm OS
devices to sync to Mobile Application Link (MAL) compliant servers.
AvantGo (www.avantgo.com) and Puma Technologies (www.pumatech.com)
are the first two companies committing to producing servers which
speak this protocol. This utility will allow a user to sync with
multiple servers, simultaneously or separately. The AvantGo.com
service (www.avantgo.com) is the first such server.

30
comms/malsync/Makefile Normal file
View File

@@ -0,0 +1,30 @@
# $NetBSD: Makefile,v 1.24 2012/10/03 11:24:41 asau Exp $
#
DISTNAME= ${PKGNAME_NOREV:S/-/_/}.src
PKGNAME= malsync-2.2.0
PKGREVISION= 1
CATEGORIES= comms
MASTER_SITES= http://www.tomw.org/malsync/
MAINTAINER= rh@NetBSD.org
HOMEPAGE= http://www.tomw.org/malsync/
COMMENT= Utility to synchronize Palm Pilots to the AvantGo.com service
CONFLICTS+= libmal-[0-9]*
WRKSRC= ${WRKDIR}/malsync
USE_TOOLS+= gmake
MAKE_ENV+= PILOT_LINK_DIR=${BUILDLINK_PREFIX.pilot-link-libs}
CPPFLAGS+= -D__unix__=1
INSTALLATION_DIRS= bin
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/malsync ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/malsync
.for doc in README_avantgo README_malsync
${INSTALL_DATA} ${FILESDIR}/${doc} ${DESTDIR}${PREFIX}/share/doc/malsync
.endfor
.include "../../comms/pilot-link-libs/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

4
comms/malsync/PLIST Normal file
View File

@@ -0,0 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:38:40 joerg Exp $
bin/malsync
share/doc/malsync/README_avantgo
share/doc/malsync/README_malsync

10
comms/malsync/distinfo Normal file
View File

@@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.7 2012/02/16 17:25:16 hans Exp $
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) = 616a237452a3f408b6cce199ce338746e8fa3149
SHA1 (patch-ab) = de38ceb03f777bac1f4612517850e023dee946b7
SHA1 (patch-ac) = a0ffae72d282e6b9276b8e16b909010e6e9c9b1e
SHA1 (patch-ad) = 2c9f6f3b60ba1d198e6752c7f0ec239727ae78e7
SHA1 (patch-mal_common_AGUtilUnix.h) = 3e8a09ef8a9d6e6e56a3cfdddb42e91bb9a9995a

View File

@@ -0,0 +1,122 @@
AVANTGO.COM AND UNIX DESKTOPS
=============================
AvantGo.com is a web capture and browsing service for handheld
devices. The setup incudes software on both your Palm device and your
desktop and an account on the AvantGo.com site. If you have a modem
(wireless or wired) for your Palm, you technically do not need the
desktop software, though you'll probably want it anyway.
This readme includes instructions for using a desktop Unix system to
sync your Palm V, III, IIIx, VII, or PalmPilot Professional
(collectively, "Palm device") to an AvantGo.com account.
There is currently no method for synchronizing your Windows CE device
to AvantGo.com through a Unix desktop.
Support:
--------
THIS PRODUCT IS NOT OFFICIALLY SUPPORTED BY AVANTGO. IT IS PROVIDED
AS IS FOR THE BENEFIT OF THE UNIX COMMUNITY.
For support, please use one of the following:
- The pilot-unix mailing list. To participate in this list, send a
message to pilot-unix-request@lists.best.com with the body containing
(on separate lines) "subscribe" or "help".
- The newsgroups news://comp.sys.palmtops.pilot,
news://alt.soft-sys.avantgo, or news://de.comp.sys.palmtops.pilot
(German)
What You'll Need:
-----------------
malsync
This is the actual synchronization executable.
Get it from http://www.tomw.org/malsync
Available in source or binary forms
View the README in the source/binary directory for build
instructions.
Palm OS .prc files
Specifically libmal.prc, MobileLink.prc, and avantgo.prc
You will need to install these using pilot-xfer or Mac/Win Hotsync
Included with malsync, or from
http://www.avantgo.com/download/unsupported
pilot-xfer
Unix utility to install .prc files to Palm OS devices.
Included with the pilot-link utility. V 0.9.3 is known to work.
Get it from ftp://ryeham.ee.ryerson.ca/pub/PalmOS/
Use 'make pilot-xfer' once uncompressed
Instructions:
-------------
1) Copy the built executable (malsync) to the chosen directory and
change it to an executable permission, e.g.:
chmod ugo+x ./malsync
2) Determine the correct serial port to which your Palm device is
connected.
Two common options are /dev/ttyS0 and /dev/ttyS1. Do one of two
things:
- set the PILOTPORT environment variable to that device, e.g.
setenv PILOTPORT /dev/ttyS1
- OR, bind the /dev/pilot port to the serial device, e.g.
ln -s /dev/ttyS1 /dev/pilot (root access required)
3) Determine and set the correct communication speed. Taking no
action
will result in 9600 baud connection. An alternative might be:
setenv PILOTRATE 57600
4) Transfer the .prc's to the Palm device with pilot-xfer:
pilot-xfer -i MobileLink.prc libmal.prc avantgo.prc
When the sync is finished, click on the Applications button of the
Palm device. A successful pilot-xfer will result in AvantGo and
Mobile Link icons appearing in this list.
5) Now you will need to set up your AvantGo account.
-
Go to http://avantgo.com/setup/account_only.html and select the Palm
Computing link. - Continue through the install pages until you hit
the page where you'll enter account information. - Enter your account
information and submit the page. Write down the username and password
you used here.
Note: The site changes periodically, so the exact URL may be
different.
5) Tap the Mobile Link icon on the Palm device. Enter this
information:
Server: AvantGo Server
Server Addr: sync.avantgo.com
Port: 80
User Name: <your AvantGo.com username>
Password: <your AvantGo.com password>
Enabled: Should be checked
6) In the directory in which you've put malsync, enter
./malsync (use options if necessary)
This should retrieve the stated channels from AvantGo.com. A
successful sync will result in these channels showing on your Palm
device.

View File

@@ -0,0 +1,92 @@
INTRODUCTION:
This is a bare bones utility to enable people who have Palm OS
devices to sync to Mobile Application Link (MAL) compliant servers.
AvantGo (www.avantgo.com) and Puma Technologies (www.pumatech.com)
are the first two companies committing to producing servers which speak
this protocol. This utility will allow a user to sync with multiple servers,
simultaneously or separately. The AvantGo.com service (www.avantgo.com)
is the first such server.
There is currently no way to set server parameters on the desktop; you
need to use the MobileLink application on the device.
MALSync only operates from the command line. If you want to build it
into some Unix-based, HotSync-like GUI, more power to you.
BINARIES:
Executables for MALSync on Linux, Solaris, and FreeBSD are available at
http://www.tomw.org/malsync
Whether you use the pre-existing binaries or build MALSync yourselves,
you will need the Palm OS applications. Get these from
http://www.avantgo.com/download/unsupported/ and install to your Palm
with either HotSync (MS Windows/Mac OS) or pilot-link (unix).
The binaries are also included with all the binary distributions of
malsync from http://www.tomw.org/malsync
COMPILING:
To compile you need the source, which you can get
from http://www.tom.org/malsync.
You also need the pilot-link distribution, which can be found at
ftp://ryeham.ee.ryerson.ca/pub/PalmOS/
Download the latest version. You need libpisock.a. You
can either compile the whole thing and the library will be in
libsock/.libs or you can just type "make libpisock.a" in
the libsock directory (after running configure first).
Now you need to edit the Makefile in the mal/client/unix
directory. Change "PILOT_LINK_DIR" to the appropriate
directory.
It should all make and be happy. If not, send email to me
(tom@tomw.org) or the mal-dev mailing list (see below).
RUNNING:
You need to set two environment variables:
PILOTRATE is the baud rate you want to use
PILOTPORT is the port your handheld is connected to.
All this stuff is documented in the pilot link distribution.
Usage: ./malsync [OPTIONS]
-p, --proxyaddress Proxy address.
-r, --proxyport Proxy port.
-u, --proxyname Proxy username.
-d, --proxypasswd Proxy password.
-s, --socksproxy Socks proxy.
-o, --socksport Socks port.
-q, --quiet Be as quiet as this program can.
-D, --daemon Work as a daemon (disconnect from shell).
The serial port to connect to may be specified by the PILOTPORT
environment variable. If not specified it will default to
/dev/pilot
The baud rate to connect with may be specified by the PILOTRATE
environment variable. If not specified, it will default to 9600.
Please use caution setting it to higher values, as several types
of workstations have problems with higher rates.
SUPPORT AND BUGS:
THIS PRODUCT IS NOT OFFICIALLY SUPPORTED BY AVANTGO. IT IS
PROVIDED AS IS FOR THE BENEFIT OF THE UNIX COMMUNITY.
The pilot-unix mailing list can be investigated by sending
email to pilot-unix-requests@lists.best.com with the body
message "help".
If you have any bugs or feature requests you can send them
to tom@tomw.org. Also feel free to fix or add them yourself
and send me the diffs!

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-aa,v 1.5 2012/02/16 17:25:16 hans Exp $
--- Makefile.orig 2003-05-31 11:42:14.000000000 +1200
+++ Makefile
@@ -1,5 +1,7 @@
TARGET = malsync
+all: ${TARGET}
+
PLAT := $(shell uname)
ifeq ($(PLAT),SunOS)
@@ -15,7 +17,6 @@ LINKLIBS = -lm
endif
TREETOP = .
-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 \
@@ -59,10 +60,6 @@ SRC = malsync.c \
$(TREETOP)/mal/client/common/AGSyncProcessor.c \
$(TREETOP)/mal/common/AGServerConfig.c
-ifeq ($(PLAT),SunOS)
-SRC += ap_snprintf.c
-endif
-
OBJS = $(SRC:.c=.o)
ifeq ($(PLAT),Darwin)
@@ -72,8 +69,8 @@ DYNLINK = -rdynamic
endif
$(TARGET): $(OBJS)
- $(CC) $(DYNLINK) $(CFLAGS) -o $@ $(OBJS) \
- ${PILOT_LINK_DIR}/libpisock/.libs/libpisock.a $(LINKLIBS)
+ $(CC) $(DYNLINK) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) \
+ -L${PILOT_LINK_DIR}/lib -lpisock $(LINKLIBS)
clean:
rm -f $(OBJS) $(TARGET)

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-ab,v 1.2 2003/01/13 18:29:53 wiz Exp $
--- mal/common/AGNet.h.orig Fri Jan 5 17:50:07 2001
+++ mal/common/AGNet.h
@@ -54,6 +54,7 @@
# else /* defined(macintosh) */
# include <netdb.h>
# include <sys/types.h>
+# include <sys/param.h>
# include <sys/socket.h>
# include <unistd.h>
# include <netinet/in.h>
@@ -61,7 +62,7 @@
# include <sys/filio.h>
# include <arpa/inet.h>
# else
-# if defined(__FreeBSD__) || defined(_HPUX_SOURCE)
+# if (defined(BSD) && BSD >= 199306) || defined(_HPUX_SOURCE)
# include <sys/ioctl.h>
# include <arpa/inet.h>
# else

View File

@@ -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

View File

@@ -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);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-mal_common_AGUtilUnix.h,v 1.1 2012/02/16 17:25:16 hans Exp $
--- mal/common/AGUtilUnix.h.orig 2000-05-14 23:17:36.000000000 +0200
+++ mal/common/AGUtilUnix.h 2012-01-26 17:39:25.909557059 +0100
@@ -46,8 +46,6 @@ extern "C" {
#include <httpd.h>
#include <ap.h>
#endif
-#define snprintf ap_snprintf
-#define vsnprintf ap_vsnprintf
#endif
#endif /* __unix__ */