On 2020/02/02 21:17, Tom Wong-Cornall wrote: > Please see attached port for fts_xapian (Dovecot FTS plugin) [1]. > > --- > fts-xapian is a full-text search plugin for Dovecot. It utilises the > Xapian search engine library to index email automatically, and allow > rapid body and header server-side search over IMAP. > > The authors intend this plugin to provide the functionality provided by > the now-deprecated fts_squat plugin, and provide a simpler way to > configure FTS for Dovecot without needing heavy external dependencies > such as Solr. > --- > > This is my first time porting, please point out where I've gone wrong. > I'm a little unsure the semantics of putting mail/dovecot in > BUILD_DEPENDS; my reasoning: > > - fts-xapian doesn't link to dovecot itself, so it shouldn't be in > LIB_DEPENDS (dovecot dlopen's fts-xapian at runtime) > > - dovecot-config is required at build, so it can't just be in > RUN_DEPENDS
Correct. > - Putting mail/dovecot into both BUILD_DEPENDS and RUN_DEPENDS seemed > to cause breakage during build I don't see that here. There's a stray \ at the end of RUN_DEPENDS so if the BUILD_DEPENDS was immediately on the following line you would have ended up with RUN_DEPENDS set to "mail/dovecot>=2.3.0 BUILD_DEPENDS = mail/dovecot" or similar, could that be it? Updated tar.gz attached, comments inline: : V= 1.2.8 : : GH_ACCOUNT= grosjo : GH_PROJECT= fts-xapian : GH_TAGNAME= ${V} : +PKGNAME= dovecot-fts-xapian-${V} set the package name to match the port name : : CATEGORIES= mail : : @@ -17,28 +15,30 @@ MAINTAINER= Tom Wong-Cornall <t...@wongcornall.com> : # LGPLv2.1 : PERMIT_PACKAGE= Yes : : -WANTLIB= xapian \ : - uuid \ : - icudata icui18n icuio icuuc \ : - c++ c++abi m pthread uuid z : +WANTLIB += ${COMPILER_LIBCXX} icudata icui18n icuio icuuc m uuid : +WANTLIB += xapian z - use ${COMPILER_LIBCXX} which is set automatically for the compiler used (otherwise this fails with ports-gcc) - I almost always just paste in the output from port-lib-depends-check directly, this is something that is occasionally swept across the whole ports tree to make sure everything is in sync so it's easier for whoever does that if the format is standard as much as possible : : COMPILER= base-clang ports-gcc : : -BUILD_DEPENDS= devel/libtool \ : - mail/dovecot>=2.3.0 \ : +BUILD_DEPENDS= mail/dovecot : +RUN_DEPENDS= mail/dovecot Just mail/dovecot is enough here. Note that Dovecot is a bit unusual as it enforces a tight dependency on the full version number in plugins, this is handled by setting PKGSPEC in mail/dovecot: $ make dump-vars|grep PKGSPEC mail/dovecot,-server.PKGSPEC=dovecot-=2.3.9.2v0 mail/dovecot,-ldap.PKGSPEC=dovecot-ldap-* mail/dovecot,-mysql.PKGSPEC=dovecot-mysql-* mail/dovecot,-postgresql.PKGSPEC=dovecot-postgresql-* PKGSPEC is propagated to dependent ports so they automatically depend on "the current version" of Dovecot and don't need a REVISION bump each time Dovecot is updated. : : LIB_DEPENDS= databases/xapian-core>=1.4.0 \ : sysutils/e2fsprogs \ : textproc/icu4c>=63.0 : : -SEPARATE_BUILD= Yes : +SEPARATE_BUILD= Yes nitpicking, line up : : CONFIGURE_STYLE= autoreconf : CONFIGURE_ARGS= --with-dovecot=${LOCALBASE}/lib/dovecot : +LIBTOOL_FLAGS= --tag=disable-static no need to build an unused static library : AUTOCONF_VERSION= 2.69 : AUTOMAKE_VERSION= 1.16 : : NO_TEST= Yes : + : +post-install: : + find ${PREFIX}/lib/dovecot -name '*.la' -delete common practice in ports unless the .la is actually needed (not the case with Dovecot, sometimes the case with ltdl ports) : .include <bsd.port.mk> : blob - 499d64c80809bab0ab732571e8eb15d692ab347e : file + mail/dovecot-fts-xapian/pkg/PLIST : --- mail/dovecot-fts-xapian/pkg/PLIST : +++ mail/dovecot-fts-xapian/pkg/PLIST : @@ -1,6 +1,4 @@ : @comment $OpenBSD: PLIST,v$ : lib/dovecot/ : -lib/dovecot/lib21_fts_xapian_plugin.a : -lib/dovecot/lib21_fts_xapian_plugin.la : -lib/dovecot/lib21_fts_xapian_plugin.so : +@so lib/dovecot/lib21_fts_xapian_plugin.so : share/doc/pkg-readmes/${PKGSTEM} sync plist; .a and .la removed by Makefile changes; the @so marker is added automatically in -current. (I guess you're running on 6.6 and will need to remove the @so marker to get the port to package on your system, but it should be there for the commit). I'd like to do some runtime tests before I give a firm OK but I'm very happy to see this ported and it's a great first submission, good work!
dovecot-fts-xapian,2.tgz
Description: application/tar-gz