Index: head/net-im/uTox/Makefile =================================================================== --- head/net-im/uTox/Makefile (revision 419325) +++ head/net-im/uTox/Makefile (revision 419326) @@ -1,52 +1,51 @@ # $FreeBSD$ PORTNAME= uTox -PORTVERSION= 0.9.5.20160530 -PORTREVISION= 1 +PORTVERSION= 0.9.7.20160729 CATEGORIES= net-im net-p2p MAINTAINER= portmaster@BSDforge.com COMMENT= Lightweight Tox client LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${LOCALBASE}/lib/libtoxcore.a:net-im/tox \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat LIB_DEPENDS= libfreetype.so:print/freetype2 \ libfontconfig.so:x11-fonts/fontconfig \ libsodium.so:security/libsodium \ libv4lconvert.so:multimedia/libv4l \ libvpx.so:multimedia/libvpx \ libfilteraudio.so:audio/libfilteraudio\ libopus.so:audio/opus RUN_DEPENDS= ${LOCALBASE}/lib/libtoxcore.a:net-im/tox USE_GITHUB= yes GH_ACCOUNT= GrayHatter -GH_TAGNAME= c85c747 +GH_TAGNAME= d800600 USES= compiler:c11 desktop-file-utils gmake openal:al pkgconfig USE_XORG= x11 xext xrender INSTALLS_ICONS= yes OPTIONS_DEFINE= DBUS 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) post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/utox .include Index: head/net-im/uTox/distinfo =================================================================== --- head/net-im/uTox/distinfo (revision 419325) +++ head/net-im/uTox/distinfo (revision 419326) @@ -1,2 +1,2 @@ -SHA256 (GrayHatter-uTox-0.9.5.20160530-c85c747_GH0.tar.gz) = 43aaad041c7a830bc7e422908855f314f396c4c9e30577e86c225a3b5377c93e -SIZE (GrayHatter-uTox-0.9.5.20160530-c85c747_GH0.tar.gz) = 2020325 +SHA256 (GrayHatter-uTox-0.9.7.20160729-d800600_GH0.tar.gz) = 6cf1355f8e034744b93d59c49b3835a28794e053827c558dba556a09c754236b +SIZE (GrayHatter-uTox-0.9.7.20160729-d800600_GH0.tar.gz) = 2357312 Index: head/net-im/uTox/files/patch-Makefile =================================================================== --- head/net-im/uTox/files/patch-Makefile (revision 419325) +++ head/net-im/uTox/files/patch-Makefile (revision 419326) @@ -1,55 +1,43 @@ ---- Makefile.orig 2016-05-30 04:33:35 UTC +--- Makefile.orig 2016-07-26 23:53:18 UTC +++ Makefile -@@ -2,9 +2,9 @@ - # set to anything else to disable them - DBUS = 1 - V4LCONVERT = 1 --FILTER_AUDIO = 0 -+FILTER_AUDIO = 1 - UNITY = 0 --XP = 0 -+XP = 0 - - DEPS = libtoxav libtoxcore openal vpx libsodium - @@ -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 Index: head/net-im/uTox/files/patch-src_main.h =================================================================== --- head/net-im/uTox/files/patch-src_main.h (revision 419325) +++ head/net-im/uTox/files/patch-src_main.h (revision 419326) @@ -1,11 +1,11 @@ ---- src/main.h.orig 2016-05-13 18:05:27.586256000 +0300 -+++ src/main.h 2016-05-13 18:06:21.738883000 +0300 -@@ -74,7 +74,7 @@ +--- src/main.h.orig 2016-07-26 23:53:18 UTC ++++ src/main.h +@@ -45,7 +45,7 @@ #define volatile(x) (*((volatile typeof(x)*)&x)) #endif */ -#ifndef __OBJC__ +#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. Index: head/net-im/uTox/files/patch-src_ui.c =================================================================== --- head/net-im/uTox/files/patch-src_ui.c (revision 419325) +++ head/net-im/uTox/files/patch-src_ui.c (revision 419326) @@ -1,21 +1,21 @@ ---- src/ui.c.orig 2016-05-10 07:09:15 UTC +--- src/ui.c.orig 2016-07-26 23:53:18 UTC +++ src/ui.c -@@ -271,16 +271,9 @@ static void draw_settings_header(int UNU +@@ -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 } Index: head/net-im/uTox/files/patch-src_xlib_main.c =================================================================== --- head/net-im/uTox/files/patch-src_xlib_main.c (revision 419325) +++ head/net-im/uTox/files/patch-src_xlib_main.c (revision 419326) @@ -1,29 +1,29 @@ ---- src/xlib/main.c.orig 2016-05-13 17:52:03.371614000 +0300 -+++ src/xlib/main.c 2016-05-13 17:53:38.294993000 +0300 -@@ -73,8 +73,9 @@ +--- src/xlib/main.c.orig 2016-07-26 23:53:18 UTC ++++ src/xlib/main.c +@@ -73,8 +73,9 @@ void postmessage(uint32_t msg, uint16_t XFlush(display); } - +#ifdef __LINUX__ #include +#endif FILE *ptt_keyboard_handle; Display *ptt_display; void init_ptt(void){ -@@ -100,6 +101,7 @@ +@@ -100,6 +101,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... if (ptt_keyboard_handle) { /* Nice! we have direct access to the keyboard! */ -@@ -117,6 +119,7 @@ +@@ -117,6 +119,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); Index: head/net-im/uTox/files/patch-src_xlib_video.c =================================================================== --- head/net-im/uTox/files/patch-src_xlib_video.c (revision 419325) +++ head/net-im/uTox/files/patch-src_xlib_video.c (revision 419326) @@ -1,12 +1,12 @@ ---- src/xlib/video.c.orig 2016-05-13 18:12:01.175591000 +0300 -+++ src/xlib/video.c 2016-05-13 18:12:27.944571000 +0300 -@@ -152,6 +152,9 @@ +--- src/xlib/video.c.orig 2016-07-26 23:53:18 UTC ++++ src/xlib/video.c +@@ -152,6 +152,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);