Files
ports/net/prosearch/Makefile
Florian Smeets 92a030dffd databases/p5-DBD-mysql: Fix for MariaDB users
Add a new variable DBD_MYSQL, use that in *_DEPENDS and add mysql to USES
where required. DBD_MYSQL will automatically set the correct DBD dependency.

In cd16748194 databases/p5-DBD-mysql was updated to 5.x, in 5.x the
support for MariaDB was removed and only MySQL >= 8.0 is supported.

In the 4.x releases MariaDB is still supported, according to upstream 4.x
will still be supported for a while [1], so use that for now when we detect
that MYSQL_FLAVOUR is set to mariadb. databases/p5-DBD-mysql4 was added in
d95f49cb3b.

DBD:MariaDB would be another alternative, but migrating to it might need
more analysis than just staying with the 4.x releases of p5-DBD-mysql. This
thread on the amavis-users mailing list has a very good summary [2] from
the author of DBD:MariaDB.

This includes ideas and suggestions from vvd and mat. Thanks!

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c17
[2] https://lists.amavis.org/pipermail/amavis-users/2024-March/006823.html

PR:		275100, 277889
Reviewed by:	vvd, mat
Fixes:	cd16748194
Differential Revision: https://reviews.freebsd.org/D44662
2024-04-07 11:36:13 +02:00

119 lines
2.8 KiB
Makefile

PORTNAME= prosearch
PORTVERSION= 0.19.4
PORTREVISION= 11
CATEGORIES= net www
MASTER_SITES= http://pro.setun.net/search/download/ SF/pro-search/pro-search/${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Powerful file search
WWW= https://sourceforge.net/projects/pro-search/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
USES= perl5 shebangfix tar:bzip2
USE_PERL5= run
SHEBANG_FILES= crawler.pl web/index.cgi web/index.fcgi
SUB_FILES= pkg-message
SUB_LIST= SEARCHDIR=${SEARCHDIR}
NO_BUILD= yes
NO_ARCH= yes
SEARCHDIR?= www/search
PLIST_SUB+= SEARCHDIR=${SEARCHDIR} WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}"
#TODO user and group for crawler
OPTIONS_DEFINE= CRAWLER SAMBA RSYNC APACHE MOD_PERL2 MOD_FASTCGI \
DB MYSQL PGSQL PGPP SQLITE
OPTIONS_DEFAULT= CRAWLER SAMBA APACHE DB MYSQL
CRAWLER_DESC= With crawler (nmap, p5-libwww)
SAMBA_DESC= crawler with SAMBA (file://)
RSYNC_DESC= crawler with RSYNC
MOD_PERL2_DESC= With MOD_PERL2
MOD_FASTCGI_DESC= With MOD_FASTCGI
DB_DESC= With both database server and client
PGPP_DESC= postgres pure Perl connection driver
#NGINX_DESC= With web server (NGINX)
.include <bsd.port.options.mk>
RUN_DEPENDS+=\
p5-lib-abs>=0:devel/p5-lib-abs
.if ${PORT_OPTIONS:MCRAWLER}
RUN_DEPENDS+=\
p5-libwww>=0:www/p5-libwww \
p5-URI>=0:net/p5-URI \
p5-DBI>=0:databases/p5-DBI \
p5-HTML-Parser>=0:www/p5-HTML-Parser \
nmap:security/nmap \
p5-Net-DirectConnect>=0:net-p2p/p5-Net-DirectConnect
.endif
.if ${PORT_OPTIONS:MSAMBA}
USES+= samba:run # smbclient
.endif
.if ${PORT_OPTIONS:MRSYNC}
RUN_DEPENDS+= rsync:net/rsync
.endif
.if ${PORT_OPTIONS:MAPACHE}
USES+= apache:run
.endif
.if ${PORT_OPTIONS:MNGINX}
RUN_DEPENDS+=\
nginx:www/nginx
.endif
.if ${PORT_OPTIONS:MMOD_PERL2}
RUN_DEPENDS+=\
${LOCALBASE}/${APACHEMODDIR}/mod_perl.so:www/mod_perl2
.endif
.if ${PORT_OPTIONS:MMOD_FASTCGI}
RUN_DEPENDS+=\
${LOCALBASE}/${APACHEMODDIR}/mod_fastcgi.so:www/mod_fastcgi \
p5-FCGI>=0:www/p5-FCGI
.endif
.if ${PORT_OPTIONS:MMYSQL}
USES+= mysql
RUN_DEPENDS+=\
${DBD_MYSQL}
.endif
.if ${PORT_OPTIONS:MDB} && ${PORT_OPTIONS:MMYSQL}
USES+= mysql:server
.endif
.if ${PORT_OPTIONS:MPGSQL}
USES+= pgsql
RUN_DEPENDS+=\
p5-DBD-Pg>=0:databases/p5-DBD-Pg
.endif
.if ${PORT_OPTIONS:MPGPP}
RUN_DEPENDS+=\
p5-DBD-PgPP>=0:databases/p5-DBD-PgPP
.endif
.if ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MPGPP} || ${PORT_OPTIONS:MDB}
USES+= pgsql
WANT_PGSQL= client server
.endif
.if ${PORT_OPTIONS:MSQLITE}
USES+= sqlite
RUN_DEPENDS+=\
p5-DBD-SQLite>=0:databases/p5-DBD-SQLite
.endif
WRKSRC= ${WRKDIR}/search
do-install:
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${SEARCHDIR}
@${CHMOD} +x ${STAGEDIR}${PREFIX}/${SEARCHDIR}/crawler.pl ${STAGEDIR}${PREFIX}/${SEARCHDIR}/010.search.purge ${STAGEDIR}${PREFIX}/${SEARCHDIR}/*.sh.* ${STAGEDIR}${PREFIX}/${SEARCHDIR}/web/*.*cgi
.include <bsd.port.mk>