On 5/17/2013 10:45 AM, David Coppa wrote:
Hi,
The diff below makes synergy link against cryptopp from our ports tree in a
sane manner.
It also appears to fix the build error on i386.
Tested on my i386 netbook.
Comments? OKs?
So this is a million percent better than the fix I came up with. Run
tested good for me on amd64 and loongson, so ok bcallah@
~Brian
ciao,
David
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/synergy/Makefile,v
retrieving revision 1.19
diff -u -p -u -p -r1.19 Makefile
--- Makefile 16 May 2013 00:09:05 -0000 1.19
+++ Makefile 17 May 2013 14:14:12 -0000
@@ -5,7 +5,7 @@ COMMENT= mouse and keyboard sharing uti
V= 1.4.12
DISTNAME= synergy-${V}-Source
PKGNAME= synergy-${V}
-REVISION= 0
+REVISION= 1
CATEGORIES= net x11
MAINTAINER= Brian Callahan <[email protected]>
@@ -15,12 +15,14 @@ HOMEPAGE= http://synergy-foss.org/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
-WANTLIB += ICE SM X11 Xext Xi Xinerama Xrandr Xtst c m pthread stdc++
+WANTLIB= ICE SM X11 Xext Xi Xinerama Xrandr Xtst \
+ c cryptopp m pthread stdc++
MASTER_SITES= http://synergy.googlecode.com/files/
-BUILD_DEPENDS= archivers/gtar \
- devel/cryptopp:patch
+BUILD_DEPENDS= archivers/gtar
+
+LIB_DEPENDS= devel/cryptopp
# tar: Invalid header, starting valid header search.
TAR= ${LOCALBASE}/bin/gtar
@@ -31,9 +33,6 @@ NO_TEST= Yes
pre-patch:
@cd ${WRKSRC} ; perl -pi -e 's/\r$$//' CMakeLists.txt
-
-post-patch:
- @ln -s ${WRKDIR}/devel/cryptopp ${WRKSRC}/tools/cryptopp562
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/synergy[cs] ${PREFIX}/bin/
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/net/synergy/patches/patch-CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 12 May 2013 16:09:04 -0000 1.2
+++ patches/patch-CMakeLists_txt 17 May 2013 14:14:12 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-CMakeLists_txt,v 1.2 2013/05/12 16:09:04 bcallah Exp $
---- CMakeLists.txt.orig Thu Apr 18 10:50:31 2013
-+++ CMakeLists.txt Thu Apr 18 10:50:31 2013
+--- CMakeLists.txt.orig Fri May 17 15:29:30 2013
++++ CMakeLists.txt Fri May 17 15:31:40 2013
@@ -87,7 +87,7 @@ if (UNIX)
check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(string.h HAVE_STRING_H)
@@ -27,7 +27,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 201
if (APPLE)
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
-@@ -174,78 +175,53 @@ if (UNIX)
+@@ -174,79 +175,54 @@ if (UNIX)
else()
@@ -129,10 +129,31 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 201
endif()
endif()
--
+
- IF(HAVE_Xi)
- LIST(APPEND libs Xi)
- ENDIF()
-
+-
# For config.h, set some static values; it may be a good idea to make
# these values dynamic for non-standard UNIX compilers.
+ set(ACCEPT_TYPE_ARG3 socklen_t)
+@@ -294,6 +270,11 @@ else (UNIX)
+
+ endif()
+
++if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++ include_directories(${OPENBSD_LOCALBASE}/include)
++ link_directories(${OPENBSD_LOCALBASE}/lib)
++endif()
++
+ if (GAME_DEVICE_SUPPORT)
+ add_definitions(-DGAME_DEVICE_SUPPORT)
+ endif()
+@@ -303,7 +284,6 @@ if (VNC_SUPPORT)
+ endif()
+
+ add_subdirectory(src)
+-add_subdirectory(tools)
+
+ if (WIN32)
+ # add /analyze in order to unconver potential bugs in the source code
Index: patches/patch-src_lib_synergy_CCryptoMode_h
===================================================================
RCS file: patches/patch-src_lib_synergy_CCryptoMode_h
diff -N patches/patch-src_lib_synergy_CCryptoMode_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lib_synergy_CCryptoMode_h 17 May 2013 14:14:12 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- src/lib/synergy/CCryptoMode.h.orig Fri May 17 14:10:03 2013
++++ src/lib/synergy/CCryptoMode.h Fri May 17 14:10:34 2013
+@@ -17,9 +17,9 @@
+
+ #pragma once
+
+-#include <cryptopp562/gcm.h>
+-#include <cryptopp562/modes.h>
+-#include <cryptopp562/aes.h>
++#include <cryptopp/gcm.h>
++#include <cryptopp/modes.h>
++#include <cryptopp/aes.h>
+ #include "ECryptoMode.h"
+ #include "CString.h"
+
Index: patches/patch-src_lib_synergy_CCryptoStream_h
===================================================================
RCS file: patches/patch-src_lib_synergy_CCryptoStream_h
diff -N patches/patch-src_lib_synergy_CCryptoStream_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lib_synergy_CCryptoStream_h 17 May 2013 14:14:12
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- src/lib/synergy/CCryptoStream.h.orig Fri May 17 14:10:14 2013
++++ src/lib/synergy/CCryptoStream.h Fri May 17 14:10:46 2013
+@@ -20,8 +20,8 @@
+ #include "BasicTypes.h"
+ #include "CStreamFilter.h"
+ #include "CCryptoMode.h"
+-#include <cryptopp562/osrng.h>
+-#include <cryptopp562/sha.h>
++#include <cryptopp/osrng.h>
++#include <cryptopp/sha.h>
+
+ class CCryptoOptions;
+
Index: patches/patch-tools_CMakeLists_txt
===================================================================
RCS file: patches/patch-tools_CMakeLists_txt
diff -N patches/patch-tools_CMakeLists_txt
--- patches/patch-tools_CMakeLists_txt 12 May 2013 16:09:04 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-tools_CMakeLists_txt,v 1.1 2013/05/12 16:09:04 bcallah Exp $
---- tools/CMakeLists.txt.orig Thu Apr 18 11:04:00 2013
-+++ tools/CMakeLists.txt Thu Apr 18 11:04:49 2013
-@@ -56,8 +56,6 @@ if (UNIX)
- if (DARWIN_VERSION GREATER 10)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
-Wno-tautological-compare")
- endif()
-- else()
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
- endif()
- endif()
-