Skip to content

Commit

Permalink
apt-cacher-ng-2 (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
fd00 committed Nov 27, 2016
1 parent 2b1ebdf commit 3b2560a
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 71 deletions.
84 changes: 44 additions & 40 deletions apt-cacher-ng/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,79 @@ primarily for Debian (and Debian based) distributions but not limited to
those. See documentation of Apt-Cacher to learn what it's good for.

Runtime requirements:
cygwin-2.0.1-1
cygwin-2.6.0-1
libbz2_1-1.0.6-2
libgcc1-4.9.2-3
liblzma5-5.0.8-1
libopenssl100-1.0.2a-1
libstdc++6-4.9.2-3
libgcc1-5.4.0-1
liblzma5-5.2.2-1
libopenssl100-1.0.2j-1
libstdc++6-5.4.0-1
libwrap0-7.6-22
zlib0-1.2.8-3

Build requirements:
(besides corresponding -devel packages)
binutils-2.25-1
cmake-3.1.2-1
cygport-0.18.1-1
gcc-core-4.9.2-3
gcc-g++-4.9.2-3
make-4.1-1
binutils-2.25-4
cmake-3.6.2-1
cygport-0.23.0-1
gcc-core-5.4.0-1
gcc-g++-5.4.0-1

make-4.2.1-1

Canonical website:
http://www.unix-ag.uni-kl.de/~bloch/acng/

Canonical download:
mirror://debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_0.8.2.orig.tar.xz
mirror://debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_2.orig.tar.xz

-------------------------------------------

Build instructions:
1. unpack apt-cacher-ng-0.8.2-X-src.tar.xz
1. unpack apt-cacher-ng-2-X-src.tar.xz
2. if you use setup to install this src package,
it will be unpacked under /usr/src automatically
% cd /usr/src
% cygport ./apt-cacher-ng-0.8.2-X.cygport all
% cygport ./apt-cacher-ng-2-X.cygport all

This will create:
/usr/src/apt-cacher-ng-0.8.2-X-src.tar.xz
/usr/src/apt-cacher-ng-0.8.2-X.tar.xz
/usr/src/apt-cacher-ng-2-X-src.tar.xz
/usr/src/apt-cacher-ng-2-X.tar.xz

-------------------------------------------

Files included in the binary package:

(apt-cacher-ng)
/etc/apt-cacher-ng/acng.conf
/etc/apt-cacher-ng/security.conf
/etc/avahi/services/apt-cacher-ng.service
/usr/lib/apt-cacher-ng/acngtool.exe
/usr/lib/apt-cacher-ng/archlx_mirrors
/usr/lib/apt-cacher-ng/backends_debian.default
/usr/lib/apt-cacher-ng/backends_gentoo.default
/usr/lib/apt-cacher-ng/backends_ubuntu.default
/usr/lib/apt-cacher-ng/cygwin_mirrors
/usr/lib/apt-cacher-ng/deb_mirrors.gz
/usr/lib/apt-cacher-ng/debvol_mirrors.gz
/usr/lib/apt-cacher-ng/delconfirm.html
/usr/lib/apt-cacher-ng/epel_mirrors
/usr/lib/apt-cacher-ng/fedora_mirrors
/usr/lib/apt-cacher-ng/gentoo_mirrors.gz
/usr/lib/apt-cacher-ng/in.acng.exe
/usr/lib/apt-cacher-ng/maint.html
/usr/lib/apt-cacher-ng/report.html
/usr/lib/apt-cacher-ng/sfnet_mirrors
/usr/lib/apt-cacher-ng/sl_mirrors
/usr/lib/apt-cacher-ng/style.css
/usr/lib/apt-cacher-ng/ubuntu_mirrors
/usr/lib/apt-cacher-ng/userinfo.html
/usr/sbin/apt-cacher-ng.exe
/usr/sbin/in.acng.exe
/usr/share/doc/Cygwin/apt-cacher-ng.README
/usr/share/doc/apt-cacher-ng/COPYING
/usr/share/doc/apt-cacher-ng/ChangeLog
/usr/share/doc/apt-cacher-ng/README
/usr/share/doc/apt-cacher-ng/TODO
/usr/share/doc/apt-cacher-ng/apt-cacher-ng.pdf
/usr/share/doc/apt-cacher-ng/examples/conf/acng.conf
/usr/share/doc/apt-cacher-ng/examples/conf/archlx_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/backends_debian
/usr/share/doc/apt-cacher-ng/examples/conf/backends_debian.default
/usr/share/doc/apt-cacher-ng/examples/conf/backends_gentoo.default
/usr/share/doc/apt-cacher-ng/examples/conf/backends_ubuntu.default
/usr/share/doc/apt-cacher-ng/examples/conf/cygwin_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/deb_mirrors.gz
/usr/share/doc/apt-cacher-ng/examples/conf/debrep.hooks
/usr/share/doc/apt-cacher-ng/examples/conf/debvol_mirrors.gz
/usr/share/doc/apt-cacher-ng/examples/conf/delconfirm.html
/usr/share/doc/apt-cacher-ng/examples/conf/epel_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/fedora_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/gentoo_mirrors.gz
/usr/share/doc/apt-cacher-ng/examples/conf/maint.html
/usr/share/doc/apt-cacher-ng/examples/conf/report.html
/usr/share/doc/apt-cacher-ng/examples/conf/security.conf
/usr/share/doc/apt-cacher-ng/examples/conf/sfnet_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/sl_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/style.css
/usr/share/doc/apt-cacher-ng/examples/conf/ubuntu_mirrors
/usr/share/doc/apt-cacher-ng/examples/conf/userinfo.html
/usr/share/doc/apt-cacher-ng/html/Intro.html
/usr/share/doc/apt-cacher-ng/html/bugs.html
/usr/share/doc/apt-cacher-ng/html/config-serv.html
Expand All @@ -89,12 +90,16 @@ Files included in the binary package:
/usr/share/doc/apt-cacher-ng/html/secure.html
/usr/share/doc/apt-cacher-ng/html/troublefaq.html
/usr/share/doc/apt-cacher-ng/html/usage.html
/usr/share/man/man8/acngfs.8.gz
/usr/share/man/man8/apt-cacher-ng.8.gz

------------------

Port Notes:

----- version 2-1bl1 -----
Version bump.

----- version 0.8.2-1bl1 -----
Version bump.

Expand All @@ -103,4 +108,3 @@ Version bump.

----- version 0.7.24-1bl1 -----
Initial release by fd0 <https://github.com/fd00/>

20 changes: 0 additions & 20 deletions apt-cacher-ng/apt-cacher-ng-0.8.2-1bl1.src.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ those. See documentation of Apt-Cacher to learn what it's good for."

inherit cmake

src_install()
{
cd ${B}
dosbin *.exe

cd ${S}
docinto examples/conf
dodoc conf/*
doman doc/man/${PN}*
}

DOCS="
doc/*.pdf
doc/README
Expand Down
92 changes: 92 additions & 0 deletions apt-cacher-ng/apt-cacher-ng-2-1bl1.src.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
--- origsrc/apt-cacher-ng-2/source/header.cc 2016-11-23 05:32:02.000000000 +0900
+++ src/apt-cacher-ng-2/source/header.cc 2016-11-27 10:41:57.495387800 +0900
@@ -18,6 +18,13 @@

#include <map>

+#if defined(__CYGWIN__)
+extern "C"
+char *_EXFUN(strptime, (const char *__restrict,
+ const char *__restrict,
+ struct tm *__restrict));
+#endif
+
using namespace std;

namespace acng
@@ -158,7 +165,7 @@ int header::Load(LPCSTR const in, unsign

while (isspace((uint)*end)) end--;
end++;
-
+
if (frontLine.empty())
{
frontLine.assign(in, string::size_type(end-in));
@@ -193,14 +200,14 @@ int header::Load(LPCSTR const in, unsign
const char *sep=(const char*) memchr(szBegin, ':', end-szBegin);
if (!sep)
return -1;
-
+
auto key = szBegin;
size_t keyLen=sep-szBegin;

sep++;
while (sep<end && isspace((uint)*sep))
sep++;
-
+
lastLineIdx = HEADPOS_NOTFORUS;

for(const auto& xh : mapId2Headname)
@@ -277,7 +284,7 @@ void header::prep(eHeadPos key, size_t l
}

void header::set(eHeadPos key, off_t nValue)
-{
+{
char buf[3*sizeof(off_t)];
int len=sprintf(buf, OFF_T_FMT, nValue);
set(key, buf, len);
@@ -310,11 +317,11 @@ int header::StoreToFile(cmstring &sPath)
if(fd<0)
return -errno;
}
-
+
auto hstr=ToString();
const char *p=hstr.rptr();
nByteCount=hstr.length();
-
+
for(string::size_type pos=0; pos<(uint)nByteCount;)
{
int ret=write(fd, p+pos, nByteCount-pos);
@@ -324,7 +331,7 @@ int header::StoreToFile(cmstring &sPath)
continue;
if(EINTR == errno)
continue;
-
+
ret=errno;
forceclose(fd);
return -ret;
@@ -337,7 +344,7 @@ int header::StoreToFile(cmstring &sPath)
if(errno != EINTR)
return -errno;
}
-
+
return nByteCount;
}

@@ -361,7 +368,7 @@ bool header::ParseDate(const char *s, st
if(!s || !tm)
return false;
for(const auto& fmt : fmts)
- if(::strptime(s, fmt, tm))
+ if(strptime(s, fmt, tm))
return true;

return false;

0 comments on commit 3b2560a

Please sign in to comment.