On Wed, Feb 06, 2019 at 10:59:18AM -0500, Brian Callahan wrote: > This diff failed to apply (patches/patch-CMakeLists_txt failed). > > ~Brian >
I guess I know why: it contains weird ^M symbols at the end of each line and I guess Emacs didn't copy them, this time I'll attach it with MIME, try it:
Index: Makefile =================================================================== RCS file: /cvs/ports/net/utox/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5 Makefile --- Makefile 12 Sep 2018 19:33:25 -0000 1.5 +++ Makefile 6 Feb 2019 13:03:53 -0000 @@ -7,17 +7,19 @@ V = 0.17.0 DISTNAME = uTox-${V}-full PKGNAME = utox-${V} MASTER_SITES = https://github.com/uTox/uTox/releases/download/v${V}/ -REVISION = 2 +REVISION = 3 CATEGORIES = net HOMEPAGE = https://utox.io +MAINTAINER = Leonid Bobrov <mazoc...@disroot.org> + # MIT PERMIT_PACKAGE_CDROM = Yes -WANTLIB += ICE SM X11 Xext Xrender c fontconfig freetype m pthread -WANTLIB += openal opus sodium toxcore v4lconvert vpx +WANTLIB += ICE SM X11 Xext Xrender c dbus-1 fontconfig freetype +WANTLIB += m openal opus pthread sodium toxcore v4lconvert vpx MODULES = devel/cmake @@ -26,14 +28,15 @@ RUN_DEPENDS = devel/desktop-file-utils \ LIB_DEPENDS += audio/openal \ multimedia/libv4l \ - net/toxcore + net/toxcore \ + x11/dbus COMPILER = base-clang ports-gcc -NO_TEST = yes - WRKDIST = ${WRKDIR}/uTox -CONFIGURE_ARGS =-DLLD_EMUL:String=${LLD_EMUL} +CONFIGURE_ARGS =-DLLD_EMUL:String=${LLD_EMUL} \ + -DENABLE_FILTERAUDIO=Off \ + -DENABLE_TESTS=On .include <bsd.port.mk> Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /cvs/ports/net/utox/patches/patch-CMakeLists_txt,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 29 Apr 2018 11:15:17 -0000 1.1.1.1 +++ patches/patch-CMakeLists_txt 6 Feb 2019 13:03:53 -0000 @@ -1,27 +1,76 @@ -$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2018/04/29 11:15:17 landry Exp $ +$OpenBSD$ Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -184,8 +184,8 @@ add_cflag("-fPIC") +@@ -1,5 +1,4 @@ + cmake_minimum_required(VERSION 3.2) +-set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6 CACHE STRING "Minimum OS X deployment version") + project(uTox LANGUAGES C) + + ##################### +@@ -31,13 +30,12 @@ if(WIN32) + set(WINDOWS TRUE) + elseif(APPLE) + if(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*") ++ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6 CACHE STRING "Minimum OS X deployment version") + set(MACOSX TRUE) + endif() + elseif(UNIX) + if(CMAKE_SYSTEM_NAME MATCHES ".*Linux") + set(LINUX TRUE) +- elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") +- set(OPENBSD TRUE) + elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*") + set(NETBSD TRUE) + elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*|FreeBSD") +@@ -103,12 +101,10 @@ if(WINDOWS AND NOT CROSS_COMPILING) + # Helping Cygwin out again.. + set(WIN64 TRUE) + endif() +-elseif(FREEBSD) +- include(cmake/toolchain-freebsd.cmake) +-elseif(OPENBSD OR NETBSD) +- include(cmake/toolchain-openbsd.cmake) + elseif(APPLE) + include(cmake/macOS.cmake) ++elseif(FREEBSD) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib" CACHE STRING "" FORCE) + endif() + + +@@ -184,8 +180,7 @@ add_cflag("-fPIC") # Fix GNU stack if(CMAKE_C_COMPILER_ID MATCHES "GNU") # Have ld strip the symbols from Release and MinSizeRel build types. - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os") - set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -s") -+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -s") if(LINUX) # enable Link Time Optimization on gcc (linux only currently) -@@ -220,8 +220,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") +@@ -220,9 +215,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") endif() # Have ld strip the symbols from Release and MinSizeRel build types. (-Oz is clang specific) - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os") - set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Oz -s") -+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ") + set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -s") ++ if(FREEBSD) ++ set(LIBRARIES ${LIBRARIES} "cxxrt") ++ endif() ++ if(NOT ENABLE_ASAN) if(NOT APPLE) + add_cflag("-fsanitize=safe-stack") +@@ -303,6 +301,9 @@ elseif(APPLE) + add_definitions("-x objective-c") + add_subdirectory(src/cocoa) + elseif(UNIX) ++ find_package(X11 REQUIRED) ++ include_directories(${X11_INCLUDE_DIR}) ++ + add_subdirectory(src/xlib) + + if(LINUX) Index: patches/patch-src_xlib_CMakeLists_txt =================================================================== RCS file: /cvs/ports/net/utox/patches/patch-src_xlib_CMakeLists_txt,v retrieving revision 1.1 diff -u -p -u -p -r1.1 patch-src_xlib_CMakeLists_txt --- patches/patch-src_xlib_CMakeLists_txt 12 Sep 2018 19:33:25 -0000 1.1 +++ patches/patch-src_xlib_CMakeLists_txt 6 Feb 2019 13:03:53 -0000 @@ -14,3 +14,28 @@ Index: src/xlib/CMakeLists.txt DEPENDS ../../icons/utox-128x128.png ) set_source_files_properties( icon.o PROPERTIES EXTERNAL_OBJECT true GENERATED true ) add_library(icon STATIC icon.o) +@@ -52,8 +52,6 @@ message("Found Freetype version ${FREETYPE_VERSION_STR + message("Freetype include: ${FREETYPE_INCLUDE_DIRS}") + message("Freetype library: ${FREETYPE_LIBRARIES}") + +-find_package(X11 REQUIRED) +- + message("X include: ${X11_INCLUDE_DIR}") + message("X library: ${X11_LIBRARIES}") + message("Xrender include: ${X11_Xrender_INCLUDE_PATH}") +@@ -73,6 +71,7 @@ target_link_libraries(utoxNATIVE + ${X11_Xrender_LIB} + fontconfig + ${FREETYPE_LIBRARIES} ++ ${DBUS_LIBRARIES} + ) + + if(LINUX OR NETBSD) +@@ -84,7 +83,6 @@ endif() + if(LINUX) + target_link_libraries(utoxNATIVE + dl +- ${DBUS_LIBRARIES} + ) + endif() + Index: patches/patch-src_xlib_main_c =================================================================== RCS file: patches/patch-src_xlib_main_c diff -N patches/patch-src_xlib_main_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_xlib_main_c 6 Feb 2019 13:03:53 -0000 @@ -0,0 +1,64 @@ +$OpenBSD$ + +Index: src/xlib/main.c +--- src/xlib/main.c.orig ++++ src/xlib/main.c +@@ -92,31 +92,8 @@ void init_ptt(void) { + + + +-#ifdef __linux__ +-#include <linux/input.h> +-static bool linux_check_ptt(void) { +- /* First, we try for direct access to the keyboard. */ +- int ptt_key = KEY_LEFTCTRL; // TODO allow user to change this... +- if (ptt_keyboard_handle) { +- /* Nice! we have direct access to the keyboard! */ +- char key_map[KEY_MAX / 8 + 1]; // Create a byte array the size of the number of keys +- memset(key_map, 0, sizeof(key_map)); +- ioctl(fileno(ptt_keyboard_handle), EVIOCGKEY(sizeof(key_map)), key_map); // Fill the keymap with the current +- // keyboard state +- int keyb = key_map[ptt_key / 8]; // The key we want (and the seven others around it) +- int mask = 1 << (ptt_key % 8); // Put 1 in the same column as our key state +- +- if (keyb & mask) { +- LOG_TRACE("XLIB", "PTT key is down" ); +- return true; +- } else { +- LOG_TRACE("XLIB", "PTT key is up" ); +- return false; +- } +- } +- /* Okay nope, lets' fallback to xinput... *pouts* +- * Fall back to Querying the X for the current keymap. */ +- ptt_key = XKeysymToKeycode(display, XK_Control_L); ++static bool check_ptt(void) { ++ int ptt_key = XKeysymToKeycode(display, XK_Control_L); // TODO allow user to change this... + char keys[32] = { 0 }; + /* We need our own connection, so that we don't block the main display... No idea why... */ + if (ptt_display) { +@@ -134,11 +111,6 @@ static bool linux_check_ptt(void) { + "keyboard.\nDisable push to talk to suppress this message.\n"); + return false; + } +-#else +-static bool bsd_check_ptt(void) { +- return false; +-} +-#endif + + bool check_ptt_key(void) { + if (!settings.push_to_talk) { +@@ -146,11 +118,7 @@ bool check_ptt_key(void) { + return true; /* If push to talk is disabled, return true. */ + } + +-#ifdef __linux__ +- return linux_check_ptt(); +-#else +- return bsd_check_ptt(); +-#endif ++ return check_ptt(); + } + + void exit_ptt(void) { Index: patches/patch-tests_CMakeLists_txt =================================================================== RCS file: patches/patch-tests_CMakeLists_txt diff -N patches/patch-tests_CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_CMakeLists_txt 6 Feb 2019 13:03:53 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ + +Index: tests/CMakeLists.txt +--- tests/CMakeLists.txt.orig ++++ tests/CMakeLists.txt +@@ -4,6 +4,7 @@ include(CTest) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") + + find_package(Check REQUIRED) ++link_directories(${CHECK_LIBRARY_DIRS}) + + function(make_test name) + add_executable(test_${name} test_${name}.c) Index: pkg/DESCR =================================================================== RCS file: /cvs/ports/net/utox/pkg/DESCR,v retrieving revision 1.2 diff -u -p -u -p -r1.2 DESCR --- pkg/DESCR 29 Apr 2018 11:19:43 -0000 1.2 +++ pkg/DESCR 6 Feb 2019 13:03:53 -0000 @@ -1,8 +1,13 @@ uTox is a lightweight Tox client with minimal dependencies, It not only looks pretty, it runs fast! + uTox has full support for: * chat; * file transfers; * audio/video calling; * desktop sharing (both as video and inline screenshots); * group chats. + +You shouldn't have to choose a new client for every device: So uTox works +everywhere! On every major system Windows, macOS, Linux, Android, FreeBSD, +NetBSD, OpenBSD, and even DragonFlyBSD.