aboutsummaryrefslogtreecommitdiffstats
path: root/lang/io
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2016-06-28 22:57:56 +0800
committergahr <gahr@FreeBSD.org>2016-06-28 22:57:56 +0800
commita0431e6fad328396681a3a18b1317318f0870da1 (patch)
treecd878b2ae9f9c630f7e550601f3dd556bcf25c54 /lang/io
parent4cb89dbac53b00c68685811730cdbac5c2bbebc8 (diff)
downloadfreebsd-ports-gnome-a0431e6fad328396681a3a18b1317318f0870da1.tar.gz
freebsd-ports-gnome-a0431e6fad328396681a3a18b1317318f0870da1.tar.zst
freebsd-ports-gnome-a0431e6fad328396681a3a18b1317318f0870da1.zip
lang/io: update to 2015.11.11
Diffstat (limited to 'lang/io')
-rw-r--r--lang/io/Makefile7
-rw-r--r--lang/io/Makefile.addons6
-rw-r--r--lang/io/distinfo5
-rw-r--r--lang/io/files/patch-libs-basekit-source_Common_inline.h22
-rw-r--r--lang/io/files/patch-memchached-1-fd6795093
-rw-r--r--lang/io/files/patch-memchached-2-b53b3d8180
-rw-r--r--lang/io/files/patch-memchached-3-0b4f7e725
7 files changed, 308 insertions, 30 deletions
diff --git a/lang/io/Makefile b/lang/io/Makefile
index 9b3d948f9568..95600a11e386 100644
--- a/lang/io/Makefile
+++ b/lang/io/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= io
-PORTVERSION= 2013.12.04
-PORTREVISION= 5
+PORTVERSION= 2015.11.11
CATEGORIES= lang
MAINTAINER= ports@FreeBSD.org
@@ -15,8 +14,7 @@ USE_GITHUB= yes
GH_ACCOUNT= stevedekorte
GH_TAGNAME= 23afbcc
-USES= cmake:outsource
-USE_GCC= yes
+USES= cmake:outsource compiler:c11
MAKE_JOBS_UNSAFE=yes
USE_LDCONFIG= yes
@@ -32,6 +30,7 @@ OPTIONS_SUB= yes
post-patch:
${REINPLACE_CMD} -e 's/^[ ]*add_subdirectory/#&/' \
${WRKSRC}/addons/CMakeLists.txt
+ ${RM} ${WRKSRC}/modules/FindFreetype.cmake
.for addon in ${ADDONS}
${ECHO} "add_subdirectory(${addon})" >> ${WRKSRC}/addons/CMakeLists.txt
.endfor
diff --git a/lang/io/Makefile.addons b/lang/io/Makefile.addons
index fa9d89496afb..e7f27399b71e 100644
--- a/lang/io/Makefile.addons
+++ b/lang/io/Makefile.addons
@@ -77,16 +77,18 @@ DBI_LIB_DEPENDS= libdbi.so:databases/libdbi
EditLine_USES= libedit
Font_LIB_DEPENDS= libfreetype.so:print/freetype2
Font_USE= GL=glut XORG=xmu
-GLFW_LIB_DEPENDS= libglfw.so.0:graphics/glfw2
+GLFW_LIB_DEPENDS= libglfw.so:graphics/glfw2
+GLFW_USE+= GL=glu,gl XORG=sm,ice,x11,xext,xi
Image_LIB_DEPENDS= libpng.so:graphics/png \
libtiff.so:graphics/tiff
Image_USES= jpeg
LZO_LIB_DEPENDS= liblzo2.so:archivers/lzo2
LibSndFile_LIB_DEPENDS= libsndfile.so:audio/libsndfile
Libxml2_USE= GNOME=libxml2
+Libxml2_USES= iconv
Loudmouth_LIB_DEPENDS= libloudmouth-1.so:net-im/loudmouth
Memcached_LIB_DEPENDS= libmemcached.so:databases/libmemcached
-MySQL_USE= MYSQL=client
+MySQL_USES= mysql:client
Ogg_LIB_DEPENDS= libogg.so:audio/libogg
OpenGL_USE= GL=glut XORG=xmu
PostgreSQL_USES= pgsql
diff --git a/lang/io/distinfo b/lang/io/distinfo
index b44e6bb7bca9..6631f623bece 100644
--- a/lang/io/distinfo
+++ b/lang/io/distinfo
@@ -1,2 +1,3 @@
-SHA256 (stevedekorte-io-2013.12.04-23afbcc_GH0.tar.gz) = d66a085288c278c3641c6c7360967ace54e5469b751659fca4e31fef7987975a
-SIZE (stevedekorte-io-2013.12.04-23afbcc_GH0.tar.gz) = 9212486
+TIMESTAMP = 1467100370
+SHA256 (stevedekorte-io-2015.11.11-23afbcc_GH0.tar.gz) = d66a085288c278c3641c6c7360967ace54e5469b751659fca4e31fef7987975a
+SIZE (stevedekorte-io-2015.11.11-23afbcc_GH0.tar.gz) = 9212486
diff --git a/lang/io/files/patch-libs-basekit-source_Common_inline.h b/lang/io/files/patch-libs-basekit-source_Common_inline.h
deleted file mode 100644
index 48623b709f3b..000000000000
--- a/lang/io/files/patch-libs-basekit-source_Common_inline.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- libs/basekit/source/Common_inline.h.orig 2011-09-13 00:14:12.000000000 +0200
-+++ libs/basekit/source/Common_inline.h 2012-10-02 16:18:38.000000000 +0200
-@@ -52,7 +52,9 @@
-
- #if defined(__APPLE__)
-
-- #define NS_INLINE static __inline__ __attribute__((always_inline))
-+ #ifndef NS_INLINE
-+ #define NS_INLINE static __inline__ __attribute__((always_inline))
-+ #endif
-
- #ifdef IO_IN_C_FILE
- // in .c
-@@ -108,7 +110,7 @@
- #define IOINLINE static inline
- #endif
-
--#elif defined(__linux__)
-+#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
-
- #ifdef IO_IN_C_FILE
- // in .c
diff --git a/lang/io/files/patch-memchached-1-fd67950 b/lang/io/files/patch-memchached-1-fd67950
new file mode 100644
index 000000000000..4cf23b1d273a
--- /dev/null
+++ b/lang/io/files/patch-memchached-1-fd67950
@@ -0,0 +1,93 @@
+From fd6795035e4bcd1d2606f4f8f69c104bfbf5d5ff Mon Sep 17 00:00:00 2001
+From: Charles Ellis <hamled@gmail.com>
+Date: Sun, 20 May 2012 23:20:33 -0700
+Subject: [PATCH] Memcached stats method compatiblity fix
+
+The stats method of Memcached is now compatible with libmemcached 1.0+.
+---
+ addons/Memcached/source/IoMemcached.c | 41 +++++++++++++++++++++--------------
+ modules/FindLibMemcached.cmake | 2 +-
+ 2 files changed, 26 insertions(+), 17 deletions(-)
+
+diff --git a/addons/Memcached/source/IoMemcached.c b/addons/Memcached/source/IoMemcached.c
+index c1be9ff..aa3fe67 100644
+--- addons/Memcached/source/IoMemcached.c
++++ addons/Memcached/source/IoMemcached.c
+@@ -472,39 +472,48 @@ values are maps with actual stats.
+ IoObject *IoMemcached_stats(IoMemcached *self, IoObject *locals, IoMessage *m)
+ {
+ IoMap *results_map = IoMap_new(IOSTATE);
++ memcached_st *mc = DATA(self)->mc;
+
+- int i;
+- for(i = 0; i < memcached_server_list_count(DATA(self)->mc->servers); i++) {
+- memcached_server_st *server = DATA(self)->mc->servers + i;
++ uint32_t pos = 0;
++ while(pos < memcached_server_count(mc)) {
++ memcached_server_instance_st server = memcached_server_instance_by_position(mc, pos);
++ if(server == NULL)
++ continue;
++
++ const char *hostname = memcached_server_name(server);
++ const in_port_t port = memcached_server_port(server);
+
+ memcached_stat_st stats;
+- if(memcached_stat_servername(&stats, "", server->hostname, server->port) != 0)
++ memcached_return_t rc = memcached_stat_servername(&stats, "", hostname, port);
++ if(rc != MEMCACHED_SUCCESS)
+ continue;
+
+- memcached_return rc;
+- char **ckeys = memcached_stat_get_keys(DATA(self)->mc, &stats, &rc);
+-
+- int ckeys_count = 0;
+- while(ckeys[ckeys_count] != NULL)
+- ckeys_count++;
++ char **ckeys = memcached_stat_get_keys(mc, &stats, &rc);
++ if(rc != MEMCACHED_SUCCESS)
++ continue;
+
+ IoMap *per_server_map = IoMap_new(IOSTATE);
+- int k;
+- for(k = 0; k < ckeys_count; k++) {
+- char *ckey = ckeys[k];
+- char *cvalue = memcached_stat_get_value(DATA(self)->mc, &stats, ckey, &rc);
++ char *ckey = *ckeys;
++ while(ckey != NULL) {
++ char *cvalue = memcached_stat_get_value(mc, &stats, ckey, &rc);
++ if(rc != MEMCACHED_SUCCESS)
++ continue;
++
+ IoMap_rawAtPut(per_server_map, IOSYMBOL(ckey), IOSYMBOL(cvalue));
+ free(cvalue);
++ ckey++;
+ }
+
+ free(ckeys);
+
+ // "127.0.0.1:11211"
+- char *server_key = (char *) malloc((strlen(server->hostname) + 1 + 5 + 1) * sizeof(char));
+- sprintf(server_key, "%s:%d", server->hostname, server->port);
++ char *server_key = (char *) malloc((strlen(hostname) + 1 + 5 + 1) * sizeof(char));
++ sprintf(server_key, "%s:%d", hostname, port);
+
+ IoMap_rawAtPut(results_map, IOSYMBOL(server_key), per_server_map);
+ free(server_key);
++
++ pos++;
+ }
+
+ return results_map;
+diff --git a/modules/FindLibMemcached.cmake b/modules/FindLibMemcached.cmake
+index 46bf5e5..07ee3bb 100644
+--- modules/FindLibMemcached.cmake
++++ modules/FindLibMemcached.cmake
+@@ -6,7 +6,7 @@
+
+ FIND_PATH(LIBMEMCACHED_INCLUDE_DIR libmemcached/memcached.h)
+
+-FIND_LIBRARY(LIBMEMCACHED_LIBRARY NAMES memcached PATH /usr/lib /usr/local/lib)
++FIND_LIBRARY(LIBMEMCACHED_LIBRARY NAMES memcached libmemcached PATH /usr/lib /usr/local/lib)
+
+ IF(LIBMEMCACHED_INCLUDE_DIR AND LIBMEMCACHED_LIBRARY)
+ SET(LIBMEMCACHED_FOUND 1)
diff --git a/lang/io/files/patch-memchached-2-b53b3d8 b/lang/io/files/patch-memchached-2-b53b3d8
new file mode 100644
index 000000000000..6fcd8ab83ff1
--- /dev/null
+++ b/lang/io/files/patch-memchached-2-b53b3d8
@@ -0,0 +1,180 @@
+From b53b3d8e66d3e4f173500f70ce2df45763b2e0b2 Mon Sep 17 00:00:00 2001
+From: Charles Ellis <hamled@gmail.com>
+Date: Mon, 21 May 2012 00:01:35 -0700
+Subject: [PATCH] Further Memcached compatibility fixes
+
+The Memcached addon is now compatible with the API for libmemcached 1.0
+throughout. The stats method also sets the error state if errors were
+encountered.
+---
+ addons/Memcached/source/IoMemcached.c | 49 +++++++++++++++++++++--------------
+ 1 file changed, 29 insertions(+), 20 deletions(-)
+
+diff --git a/addons/Memcached/source/IoMemcached.c b/addons/Memcached/source/IoMemcached.c
+index aa3fe67..0d0dfb4 100644
+--- addons/Memcached/source/IoMemcached.c
++++ addons/Memcached/source/IoMemcached.c
+@@ -105,7 +105,7 @@ Returns self.
+ */
+ IoObject *IoMemcached_addServer(IoMemcached *self, IoObject *locals, IoMessage *m)
+ {
+- memcached_server_st *server;
++ memcached_server_list_st server;
+
+ server = memcached_servers_parse(IoMessage_locals_cStringArgAt_(m, locals, 0));
+ memcached_server_push(DATA(self)->mc, server);
+@@ -132,7 +132,7 @@ IoObject *IoMemcached_set(IoMemcached *self, IoObject *locals, IoMessage *m)
+ size_t size;
+ char *cvalue = IoMemcached_serialize(self, locals, value, &size, &flags);
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_set(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ cvalue, size,
+@@ -164,7 +164,7 @@ IoObject *IoMemcached_add(IoMemcached *self, IoObject *locals, IoMessage *m)
+ size_t size;
+ char *cvalue = IoMemcached_serialize(self, locals, value, &size, &flags);
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_add(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ cvalue, size,
+@@ -200,7 +200,7 @@ IoObject *IoMemcached_replace(IoMemcached *self, IoObject *locals, IoMessage *m)
+ size_t size;
+ char *cvalue = IoMemcached_serialize(self, locals, value, &size, &flags);
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_replace(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ cvalue, size,
+@@ -230,7 +230,7 @@ IoObject *IoMemcached_append(IoMemcached *self, IoObject *locals, IoMessage *m)
+ IoSeq *key = IoMessage_locals_seqArgAt_(m, locals, 0);
+ IoSeq *value = IoMessage_locals_seqArgAt_(m, locals, 1);
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_append(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ CSTRING(value), IOSEQ_LENGTH(value),
+@@ -254,7 +254,7 @@ IoObject *IoMemcached_prepend(IoMemcached *self, IoObject *locals, IoMessage *m)
+ IoSeq *key = IoMessage_locals_seqArgAt_(m, locals, 0);
+ IoSeq *value = IoMessage_locals_seqArgAt_(m, locals, 1);
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_prepend(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ CSTRING(value), IOSEQ_LENGTH(value),
+@@ -279,7 +279,7 @@ IoObject *IoMemcached_get(IoMemcached *self, IoObject *locals, IoMessage *m)
+
+ size_t size;
+ uint32_t flags;
+- memcached_return rc;
++ memcached_return_t rc;
+
+ char *cvalue;
+ cvalue = memcached_get(DATA(self)->mc,
+@@ -322,7 +322,7 @@ IoObject *IoMemcached_getMulti(IoMemcached *self, IoObject *locals, IoMessage *m
+ IOASSERT(IOSEQ_LENGTH(key) < MEMCACHED_MAX_KEY, "key is too long");
+ }
+
+- char **ckeys = (char **) malloc(sizeof(char *) * keys_list_size);
++ const char **ckeys = (const char **) malloc(sizeof(const char *) * keys_list_size);
+ size_t *ckey_lengths = (size_t *) malloc(sizeof(size_t) * keys_list_size);
+
+ for(i = 0; i < keys_list_size; i++) {
+@@ -330,7 +330,7 @@ IoObject *IoMemcached_getMulti(IoMemcached *self, IoObject *locals, IoMessage *m
+ ckey_lengths[i] = strlen(ckeys[i]);
+ }
+
+- memcached_return rc = memcached_mget(DATA(self)->mc, ckeys, ckey_lengths, keys_list_size);
++ memcached_return_t rc = memcached_mget(DATA(self)->mc, ckeys, ckey_lengths, keys_list_size);
+
+ free(ckeys);
+ free(ckey_lengths);
+@@ -377,7 +377,7 @@ IoObject *IoMemcached_delete(IoMemcached *self, IoObject *locals, IoMessage *m)
+
+ time_t time = IoMessage_argCount(m) == 2 ? IoMessage_locals_intArgAt_(m, locals, 1) : 0;
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_delete(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ time
+@@ -423,7 +423,7 @@ IoObject *IoMemcached_incr(IoMemcached *self, IoObject *locals, IoMessage *m)
+
+ uint64_t new_value;
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_increment(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ offset, &new_value
+@@ -451,7 +451,7 @@ IoObject *IoMemcached_decr(IoMemcached *self, IoObject *locals, IoMessage *m)
+
+ uint64_t new_value;
+
+- memcached_return rc;
++ memcached_return_t rc;
+ rc = memcached_decrement(DATA(self)->mc,
+ CSTRING(key), IOSEQ_LENGTH(key),
+ offset, &new_value
+@@ -472,11 +472,11 @@ values are maps with actual stats.
+ IoObject *IoMemcached_stats(IoMemcached *self, IoObject *locals, IoMessage *m)
+ {
+ IoMap *results_map = IoMap_new(IOSTATE);
+- memcached_st *mc = DATA(self)->mc;
+
++ int errors = 0;
+ uint32_t pos = 0;
+- while(pos < memcached_server_count(mc)) {
+- memcached_server_instance_st server = memcached_server_instance_by_position(mc, pos);
++ while(pos < memcached_server_count(DATA(self)->mc)) {
++ memcached_server_instance_st server = memcached_server_instance_by_position(DATA(self)->mc, pos);
+ if(server == NULL)
+ continue;
+
+@@ -485,19 +485,25 @@ IoObject *IoMemcached_stats(IoMemcached *self, IoObject *locals, IoMessage *m)
+
+ memcached_stat_st stats;
+ memcached_return_t rc = memcached_stat_servername(&stats, "", hostname, port);
+- if(rc != MEMCACHED_SUCCESS)
++ if(rc != MEMCACHED_SUCCESS) {
++ errors++;
+ continue;
++ }
+
+- char **ckeys = memcached_stat_get_keys(mc, &stats, &rc);
+- if(rc != MEMCACHED_SUCCESS)
++ char **ckeys = memcached_stat_get_keys(DATA(self)->mc, &stats, &rc);
++ if(rc != MEMCACHED_SUCCESS) {
++ errors++;
+ continue;
++ }
+
+ IoMap *per_server_map = IoMap_new(IOSTATE);
+ char *ckey = *ckeys;
+ while(ckey != NULL) {
+- char *cvalue = memcached_stat_get_value(mc, &stats, ckey, &rc);
+- if(rc != MEMCACHED_SUCCESS)
++ char *cvalue = memcached_stat_get_value(DATA(self)->mc, &stats, ckey, &rc);
++ if(rc != MEMCACHED_SUCCESS) {
++ errors++;
+ continue;
++ }
+
+ IoMap_rawAtPut(per_server_map, IOSYMBOL(ckey), IOSYMBOL(cvalue));
+ free(cvalue);
+@@ -516,6 +522,9 @@ IoObject *IoMemcached_stats(IoMemcached *self, IoObject *locals, IoMessage *m)
+ pos++;
+ }
+
++ if(errors > 0)
++ IoState_error_(IOSTATE, m, memcached_strerror(DATA(self)->mc, MEMCACHED_SOME_ERRORS));
++
+ return results_map;
+ }
+
diff --git a/lang/io/files/patch-memchached-3-0b4f7e7 b/lang/io/files/patch-memchached-3-0b4f7e7
new file mode 100644
index 000000000000..217eef68527a
--- /dev/null
+++ b/lang/io/files/patch-memchached-3-0b4f7e7
@@ -0,0 +1,25 @@
+From 0b4f7e75e80bf25d382901f098b60c724e0dd6b3 Mon Sep 17 00:00:00 2001
+From: Kyle Marek-Spartz <zeckalpha@gmail.com>
+Date: Sat, 1 Feb 2014 09:23:43 -0600
+Subject: [PATCH] Changed type to get memcached >= 1.0.17 to compile. Still
+ gives warning for: io/addons/Memcached/source/IoMemcached.c:46:2: warning:
+ implicit declaration of function IoState_registerProtoWithFunc_ is invalid in
+ C99
+
+---
+ addons/Memcached/source/IoMemcached.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/addons/Memcached/source/IoMemcached.c b/addons/Memcached/source/IoMemcached.c
+index 0d0dfb4..a4f3901 100644
+--- addons/Memcached/source/IoMemcached.c
++++ addons/Memcached/source/IoMemcached.c
+@@ -476,7 +476,7 @@ IoObject *IoMemcached_stats(IoMemcached *self, IoObject *locals, IoMessage *m)
+ int errors = 0;
+ uint32_t pos = 0;
+ while(pos < memcached_server_count(DATA(self)->mc)) {
+- memcached_server_instance_st server = memcached_server_instance_by_position(DATA(self)->mc, pos);
++ const memcached_instance_st *server = memcached_server_instance_by_position(DATA(self)->mc, pos);
+ if(server == NULL)
+ continue;
+