mpack: mirror the distfile, whack some implicit function definitions
and a 64-bit time_t issue
This commit is contained in:
parent
c4d6976d37
commit
a732706ca7
|
@ -1,7 +1,7 @@
|
||||||
COMMENT= external MIME packer/unpacker
|
COMMENT= external MIME packer/unpacker
|
||||||
|
|
||||||
DISTNAME= mpack-1.6
|
DISTNAME= mpack-1.6
|
||||||
REVISION= 2
|
REVISION= 3
|
||||||
CATEGORIES= converters mail news
|
CATEGORIES= converters mail news
|
||||||
|
|
||||||
# BSD
|
# BSD
|
||||||
|
@ -10,12 +10,12 @@ PERMIT_PACKAGE= Yes
|
||||||
WANTLIB += c
|
WANTLIB += c
|
||||||
|
|
||||||
MASTER_SITES= http://ftp.andrew.cmu.edu/pub/mpack/ \
|
MASTER_SITES= http://ftp.andrew.cmu.edu/pub/mpack/ \
|
||||||
ftp://ftp.andrew.cmu.edu/pub/mpack/
|
https://spacehopper.org/mirrors/
|
||||||
|
|
||||||
CONFIGURE_STYLE= gnu
|
CONFIGURE_STYLE= gnu
|
||||||
NO_TEST= Yes
|
NO_TEST= Yes
|
||||||
|
|
||||||
# less annoying for patching
|
# less annoying for patching; not the same as FIX_EXTRACT_PERMISSIONS
|
||||||
post-extract:
|
post-extract:
|
||||||
chmod -R u+w ${WRKSRC}/
|
chmod -R u+w ${WRKSRC}/
|
||||||
|
|
||||||
|
|
12
converters/mpack/patches/patch-common_h
Normal file
12
converters/mpack/patches/patch-common_h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Index: common.h
|
||||||
|
--- common.h.orig
|
||||||
|
+++ common.h
|
||||||
|
@@ -29,6 +29,8 @@
|
||||||
|
#define TEMPFILENAME "tempdesc.txt"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <unistd.h>
|
||||||
|
+
|
||||||
|
#if defined(unix) && !defined(remove)
|
||||||
|
#define remove unlink
|
||||||
|
#endif
|
|
@ -1,6 +1,11 @@
|
||||||
--- decode.c.orig Mon Jul 21 21:47:54 2003
|
Index: decode.c
|
||||||
+++ decode.c Tue Dec 11 10:47:55 2012
|
--- decode.c.orig
|
||||||
@@ -28,10 +28,11 @@
|
+++ decode.c
|
||||||
|
@@ -25,17 +25,20 @@
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
* SOFTWARE. */
|
||||||
|
|
||||||
|
+#include <err.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -13,7 +18,12 @@
|
||||||
|
|
||||||
extern char *os_idtodir(char *id);
|
extern char *os_idtodir(char *id);
|
||||||
extern FILE *os_newtypedfile(char *fname, char *contentType, int flags, params contentParams);
|
extern FILE *os_newtypedfile(char *fname, char *contentType, int flags, params contentParams);
|
||||||
@@ -545,8 +546,8 @@ getDispositionFilename(char *disposition)
|
extern FILE *os_createnewfile(char *fname);
|
||||||
|
+extern FILE *os_resetfile(char *fname);
|
||||||
|
extern char *md5contextTo64(MD5_CTX *context);
|
||||||
|
|
||||||
|
/* The possible content transfer encodings */
|
||||||
|
@@ -545,8 +548,8 @@ getDispositionFilename(char *disposition)
|
||||||
SkipWhitespace(&disposition);
|
SkipWhitespace(&disposition);
|
||||||
if (!disposition) return 0;
|
if (!disposition) return 0;
|
||||||
|
|
||||||
|
@ -24,7 +34,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
SkipWhitespace(&disposition);
|
SkipWhitespace(&disposition);
|
||||||
@@ -632,7 +633,7 @@ int handlePartial(struct part *inpart, char *headers,
|
@@ -632,7 +635,7 @@ int handlePartial(struct part *inpart, char *headers,
|
||||||
}
|
}
|
||||||
/* Store number of parts in reassembly directory */
|
/* Store number of parts in reassembly directory */
|
||||||
sprintf(buf, "%sCT", dir);
|
sprintf(buf, "%sCT", dir);
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
Fixes from Sebastian Pipping/gentoo.
|
Fixes from Sebastian Pipping/gentoo.
|
||||||
|
|
||||||
--- unixos.c.orig Mon Jul 21 21:54:05 2003
|
Index: unixos.c
|
||||||
+++ unixos.c Tue Dec 11 10:52:04 2012
|
--- unixos.c.orig
|
||||||
@@ -30,6 +30,7 @@
|
+++ unixos.c
|
||||||
|
@@ -26,10 +26,13 @@
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
+#include <err.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
+#include <sys/stat.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "part.h"
|
#include "part.h"
|
||||||
@@ -38,10 +39,6 @@
|
@@ -38,10 +41,6 @@
|
||||||
#define MAXHOSTNAMELEN 64
|
#define MAXHOSTNAMELEN 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +28,16 @@ Fixes from Sebastian Pipping/gentoo.
|
||||||
int overwrite_files = 0;
|
int overwrite_files = 0;
|
||||||
int didchat;
|
int didchat;
|
||||||
|
|
||||||
@@ -90,7 +87,7 @@ char *os_idtodir(char *id)
|
@@ -76,7 +75,7 @@ char *os_genid(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
result = malloc(25+strlen(hostname));
|
||||||
|
- sprintf(result, "%d.%d@%s", pid, curtime++, hostname);
|
||||||
|
+ sprintf(result, "%d.%lld@%s", pid, (long long)curtime++, hostname);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -90,7 +89,7 @@ char *os_idtodir(char *id)
|
||||||
strcpy(buf, getenv("TMPDIR"));
|
strcpy(buf, getenv("TMPDIR"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -30,7 +46,7 @@ Fixes from Sebastian Pipping/gentoo.
|
||||||
}
|
}
|
||||||
strcat(buf, "/m-prts-");
|
strcat(buf, "/m-prts-");
|
||||||
p = getenv("USER");
|
p = getenv("USER");
|
||||||
@@ -136,11 +133,7 @@ FILE *os_createnewfile(char *fname)
|
@@ -136,11 +135,7 @@ FILE *os_createnewfile(char *fname)
|
||||||
int fd;
|
int fd;
|
||||||
FILE *ret;
|
FILE *ret;
|
||||||
|
|
||||||
|
@ -43,7 +59,7 @@ Fixes from Sebastian Pipping/gentoo.
|
||||||
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -149,7 +142,19 @@ FILE *os_createnewfile(char *fname)
|
@@ -149,7 +144,19 @@ FILE *os_createnewfile(char *fname)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
--- unixpk.c.orig Mon Jul 21 21:50:41 2003
|
Index: unixpk.c
|
||||||
+++ unixpk.c Tue Dec 11 10:52:18 2012
|
--- unixpk.c.orig
|
||||||
@@ -25,6 +25,8 @@
|
+++ unixpk.c
|
||||||
|
@@ -22,9 +22,11 @@
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
+#include <sys/wait.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include <unistd.h>
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
--- unixunpk.c.orig Mon Jul 21 21:51:55 2003
|
Index: unixunpk.c
|
||||||
+++ unixunpk.c Sun Jan 8 00:04:32 2012
|
--- unixunpk.c.orig
|
||||||
@@ -23,6 +23,7 @@
|
+++ unixunpk.c
|
||||||
|
@@ -23,6 +23,8 @@
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "part.h"
|
#include "part.h"
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ int main(int argc, char **argv)
|
@@ -100,7 +102,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
void usage(void) {
|
void usage(void) {
|
||||||
fprintf(stderr, "munpack version %s\n", MPACK_VERSION);
|
fprintf(stderr, "munpack version %s\n", MPACK_VERSION);
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
Allow building with CLang's scan-build.
|
Allow building with CLang's scan-build.
|
||||||
|
|
||||||
--- uudecode.c.orig Mon Jul 21 21:46:37 2003
|
Index: uudecode.c
|
||||||
+++ uudecode.c Tue Dec 11 10:23:21 2012
|
--- uudecode.c.orig
|
||||||
@@ -35,6 +35,7 @@ extern FILE *os_createnewfile(char *fname);
|
+++ uudecode.c
|
||||||
|
@@ -23,6 +23,8 @@
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "xmalloc.h"
|
||||||
|
@@ -35,6 +37,7 @@ extern FILE *os_createnewfile(char *fname);
|
||||||
|
|
||||||
static FILE *startDescFile(char *fname);
|
static FILE *startDescFile(char *fname);
|
||||||
|
|
||||||
|
@ -10,7 +20,7 @@ Allow building with CLang's scan-build.
|
||||||
|
|
||||||
/* Length of a normal uuencoded line, including newline */
|
/* Length of a normal uuencoded line, including newline */
|
||||||
#define UULENGTH 62
|
#define UULENGTH 62
|
||||||
@@ -826,7 +827,7 @@ uudecodefiles(char *dir, int nparts)
|
@@ -826,7 +829,7 @@ uudecodefiles(char *dir, int nparts)
|
||||||
/*
|
/*
|
||||||
* Decode a uuencoded line to 'outfile'
|
* Decode a uuencoded line to 'outfile'
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +29,7 @@ Allow building with CLang's scan-build.
|
||||||
{
|
{
|
||||||
int c, len;
|
int c, len;
|
||||||
|
|
||||||
@@ -845,7 +846,4 @@ int uudecodeline(char *line, FILE *outfile)
|
@@ -845,7 +848,4 @@ int uudecodeline(char *line, FILE *outfile)
|
||||||
}
|
}
|
||||||
line += 4;
|
line += 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user