View | Details | Raw Unified | Return to bug 215746
Collapse All | Expand All

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

Return to bug 215746