pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
+i2pd: Full-featured C++ implementation of I2P client
Module Name: pkgsrc-wip
Committed By: Jake Slazenger <jake.slazenger%yandex.com@localhost>
Pushed By: jakeSlaz
Date: Wed Mar 14 00:26:17 2018 +0300
Changeset: dbb4dc5e06aacdd5fff4368671437b8842eb6f19
Added Files:
i2pd/DESCR
i2pd/Makefile
i2pd/PLIST
i2pd/TODO
i2pd/distinfo
i2pd/patches/patch-CMakeLists.txt
i2pd/patches/patch-I2PEndian.h
i2pd/patches/patch-NTCPSession.cpp
Log Message:
+i2pd: Full-featured C++ implementation of I2P client
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dbb4dc5e06aacdd5fff4368671437b8842eb6f19
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
i2pd/DESCR | 0
i2pd/Makefile | 51 +++++++++++++++++++
i2pd/PLIST | 5 ++
i2pd/TODO | 3 ++
i2pd/distinfo | 9 ++++
i2pd/patches/patch-CMakeLists.txt | 101 +++++++++++++++++++++++++++++++++++++
i2pd/patches/patch-I2PEndian.h | 17 +++++++
i2pd/patches/patch-NTCPSession.cpp | 25 +++++++++
8 files changed, 211 insertions(+)
diffs:
diff --git a/i2pd/DESCR b/i2pd/DESCR
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/i2pd/Makefile b/i2pd/Makefile
new file mode 100644
index 0000000000..c2b0674f39
--- /dev/null
+++ b/i2pd/Makefile
@@ -0,0 +1,51 @@
+# $NetBSD$
+
+PKGNAME= i2pd-${I2PD_VERSION}
+
+COMMENT= Full-featured C++ implementation of I2P client
+
+.include "../../wip/libi2pd/Makefile.common"
+
+CMAKE_ARGS+= -DWITH_BINARY=yes
+CMAKE_ARGS+= -DWITH_LIBRARY=no
+
+I2PD_USER= i2pd
+I2PD_GROUP= i2pd
+PKG_GECOS.${I2PD_USER}= i2pd user
+
+CONFLICTS+= i2pd-git-*
+
+PKG_USERS= ${I2PD_USER}:${I2PD_GROUP}
+PKG_GROUPS= ${I2PD_GROUP}
+
+I2PD_SOURCESDIR=${WRKSRC}/..
+I2PD_CONFDIR=${DESTDIR}/${PKG_SYSCONFBASE}/i2pd
+
+MAKE_DIRS+=${VARBASE}/db/i2pd
+MAKE_DIRS+=${VARBASE}/log/i2pd
+MAKE_DIRS+=${VARBASE}/run/i2pd
+
+INSTALLATION_DIRS+= bin
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1
+INSTALLATION_DIRS+= ${PKG_SYSCONFBASE}/i2pd
+
+MAKE_DIRS_PERMS+=${I2PD_CONFDIR} \
+ ${I2PD_USER} ${I2PD_GROUP} 0755
+MAKE_DIRS_PERMS+=${VARBASE}/db/i2pd \
+ ${I2PD_USER} ${I2PD_GROUP} 0755
+MAKE_DIRS_PERMS+=${VARBASE}/log/i2pd \
+ ${I2PD_USER} ${I2PD_GROUP} 0755
+MAKE_DIRS_PERMS+=${VARBASE}/run/i2pd \
+ ${I2PD_USER} ${I2PD_GROUP} 0755
+
+post-install:
+ ${INSTALL_MAN} ${I2PD_SOURCESDIR}/debian/i2pd.1 \
+ ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1/
+ ${INSTALL_DATA} ${I2PD_SOURCESDIR}/contrib/i2pd.conf \
+ ${I2PD_CONFDIR}/
+ ${INSTALL_DATA} ${I2PD_SOURCESDIR}/contrib/tunnels.conf \
+ ${I2PD_CONFDIR}/
+ ${INSTALL_DATA_DIR} ${I2PD_SOURCESDIR}/contrib/certificates \
+ ${I2PD_CONFDIR}/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/i2pd/PLIST b/i2pd/PLIST
new file mode 100644
index 0000000000..125da4166f
--- /dev/null
+++ b/i2pd/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD$
+bin/i2pd
+etc/i2pd/i2pd.conf
+etc/i2pd/tunnels.conf
+man/man1/i2pd.1
diff --git a/i2pd/TODO b/i2pd/TODO
new file mode 100644
index 0000000000..6fad8c303f
--- /dev/null
+++ b/i2pd/TODO
@@ -0,0 +1,3 @@
+* Problems with default i2pd.conf:
+ * i2pd works well without any config, but if set default one,
+ i2pd starts giving tons of errors.
diff --git a/i2pd/distinfo b/i2pd/distinfo
new file mode 100644
index 0000000000..135af5f96f
--- /dev/null
+++ b/i2pd/distinfo
@@ -0,0 +1,9 @@
+$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) = bc42e715dcf80f3ef3aae76626b9d245025de101
+SHA1 (patch-I2PEndian.h) = 6f18a636515366509eed646f77979b36e1259458
+SHA1 (patch-NTCPSession.cpp) = 77e7110d9cf09ef409edb54639147b3f52438709
diff --git a/i2pd/patches/patch-CMakeLists.txt b/i2pd/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..17acbcaf8e
--- /dev/null
+++ b/i2pd/patches/patch-CMakeLists.txt
@@ -0,0 +1,101 @@
+$NetBSD$
+
+Don't allow to install source, header and license files for the i2pd client.
+
+Also fix problem with WITH_LIBRARY option that doesn't work (known problem,
+fixed in the upstream: github.com/PurpleI2P/i2pd/issues/1146).
+
+--- work/i2pd-2.18.0/build/CMakeLists.txt 2018-01-30 16:14:29.000000000 +0000
++++ CMakeLists.txt
+@@ -93,13 +93,16 @@ endif()
+
+ add_library(libi2pd ${LIBI2PD_SRC})
+ set_target_properties(libi2pd PROPERTIES PREFIX "")
+-install(TARGETS libi2pd
+- EXPORT libi2pd
+- ARCHIVE DESTINATION lib
+- COMPONENT Libraries)
++
++if (WITH_LIBRARY)
++ install(TARGETS libi2pd
++ EXPORT libi2pd
++ ARCHIVE DESTINATION lib
++ COMPONENT Libraries)
+ # TODO Make libi2pd available to 3rd party projects via CMake as imported target
+ # FIXME This pulls stdafx
+ # install(EXPORT libi2pd DESTINATION ${CMAKE_INSTALL_LIBDIR})
++endif()
+
+ set (CLIENT_SRC
+ "${LIBI2PD_CLIENT_SRC_DIR}/AddressBook.cpp"
+@@ -466,10 +469,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 +481,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 +491,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 +502,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,16 +522,16 @@ 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(Headers
+- DISPLAY_NAME "Header files"
+- DESCRIPTION "I2pd header files for development"
+- INSTALL_TYPES full dev3rd
+- )
++#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"
++# INSTALL_TYPES full dev3rd
++# )
+ install(FILES ${MINIUPNPC_INCLUDE_DIR}/miniupnpc/miniupnpc.dll
+ DESTINATION bin
+ COMPONENT MiniUPnPc
diff --git a/i2pd/patches/patch-I2PEndian.h b/i2pd/patches/patch-I2PEndian.h
new file mode 100644
index 0000000000..e1c709f925
--- /dev/null
+++ b/i2pd/patches/patch-I2PEndian.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Adding NetBSD-specific macro.
+Fixed in the upstream:
+github.com/PurpleI2P/i2pd/commit/30fb0f5a942cc5195c725feae25ab38f88b08436
+
+--- ../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>
diff --git a/i2pd/patches/patch-NTCPSession.cpp b/i2pd/patches/patch-NTCPSession.cpp
new file mode 100644
index 0000000000..72d3d83d3f
--- /dev/null
+++ b/i2pd/patches/patch-NTCPSession.cpp
@@ -0,0 +1,25 @@
+$NetBSD$
+
+>"due the bug in gcc 4.7. std::shared_future.get() is not const"
+github.com/PurpleI2P/i2pd/commit/30fb0f5a942cc5195c725feae25ab38f88b08436
+
+--- ../libi2pd/NTCPSession.cpp 2018-01-30 16:14:29.000000000 +0000
++++ ../libi2pd/NTCPSession.cpp
+@@ -171,7 +171,7 @@ namespace transport
+ return;
+ }
+ }
+-#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7)
++#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7) || defined(__NetBSD__)
+ // due the bug in gcc 4.7. std::shared_future.get() is not const
+ if (!m_DHKeysPair)
+ m_DHKeysPair = transports.GetNextDHKeysPair ();
+@@ -250,7 +250,7 @@ namespace transport
+ }
+ else
+ {
+-#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7)
++#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7) || defined (__NetBSD__)
+ // due the bug in gcc 4.7. std::shared_future.get() is not const
+ CreateAESKey (m_Establisher->phase2.pubKey);
+ HandlePhase2 ();
Home |
Main Index |
Thread Index |
Old Index