On 2019/06/11 10:27, Mikal Villa wrote:
> Hi,
> 
> Since my first request the 2.26.0 release was done so I've also updated
> the port.
> 
> Can't seem to have gotten any replies on it, is there nobody that has
> time to help me verify & import to cvs?
> 
> I've attached the updated port.
> 
> 
> 
> Best regards,
> Mikal Villa
> 
> On 06/06/2019 12:00, Mikal Villa wrote:
> > Hi,
> >
> > This would be my first port, but I've actually read the documentation
> > and think I got it right. Not totally sure about the PLIST but hopefully
> > someone can point out my mistakes.
> >
> > I plan to update the i2pd source for OpenBSD so this port can lose it's
> > current patch, but since the release was made before the port was
> > written it's needed for now. This can be considered as a official port
> > from the project.
> >
> > I don't have CVS access so I would need someone here to actually submit it.
> >
> >
> > Best regards,
> > Mikal Villa / Meeh
> >

It often helps a bit to describe the port in the email so readers can
see if they might be interested in it.

Updated tar attached with some cleanup, which I'll explain inline with the
diff below. It is in better shape like this but I don't particularly want
to run it for further tests so will leave it to someone else to pick up
if they're interested.


: diff --git a/Makefile b/Makefile
: index 4ac5ff7..984070d 100755
: --- a/Makefile
: +++ b/Makefile
: @@ -1,48 +1,42 @@
:  # $OpenBSD$
:  
: -GH_ACCOUNT =    PurpleI2P
: -GH_PROJECT =    i2pd
: -GH_TAGNAME =    2.26.0
: -DISTNAME =   i2pd-${GH_TAGNAME}
: +COMMENT =    client for the I2P anonymous network
: +
: +GH_ACCOUNT = PurpleI2P
: +GH_PROJECT = i2pd
: +GH_TAGNAME = 2.26.0

spaces->tabs
DISTNAME is set to $GH_PROJECT-$GH_TAGNAME by default, no need to set it 
separately

: +
:  CATEGORIES = net
:  HOMEPAGE =   https://i2pd.website
: -COMMENT =    full-featured C++ inplementation of a I2P router

move up to standard position (see Makefile.template), reword a bit
(keeping COMMENT simple, describing in DESCR)

:  
:  MAINTAINER = Mikal Villa <mik...@mikalv.net>
:  
: -# BSD 3-clause
: +# BSD

standard in ports tree

: -PERMIT_PACKAGE_CDROM =       Yes
: +PERMIT_PACKAGE = Yes

this is gradually being replaced in the ports tree

: +WANTLIB += ${COMPILER_LIBCXX} boost_date_time-mt boost_filesystem-mt
: +WANTLIB += boost_program_options-mt boost_system-mt c crypto m
: +WANTLIB += ssl z
:  
: -WANTLIB =    ${COMPILER_LIBCXX} boost_date_time boost_filesystem \
: -             boost_program_options boost_system  c crypto m ssl z
: +COMPILER =   base-clang ports-gcc
: +MODULES =    devel/cmake

you already patch the cmake file, and it has an install target, and
installs the headers for the library, so might as well use it.

:  LIB_DEPENDS =        devel/boost
:  
: -COMPILER  =    base-clang ports-gcc base-gcc

boost needs a c++11 compiler already so no point having base-gcc in this list

: -USE_GMAKE =  Yes
: -SUBST_VARS += VARBASE

should use LOCALSTATEDIR which is already in SUBST_VARS

: -
: -#FAKE_FLAGS=     sysconfdir=${PREFIX}/share/examples
: -
: -# The upstream makefile has no install target.
: -do-install:
: -     ${INSTALL_PROGRAM} ${WRKSRC}/i2pd ${PREFIX}/sbin
: -     ${INSTALL_DATA} ${WRKSRC}/libi2pd.a ${PREFIX}/lib
: -     ${INSTALL_DATA} ${WRKSRC}/libi2pdclient.a ${PREFIX}/lib
: +WRKSRC =     ${WRKDIST}/build
:  
:  post-install:
:       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/family
:       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/reseed
:       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/router
: -     ${INSTALL_DATA} ${WRKSRC}/contrib/certificates/family/* \
: +     ${INSTALL_DATA} ${WRKDIST}/contrib/certificates/family/* \
<snip>

setting WRKSRC to a subdirectory to use the cmake infrastructure means that
these dirs need changing

i also added a do-test target in the attached file but haven't updated the
diff; however it fails

:  .include <bsd.port.mk>
: diff --git a/patches/patch-build_CMakeLists_txt 
b/patches/patch-build_CMakeLists_txt
: index de3e6e1..5db3b5c 100644
: --- a/patches/patch-build_CMakeLists_txt
: +++ b/patches/patch-build_CMakeLists_txt
: @@ -1,7 +1,8 @@
: ---- build/CMakeLists.txt.orig        Fri Nov  9 05:22:55 2018
: -+++ build/CMakeLists.txt     Tue Nov 13 21:08:17 2018
: -@@ -471,7 +471,7 @@
: -   endif()
: +Index: build/CMakeLists.txt
: +--- build/CMakeLists.txt.orig
: ++++ build/CMakeLists.txt
: +@@ -473,7 +473,7 @@ if (WITH_BINARY)
: +   target_link_libraries(libi2pd ${Boost_LIBRARIES} ${ZLIB_LIBRARY})
:     target_link_libraries( "${PROJECT_NAME}" libi2pd libi2pdclient ${DL_LIB} 
${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARY} 
${CMAKE_THREAD_LIBS_INIT} ${MINGW_EXTRA} ${DL_LIB} ${CMAKE_REQUIRED_LIBRARIES})
:   
:  -  install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION 
${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
: @@ -9,7 +10,7 @@
:     set (APPS 
"\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
:     set (DIRS 
"${Boost_LIBRARY_DIR};${OPENSSL_INCLUDE_DIR}/../bin;${ZLIB_INCLUDE_DIR}/../bin;/mingw32/bin")
:     if (MSVC)
: -@@ -485,7 +485,7 @@
: +@@ -487,7 +487,7 @@ if (WITH_BINARY)
:   endif ()
:   
:   install(FILES ../LICENSE
: @@ -18,7 +19,7 @@
:     COMPONENT Runtime
:     )
:   # Take a copy on Appveyor
: -@@ -496,8 +496,8 @@
: +@@ -498,8 +498,8 @@ install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICEN
:     OPTIONAL                      # for local builds only!
:     )
:   
: @@ -29,7 +30,7 @@
:   # install(DIRECTORY ../ DESTINATION src/
:   #   # OPTIONAL
:   #   COMPONENT Source FILES_MATCHING
: -@@ -506,7 +506,7 @@
: +@@ -508,7 +508,7 @@ install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONE
:   #   )
:   
:   file(GLOB I2PD_HEADERS "../libi2pd/*.h" "../libi2pd_client/*.h" 
"../daemon/*.h")

regenerated with "make update-patches"


: diff --git a/pkg/PLIST b/pkg/PLIST
: index b2c0ca7..2614037 100644
: --- a/pkg/PLIST
: +++ b/pkg/PLIST
: @@ -2,101 +2,267 @@
:  @newgroup _i2pd:836
:  @newuser _i2pd:836:836:daemon:i2pd account:/var/lib/i2pd:/sbin/nologin
:  @rcscript ${RCDIR}/i2pd
: +include/i2pd/
: +include/i2pd/AddressBook.cpp
: +include/i2pd/AddressBook.h
<..snip..>

sync from cmake build that includes the headers

: -@sample ${VARBASE}/lib/i2pd/
: -@sample ${VARBASE}/lib/i2pd/certificates/
: -@sample ${VARBASE}/lib/i2pd/certificates/family/
: -@sample ${VARBASE}/lib/i2pd/certificates/reseed/
: -@sample ${VARBASE}/lib/i2pd/certificates/router/
: +@sample ${LOCALSTATEDIR}/lib/i2pd/
: +@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/
: +@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/family/
: +@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/reseed/
: +@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/router/
<..snip..>

VARBASE->LOCALSTATEDIR as described above

: diff --git a/pkg/DESCR b/pkg/DESCR
: old mode 100755
: new mode 100644
: index 0e3a1d9..77deff1

there should be no 'x' bit in files in ports

: --- a/pkg/DESCR
: +++ b/pkg/DESCR
: @@ -1,6 +1,7 @@
: -Full fatured C++ implementation of the I2P client. The I2P (Invisible 
Internet
: -Project) is a universal anonymous network layer. All communications over I2P 
are
: -anonymous and end-to-end encrypted. Participants don't reveal their real IP
: -address to each other. Peer to peer (cryptocorruencies, file sharing) and
: -client-to-server applications (websites, instant messengers, chat servers) 
are
: -supported.
: +i2pd is a full featured client for the I2P network written in C++.
: +
: +I2P (Invisible Internet Project) is a universal anonymous network layer.
: +All communications over I2P are anonymous and end-to-end encrypted.
: +Participants don't reveal their real IP address to each other. Peer to
: +peer (cryptocorruencies, file sharing) and client-to-server applications
: +(websites, instant messengers, chat servers) are supported.
: 

tweak wording/layout/typos

: diff --git a/pkg/i2pd.rc b/pkg/i2pd.rc
: old mode 100755
: new mode 100644
: index 06c8460..b9874f6
: --- a/pkg/i2pd.rc
: +++ b/pkg/i2pd.rc
: @@ -2,9 +2,9 @@
:  #
:  # $OpenBSD$
:  
: -daemon="${TRUEPREFIX}/sbin/i2pd"
: +daemon="${TRUEPREFIX}/sbin/i2pd --daemon"
:  daemon_user="_i2pd"
: -daemon_flags="--service --daemon --datadir=/var/lib/i2pd 
--conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf 
--tunnelsdir=/etc/i2pd/tunnels.d"
: +daemon_flags="--service --datadir=${LOCALSTATEDIR}/lib/i2pd 
--conf=${SYSCONFDIR}/i2pd/i2pd.conf --tunconf=${SYSCONFDIR}/i2pd/tunnels.conf 
--tunnelsdir=${SYSCONFDIR}/i2pd/tunnels.d"
:  
:  . /etc/rc.d/rc.subr
:  

don't hardcode paths, force --daemon to avoid startup problems if
somebody sets i2pd_flags in rc.conf.local that doesn't include it.

Attachment: i2pd.tgz
Description: application/tar-gz

Reply via email to