From nobody Sun Oct 22 08:36:20 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCs9c64gLz4yFwB; Sun, 22 Oct 2023 08:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCs9c5nKGz3FX4; Sun, 22 Oct 2023 08:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697963780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDY1dR/m6SqJmDKzrhLwkGXoDnfwG7RedN0OabZWaOg=; b=Vf63c9kRiZFXXuzxCdg86m1bt8nZ8vp5FHUU41nJSDoskGDeV8oXIJw4bD8YteJm6Hx+LV aRuzsKL0h3Fv++hAiX+dpnYE3aTqrhmX5Ezyw87YuspKXI6N/tdGL5wysI4xAX9J1pMIP0 pqHF3AQpR4+HXIpNkYPnLP/jULx9iIi6+Gh2Kr5VBqWQSLcMOlU0hOh8K3AGbbvNpTTTWr M7TrJmsLQYfXsZc1XSSvZWSdV5HlK7WSrufzdzGtOMm7WEVt4ZzcO5PdaENnqophzaYdUF phyFNM4sd8s5IHpR0AVltnTOL5N/uqRPf2rMzVknFNm7VZXeRSz0PwlOx5McGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697963780; a=rsa-sha256; cv=none; b=dnSy+P/MvnuSXuVUC4UgN7ZeZmM5FQ+n2GvuF7bJ9Wv0uoabgTDK26i9f+w6kW51ntMfG9 tRjmVou1qlwx9JmtHqoCa6nTJqlnv2vvxB6uu76TzMHuK6NTF5Ky5fnFOmxBz2w4VWtDhG fKrps84Jvv/g0o7xhtyyU0SUn9p/DNYlHZ4K2kQUImmPSey3EAU7J5PUY3gHalzOi7qfC6 a8Y0WBabRPhmKDe8oHaa+Xq7DPboG6TOW+U5rcIpqfjTF7j3Yq5Cu90/yNCtjYNFSky2V6 ETYu3d5xSidbzlvzDc9ZPK6HM6Wd390NxYW89c8JnvsjAUmFrAHUPwNBAMDF8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697963780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDY1dR/m6SqJmDKzrhLwkGXoDnfwG7RedN0OabZWaOg=; b=cjF7G+16TCt3ALViADh50FPUq+wR19foqSSq+rfq4/O2VNx9CqPOqgqDaRkQY2AuQWHuaW 5jDWUOoTfVOz4BxcOgGWDtKk0vumFkDUA/CqWOTH/IGl9BMJQqoeBtmcsugGjycpx54vvM O2gRqOTH/G9vYjSB2evv5X1UEdyZHFwk97muBTRNRvK4Y0jbQ6KxjIk2Qpd7k3LntFad1/ XacCCEUZCkJMOpbET/mXA+RYisyfN+FWSYZ6GrEsGpiIjtety+YtxN1E+ulYeUDTzLwmMd kY3coKfP0UMwAo9tzdFtVfwNopW3ggoWcWreysBMCDgICw3ja5bnSCWkF1k5rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCs9c4qxpzr6g; Sun, 22 Oct 2023 08:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39M8aKNp082281; Sun, 22 Oct 2023 08:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39M8aKIf082278; Sun, 22 Oct 2023 08:36:20 GMT (envelope-from git) Date: Sun, 22 Oct 2023 08:36:20 GMT Message-Id: <202310220836.39M8aKIf082278@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: da38902830d3 - main - sysutils/deltup: upgrade to version 0.4.6 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da38902830d326a2b5f2fb45f4d6f2e91ef57614 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=da38902830d326a2b5f2fb45f4d6f2e91ef57614 commit da38902830d326a2b5f2fb45f4d6f2e91ef57614 Author: Stefan Eßer AuthorDate: 2023-10-22 08:32:46 +0000 Commit: Stefan Eßer CommitDate: 2023-10-22 08:36:10 +0000 sysutils/deltup: upgrade to version 0.4.6 Fetch from GitHub, since the main web-site deltup.org seems unresponsive (it still has a DNS entry). --- sysutils/deltup/Makefile | 60 ++++++++------- sysutils/deltup/distinfo | 7 +- sysutils/deltup/files/patch-Makefile | 19 ----- sysutils/deltup/files/patch-bzip2.cpp | 39 ---------- sysutils/deltup/files/patch-deltup.cpp | 122 ------------------------------- sysutils/deltup/files/patch-file.cpp | 10 --- sysutils/deltup/files/patch-file.h | 29 -------- sysutils/deltup/files/patch-gzip.cpp | 67 ----------------- sysutils/deltup/files/patch-gzip.h | 20 ----- sysutils/deltup/files/patch-src_Makefile | 32 ++++++++ sysutils/deltup/files/patch-system.cpp | 21 ------ sysutils/deltup/files/patch-tmpstore.cpp | 11 --- 12 files changed, 71 insertions(+), 366 deletions(-) diff --git a/sysutils/deltup/Makefile b/sysutils/deltup/Makefile index 94b8607a23fc..f6a63741485e 100644 --- a/sysutils/deltup/Makefile +++ b/sysutils/deltup/Makefile @@ -1,20 +1,23 @@ PORTNAME= deltup -PORTVERSION= 0.4.4 -PORTREVISION= 1 +DISTVERSIONPREFIX= v +DISTVERSION= 0.4.6 CATEGORIES= sysutils -MASTER_SITES= http://deltup.org/e107_files/downloads/ \ - LOCAL/rafan \ +MASTER_SITES= https://github.com/jjwhitney/Deltup/archive/refs/tags/ \ http://www.bzip.org/${BZIP2_102}/:bzip2102src \ http://www.bzip.org/${BZIP2_103}/:bzip2103src -DISTFILES+= ${DISTNAME}.tar.gz ${BZIP2_102_SOURCE}:bzip2102src ${BZIP2_103_SOURCE}:bzip2103src +DISTFILES+= ${DISTVERSIONPREFIX}${DISTVERSION}.tar.gz \ + ${BZIP2_102_SOURCE}:bzip2102src \ + ${BZIP2_103_SOURCE}:bzip2103src -MAINTAINER= ports@FreeBSD.org +MAINTAINER= se@FreeBSD.org COMMENT= Source delta update program -WWW= http://www.deltup.org/ +WWW= https://github.com/jjwhitney/Deltup # http://www.deltup.org/ + +LICENSE= GPLv2+ RUN_DEPENDS= bdelta:misc/bdelta \ - xdelta:misc/xdelta \ - gzip>=1:archivers/gzip + gzip>=1:archivers/gzip \ + xdelta:misc/xdelta BZIP2_102_SOURCE= bzip2-${BZIP2_102}.tar.gz BZIP2_103_SOURCE= bzip2-${BZIP2_103}.tar.gz @@ -23,42 +26,47 @@ BZIP2_102= 1.0.2 BZIP2_103= 1.0.3 USES= gmake ssl -ALL_TARGET= deltup -MAKE_ARGS= CC="${CC}" CXX="${CXX}" PREFIX="${PREFIX}" +MAKE_ARGS= CC="${CC}" \ + CXX="${CXX}" \ + PREFIX="${PREFIX}" CXXFLAGS+= -I${OPENSSLINC} -PLIST_FILES= bin/deltup \ - bin/bzip2_1.0.2 \ - bin/bzip2_1.0.3 \ - man/man1/deltup.1.gz + +WRKSRC= ${WRKDIR}/Deltup-${PORTVERSION} WRKSRC_BZIP2_102= ${WRKDIR}/bzip2-${BZIP2_102} WRKSRC_BZIP2_103= ${WRKDIR}/bzip2-${BZIP2_103} +PLIST_FILES= bin/bzip2_1.0.2 \ + bin/bzip2_1.0.3 \ + bin/deltup \ + man/man1/deltup.1.gz + PORTDOCS= ChangeLog README OPTIONS_DEFINE= DOCS -post-patch: - @${REINPLACE_CMD} -e 's/CC/CXX/' -e 's,gcc,$${CXX},' \ - -e "s|\(-lcrypto\)|-L${OPENSSLLIB} \1|g" ${WRKSRC}/Makefile - pre-build: + @${REINPLACE_CMD} -e 's,CC,CXX,;s,gcc,$${CXX},' \ + -e "s|\(-lcrypto\)|-L${OPENSSLLIB} \1|g" ${WRKSRC}/src/Makefile @${REINPLACE_CMD} -e 's|-Wall -Winline -O2|-Wall -Winline -O2 ${CFLAGS}|' \ ${WRKSRC_BZIP2_102}/Makefile @${REINPLACE_CMD} -e 's|-Wall -Winline -O -g|-Wall -Winline -O2 ${CFLAGS}|' \ ${WRKSRC_BZIP2_103}/Makefile - @(cd ${WRKSRC_BZIP2_102} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} bzip2) - @(cd ${WRKSRC_BZIP2_103} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} bzip2) + +do-build: + @cd ${WRKSRC_BZIP2_102} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ + ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} bzip2 + @cd ${WRKSRC_BZIP2_103} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ + ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} bzip2 + cd ${WRKSRC}/src && ${MAKE} deltup do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/deltup ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/src/deltup ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC_BZIP2_102}/bzip2 ${STAGEDIR}${PREFIX}/bin/bzip2_1.0.2 ${INSTALL_PROGRAM} ${WRKSRC_BZIP2_103}/bzip2 ${STAGEDIR}${PREFIX}/bin/bzip2_1.0.3 ${INSTALL_MAN} ${WRKSRC}/deltup.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 - @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in ${PORTDOCS} - @${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/${i} + ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/${i} .endfor .include diff --git a/sysutils/deltup/distinfo b/sysutils/deltup/distinfo index c0f3f403b9bf..dbc21bd34765 100644 --- a/sysutils/deltup/distinfo +++ b/sysutils/deltup/distinfo @@ -1,6 +1,9 @@ -SHA256 (deltup-0.4.4.tar.gz) = fba7f1a970a04b2b786402e55c017c667b065f1974154f2ba6a65c855357b744 -SIZE (deltup-0.4.4.tar.gz) = 14905 +TIMESTAMP = 1697960572 +SHA256 (v0.4.6.tar.gz) = f86b304dcdadc864cd347d382dc2c9c249e399f22408d6d7d68490374386c365 +SIZE (v0.4.6.tar.gz) = 14869 SHA256 (bzip2-1.0.2.tar.gz) = 4b526afa73ca1ccd6f5f1f5fd23813f159f715c3d0e00688f1df54b51f443cdd SIZE (bzip2-1.0.2.tar.gz) = 665198 SHA256 (bzip2-1.0.3.tar.gz) = 4aaa8e7b4ecf03d91c33e8bf92d489533fa6c1f99e825c34058003f18eb68c13 SIZE (bzip2-1.0.3.tar.gz) = 669075 +SHA256 (jjwhitney-Deltup-v0.4.6_GH0.tar.gz) = f86b304dcdadc864cd347d382dc2c9c249e399f22408d6d7d68490374386c365 +SIZE (jjwhitney-Deltup-v0.4.6_GH0.tar.gz) = 14869 diff --git a/sysutils/deltup/files/patch-Makefile b/sysutils/deltup/files/patch-Makefile deleted file mode 100644 index 4c65a1ce768e..000000000000 --- a/sysutils/deltup/files/patch-Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.orig 2005-05-21 04:23:34.000000000 +0400 -+++ Makefile 2013-03-16 09:57:42.000000000 +0400 -@@ -4,13 +4,13 @@ - - CC = g++ - --objfiles=bpatch.o bzip2.o file.o system.o tmpstore.o deltup.o --libs=-lstdc++ -lz -lbz2 -lssl -+objfiles=bpatch.o bzip2.o gzip.o file.o system.o tmpstore.o deltup.o -+libs=-lz -lbz2 -lcrypto - - #edelta: edelta.cpp deltup - # gcc edelta.cpp ${CXXFLAGS} -o edelta - %.o : %.cpp -- ${CC} -c $< -o $@ -g #-Wall -pedantic #-DFIXED_FRAMERATE -+ ${CC} -c $< -o $@ ${CXXFLAGS} - - all: deltup - diff --git a/sysutils/deltup/files/patch-bzip2.cpp b/sysutils/deltup/files/patch-bzip2.cpp deleted file mode 100644 index c7c10010edba..000000000000 --- a/sysutils/deltup/files/patch-bzip2.cpp +++ /dev/null @@ -1,39 +0,0 @@ ---- bzip2.cpp.orig 2007-03-25 01:59:24.000000000 +0300 -+++ bzip2.cpp 2013-10-06 17:12:16.000000000 +0400 -@@ -19,6 +19,8 @@ - #include "system.h" - #include "tmpstore.h" - #include "bzip2.h" -+#include -+#include - - char *bzip2_compressor_name[MAX_BZIP2_COMPRESSORS] = {"0.9.0c", "1.0.2", "1.0.3", "1.0.4"}; - char *bzip2_name[MAX_BZIP2_COMPRESSORS] = {NULL, NULL, NULL, NULL}; -@@ -31,14 +33,12 @@ - system(command.c_str()); - - FILE * fp; -- char * line = NULL; -+ char line[2*CHAR_MAX]; - string fname; -- size_t len = 0; -- ssize_t read; - fp = fopen(tempfile.c_str(), "r"); - if (fp == NULL) - exit(EXIT_FAILURE); -- while ((read = getline(&line, &len, fp)) != -1) { -+ while (fgets(line, 2*CHAR_MAX, fp)!=NULL) { - // printf("Retrieved line of length %zu :\n", read); - // printf("%s", line); - char *v = strstr(line, "Version"); -@@ -56,8 +56,8 @@ - } - fname = line; - } -- if (line) -- free(line); -+// if (line) -+// free(&line); - if (verbose) { - printf("found bzip2 compressors/decompressors:\n"); - for (int i = 0; i < MAX_BZIP2_COMPRESSORS; ++i) { diff --git a/sysutils/deltup/files/patch-deltup.cpp b/sysutils/deltup/files/patch-deltup.cpp deleted file mode 100644 index 60a2d1595583..000000000000 --- a/sysutils/deltup/files/patch-deltup.cpp +++ /dev/null @@ -1,122 +0,0 @@ ---- deltup.cpp.orig 2007-07-13 07:22:20.000000000 +0400 -+++ deltup.cpp 2013-10-06 17:15:15.000000000 +0400 -@@ -16,7 +16,7 @@ - //#include - //#include - //#include --//#include -+#include - //#include - //#include - //#include -@@ -32,6 +32,7 @@ - #include "filetypes.h" - #include "system.h" - #include "bzip2.h" -+#include "gzip.h" - - bool force_overwrite = false, remove_intermediate = false, - info_mode = false, ensure_md5sum = false, use_bdelta = false; -@@ -150,28 +151,33 @@ - - void gzip_without_header(string in, string out, char compression) { - string tempfile = getTmpFilename(); -- -- deflate("gzip", in, tempfile, compression, false); -+ find_gzip_compressor(); -+ if (gzip_name != NULL) { -+ deflate(gzip_name, in, tempfile, compression, false); - // printf("here2 %s %s %c\n", in.c_str(), tempfile.c_str(), compression); -- unsigned filesize = getLenOfFile(tempfile); -- char inbuf[12]; -- IFStream *f = new IFStream(tempfile); -- f->read(inbuf, 10); -- char flags = inbuf[3]; -- -- if (flags & 2) f->read(inbuf, 2); -- if (flags & 4) { -- unsigned extrafieldsize = read_word(*f); -- while (extrafieldsize) -- extrafieldsize -= f->read(inbuf, extrafieldsize<10?extrafieldsize:10); -- } -- if (flags & 8) do f->read(inbuf, 1); while (*inbuf); -- if (flags & 16) do f->read(inbuf, 1); while (*inbuf); -- if (flags & 32) f->read(inbuf, 2); -- -- OFStream o(out); -- copy_bytes_to_file(*f, o, filesize-f->loc()); -- delete f; -+ unsigned filesize = getLenOfFile(tempfile); -+ char inbuf[12]; -+ IFStream *f = new IFStream(tempfile); -+ f->read(inbuf, 10); -+ char flags = inbuf[3]; -+ -+ if (flags & 2) f->read(inbuf, 2); -+ if (flags & 4) { -+ unsigned extrafieldsize = read_word(*f); -+ while (extrafieldsize) -+ extrafieldsize -= f->read(inbuf, extrafieldsize<10?extrafieldsize:10); -+ } -+ if (flags & 8) do f->read(inbuf, 1); while (*inbuf); -+ if (flags & 16) do f->read(inbuf, 1); while (*inbuf); -+ if (flags & 32) f->read(inbuf, 2); -+ -+ OFStream o(out); -+ copy_bytes_to_file(*f, o, filesize-f->loc()); -+ delete f; -+ gzip_found = 1; -+ } else { -+ gzip_found = 0; -+ } - doneTmpFile(tempfile); - - } -@@ -245,12 +251,16 @@ - string gzip_temp = getTmpFilename(); - const char *lev = "968712534"; - do { -- printf("here %c\n", *lev); - gzip_without_header(file2.uname, gzip_temp, *lev); -+ if (gzip_found == 0) { break; -+// } else { -+// printf("here %c\n", *lev); -+ } - makeDelta(use_bdelta, gzip_temp, file2.fullname(), pristineName); - ++lev; - } while (*lev && getLenOfFile(pristineName)>1024); -- if (!*lev) error("Unknown gzip compression format"); -+ if (gzip_found == 0) { error("Can't find GNU gzip"); -+ } else if (!*lev) { error("Unknown gzip compression format"); } - compression_level=*(lev-1)-'0'; - doneTmpFile(gzip_temp); - } else if (file2.type==BZIP2) { -@@ -365,7 +375,10 @@ - bzip2_name[i]); - } else fprintf(stderr, "Error: Deltup cannot find the proper bzip2 to rebuild the package\n"); - break; -- case GZIP: gzip_without_header(f.uname, finalName, c); break; -+ case GZIP: -+ gzip_without_header(f.uname, finalName, c); -+ if (gzip_found == 0) error("Can't find GNU gzip"); -+ break; - case UNKNOWN_FMT: cat(f.uname, finalName, false); - - }; -@@ -520,14 +533,14 @@ - IStream *f = new IFStream(fname); - Injectable_IStream f2(*f); - if (((IFStream*)f)->bad()) { -- fprintf(stderr, "file is missing: %s\n", fname.c_str()); return;} -+ fprintf(stderr, "file is missing: %s\n", fname.c_str()); exit(1);} - unsigned type = determine_filetype(f2); - delete f; - switch (type) { - case GZIP: f = new GZ_IFStream(fname); break; - case BZIP2: f = new BZ_IFStream(fname); break; - case DTU: f = new IFStream(fname); break; -- case UNKNOWN_FMT: fprintf(stderr, "cannot read file %s\n", fname.c_str()); return; -+ case UNKNOWN_FMT: fprintf(stderr, "cannot read file %s\n", fname.c_str()); exit(1); - case TARBALL : - f = new IFStream(fname); - unsigned zero_count; diff --git a/sysutils/deltup/files/patch-file.cpp b/sysutils/deltup/files/patch-file.cpp deleted file mode 100644 index cfb0656d53b7..000000000000 --- a/sysutils/deltup/files/patch-file.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- file.cpp.orig 2013-10-06 17:12:46.000000000 +0400 -+++ file.cpp 2013-10-06 17:13:27.000000000 +0400 -@@ -12,6 +12,7 @@ - * Author: John Whitney - */ - -+#include - #include - #include - #include diff --git a/sysutils/deltup/files/patch-file.h b/sysutils/deltup/files/patch-file.h deleted file mode 100644 index e68afcb3ce0f..000000000000 --- a/sysutils/deltup/files/patch-file.h +++ /dev/null @@ -1,29 +0,0 @@ ---- file.h.orig 2013-03-16 09:40:32.000000000 +0400 -+++ file.h 2013-03-16 09:41:06.000000000 +0400 -@@ -12,6 +12,8 @@ - * Author: John Whitney - */ - -+#include -+ - class IStream { - public: - virtual unsigned read(void *data, unsigned num) = 0; -@@ -56,7 +58,7 @@ - }; - - class GZ_IFStream : public IStream { -- void *file; -+ gzFile file; - public: - GZ_IFStream(string fname); - virtual ~GZ_IFStream(); -@@ -65,7 +67,7 @@ - }; - - class GZ_OFStream : public OStream { -- void *file; -+ gzFile file; - public: - GZ_OFStream(string fname); - virtual ~GZ_OFStream(); diff --git a/sysutils/deltup/files/patch-gzip.cpp b/sysutils/deltup/files/patch-gzip.cpp deleted file mode 100644 index 1a1b65015e9a..000000000000 --- a/sysutils/deltup/files/patch-gzip.cpp +++ /dev/null @@ -1,67 +0,0 @@ ---- gzip.cpp.orig 2013-10-06 17:11:38.000000000 +0400 -+++ gzip.cpp 2013-10-06 17:12:35.000000000 +0400 -@@ -0,0 +1,64 @@ -+/* Copyright (C) 2007 John Whitney -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; version 2 of the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Author: John Whitney -+ */ -+ -+#include -+#include -+using namespace std; -+#include "file.h" -+#include "system.h" -+#include "tmpstore.h" -+#include "gzip.h" -+#include -+#include -+ -+int gzip_found = 0; -+char *gzip_name = NULL; -+ -+void find_gzip_compressor() { -+ string tempfile = getTmpFilename(); -+ string command = "find `echo $PATH | tr ':' ' '` -iname 'gzip' -exec sh -c 'echo {};{} -V 2>&1|grep ^gzip' \\; 2> /dev/null > " -+ + tempfile; -+ -+ system(command.c_str()); -+ -+ FILE * fp; -+ char line[2*CHAR_MAX]; -+ string fname; -+ fp = fopen(tempfile.c_str(), "r"); -+ if (fp == NULL) -+ exit(EXIT_FAILURE); -+ while (fgets(line, 2*CHAR_MAX, fp)!=NULL) { -+ char *v = strstr(line, "gzip"); -+ if (v) { -+ int index=-1; -+ if (strncmp(v+5, "1.", 2) == 0) index=0; -+ if (index!=-1) -+ { -+ gzip_name = new char[fname.length()]; -+ strncpy(gzip_name, fname.c_str(), fname.length()-1); -+ gzip_name[fname.length()-1] = 0; -+ break; -+ } -+ } -+ fname = line; -+ } -+ if (verbose) { -+ if (gzip_name!=NULL) -+ { -+ printf("found GNU gzip compressor/decompressor:\n"); -+ printf(" %s\n", gzip_name); -+ } -+ else printf("GNU gzip compressor/decompressor NOT found!\n"); -+ } -+} diff --git a/sysutils/deltup/files/patch-gzip.h b/sysutils/deltup/files/patch-gzip.h deleted file mode 100644 index d15920a4f00a..000000000000 --- a/sysutils/deltup/files/patch-gzip.h +++ /dev/null @@ -1,20 +0,0 @@ ---- gzip.h.orig 1970-01-01 05:00:00.000000000 +0500 -+++ gzip.h 2008-03-10 10:38:01.000000000 +0500 -@@ -0,0 +1,17 @@ -+/* Copyright (C) 2007 John Whitney -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; version 2 of the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Author: John Whitney -+ */ -+ -+extern char *gzip_name; -+extern int gzip_found; -+void find_gzip_compressor(); diff --git a/sysutils/deltup/files/patch-src_Makefile b/sysutils/deltup/files/patch-src_Makefile new file mode 100644 index 000000000000..e863edbeaecc --- /dev/null +++ b/sysutils/deltup/files/patch-src_Makefile @@ -0,0 +1,32 @@ +--- src/Makefile.orig 2014-08-12 16:57:16 UTC ++++ src/Makefile +@@ -2,23 +2,21 @@ BINDIR=$(PREFIX)/bin + PREFIX=%%PREFIX%% + BINDIR=$(PREFIX)/bin + +-CC = g++ +- + objfiles=bpatch.o archfunc.o file.o system.o tmpstore.o deltup.o +-libs=-lstdc++ -lz -lbz2 -lcrypto #-lssl ++libs=-lstdc++ -lz -lbz2 -L/usr/local/lib -lcrypto #-lssl + + #edelta: edelta.cpp deltup +-# gcc edelta.cpp ${CXXFLAGS} -o edelta ++# ${CXX} edelta.cpp ${CXXFLAGS} -o edelta + %.o : %.cpp +- ${CC} -c $< -o $@ ${CXXFLAGS} #-g #-Wall -pedantic ++ ${CXX} -c $< -o $@ ${CXXFLAGS} #-g #-Wall -pedantic + + all: deltup + + depend: +- gcc -MM *.cpp > .depend +- ++ $CXX -MM *.cpp > .depend ++ + deltup: $(objfiles) +- ${CC} $(objfiles) ${CXXFLAGS} -o deltup $(libs) ++ ${CXX} $(objfiles) ${CXXFLAGS} -o deltup $(libs) + + install: deltup + mkdir -p $(DESTDIR)$(BINDIR) diff --git a/sysutils/deltup/files/patch-system.cpp b/sysutils/deltup/files/patch-system.cpp deleted file mode 100644 index 794254f08318..000000000000 --- a/sysutils/deltup/files/patch-system.cpp +++ /dev/null @@ -1,21 +0,0 @@ ---- system.cpp.orig 2007-03-25 01:45:52.000000000 +0300 -+++ system.cpp 2013-10-06 17:14:02.000000000 +0400 -@@ -11,7 +11,8 @@ - * - * Author: John Whitney - */ -- -+ -+#include - #include - #include - #include -@@ -19,7 +20,7 @@ - using namespace std; - #include "file.h" - #include "bpatch.h" -- -+#include - #include "filetypes.h" - - bool verbose = false; diff --git a/sysutils/deltup/files/patch-tmpstore.cpp b/sysutils/deltup/files/patch-tmpstore.cpp deleted file mode 100644 index 1450c40c505e..000000000000 --- a/sysutils/deltup/files/patch-tmpstore.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- tmpstore.cpp.orig 2013-10-06 17:14:20.000000000 +0400 -+++ tmpstore.cpp 2013-10-06 17:15:03.000000000 +0400 -@@ -12,6 +12,8 @@ - * Author: John Whitney - */ - -+#include -+#include - #include - #include - #include