pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toxic: Rename to toxic-git



Module Name:	pkgsrc-wip
Committed By:	Mateusz Poszwa <old4%o2.pl@localhost>
Pushed By:	f8l
Date:		Thu Sep 22 22:31:49 2016 +0200
Changeset:	db9721f971a250b15a198a1b798c8be4536caa99

Modified Files:
	Makefile
Added Files:
	toxic-git/DESCR
	toxic-git/Makefile
	toxic-git/PLIST
	toxic-git/TODO
	toxic-git/distinfo
	toxic-git/options.mk
	toxic-git/patches/patch-Makefile
	toxic-git/patches/patch-cfg_global__vars.mk
	toxic-git/patches/patch-src_name__lookup.c
	toxic-git/patches/patch-src_toxic.c
	toxic-git/patches/patch-src_video__device.c
Removed Files:
	toxic/DESCR
	toxic/Makefile
	toxic/PLIST
	toxic/TODO
	toxic/distinfo
	toxic/options.mk
	toxic/patches/patch-Makefile
	toxic/patches/patch-cfg_global__vars.mk
	toxic/patches/patch-src_name__lookup.c
	toxic/patches/patch-src_toxic.c
	toxic/patches/patch-src_video__device.c

Log Message:
toxic: Rename to toxic-git

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=db9721f971a250b15a198a1b798c8be4536caa99

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                    |   2 +-
 toxic-git/DESCR                             |   2 +
 toxic-git/Makefile                          |  32 +++++
 toxic-git/PLIST                             |  15 +++
 toxic-git/TODO                              |   1 +
 toxic-git/distinfo                          |   7 ++
 toxic-git/options.mk                        |  15 +++
 toxic-git/patches/patch-Makefile            |  16 +++
 toxic-git/patches/patch-cfg_global__vars.mk |  15 +++
 toxic-git/patches/patch-src_name__lookup.c  |  14 +++
 toxic-git/patches/patch-src_toxic.c         |  14 +++
 toxic-git/patches/patch-src_video__device.c | 181 ++++++++++++++++++++++++++++
 toxic/DESCR                                 |   2 -
 toxic/Makefile                              |  32 -----
 toxic/PLIST                                 |  15 ---
 toxic/TODO                                  |   1 -
 toxic/distinfo                              |   7 --
 toxic/options.mk                            |  15 ---
 toxic/patches/patch-Makefile                |  16 ---
 toxic/patches/patch-cfg_global__vars.mk     |  15 ---
 toxic/patches/patch-src_name__lookup.c      |  14 ---
 toxic/patches/patch-src_toxic.c             |  14 ---
 toxic/patches/patch-src_video__device.c     | 181 ----------------------------
 23 files changed, 313 insertions(+), 313 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index f486730..0f2cb9f 100644
--- a/Makefile
+++ b/Makefile
@@ -4103,7 +4103,7 @@ SUBDIR+=	tortunnel
 SUBDIR+=	totem
 SUBDIR+=	totem-pl-parser
 SUBDIR+=	toxcore
-SUBDIR+=	toxic
+SUBDIR+=	toxic-git
 SUBDIR+=	tpp
 SUBDIR+=	tqsllib
 SUBDIR+=	tr2latex
diff --git a/toxic-git/DESCR b/toxic-git/DESCR
new file mode 100644
index 0000000..7b950d3
--- /dev/null
+++ b/toxic-git/DESCR
@@ -0,0 +1,2 @@
+Toxic is a Tox-based instant messenging client which formerly resided
+in the Tox core repository, and is now available as a standalone application.
diff --git a/toxic-git/Makefile b/toxic-git/Makefile
new file mode 100644
index 0000000..ca71bd9
--- /dev/null
+++ b/toxic-git/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD$
+
+DISTNAME=	toxic-0.7.0
+CATEGORIES=	chat
+MASTER_SITES=	${MASTER_SITE_GITHUB:=JFreegman/}
+
+GIT_REPOSITORIES=	toxic
+GIT_REPO.toxic=	https://github.com/JFreegman/toxic.git
+WRKSRC=	${WRKDIR}/toxic
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://wiki.tox.chat/clients/toxic
+COMMENT=	CLI Tox client
+LICENSE=	gnu-gpl-v3
+
+NO_CONFIGURE=	yes
+USE_TOOLS+=	gmake pkg-config
+USE_LANGUAGES+=	c
+
+.include "options.mk"
+
+.include "../../wip/toxcore/buildlink3.mk"
+
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../converters/qrencode/buildlink3.mk"
+.include "../../devel/libconfig/buildlink3.mk"
+.include "../../devel/ncursesw/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/toxic-git/PLIST b/toxic-git/PLIST
new file mode 100644
index 0000000..3f8740f
--- /dev/null
+++ b/toxic-git/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD$
+bin/toxic
+man/man1/toxic.1
+man/man5/toxic.conf.5
+share/applications/toxic.desktop
+share/toxic/nameservers
+share/toxic/sounds/ToxicContactOffline.wav
+share/toxic/sounds/ToxicContactOnline.wav
+share/toxic/sounds/ToxicError.wav
+share/toxic/sounds/ToxicIncomingCall.wav
+share/toxic/sounds/ToxicOutgoingCall.wav
+share/toxic/sounds/ToxicRecvMessage.wav
+share/toxic/sounds/ToxicTransferComplete.wav
+share/toxic/sounds/ToxicTransferStart.wav
+share/toxic/toxic.conf.example
diff --git a/toxic-git/TODO b/toxic-git/TODO
new file mode 100644
index 0000000..9f042c0
--- /dev/null
+++ b/toxic-git/TODO
@@ -0,0 +1 @@
+Add freealut option (needed for sound notifications).
diff --git a/toxic-git/distinfo b/toxic-git/distinfo
new file mode 100644
index 0000000..97cbc4c
--- /dev/null
+++ b/toxic-git/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (patch-Makefile) = c996154317aedaaa4b3a1bac2a69e4fc1b89173b
+SHA1 (patch-cfg_global__vars.mk) = 5aad096f067f485c439135d3838b8912d1ad7d5e
+SHA1 (patch-src_name__lookup.c) = 212742961593ff970e5d108af2f14b8f93199a76
+SHA1 (patch-src_toxic.c) = 0c466bb767a77f5bf25aeef934ca61e5dc550923
+SHA1 (patch-src_video__device.c) = 27ca66738b98cbcf7be002ccd9c768f29e221297
diff --git a/toxic-git/options.mk b/toxic-git/options.mk
new file mode 100644
index 0000000..ec5c397
--- /dev/null
+++ b/toxic-git/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.toxic
+PKG_SUPPORTED_OPTIONS+= notify x11
+PKG_SUGGESTED_OPTIONS+= notify x11
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mnotify)
+.include "../../sysutils/libnotify/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mx11)
+.include "../../x11/libX11/buildlink3.mk"
+.endif
diff --git a/toxic-git/patches/patch-Makefile b/toxic-git/patches/patch-Makefile
new file mode 100644
index 0000000..3f9f784
--- /dev/null
+++ b/toxic-git/patches/patch-Makefile
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Base NetBSD build on FreeBSD build.
+
+--- Makefile.orig	2015-12-26 05:56:46.000000000 +0000
++++ Makefile
+@@ -30,6 +30,9 @@ endif
+ ifeq ($(UNAME_S), OpenBSD)
+     -include $(CFG_DIR)/systems/FreeBSD.mk
+ endif
++ifeq ($(UNAME_S), NetBSD)
++    -include $(CFG_DIR)/systems/FreeBSD.mk
++endif
+ ifeq ($(UNAME_S), Darwin)
+     -include $(CFG_DIR)/systems/Darwin.mk
+ endif
diff --git a/toxic-git/patches/patch-cfg_global__vars.mk b/toxic-git/patches/patch-cfg_global__vars.mk
new file mode 100644
index 0000000..de6973f
--- /dev/null
+++ b/toxic-git/patches/patch-cfg_global__vars.mk
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Allow overwriting PREFIX.
+
+--- cfg/global_vars.mk.orig	2015-12-26 05:56:46.000000000 +0000
++++ cfg/global_vars.mk
+@@ -23,7 +23,7 @@ SNDFILES += ToxicRecvMessage.wav ToxicOu
+ SNDFILES += ToxicTransferComplete.wav ToxicTransferStart.wav
+ 
+ # Install directories
+-PREFIX = /usr/local
++PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
+ DATADIR = $(PREFIX)/share/toxic
+ MANDIR = $(PREFIX)/share/man
diff --git a/toxic-git/patches/patch-src_name__lookup.c b/toxic-git/patches/patch-src_name__lookup.c
new file mode 100644
index 0000000..cf2ad0a
--- /dev/null
+++ b/toxic-git/patches/patch-src_name__lookup.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include stdarg.h.
+
+--- src/name_lookup.c.orig	2015-12-26 05:56:46.000000000 +0000
++++ src/name_lookup.c
+@@ -21,6 +21,7 @@
+  */
+ 
+ #include <stdlib.h>
++#include <stdarg.h>
+ #include <string.h>
+ #include <curl/curl.h>
+
diff --git a/toxic-git/patches/patch-src_toxic.c b/toxic-git/patches/patch-src_toxic.c
new file mode 100644
index 0000000..3b571b1
--- /dev/null
+++ b/toxic-git/patches/patch-src_toxic.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include stdarg.h.
+
+--- src/toxic.c.orig	2015-12-26 05:56:46.000000000 +0000
++++ src/toxic.c
+@@ -26,6 +26,7 @@
+ #include <stdlib.h>
+ #include <stdbool.h>
+ #include <stdint.h>
++#include <stdarg.h>
+ #include <signal.h>
+ #include <locale.h>
+ #include <string.h>
diff --git a/toxic-git/patches/patch-src_video__device.c b/toxic-git/patches/patch-src_video__device.c
new file mode 100644
index 0000000..58bb2fc
--- /dev/null
+++ b/toxic-git/patches/patch-src_video__device.c
@@ -0,0 +1,181 @@
+$NetBSD$
+
+Do not assume what is not Linux or FreeBSD is OSX.
+
+--- src/video_device.c.orig	2015-12-26 05:56:46.000000000 +0000
++++ src/video_device.c
+@@ -30,14 +30,18 @@
+ 
+ #include <vpx/vpx_image.h>
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__OSX__)
++#import "osx_video.h"
++#else
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <fcntl.h>
++#ifdef __Linux__
+ #include <linux/videodev2.h>
+-#else /* __OSX__ */
+-#import "osx_video.h"
++#else
++#include <sys/videoio.h>
++#endif
+ #endif
+ 
+ #include "line_info.h"
+@@ -65,7 +69,7 @@ typedef struct VideoDevice {
+     void* cb_data;                          /* Data to be passed to callback */
+     int32_t friend_number;                  /* ToxAV friend number */
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+     int fd;                                 /* File descriptor of video device selected/opened */
+     struct v4l2_format fmt;
+     struct VideoBuffer *buffers;
+@@ -131,7 +135,7 @@ static void yuv420tobgr(uint16_t width, 
+     }
+ }
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ static void yuv422to420(uint8_t *plane_y, uint8_t *plane_u, uint8_t *plane_v,
+                  uint8_t *input, uint16_t width, uint16_t height)
+ {
+@@ -177,7 +181,10 @@ VideoDeviceError init_video_devices()
+ {
+     size[vdt_input] = 0;
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__OSX__)
++    if( osx_video_init((char**)video_devices_names[vdt_input], &size[vdt_input]) != 0 )
++        return vde_InternalError;
++#else
+     for (; size[vdt_input] <= MAX_DEVICES; ++size[vdt_input]) {
+         int fd;
+         char device_address[] = "/dev/videoXX";
+@@ -208,10 +215,6 @@ VideoDeviceError init_video_devices()
+             close(fd);
+         }
+     }
+-
+-#else /* __OSX__ */
+-    if( osx_video_init((char**)video_devices_names[vdt_input], &size[vdt_input]) != 0 )
+-        return vde_InternalError;
+ #endif
+ 
+     size[vdt_output] = 1;
+@@ -257,12 +260,12 @@ VideoDeviceError terminate_video_devices
+ VideoDeviceError register_video_device_callback(int32_t friend_number, uint32_t device_idx,
+                                                 VideoDataHandleCallback callback, void* data)
+ {
+-#if defined(__linux__) || defined(__FreeBSD__)
+-    if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] || !video_devices_running[vdt_input][device_idx]->fd )
+-        return vde_InvalidSelection;
+-#else /* __OSX__ */
++#if defined(__OSX__)
+     if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] )
+         return vde_InvalidSelection;
++#else
++    if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] || !video_devices_running[vdt_input][device_idx]->fd )
++        return vde_InvalidSelection;
+ #endif
+ 
+     lock;
+@@ -336,7 +339,13 @@ VideoDeviceError open_video_device(Video
+     if ( type == vdt_input ) {
+         video_thread_paused = true;
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__OSX__)
++        if ( osx_video_open_device(selection, &device->video_width, &device->video_height) != 0 ) {
++            free(device);
++            unlock;
++            return vde_FailedStart;
++        }
++#else
+         /* Open selected device */
+         char device_address[] = "/dev/videoXX";
+         snprintf(device_address + 10 , sizeof(device_address) - 10, "%i", selection);
+@@ -455,13 +464,6 @@ VideoDeviceError open_video_device(Video
+             unlock;
+             return vde_FailedStart;
+         }
+-
+-#else /* __OSX__ */
+-        if ( osx_video_open_device(selection, &device->video_width, &device->video_height) != 0 ) {
+-            free(device);
+-            unlock;
+-            return vde_FailedStart;
+-        }
+ #endif
+ 
+         /* Create X11 window associated to device */
+@@ -632,7 +634,12 @@ void* video_thread_poll (void* arg) // T
+                     uint8_t *u = device->input.planes[1];
+                     uint8_t *v = device->input.planes[2];
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__OSX__)
++                    if ( osx_video_read_device(y, u, v, &video_width, &video_height) != 0 ) {
++                        unlock;
++                        continue;
++                    }
++#else
+                     struct v4l2_buffer buf;
+                     memset(&(buf), 0, sizeof(buf));
+ 
+@@ -648,12 +655,6 @@ void* video_thread_poll (void* arg) // T
+ 
+                     /* Convert frame image data to YUV420 for ToxAV */
+                     yuv422to420(y, u, v, data, video_width, video_height);
+-
+-#else /* __OSX__*/
+-                    if ( osx_video_read_device(y, u, v, &video_width, &video_height) != 0 ) {
+-                        unlock;
+-                        continue;
+-                    }
+ #endif
+ 
+                     /* Send frame data to friend through ToxAV */
+@@ -690,7 +691,7 @@ void* video_thread_poll (void* arg) // T
+                     XFlush(device->x_display);
+                     free(img_data);
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+                     if ( -1 == xioctl(device->fd, VIDIOC_QBUF, &buf) ) {
+                         unlock;
+                         continue;
+@@ -725,7 +726,9 @@ VideoDeviceError close_video_device(Vide
+     if ( !device->ref_count ) {
+ 
+         if ( type == vdt_input ) {
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__OSX__)
++            osx_video_close_device(device_idx);
++#else
+             enum v4l2_buf_type buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+             if( -1 == xioctl(device->fd, VIDIOC_STREAMOFF, &buf_type) ) {}
+ 
+@@ -735,9 +738,6 @@ VideoDeviceError close_video_device(Vide
+                 }
+             }
+             close(device->fd);
+-
+-#else /* __OSX__ */
+-            osx_video_close_device(device_idx);
+ #endif
+             vpx_img_free(&device->input);
+             XDestroyWindow(device->x_display, device->x_window);
+@@ -745,7 +745,7 @@ VideoDeviceError close_video_device(Vide
+             XCloseDisplay(device->x_display);
+             pthread_mutex_destroy(device->mutex);
+ 
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+             free(device->buffers);
+ #endif /* __linux__ */
+ 
diff --git a/toxic/DESCR b/toxic/DESCR
deleted file mode 100644
index 7b950d3..0000000
--- a/toxic/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-Toxic is a Tox-based instant messenging client which formerly resided
-in the Tox core repository, and is now available as a standalone application.
diff --git a/toxic/Makefile b/toxic/Makefile
deleted file mode 100644
index ca71bd9..0000000
--- a/toxic/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# $NetBSD$
-
-DISTNAME=	toxic-0.7.0
-CATEGORIES=	chat
-MASTER_SITES=	${MASTER_SITE_GITHUB:=JFreegman/}
-
-GIT_REPOSITORIES=	toxic
-GIT_REPO.toxic=	https://github.com/JFreegman/toxic.git
-WRKSRC=	${WRKDIR}/toxic
-
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://wiki.tox.chat/clients/toxic
-COMMENT=	CLI Tox client
-LICENSE=	gnu-gpl-v3
-
-NO_CONFIGURE=	yes
-USE_TOOLS+=	gmake pkg-config
-USE_LANGUAGES+=	c
-
-.include "options.mk"
-
-.include "../../wip/toxcore/buildlink3.mk"
-
-.include "../../audio/openal-soft/buildlink3.mk"
-.include "../../converters/qrencode/buildlink3.mk"
-.include "../../devel/libconfig/buildlink3.mk"
-.include "../../devel/ncursesw/buildlink3.mk"
-.include "../../www/curl/buildlink3.mk"
-
-.include "../../sysutils/desktop-file-utils/desktopdb.mk"
-.include "../../wip/mk/git-package.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/toxic/PLIST b/toxic/PLIST
deleted file mode 100644
index 3f8740f..0000000
--- a/toxic/PLIST
+++ /dev/null
@@ -1,15 +0,0 @@
-@comment $NetBSD$
-bin/toxic
-man/man1/toxic.1
-man/man5/toxic.conf.5
-share/applications/toxic.desktop
-share/toxic/nameservers
-share/toxic/sounds/ToxicContactOffline.wav
-share/toxic/sounds/ToxicContactOnline.wav
-share/toxic/sounds/ToxicError.wav
-share/toxic/sounds/ToxicIncomingCall.wav
-share/toxic/sounds/ToxicOutgoingCall.wav
-share/toxic/sounds/ToxicRecvMessage.wav
-share/toxic/sounds/ToxicTransferComplete.wav
-share/toxic/sounds/ToxicTransferStart.wav
-share/toxic/toxic.conf.example
diff --git a/toxic/TODO b/toxic/TODO
deleted file mode 100644
index 9f042c0..0000000
--- a/toxic/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Add freealut option (needed for sound notifications).
diff --git a/toxic/distinfo b/toxic/distinfo
deleted file mode 100644
index 97cbc4c..0000000
--- a/toxic/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD$
-
-SHA1 (patch-Makefile) = c996154317aedaaa4b3a1bac2a69e4fc1b89173b
-SHA1 (patch-cfg_global__vars.mk) = 5aad096f067f485c439135d3838b8912d1ad7d5e
-SHA1 (patch-src_name__lookup.c) = 212742961593ff970e5d108af2f14b8f93199a76
-SHA1 (patch-src_toxic.c) = 0c466bb767a77f5bf25aeef934ca61e5dc550923
-SHA1 (patch-src_video__device.c) = 27ca66738b98cbcf7be002ccd9c768f29e221297
diff --git a/toxic/options.mk b/toxic/options.mk
deleted file mode 100644
index ec5c397..0000000
--- a/toxic/options.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# $NetBSD$
-
-PKG_OPTIONS_VAR=	PKG_OPTIONS.toxic
-PKG_SUPPORTED_OPTIONS+= notify x11
-PKG_SUGGESTED_OPTIONS+= notify x11
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mnotify)
-.include "../../sysutils/libnotify/buildlink3.mk"
-.endif
-
-.if !empty(PKG_OPTIONS:Mx11)
-.include "../../x11/libX11/buildlink3.mk"
-.endif
diff --git a/toxic/patches/patch-Makefile b/toxic/patches/patch-Makefile
deleted file mode 100644
index 3f9f784..0000000
--- a/toxic/patches/patch-Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-Base NetBSD build on FreeBSD build.
-
---- Makefile.orig	2015-12-26 05:56:46.000000000 +0000
-+++ Makefile
-@@ -30,6 +30,9 @@ endif
- ifeq ($(UNAME_S), OpenBSD)
-     -include $(CFG_DIR)/systems/FreeBSD.mk
- endif
-+ifeq ($(UNAME_S), NetBSD)
-+    -include $(CFG_DIR)/systems/FreeBSD.mk
-+endif
- ifeq ($(UNAME_S), Darwin)
-     -include $(CFG_DIR)/systems/Darwin.mk
- endif
diff --git a/toxic/patches/patch-cfg_global__vars.mk b/toxic/patches/patch-cfg_global__vars.mk
deleted file mode 100644
index de6973f..0000000
--- a/toxic/patches/patch-cfg_global__vars.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Allow overwriting PREFIX.
-
---- cfg/global_vars.mk.orig	2015-12-26 05:56:46.000000000 +0000
-+++ cfg/global_vars.mk
-@@ -23,7 +23,7 @@ SNDFILES += ToxicRecvMessage.wav ToxicOu
- SNDFILES += ToxicTransferComplete.wav ToxicTransferStart.wav
- 
- # Install directories
--PREFIX = /usr/local
-+PREFIX ?= /usr/local
- BINDIR = $(PREFIX)/bin
- DATADIR = $(PREFIX)/share/toxic
- MANDIR = $(PREFIX)/share/man
diff --git a/toxic/patches/patch-src_name__lookup.c b/toxic/patches/patch-src_name__lookup.c
deleted file mode 100644
index cf2ad0a..0000000
--- a/toxic/patches/patch-src_name__lookup.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-Include stdarg.h.
-
---- src/name_lookup.c.orig	2015-12-26 05:56:46.000000000 +0000
-+++ src/name_lookup.c
-@@ -21,6 +21,7 @@
-  */
- 
- #include <stdlib.h>
-+#include <stdarg.h>
- #include <string.h>
- #include <curl/curl.h>
-
diff --git a/toxic/patches/patch-src_toxic.c b/toxic/patches/patch-src_toxic.c
deleted file mode 100644
index 3b571b1..0000000
--- a/toxic/patches/patch-src_toxic.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-Include stdarg.h.
-
---- src/toxic.c.orig	2015-12-26 05:56:46.000000000 +0000
-+++ src/toxic.c
-@@ -26,6 +26,7 @@
- #include <stdlib.h>
- #include <stdbool.h>
- #include <stdint.h>
-+#include <stdarg.h>
- #include <signal.h>
- #include <locale.h>
- #include <string.h>
diff --git a/toxic/patches/patch-src_video__device.c b/toxic/patches/patch-src_video__device.c
deleted file mode 100644
index 58bb2fc..0000000
--- a/toxic/patches/patch-src_video__device.c
+++ /dev/null
@@ -1,181 +0,0 @@
-$NetBSD$
-
-Do not assume what is not Linux or FreeBSD is OSX.
-
---- src/video_device.c.orig	2015-12-26 05:56:46.000000000 +0000
-+++ src/video_device.c
-@@ -30,14 +30,18 @@
- 
- #include <vpx/vpx_image.h>
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+#import "osx_video.h"
-+#else
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
- #include <fcntl.h>
-+#ifdef __Linux__
- #include <linux/videodev2.h>
--#else /* __OSX__ */
--#import "osx_video.h"
-+#else
-+#include <sys/videoio.h>
-+#endif
- #endif
- 
- #include "line_info.h"
-@@ -65,7 +69,7 @@ typedef struct VideoDevice {
-     void* cb_data;                          /* Data to be passed to callback */
-     int32_t friend_number;                  /* ToxAV friend number */
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-     int fd;                                 /* File descriptor of video device selected/opened */
-     struct v4l2_format fmt;
-     struct VideoBuffer *buffers;
-@@ -131,7 +135,7 @@ static void yuv420tobgr(uint16_t width, 
-     }
- }
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
- static void yuv422to420(uint8_t *plane_y, uint8_t *plane_u, uint8_t *plane_v,
-                  uint8_t *input, uint16_t width, uint16_t height)
- {
-@@ -177,7 +181,10 @@ VideoDeviceError init_video_devices()
- {
-     size[vdt_input] = 0;
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+    if( osx_video_init((char**)video_devices_names[vdt_input], &size[vdt_input]) != 0 )
-+        return vde_InternalError;
-+#else
-     for (; size[vdt_input] <= MAX_DEVICES; ++size[vdt_input]) {
-         int fd;
-         char device_address[] = "/dev/videoXX";
-@@ -208,10 +215,6 @@ VideoDeviceError init_video_devices()
-             close(fd);
-         }
-     }
--
--#else /* __OSX__ */
--    if( osx_video_init((char**)video_devices_names[vdt_input], &size[vdt_input]) != 0 )
--        return vde_InternalError;
- #endif
- 
-     size[vdt_output] = 1;
-@@ -257,12 +260,12 @@ VideoDeviceError terminate_video_devices
- VideoDeviceError register_video_device_callback(int32_t friend_number, uint32_t device_idx,
-                                                 VideoDataHandleCallback callback, void* data)
- {
--#if defined(__linux__) || defined(__FreeBSD__)
--    if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] || !video_devices_running[vdt_input][device_idx]->fd )
--        return vde_InvalidSelection;
--#else /* __OSX__ */
-+#if defined(__OSX__)
-     if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] )
-         return vde_InvalidSelection;
-+#else
-+    if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx] || !video_devices_running[vdt_input][device_idx]->fd )
-+        return vde_InvalidSelection;
- #endif
- 
-     lock;
-@@ -336,7 +339,13 @@ VideoDeviceError open_video_device(Video
-     if ( type == vdt_input ) {
-         video_thread_paused = true;
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+        if ( osx_video_open_device(selection, &device->video_width, &device->video_height) != 0 ) {
-+            free(device);
-+            unlock;
-+            return vde_FailedStart;
-+        }
-+#else
-         /* Open selected device */
-         char device_address[] = "/dev/videoXX";
-         snprintf(device_address + 10 , sizeof(device_address) - 10, "%i", selection);
-@@ -455,13 +464,6 @@ VideoDeviceError open_video_device(Video
-             unlock;
-             return vde_FailedStart;
-         }
--
--#else /* __OSX__ */
--        if ( osx_video_open_device(selection, &device->video_width, &device->video_height) != 0 ) {
--            free(device);
--            unlock;
--            return vde_FailedStart;
--        }
- #endif
- 
-         /* Create X11 window associated to device */
-@@ -632,7 +634,12 @@ void* video_thread_poll (void* arg) // T
-                     uint8_t *u = device->input.planes[1];
-                     uint8_t *v = device->input.planes[2];
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+                    if ( osx_video_read_device(y, u, v, &video_width, &video_height) != 0 ) {
-+                        unlock;
-+                        continue;
-+                    }
-+#else
-                     struct v4l2_buffer buf;
-                     memset(&(buf), 0, sizeof(buf));
- 
-@@ -648,12 +655,6 @@ void* video_thread_poll (void* arg) // T
- 
-                     /* Convert frame image data to YUV420 for ToxAV */
-                     yuv422to420(y, u, v, data, video_width, video_height);
--
--#else /* __OSX__*/
--                    if ( osx_video_read_device(y, u, v, &video_width, &video_height) != 0 ) {
--                        unlock;
--                        continue;
--                    }
- #endif
- 
-                     /* Send frame data to friend through ToxAV */
-@@ -690,7 +691,7 @@ void* video_thread_poll (void* arg) // T
-                     XFlush(device->x_display);
-                     free(img_data);
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-                     if ( -1 == xioctl(device->fd, VIDIOC_QBUF, &buf) ) {
-                         unlock;
-                         continue;
-@@ -725,7 +726,9 @@ VideoDeviceError close_video_device(Vide
-     if ( !device->ref_count ) {
- 
-         if ( type == vdt_input ) {
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+            osx_video_close_device(device_idx);
-+#else
-             enum v4l2_buf_type buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-             if( -1 == xioctl(device->fd, VIDIOC_STREAMOFF, &buf_type) ) {}
- 
-@@ -735,9 +738,6 @@ VideoDeviceError close_video_device(Vide
-                 }
-             }
-             close(device->fd);
--
--#else /* __OSX__ */
--            osx_video_close_device(device_idx);
- #endif
-             vpx_img_free(&device->input);
-             XDestroyWindow(device->x_display, device->x_window);
-@@ -745,7 +745,7 @@ VideoDeviceError close_video_device(Vide
-             XCloseDisplay(device->x_display);
-             pthread_mutex_destroy(device->mutex);
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-             free(device->buffers);
- #endif /* __linux__ */
- 


Home | Main Index | Thread Index | Old Index