diff options
author | danfe <danfe@FreeBSD.org> | 2015-04-23 15:26:09 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2015-04-23 15:26:09 +0800 |
commit | 56d84fbd851d087c13f87247bad76423ac0d0c1e (patch) | |
tree | ca993116c15acd457e01327addef3458e31b9a74 /games | |
parent | 064a4ff4a3cbc836d53edb71928e8118536ca931 (diff) | |
download | freebsd-ports-gnome-56d84fbd851d087c13f87247bad76423ac0d0c1e.tar.gz freebsd-ports-gnome-56d84fbd851d087c13f87247bad76423ac0d0c1e.tar.zst freebsd-ports-gnome-56d84fbd851d087c13f87247bad76423ac0d0c1e.zip |
- Fix broken communication with external tools (e.g. q2map): GtkRadiant's
network library (libs/l_net) defines its own struct sockaddr_s, which
has single ``short sa_family'' field instead of ``unsigned char sa_len''
and ``sa_family_t sa_family'' of struct sockaddr; this, in turn, causes
problems when sockaddr_s objects bogusly used as sockaddr ones, e.g.:
connect(4, { sa_len = 2, sa_family = 0, ...) ERR#47 'Address family
not supported by protocol family'
- Fix missing main window icon by calling pixbuf_new_from_file_with_mask()
with correct filepath
- Since these changes are likely to improve GtkRadiant user's experience,
tentatively bump port revision
- Fix comment indentation in `radiant/treemodel.cpp' (broken in r384527)
Diffstat (limited to 'games')
-rw-r--r-- | games/gtkradiant/Makefile | 2 | ||||
-rw-r--r-- | games/gtkradiant/files/patch-libs_l__net_l__net__berkley.c | 29 | ||||
-rw-r--r-- | games/gtkradiant/files/patch-radiant__mainframe.cpp | 9 | ||||
-rw-r--r-- | games/gtkradiant/files/patch-radiant_treemodel.cpp | 8 |
4 files changed, 43 insertions, 5 deletions
diff --git a/games/gtkradiant/Makefile b/games/gtkradiant/Makefile index 0f0c77d240af..ef9281764249 100644 --- a/games/gtkradiant/Makefile +++ b/games/gtkradiant/Makefile @@ -3,7 +3,7 @@ PORTNAME= gtkradiant PORTVERSION= 1.5.0 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= games cad MASTER_SITES= IDSOFTWARE/source/:id \ http://www.bsd-geek.de/FreeBSD/distfiles/:fb diff --git a/games/gtkradiant/files/patch-libs_l__net_l__net__berkley.c b/games/gtkradiant/files/patch-libs_l__net_l__net__berkley.c new file mode 100644 index 000000000000..1f512e87fd04 --- /dev/null +++ b/games/gtkradiant/files/patch-libs_l__net_l__net__berkley.c @@ -0,0 +1,29 @@ +--- libs/l_net/l_net_berkley.c.orig 2006-02-10 22:01:20 UTC ++++ libs/l_net/l_net_berkley.c +@@ -438,7 +438,7 @@ static int PartialIPAddress (char *in, s + addr = (addr<<8) + num; + } + +- hostaddr->sa_family = AF_INET; ++ ((struct sockaddr_in *)hostaddr)->sin_family = AF_INET; + ((struct sockaddr_in *)hostaddr)->sin_port = htons((u_short)net_hostport); + ((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr); + +@@ -657,7 +657,7 @@ int WINS_StringToAddr(char *string, stru + sscanf(string, "%d.%d.%d.%d:%d", &ha1, &ha2, &ha3, &ha4, &hp); + ipaddr = (ha1 << 24) | (ha2 << 16) | (ha3 << 8) | ha4; + +- addr->sa_family = AF_INET; ++ ((struct sockaddr_in *)addr)->sin_family = AF_INET; + ((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr); + ((struct sockaddr_in *)addr)->sin_port = htons((u_short)hp); + return 0; +@@ -718,7 +718,7 @@ int WINS_GetAddrFromName(char *name, str + if (!hostentry) + return -1; + +- addr->sa_family = AF_INET; ++ ((struct sockaddr_in *)addr)->sin_family = AF_INET; + ((struct sockaddr_in *)addr)->sin_port = htons((u_short)net_hostport); + ((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0]; + diff --git a/games/gtkradiant/files/patch-radiant__mainframe.cpp b/games/gtkradiant/files/patch-radiant__mainframe.cpp index 5034d348ea31..78861bb4f346 100644 --- a/games/gtkradiant/files/patch-radiant__mainframe.cpp +++ b/games/gtkradiant/files/patch-radiant__mainframe.cpp @@ -9,6 +9,15 @@ "so" #elif defined (__APPLE__) "dylib" +@@ -2849,7 +2849,7 @@ + + #if !defined(WIN32) + { +- GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask("icon.bmp"); ++ GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask("bitmaps/icon.bmp"); + if(pixbuf != 0) + { + gtk_window_set_icon(window, pixbuf); @@ -3479,7 +3479,7 @@ const char* ENGINEPATH_ATTRIBUTE = #if defined(WIN32) diff --git a/games/gtkradiant/files/patch-radiant_treemodel.cpp b/games/gtkradiant/files/patch-radiant_treemodel.cpp index 8663dfac8ad5..32683476caa8 100644 --- a/games/gtkradiant/files/patch-radiant_treemodel.cpp +++ b/games/gtkradiant/files/patch-radiant_treemodel.cpp @@ -20,7 +20,7 @@ void node_detach_name_changed_callback(scene::Node& node, const NameCallback& callback) { - if(&node != 0) -+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 ++ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 + + if(n != 0) { @@ -31,7 +31,7 @@ const char* node_get_name_safe(scene::Node& node) { - if(&node == 0) -+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 ++ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 + + if(n == 0) { @@ -42,7 +42,7 @@ void node_attach_name_changed_callback(scene::Node& node, const NameCallback& callback) { - if(&node != 0) -+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 ++ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 + + if(n != 0) { @@ -53,7 +53,7 @@ void node_detach_name_changed_callback(scene::Node& node, const NameCallback& callback) { - if(&node != 0) -+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 ++ volatile intptr_t n = (intptr_t)&node; // see the comment on line 713 + + if(n != 0) { |