aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2017-01-11 04:52:40 +0800
committerthierry <thierry@FreeBSD.org>2017-01-11 04:52:40 +0800
commit0d98e0fcc7ae309de518034ffe65a2c7bfb22c93 (patch)
tree2ec2d55c79e041af61ab3e6e6b3265cdc5950430
parent4ad88c2cde141bfdd1eebcd320e1d2624c84c5a9 (diff)
downloadfreebsd-ports-gnome-0d98e0fcc7ae309de518034ffe65a2c7bfb22c93.tar.gz
freebsd-ports-gnome-0d98e0fcc7ae309de518034ffe65a2c7bfb22c93.tar.zst
freebsd-ports-gnome-0d98e0fcc7ae309de518034ffe65a2c7bfb22c93.zip
Chase toxcore and upgrade to 0.11.1.
PR: 215746 Approved by: maintainer (Chris Hutchinson)
-rw-r--r--net-im/uTox/Makefile21
-rw-r--r--net-im/uTox/distinfo6
-rw-r--r--net-im/uTox/files/patch-Makefile43
-rw-r--r--net-im/uTox/files/patch-src_main.h12
-rw-r--r--net-im/uTox/files/patch-src_ui.c21
-rw-r--r--net-im/uTox/files/patch-src_xlib_main.c17
-rw-r--r--net-im/uTox/files/patch-src_xlib_video.c12
-rw-r--r--net-im/uTox/pkg-plist15
8 files changed, 31 insertions, 116 deletions
diff --git a/net-im/uTox/Makefile b/net-im/uTox/Makefile
index f32d11a05cd5..254d1742abdf 100644
--- a/net-im/uTox/Makefile
+++ b/net-im/uTox/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= uTox
-PORTVERSION= 0.9.8.20160729
-PORTREVISION= 2
+PORTVERSION= 0.11.1
CATEGORIES= net-im net-p2p
MAINTAINER= portmaster@BSDforge.com
@@ -23,12 +22,11 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
RUN_DEPENDS= ${LOCALBASE}/lib/libtoxcore.a:net-im/tox
USE_GITHUB= yes
-GH_ACCOUNT= GrayHatter
-GH_TAGNAME= 66bf323
+GH_TAGNAME= 1835eae
-USES= compiler:c11 desktop-file-utils gmake openal:al pkgconfig
+USES= cmake compiler:c11 desktop-file-utils localbase:ldflags openal:al \
+ pkgconfig
USE_XORG= x11 xext xrender
-INSTALLS_ICONS= yes
OPTIONS_DEFINE= DBUS
OPTIONS_DEFAULT= DBUS
@@ -36,15 +34,10 @@ OPTIONS_DEFAULT= DBUS
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
DBUS_MAKE_ARGS_OFF= DBUS=0
-post-patch:
- @${REINPLACE_CMD} -e 's|$$(GIT_V)|${DISTVERSION}-${GH_TAGNAME}|' \
- -e 's|(DATAROOTDIR)/man|(PREFIX)/man|' ${WRKSRC}/${MAKEFILE}
-
pre-configure:
- @(if [ ! -e "${LOCALBASE}/lib/libtoxav.so" ]; then \
- ${ECHO_CMD} "==> ${PKGNAME} requires net-im/tox port to be built with SODIUM option enabled"; \
- ${FALSE}; \
- fi)
+ ${REINPLACE_CMD} -e 's|resolv dl||' \
+ -e 's|/usr/include/freetype2|${LOCALBASE}/include/freetype2|' \
+ ${WRKSRC}/CMakeLists.txt
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/utox
diff --git a/net-im/uTox/distinfo b/net-im/uTox/distinfo
index fe5717c08352..2e9baac14751 100644
--- a/net-im/uTox/distinfo
+++ b/net-im/uTox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1471099250
-SHA256 (GrayHatter-uTox-0.9.8.20160729-66bf323_GH0.tar.gz) = 91924726d555b457c31f4c710fc1952684cc0c6ecfb214806e9643fab2e441fb
-SIZE (GrayHatter-uTox-0.9.8.20160729-66bf323_GH0.tar.gz) = 2358300
+TIMESTAMP = 1483474222
+SHA256 (uTox-uTox-0.11.1-1835eae_GH0.tar.gz) = bd6c093c30ee56315dc97dc70bc32a761b748c761353eadb6e940a5cdbc5891d
+SIZE (uTox-uTox-0.11.1-1835eae_GH0.tar.gz) = 2378596
diff --git a/net-im/uTox/files/patch-Makefile b/net-im/uTox/files/patch-Makefile
deleted file mode 100644
index aec2469f32ef..000000000000
--- a/net-im/uTox/files/patch-Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
---- Makefile.orig 2016-07-26 23:53:18 UTC
-+++ Makefile
-@@ -54,6 +54,40 @@ ifeq ($(UNAME_S), Linux)
-
- TRAY_OBJ = icons/utox-128x128.o
- TRAY_GEN = $(LD) -r -b binary icons/utox-128x128.png -o
-+else ifeq ($(UNAME_S), FreeBSD)
-+ OUT_FILE = utox
-+
-+ DEPS += fontconfig freetype2 x11 xext xrender
-+
-+ ifeq ($(V4LCONVERT), 1)
-+ DEPS += libv4lconvert
-+ else
-+ CFLAGS += -DNO_V4LCONVERT
-+ endif
-+
-+ ifeq ($(UNITY), 1)
-+ DEPS += messaging-menu unity
-+ CFLAGS += -DUNITY
-+ endif
-+
-+ ifeq ($(DBUS), 1)
-+ DEPS += dbus-1
-+ CFLAGS += -DHAVE_DBUS
-+ else
-+ CFLAGS += -DNO_DBUS
-+ endif
-+
-+ PKG_CONFIG = pkg-config
-+
-+ CFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEPS))
-+
-+ LDFLAGS += $(shell $(PKG_CONFIG) --libs $(DEPS))
-+
-+ OS_SRC = $(wildcard src/xlib/*.c)
-+ OS_OBJ = $(OS_SRC:.c=.o)
-+
-+ TRAY_OBJ = icons/utox-128x128.o
-+ TRAY_GEN = $(LD) -r -b binary icons/utox-128x128.png -o
- else ifeq ($(UNAME_O), Cygwin)
- OUT_FILE = utox.exe
-
diff --git a/net-im/uTox/files/patch-src_main.h b/net-im/uTox/files/patch-src_main.h
index bb398bb54aeb..02d0d9fdccc7 100644
--- a/net-im/uTox/files/patch-src_main.h
+++ b/net-im/uTox/files/patch-src_main.h
@@ -1,11 +1,13 @@
---- src/main.h.orig 2016-07-26 23:53:18 UTC
+--- src/main.h.orig 2016-12-21 09:12:44 UTC
+++ src/main.h
-@@ -45,7 +45,7 @@
+@@ -80,8 +80,8 @@
#define volatile(x) (*((volatile typeof(x)*)&x))
#endif */
-#ifndef __OBJC__
-+#if !defined(__OBJC__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
- #define volatile(x) (x)
+-#define volatile(x)(x)
++#if !defined(__OBJC__) || defined(__NetBSD__) || defined(__FreeBSD__)
++#define volatile(x) x
#endif
- /* UTOX_SCALE is used as the default so that we have a lot of options for scale size.
+
+ #define SCALE(x) (((int)((ui_scale / 10.0) * ((double)x))) ?: 1)
diff --git a/net-im/uTox/files/patch-src_ui.c b/net-im/uTox/files/patch-src_ui.c
deleted file mode 100644
index 064debfba54d..000000000000
--- a/net-im/uTox/files/patch-src_ui.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/ui.c.orig 2016-07-26 23:53:18 UTC
-+++ src/ui.c
-@@ -298,16 +298,9 @@ static void draw_settings_header(int UNU
- setfont(FONT_SELF_NAME);
- drawstr(MAIN_LEFT + SCALE(10), SCALE(10), UTOX_SETTINGS);
- #ifdef GIT_VERSION
-- int x = MAIN_LEFT + SCALE(10) + UTOX_STR_WIDTH(UTOX_SETTINGS) + SCALE(10);
-+ int x = MAIN_LEFT + UTOX_SCALE(5 ) + UTOX_STR_WIDTH(UTOX_SETTINGS) + UTOX_SCALE(5 );
- setfont(FONT_TEXT);
-- drawtext(x, SCALE(10), (uint8_t*)GIT_VERSION, strlen(GIT_VERSION));
-- char version_string[64];
-- int count;
-- count = snprintf(version_string, 64, "Core v%u.%u.%u ToxAV v%u.%u.%u ToxES v%u.%u.%u",
-- tox_version_major(), tox_version_minor(), tox_version_patch(),
-- toxav_version_major(), toxav_version_minor(), toxav_version_patch(),
-- toxes_version_major(), toxes_version_minor(), toxes_version_patch());
-- drawtextwidth_right(w, textwidth((char_t*)version_string, count), SCALE(10), (uint8_t*)version_string, strlen(version_string));
-+ drawtext(x, UTOX_SCALE(5), (uint8_t*)GIT_VERSION, strlen(GIT_VERSION));
- #endif
- }
-
diff --git a/net-im/uTox/files/patch-src_xlib_main.c b/net-im/uTox/files/patch-src_xlib_main.c
index a19a80e10ba9..14c2991bef2f 100644
--- a/net-im/uTox/files/patch-src_xlib_main.c
+++ b/net-im/uTox/files/patch-src_xlib_main.c
@@ -1,29 +1,28 @@
---- src/xlib/main.c.orig 2016-07-26 23:53:18 UTC
+--- src/xlib/main.c.orig 2016-12-21 09:12:44 UTC
+++ src/xlib/main.c
-@@ -73,8 +73,9 @@ void postmessage(uint32_t msg, uint16_t
+@@ -35,7 +35,9 @@ void postmessage(uint32_t msg, uint16_t
XFlush(display);
}
--
+#ifdef __LINUX__
#include <linux/input.h>
+#endif
- FILE *ptt_keyboard_handle;
+ FILE * ptt_keyboard_handle;
Display *ptt_display;
- void init_ptt(void){
-@@ -100,6 +101,7 @@ _Bool check_ptt_key(void){
+ void init_ptt(void) {
+@@ -60,6 +62,7 @@ bool check_ptt_key(void) {
int ptt_key;
/* First, we try for direct access to the keyboard. */
+#ifdef __LINUX__
- ptt_key = KEY_LEFTCTRL; // TODO allow user to change this...
+ ptt_key = KEY_LEFTCTRL; // TODO allow user to change this...
if (ptt_keyboard_handle) {
/* Nice! we have direct access to the keyboard! */
-@@ -117,6 +119,7 @@ _Bool check_ptt_key(void){
+@@ -78,6 +81,7 @@ bool check_ptt_key(void) {
return 0;
}
}
+#endif
/* Okay nope, lets' fallback to xinput... *pouts*
* Fall back to Querying the X for the current keymap. */
- ptt_key = XKeysymToKeycode(display, XK_Control_L);
+ ptt_key = XKeysymToKeycode(display, XK_Control_L);
diff --git a/net-im/uTox/files/patch-src_xlib_video.c b/net-im/uTox/files/patch-src_xlib_video.c
index 30b50db7c8d4..5a943493afd0 100644
--- a/net-im/uTox/files/patch-src_xlib_video.c
+++ b/net-im/uTox/files/patch-src_xlib_video.c
@@ -1,12 +1,12 @@
---- src/xlib/video.c.orig 2016-07-26 23:53:18 UTC
+--- src/xlib/video.c.orig 2016-12-21 09:12:44 UTC
+++ src/xlib/video.c
-@@ -152,6 +152,9 @@ _Bool native_video_init(void *handle) {
- if(isdesktop(handle)) {
+@@ -144,6 +144,9 @@ bool native_video_init(void *handle) {
+ if (isdesktop(handle)) {
utox_v4l_fd = -1;
+#ifndef volatile
+#define volatile(x) (*((volatile typeof(x)*)&x))
+#endif
- video_x = volatile(grabx);
- video_y = volatile(graby);
- video_width = volatile(grabpx);
+ video_x = volatile(grabx);
+ video_y = volatile(graby);
+ video_width = volatile(grabpx);
diff --git a/net-im/uTox/pkg-plist b/net-im/uTox/pkg-plist
index 0563b6499267..c482abad2ca1 100644
--- a/net-im/uTox/pkg-plist
+++ b/net-im/uTox/pkg-plist
@@ -1,18 +1,3 @@
bin/utox
share/applications/utox.desktop
-share/icons/hicolor/128x128/apps/utox.png
-share/icons/hicolor/14x14/apps/utox.png
-share/icons/hicolor/16x16/apps/utox.png
-share/icons/hicolor/192x192/apps/utox.png
-share/icons/hicolor/22x22/apps/utox.png
-share/icons/hicolor/24x24/apps/utox.png
-share/icons/hicolor/256x256/apps/utox.png
-share/icons/hicolor/32x32/apps/utox.png
-share/icons/hicolor/36x36/apps/utox.png
-share/icons/hicolor/48x48/apps/utox.png
-share/icons/hicolor/512x512/apps/utox.png
-share/icons/hicolor/64x64/apps/utox.png
-share/icons/hicolor/72x72/apps/utox.png
-share/icons/hicolor/96x96/apps/utox.png
-share/icons/hicolor/scalable/apps/utox.svg
man/man1/utox.1.gz