aboutsummaryrefslogtreecommitdiff
path: root/www/logtools
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2014-07-08 20:11:04 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2014-07-08 20:11:04 +0000
commit013f4c87edd89581ad5e1fba01dd93bdcc92f58f (patch)
tree84fcc7d853ed38a63fcb22b93d9b74214181ce88 /www/logtools
parent32df1e900e00ea9214c65f3e34eb7933be82c7f5 (diff)
downloadports-013f4c87edd89581ad5e1fba01dd93bdcc92f58f.tar.gz
ports-013f4c87edd89581ad5e1fba01dd93bdcc92f58f.zip
Notes
Diffstat (limited to 'www/logtools')
-rw-r--r--www/logtools/Makefile24
-rw-r--r--www/logtools/files/patch-aa11
-rw-r--r--www/logtools/files/patch-ac14
-rw-r--r--www/logtools/files/patch-clfdomainsplit.cpp43
-rw-r--r--www/logtools/files/patch-clfmerge.cpp53
-rw-r--r--www/logtools/files/patch-clfsplit.cpp (renamed from www/logtools/files/patch-ab)0
-rw-r--r--www/logtools/pkg-descr4
-rw-r--r--www/logtools/pkg-plist11
8 files changed, 124 insertions, 36 deletions
diff --git a/www/logtools/Makefile b/www/logtools/Makefile
index fa0e0313f094..00fa45e31798 100644
--- a/www/logtools/Makefile
+++ b/www/logtools/Makefile
@@ -3,23 +3,29 @@
PORTNAME= logtools
PORTVERSION= 0.13d
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.coker.com.au/logtools/ \
LOCAL/chinsan/logtools/
-EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= Useful tools to deal with CLF files (Common Log File format)
-PLIST_FILES= bin/clfmerge \
- bin/clfsplit \
- bin/clfdomainsplit \
- bin/logprn \
- bin/funnel \
- etc/clfdomainsplit.cfg
+LICENSE= GPLv2
+USES= tar:tgz
GNU_CONFIGURE= yes
-MAN1= clfmerge.1 logprn.1 funnel.1 clfsplit.1 clfdomainsplit.1
-NO_STAGE= yes
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|-O2 -g|| ; \
+ s|-lstdc++|| ; \
+ s| \($${prefix}\)| $${DESTDIR}\1|g ; \
+ s| \(@mandir@\)| $${DESTDIR}\1|g ; \
+ s|.cfg |.cfg.sample | ; \
+ s| \(@sysconfdir@\)| $${DESTDIR}\1|g' ${WRKSRC}/Makefile.in
+
+post-build:
+ @${LN} -sf clfdomainsplit.cfg ${WRKSRC}/clfdomainsplit.cfg.sample
+
.include <bsd.port.mk>
diff --git a/www/logtools/files/patch-aa b/www/logtools/files/patch-aa
deleted file mode 100644
index 396944cd5a03..000000000000
--- a/www/logtools/files/patch-aa
+++ /dev/null
@@ -1,11 +0,0 @@
---- clfmerge.cpp.orig Tue Jan 8 17:15:37 2002
-+++ clfmerge.cpp Tue Jan 8 17:14:06 2002
-@@ -201,7 +201,7 @@
- unsigned int map_items = 0;
- bool set_map_items = false, domain_mangling = false;
- int int_c;
-- optind = 0;
-+ optind = 1;
- while(-1 != (int_c = getopt(argc, argv, "b:hd")) )
- {
- switch(char(int_c))
diff --git a/www/logtools/files/patch-ac b/www/logtools/files/patch-ac
deleted file mode 100644
index 96ca9b3dd995..000000000000
--- a/www/logtools/files/patch-ac
+++ /dev/null
@@ -1,14 +0,0 @@
---- clfdomainsplit.cpp.orig Mon Jun 9 10:56:27 2003
-+++ clfdomainsplit.cpp Mon Jun 9 10:56:47 2003
-@@ -1,10 +1,6 @@
- #include <stdio.h>
-
--#if (__GNUC__ >= 3)
--#include <ext/hash_map>
--#else
--#include <hash_map>
--#endif
-+#include <hash_map.h>
-
- #include <unistd.h>
- #include <string>
diff --git a/www/logtools/files/patch-clfdomainsplit.cpp b/www/logtools/files/patch-clfdomainsplit.cpp
new file mode 100644
index 000000000000..753703f1aa4a
--- /dev/null
+++ b/www/logtools/files/patch-clfdomainsplit.cpp
@@ -0,0 +1,43 @@
+--- clfdomainsplit.cpp.orig Mon Jun 9 10:56:27 2003
++++ clfdomainsplit.cpp Mon Jun 9 10:56:47 2003
+@@ -1,19 +1,23 @@
+-#include <stdio.h>
++#include <cstdio>
+
+-#if (__GNUC__ >= 3)
+-#include <ext/hash_map>
++#if defined(_LIBCPP_VERSION)
++#include <unordered_map>
+ #else
+-#include <hash_map>
++#include <ext/hash_map>
+ #endif
+
++#include <cstdlib>
+ #include <unistd.h>
+ #include <cstring>
+ #include <vector>
+-#include <ctype.h>
++#include <cctype>
++#include <string>
+ #include "logtools.h"
+
+ using namespace std;
++#if !defined(_LIBCPP_VERSION)
+ using namespace __gnu_cxx;
++#endif
+
+ // MAX_FDS is the maximum number of files that will be directly written to
+ // by one process
+@@ -166,7 +170,11 @@
+ size_t operator()(const string str) const { return hash<const char *>()(str.c_str()); }
+ };
+
++#if defined(_LIBCPP_VERSION)
++typedef unordered_map<const string, FILE **, hash_string, eqstr> HASH_TYPE;
++#else
+ typedef hash_map<const string, FILE **, hash_string, eqstr> HASH_TYPE;
++#endif
+ HASH_TYPE fd_map;
+
+ typedef FILE * PFILE;
diff --git a/www/logtools/files/patch-clfmerge.cpp b/www/logtools/files/patch-clfmerge.cpp
new file mode 100644
index 000000000000..017e4814186b
--- /dev/null
+++ b/www/logtools/files/patch-clfmerge.cpp
@@ -0,0 +1,53 @@
+--- clfmerge.cpp.orig Tue Jan 8 17:15:37 2002
++++ clfmerge.cpp Tue Jan 8 17:14:06 2002
+@@ -1,17 +1,26 @@
+-#include <stdio.h>
++#include <cstdio>
++
++#if defined(_LIBCPP_VERSION)
++#include <unordered_map>
++#else
+ #include <ext/hash_map>
+-#include <stdlib.h>
++#endif
++
++#include <cstdlib>
+ #include <map>
+ #include <cstring>
+ #include <unistd.h>
+-#include <ctype.h>
++#include <cctype>
++#include <string>
+
+ #include "logtools.h"
+
+ #define BUF_SIZE 4096
+
+ using namespace std;
++#if !defined(_LIBCPP_VERSION)
+ using namespace __gnu_cxx;
++#endif
+
+ struct eqstr
+ {
+@@ -19,7 +28,11 @@
+ { return strcmp(s1, s2) == 0; }
+ };
+
++#if defined(_LIBCPP_VERSION)
++unordered_map<const char *, const char *, hash<const char *>, eqstr> months;
++#else
+ hash_map<const char *, const char *, hash<const char *>, eqstr> months;
++#endif
+
+ class LogFile
+ {
+@@ -207,7 +220,7 @@
+ unsigned int map_items = 0;
+ bool set_map_items = false, domain_mangling = false;
+ int int_c;
+- optind = 0;
++ optind = 1;
+ while(-1 != (int_c = getopt(argc, argv, "b:hd")) )
+ {
+ switch(char(int_c))
diff --git a/www/logtools/files/patch-ab b/www/logtools/files/patch-clfsplit.cpp
index 3bc487017665..3bc487017665 100644
--- a/www/logtools/files/patch-ab
+++ b/www/logtools/files/patch-clfsplit.cpp
diff --git a/www/logtools/pkg-descr b/www/logtools/pkg-descr
index b9359a37c05b..a74a4e77a1a3 100644
--- a/www/logtools/pkg-descr
+++ b/www/logtools/pkg-descr
@@ -1,4 +1,4 @@
-Tools like clfmerge, clfsplit etc to simplify working with access log files
-e.g. with virtual hosts.
+Tools like clfmerge, clfsplit etc to simplify working with access
+log files e.g. with virtual hosts.
WWW: http://doc.coker.com.au/projects/logtools/
diff --git a/www/logtools/pkg-plist b/www/logtools/pkg-plist
new file mode 100644
index 000000000000..ffca34732089
--- /dev/null
+++ b/www/logtools/pkg-plist
@@ -0,0 +1,11 @@
+bin/clfdomainsplit
+bin/clfmerge
+bin/clfsplit
+bin/funnel
+bin/logprn
+@sample etc/clfdomainsplit.cfg.sample
+man/man1/clfdomainsplit.1.gz
+man/man1/clfmerge.1.gz
+man/man1/clfsplit.1.gz
+man/man1/funnel.1.gz
+man/man1/logprn.1.gz