1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 09:32:37 +01:00

net-misc/ipcalc: bump to 0.2.3

This commit is contained in:
2018-06-28 13:29:15 +02:00
parent 94a7a1c61c
commit ebac96c1b6
4 changed files with 2 additions and 103 deletions

View File

@@ -1,4 +1,2 @@
AUX ipcalc-ng-0.2.2-fix-geoip-linking.patch 1515 BLAKE2B c69c886c7e52f9e3d4e19022373a3ba44a771b413a452447860214e064b6ff88f172361c64c8eb36504509eebf154d5c856f8c1d62635f2aee569457c75a8197 SHA512 17cf1bc0a6ab2224a3f5b303d848ac9d292d2052c88595c738f8baf8c398bde784e4aab9a901fd330b72f960fbc927ddecff304df2abfa38b4dd4aefbb0b2fb7 DIST ipcalc-ng-0.2.3.tar.gz 36596 BLAKE2B b91cd1ca071982c565b5b0d37ae5c630dd76896f9ece0a471cf1b1933127552ce4da7e9890cb8dbcff2e1787cd1348791eed0ffe909a6c241efc84ac5993a569 SHA512 d18bbdecea24929965dbebe120b8c5fefa5bc6a6ba1ce2f1682da189eb5f862c7839959f1a95ce638b5cfe0adb6388f2b0ad9c1761089cc29f4eca32bdbc3ba1
AUX ipcalc-ng-0.2.2-ipcalc-h-guard-header.patch 906 BLAKE2B 58bcbd47bc28556ce22c23781b816d2b2fe87f26cf62f5973dd1eae860c9d212f090524740dd660e1f16e60270bca3f99d9063b14ee2956ba9c5cf979104fb1e SHA512 41992e48057e25173c08f6695a912fd8186d5434004e3f5c10c37f6d139f42e7ac826ef20230aaadf56afb0dafed0be977bd58cb540bd53115e705f2a6fda16c EBUILD ipcalc-ng-0.2.3.ebuild 730 BLAKE2B 819aeadc292fd03e64e6f6cc9d66495775c414495cf2c928a505d9cd2b0342b404309948094ae5ae4d496734cbbd7fd95566406c42f92352ce3c97df0867dc74 SHA512 67f2fd58e0cd8023b2bd27ddd03092c6664bbb61d6c2122032c190d8e3c133c8018cda0e7c66afeb2834407d0c8741d75484bf1a414717aa3c0902b4ef4628e1
DIST ipcalc-ng-0.2.2.tar.gz 36523 BLAKE2B 12afd7bf31dc641a7563a8e9b7f3283f0fbaca3e13acc2c9e30a6268498a13a1567151f839620c64a4317639452ffd7be934e416bd1311ec9f8e7e89ab7ce9dc SHA512 f70a8b8b98e308e2ec31703dae752658161df4ef0d530b86f27ec6a1c65e9942928b375c573a74ef1eac9bda112f25f9ce22487c34d3a2632282b62bd85702be
EBUILD ipcalc-ng-0.2.2.ebuild 831 BLAKE2B 8c295e8915e6dd7175473a11cec2573878b52c0a53d8b280463086f5f82f48105a822360ab1ca052d255a86c146fddf224e0df77fb25f208668c4fc55865177c SHA512 c693f0104420e682c8db03df3955928daa2dcc8af903ff3343d6ff5717e2a06912b3575038567aac01cee09988402ac1b0b429e689f5723b34ab55b08e410d31

View File

@@ -1,64 +0,0 @@
diff --git a/ipcalc-geoip.c b/ipcalc-geoip.c
index 6be38fe..17b6346 100644
--- a/ipcalc-geoip.c
+++ b/ipcalc-geoip.c
@@ -34,6 +34,22 @@
# include <GeoIP.h>
# include <GeoIPCity.h>
+static int __attribute__((__format__(printf, 2, 3)))
+safe_asprintf(char **strp, const char *fmt, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, fmt);
+ ret = vasprintf(&(*strp), fmt, args);
+ va_end(args);
+ if (ret < 0) {
+ fprintf(stderr, "Memory allocation failure\n");
+ exit(1);
+ }
+ return ret;
+}
+
# ifdef USE_DYN_GEOIP
# include <dlfcn.h>
@@ -59,22 +75,6 @@ static GeoIP_record_by_ipnum_v6_func pGeoIP_record_by_ipnum_v6;
#define LIBNAME LIBPATH"/libGeoIP.so.1"
-static int __attribute__((__format__(printf, 2, 3)))
-safe_asprintf(char **strp, const char *fmt, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, fmt);
- ret = vasprintf(&(*strp), fmt, args);
- va_end(args);
- if (ret < 0) {
- fprintf(stderr, "Memory allocation failure\n");
- exit(1);
- }
- return ret;
-}
-
int geo_setup(void)
{
static void *ld = NULL;
diff --git a/ipcalc.h b/ipcalc.h
index a3f13bc..9af367a 100644
--- a/ipcalc.h
+++ b/ipcalc.h
@@ -24,6 +24,9 @@
void geo_ipv4_lookup(struct in_addr ip, char **country, char **ccode, char **city, char **coord);
void geo_ipv6_lookup(struct in6_addr *ip, char **country, char **ccode, char **city, char **coord);
int geo_setup(void);
+#ifndef USE_DYN_GEOIP
+# define geo_setup() 0
+#endif
#else
# define geo_ipv4_lookup(x,y,z,w,a)
# define geo_ipv6_lookup(x,y,z,w,a)

View File

@@ -1,30 +0,0 @@
From cfb6fab514ff7dbf2eeb641cc553349d6fc143b3 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
Date: Wed, 25 Apr 2018 13:22:03 +0200
Subject: [PATCH] ipcalc.h: guard header
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
---
ipcalc.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ipcalc.h b/ipcalc.h
index 74c8896..a3f13bc 100644
--- a/ipcalc.h
+++ b/ipcalc.h
@@ -17,6 +17,9 @@
* Nikos Mavrogiannopoulos <nmav@redhat.com>
*/
+#ifndef _IPCALC_H
+#define _IPCALC_H
+
#ifdef USE_GEOIP
void geo_ipv4_lookup(struct in_addr ip, char **country, char **ccode, char **city, char **coord);
void geo_ipv6_lookup(struct in6_addr *ip, char **country, char **ccode, char **city, char **coord);
@@ -100,3 +103,5 @@ __attribute__ ((format(printf, 3, 4)))
color_printf(const char *color, const char *title, const char *fmt, ...);
extern int beSilent;
+
+#endif

View File

@@ -22,11 +22,6 @@ DEPEND="!net-misc/ipcalc
geoip? ( dev-libs/geoip )" geoip? ( dev-libs/geoip )"
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
PATCHES=(
${FILESDIR}/${P}-fix-geoip-linking.patch
${FILESDIR}/${P}-ipcalc-h-guard-header.patch
)
src_compile() { src_compile() {
emake \ emake \
CC="$(tc-getCC)" LIBS="${LDFLAGS}" LIBPATH="${EPREFIX}/usr/$(get_libdir)" \ CC="$(tc-getCC)" LIBS="${LDFLAGS}" LIBPATH="${EPREFIX}/usr/$(get_libdir)" \