pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
+libi2pd: i2pd library
Module Name: pkgsrc-wip
Committed By: Jake Slazenger <jake.slazenger%yandex.com@localhost>
Pushed By: jakeSlaz
Date: Wed Mar 14 00:27:35 2018 +0300
Changeset: 9fa03ee39a26f8cffd8493e5f5134a48fe430ffd
Added Files:
libi2pd/DESCR
libi2pd/Makefile
libi2pd/Makefile.common
libi2pd/PLIST
libi2pd/TODO
libi2pd/distinfo
libi2pd/options.mk
libi2pd/patches/patch-CMakeLists.txt
libi2pd/patches/patch-I2PEndian.h
Log Message:
+libi2pd: i2pd library
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9fa03ee39a26f8cffd8493e5f5134a48fe430ffd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
libi2pd/DESCR | 0
libi2pd/Makefile | 10 +++++
libi2pd/Makefile.common | 24 +++++++++++
libi2pd/PLIST | 65 ++++++++++++++++++++++++++++++
libi2pd/TODO | 1 +
libi2pd/distinfo | 8 ++++
libi2pd/options.mk | 55 ++++++++++++++++++++++++++
libi2pd/patches/patch-CMakeLists.txt | 77 ++++++++++++++++++++++++++++++++++++
libi2pd/patches/patch-I2PEndian.h | 15 +++++++
9 files changed, 255 insertions(+)
diffs:
diff --git a/libi2pd/DESCR b/libi2pd/DESCR
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/libi2pd/Makefile b/libi2pd/Makefile
new file mode 100644
index 0000000000..9dc6a567c2
--- /dev/null
+++ b/libi2pd/Makefile
@@ -0,0 +1,10 @@
+# $NetBSD$
+.include "Makefile.common"
+
+PKGNAME= libi2pd-${I2PD_VERSION}
+COMMENT= i2pd library
+
+CMAKE_ARGS+= -DWITH_LIBRARY=yes
+CMAKE_ARGS+= -DWITH_BINARY=no
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/libi2pd/Makefile.common b/libi2pd/Makefile.common
new file mode 100644
index 0000000000..ec56e91942
--- /dev/null
+++ b/libi2pd/Makefile.common
@@ -0,0 +1,24 @@
+# $NetBSD$
+# used by wip/i2pd/Makefile
+# used by wip/i2pd-git/Makefile
+
+GITHUB_PROJECT= i2pd
+I2PD_VERSION= 2.18.0
+DISTNAME= i2pd-${I2PD_VERSION}
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=PurpleI2P/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+WRKSRC= ${WRKDIR}/i2pd-2.18.0/build
+
+MAINTAINER= jake.slazenger%yandex.com@localhost
+HOMEPAGE= https://github.com/PurpleI2P/i2pd/
+LICENSE= modified-bsd
+
+USE_CMAKE= yes
+
+USE_LANGUAGES= c c++11
+
+.include "options.mk"
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
diff --git a/libi2pd/PLIST b/libi2pd/PLIST
new file mode 100644
index 0000000000..1d190f982d
--- /dev/null
+++ b/libi2pd/PLIST
@@ -0,0 +1,65 @@
+@comment $NetBSD$
+include/libi2pd/AddressBook.h
+include/libi2pd/BOB.h
+include/libi2pd/Base.h
+include/libi2pd/BloomFilter.h
+include/libi2pd/ClientContext.h
+include/libi2pd/Config.h
+include/libi2pd/Crypto.h
+include/libi2pd/CryptoKey.h
+include/libi2pd/Daemon.h
+include/libi2pd/Datagram.h
+include/libi2pd/Destination.h
+include/libi2pd/Event.h
+include/libi2pd/FS.h
+include/libi2pd/Family.h
+include/libi2pd/Garlic.h
+include/libi2pd/Gost.h
+include/libi2pd/Gzip.h
+include/libi2pd/HTTP.h
+include/libi2pd/HTTPProxy.h
+include/libi2pd/HTTPServer.h
+include/libi2pd/I2CP.h
+include/libi2pd/I2NPProtocol.h
+include/libi2pd/I2PControl.h
+include/libi2pd/I2PEndian.h
+include/libi2pd/I2PService.h
+include/libi2pd/I2PTunnel.h
+include/libi2pd/Identity.h
+include/libi2pd/LeaseSet.h
+include/libi2pd/LittleBigEndian.h
+include/libi2pd/Log.h
+include/libi2pd/MatchedDestination.h
+include/libi2pd/NTCPSession.h
+include/libi2pd/NetDbRequests.h
+include/libi2pd/Profiling.h
+include/libi2pd/Queue.h
+include/libi2pd/Reseed.h
+include/libi2pd/RouterContext.h
+include/libi2pd/RouterInfo.h
+include/libi2pd/SAM.h
+include/libi2pd/SOCKS.h
+include/libi2pd/SSU.h
+include/libi2pd/SSUData.h
+include/libi2pd/SSUSession.h
+include/libi2pd/Signature.h
+include/libi2pd/Streaming.h
+include/libi2pd/Tag.h
+include/libi2pd/Timestamp.h
+include/libi2pd/TransitTunnel.h
+include/libi2pd/TransportSession.h
+include/libi2pd/Transports.h
+include/libi2pd/Tunnel.h
+include/libi2pd/TunnelBase.h
+include/libi2pd/TunnelConfig.h
+include/libi2pd/TunnelEndpoint.h
+include/libi2pd/TunnelGateway.h
+include/libi2pd/TunnelPool.h
+include/libi2pd/UPnP.h
+include/libi2pd/WebSocks.h
+include/libi2pd/Websocket.h
+include/libi2pd/api.h
+include/libi2pd/util.h
+include/libi2pd/version.h
+lib/libi2pd.a
+@pkgdir bin
diff --git a/libi2pd/TODO b/libi2pd/TODO
new file mode 100644
index 0000000000..3cb76ec347
--- /dev/null
+++ b/libi2pd/TODO
@@ -0,0 +1 @@
+* Create a Makefile.common for libi2pd
diff --git a/libi2pd/distinfo b/libi2pd/distinfo
new file mode 100644
index 0000000000..012dbe16d7
--- /dev/null
+++ b/libi2pd/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (i2pd/i2pd-2.18.0.tar.gz) = 2c1e6750d874b3369ae3102ba50dad9292dedad4
+RMD160 (i2pd/i2pd-2.18.0.tar.gz) = 94a0edda2fdcd7ee0ae4d1478ba63dd35464d386
+SHA512 (i2pd/i2pd-2.18.0.tar.gz) = dc8e0f4df25188e4d72ea6ffa2c36e48a7d2103d025730b40e226ab631724a9a07a4dc03a1a3d08328972c98020c44535661820add80374f1dabdf3fc848ef84
+Size (i2pd/i2pd-2.18.0.tar.gz) = 1868440 bytes
+SHA1 (patch-CMakeLists.txt) = da17b74a0996d6a7f406fe8f78a5f24e39d07aac
+SHA1 (patch-I2PEndian.h) = 805898295f9a1152c449376fbf74a339033f832f
diff --git a/libi2pd/options.mk b/libi2pd/options.mk
new file mode 100644
index 0000000000..c5f4c68bf5
--- /dev/null
+++ b/libi2pd/options.mk
@@ -0,0 +1,55 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.i2pd
+
+PKG_SUPPORTED_OPTIONS= debug upnp aesni i2lua websockets
+PKG_SUGGESTED_OPTIONS= upnp
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Select build profile
+###
+.if !empty(PKG_OPTIONS:Mdebug)
+CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Debug
+.else
+CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+.endif
+
+###
+### Enable UPnP support
+###
+.if !empty(PKG_OPTIONS:Mupnp)
+CMAKE_ARGS+= -DWITH_UPNP=yes
+.include "../../net/miniupnpc/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DWITH_UPNP=no
+.endif
+
+###
+### Enable AES-NI support
+###
+.if !empty(PKG_OPTIONS:Maesni)
+CMAKE_ARGS+= -DWITH_AESNI=ON
+.else
+CMAKE_ARGS+= -DWITH_AESNI=OFF
+.endif
+
+###
+### Used when building i2lua
+###
+.if !empty(PKG_OPTIONS:Mi2lua)
+CMAKE_ARGS+= -DWITH_I2LUA=yes
+.else
+CMAKE_ARGS+= -DWITH_I2LUA=no
+.endif
+
+###
+### Enable websocket server
+###
+.if !empty(PKG_OPTIONS:Mwebsockets)
+CMAKE_ARGS+= -DWITH_WEBSOCKETS=yes
+.include "../../net/websocketpp/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DWITH_WEBSOCKETS=no
+.endif
diff --git a/libi2pd/patches/patch-CMakeLists.txt b/libi2pd/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..e15c02937c
--- /dev/null
+++ b/libi2pd/patches/patch-CMakeLists.txt
@@ -0,0 +1,77 @@
+$NetBSD$
+
+Don't allow to install source and license files.
+Also change destination for headers of i2pd library
+
+--- CMakeLists.txt 2018-01-30 16:14:29.000000000 +0000
++++ CMakeLists.txt
+@@ -23,7 +23,7 @@ option(WITH_I2LUA "Build for i2lua" OFF)
+ option(WITH_WEBSOCKETS "Build with websocket ui" OFF)
+
+ # paths
+-set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
++set (CMAKE_MODULE_PATH "/usr/pkgsrc/pkgsrc-2017-Q4/wip/libi2pd/work/.buildlink/cmake-Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
+ set ( CMAKE_SOURCE_DIR ".." )
+
+ # architecture
+@@ -466,10 +466,10 @@ if (WITH_BINARY)
+ endif ()
+ endif ()
+
+-install(FILES ../LICENSE
+- DESTINATION .
+- COMPONENT Runtime
+- )
++#install(FILES ../LICENSE
++# DESTINATION .
++# COMPONENT Runtime
++# )
+ # Take a copy on Appveyor
+ install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICENSE"
+ DESTINATION .
+@@ -478,8 +478,8 @@ install(FILES "C:/projects/openssl-$ENV{
+ OPTIONAL # for local builds only!
+ )
+
+-file(GLOB_RECURSE I2PD_SOURCES "../libi2pd/*.cpp" "../libi2pd_client/*.cpp" "../daemon/*.cpp" "../build" "../Win32" "../Makefile*")
+-install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source)
++#file(GLOB_RECURSE I2PD_SOURCES "../libi2pd/*.cpp" "../libi2pd_client/*.cpp" "../daemon/*.cpp" "../build" "../Win32" "../Makefile*")
++#install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Source FILES_MATCHING
+@@ -488,7 +488,7 @@ install(FILES ${I2PD_SOURCES} DESTINATIO
+ # )
+
+ file(GLOB I2PD_HEADERS "../libi2pd/*.h" "../libi2pd_client/*.h" "../daemon/*.h")
+-install(FILES ${I2PD_HEADERS} DESTINATION src/ COMPONENT Headers)
++install(FILES ${I2PD_HEADERS} DESTINATION include/libi2pd COMPONENT Headers)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Headers FILES_MATCHING
+@@ -499,7 +499,7 @@ install(FILES ${I2PD_HEADERS} DESTINATIO
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Purple I2P, a C++ I2P daemon")
+ set(CPACK_PACKAGE_VENDOR "Purple I2P")
+ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../README.md")
+-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE")
++#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE")
+ file(READ ../libi2pd/version.h version_h)
+ string(REGEX REPLACE ".*I2PD_VERSION_MAJOR ([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_MAJOR "${version_h}")
+ string(REGEX REPLACE ".*I2PD_VERSION_MINOR ([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_MINOR "${version_h}")
+@@ -519,11 +519,11 @@ cpack_add_component(Libraries
+ DESCRIPTION "Binary libraries for development"
+ INSTALL_TYPES full dev3rd
+ )
+-cpack_add_component(Source
+- DISPLAY_NAME "Source code"
+- DESCRIPTION "I2pd source code"
+- INSTALL_TYPES full
+- )
++#cpack_add_component(Source
++# DISPLAY_NAME "Source code"
++# DESCRIPTION "I2pd source code"
++# INSTALL_TYPES full
++# )
+ cpack_add_component(Headers
+ DISPLAY_NAME "Header files"
+ DESCRIPTION "I2pd header files for development"
diff --git a/libi2pd/patches/patch-I2PEndian.h b/libi2pd/patches/patch-I2PEndian.h
new file mode 100644
index 0000000000..87e4885941
--- /dev/null
+++ b/libi2pd/patches/patch-I2PEndian.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Adding NetBSD-specific macro (send this patch to the upstream)
+
+--- ../libi2pd/I2PEndian.h 2018-01-30 16:14:29.000000000 +0000
++++ ../libi2pd/I2PEndian.h
+@@ -3,7 +3,7 @@
+ #include <inttypes.h>
+ #include <string.h>
+
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/endian.h>
+ #elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+ #include <endian.h>
Home |
Main Index |
Thread Index |
Old Index