Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --- pkgsrc/net/synergy/Makefile 2015/02/03 19:08:55 1.24 +++ pkgsrc/net/synergy/Makefile 2019/08/22 12:23:41 1.56 @@ -1,19 +1,33 @@ -# $NetBSD: Makefile,v 1.24 2015/02/03 19:08:55 tnn Exp $ -# +# $NetBSD: Makefile,v 1.56 2019/08/22 12:23:41 ryoon Exp $ -DISTNAME= synergy-1.6.2 +DISTNAME= synergy-core-1.10.2 +PKGNAME= ${DISTNAME:S/-core//} +PKGREVISION= 3 CATEGORIES= net x11 -MASTER_SITES= -https://github.com/synergy/synergy/archive/${PKGVERSION_NOREV}${EXTRACT_SUFX} +MASTER_SITES= ${MASTER_SITE_GITHUB:=symless/} +GITHUB_PROJECT= synergy-core +GITHUB_TAG= v${PKGVERSION_NOREV}-stable MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://synergy-project.org/ COMMENT= Let a user share a mouse and keyboard among computers LICENSE= gnu-gpl-v2 -EXTRACT_USING= bsdtar -USE_LANGUAGES= c c++ -USE_TOOLS+= unzip +USE_LANGUAGES= c c++11 +# Main configuration is CMake, but subdirectories are GNU configure. +# We need to set GNU_CONFIGURE=yes for config.{guess,sub} overrides to kick in. +# We override the do-configure target to prevent pkgsrc from running both +# configuration mechanisms. USE_CMAKE= yes +GNU_CONFIGURE= yes +CMAKE_ARGS+= -DSYNERGY_BUILD_LEGACY_GUI=OFF + +CONFIG_SUB_OVERRIDE+= ext/gmock/build-aux/config.sub +CONFIG_SUB_OVERRIDE+= ext/gtest/build-aux/config.sub +CONFIG_GUESS_OVERRIDE+= ext/gmock/build-aux/config.guess +CONFIG_GUESS_OVERRIDE+= ext/gtest/build-aux/config.guess + +CONFIGURE_ENV+= GIT_COMMIT=1b4c0761 EXAMPLES= MacReadme.txt org.synergy-foss.org.synergyc.plist \ org.synergy-foss.org.synergys.plist synergy.conf.example \ @@ -28,13 +42,8 @@ SUBST_SED.fix-paths= -e 's,"/etc,"${PKG BUILDLINK_TRANSFORM+= rm:-march=native -post-extract: - ${MKDIR} ${WRKSRC}/ext/cryptopp562 - cd ${WRKSRC}/ext/cryptopp562 && unzip -aqo ../cryptopp562.zip - ${MKDIR} ${WRKSRC}/ext/gmock-1.6.0 - cd ${WRKSRC}/ext/gmock-1.6.0 && unzip -aqo ../gmock-1.6.0.zip - ${MKDIR} ${WRKSRC}/ext/gtest-1.6.0 - cd ${WRKSRC}/ext/gtest-1.6.0 && unzip -aqo ../gtest-1.6.0.zip +.PHONY: do-configure +do-configure: do-configure-cmake INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/examples/${PKGBASE} @@ -49,16 +58,29 @@ do-install: .include "../../mk/compiler.mk" .if !empty(PKGSRC_COMPILER:Mclang) -_WRAP_EXTRA_ARGS.CXX+= -std=c++11 -CWRAPPERS_APPEND.cxx+= -std=c++11 +_WRAP_EXTRA_ARGS.CXX+= -Wno-switch -Wno-unused \ + -Wno-deprecated-register -Wno-tautological-compare \ + -Wno-logical-op-parentheses -Wno-null-dereference +CWRAPPERS_APPEND.cxx+= -Wno-switch -Wno-unused \ + -Wno-deprecated-register -Wno-tautological-compare \ + -Wno-logical-op-parentheses -Wno-null-dereference .endif -# tools/cryptopp562/GNUmakefile -.include "../../mk/bsd.prefs.mk" -.if !empty(MACHINE_PLATFORM:MNetBSD-[0-6].*-i386) -CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM +.include "../../mk/endian.mk" +.if ${MACHINE_ENDIAN} == "big" +CFLAGS+= -DUSYNERGY_BIG_ENDIAN +.else +CFLAGS+= -DUSYNERGY_LITTLE_ENDIAN .endif +# XXX surely there exists a better way to do this +.if ${OPSYS} != "Linux" +BUILDLINK_TRANSFORM+= rm:-ldl +.endif + +LDFLAGS.SunOS+= -lsocket -lnsl + +.include "../../security/openssl/buildlink3.mk" .include "../../www/curl/buildlink3.mk" .if !exists(/System/Library/Frameworks/Carbon.framework) .include "../../x11/libXext/buildlink3.mk" @@ -67,5 +89,6 @@ CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM .include "../../x11/libXt/buildlink3.mk" .include "../../x11/libXtst/buildlink3.mk" .endif +.include "../../mk/dlopen.buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.pkg.mk"