diff options
author | Joseph Mingrone <jrm@FreeBSD.org> | 2023-11-25 14:06:37 +0000 |
---|---|---|
committer | Joseph Mingrone <jrm@FreeBSD.org> | 2023-12-11 13:41:14 +0000 |
commit | 134cdd54850031bfdc8202d27b1a69b2839d94bb (patch) | |
tree | 5fb110cdf7988d161180e3d37f6131bad86acdd6 | |
parent | 04faeb256407343d5902f147c62da5a4738ae085 (diff) | |
download | ports-134cdd54850031bfdc8202d27b1a69b2839d94bb.tar.gz ports-134cdd54850031bfdc8202d27b1a69b2839d94bb.zip |
textproc/redland: Do not depend on Berkeley DB by default
Due to licensing issues, Redland only supports BDB up to version 5.3, a
version that was marked for removal from the ports tree on 2022-06-30.
A few different databases are supported for persistent storage, so add
MYSQL, PGSQL, and SQLITE as alternatives, and switch to SQLITE by
default.
While here, also:
- Patch to fix a build failure when MYSQL storage is chosen
- Pet portclippy/portfmt
- Hook in tests (1 of 17 tests fail, but upstream's bug tracker is broken)
Approved by: tcberner (kde)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42769
-rw-r--r-- | textproc/redland/Makefile | 67 | ||||
-rw-r--r-- | textproc/redland/files/patch-src_rdf__storage__mysql.c | 11 | ||||
-rw-r--r-- | textproc/redland/pkg-plist | 6 |
3 files changed, 34 insertions, 50 deletions
diff --git a/textproc/redland/Makefile b/textproc/redland/Makefile index a4d1ee191970..4a9ed73772dd 100644 --- a/textproc/redland/Makefile +++ b/textproc/redland/Makefile @@ -1,6 +1,6 @@ PORTNAME= redland PORTVERSION= 1.0.17 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= textproc MASTER_SITES= http://download.librdf.org/source/ @@ -17,62 +17,37 @@ LIB_DEPENDS= libltdl.so:devel/libltdl \ libraptor2.so:textproc/raptor2 \ librasqal.so:textproc/rasqal -USE_PERL5= build USES= gmake libtool pathfix perl5 pkgconfig shebangfix +USE_LDCONFIG= yes +USE_PERL5= build SHEBANG_FILES= scripts/touch-mtime.pl GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-threestore=no -USE_LDCONFIG= yes -OPTIONS_DEFINE= BDB THREADS -OPTIONS_DEFAULT= BDB +INSTALL_TARGET= install-strip +TEST_TARGET= check + +OPTIONS_DEFINE= THREADS +OPTIONS_DEFAULT= SQLITE -BDB_USES= bdb -BDB_CONFIGURE_OFF= --with-bdb=no +OPTIONS_GROUP= STORAGE +OPTIONS_GROUP_STORAGE= BDB MYSQL PGSQL SQLITE -THREADS_CONFIGURE_ENABLE= threads +OPTIONS_SUB= YES -# MYSQL "Use MySQL instead of BDB" off \ -# PGSQL "Use PgSQL instead of BDB" off \ -# SQLITE "Use SQLite instead of BDB" off \ -# VIRTUOSO "Use Virtoso instead of BDB" off +BDB_USES= bdb:5 +BDB_CONFIGURE_WITH= bdb -#.if defined(WITH_MYSQL) -#USE_MYSQL= yes -#CONFIGURE_ARGS+=--with-mysql=yes -#CPPFLAGS+= -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H -#LIBS+= -L${LOCALBASE}/lib/mysql -#PLIST_SUB+= MYSQL="" -#.else -CONFIGURE_ARGS+=--with-mysql=no -PLIST_SUB+= MYSQL="@comment " -#.endif +MYSQL_LIB_DEPENDS= libunwind.so:devel/libunwind +MYSQL_USES= mysql ssl +MYSQL_CONFIGURE_WITH= mysql -#.if defined(WITH_PGSQL) -#USES+= pgsql -#CONFIGURE_ARGS+=--with-postgresql=yes -#PLIST_SUB+= PGSQL="" -#.else -CONFIGURE_ARGS+=--with-postgresql=no -PLIST_SUB+= PGSQL="@comment " -#.endif +PGSQL_USES= pgsql +PGSQL_CONFIGURE_WITH= postgresql -#.if defined(WITH_SQLITE) -#USES+= sqlite:3 -#CONFIGURE_ARGS+=--with-sqlite=3 -#PLIST_SUB+= SQLITE="" -#.else -CONFIGURE_ARGS+=--with-sqlite=no -PLIST_SUB+= SQLITE="@comment " -#.endif +SQLITE_USES= sqlite:3 +SQLITE_CONFIGURE_WITH= sqlite -#.if defined(WITH_VIRTUOSO) -#CONFIGURE_ARGS+=--with-virtuoso=yes -#LIB_DEPENDS+= iodbc.3:databases/libiodbc -#PLIST_SUB+= VIRTUOSO="" -#.else -CONFIGURE_ARGS+=--with-virtuoso=no -PLIST_SUB+= VIRTUOSO="@comment " -#.endif +THREADS_CONFIGURE_WITH= threads .include <bsd.port.mk> diff --git a/textproc/redland/files/patch-src_rdf__storage__mysql.c b/textproc/redland/files/patch-src_rdf__storage__mysql.c new file mode 100644 index 000000000000..e338c891b4b3 --- /dev/null +++ b/textproc/redland/files/patch-src_rdf__storage__mysql.c @@ -0,0 +1,11 @@ +--- src/rdf_storage_mysql.c.orig 2023-11-25 15:00:04 UTC ++++ src/rdf_storage_mysql.c +@@ -447,7 +447,7 @@ librdf_storage_mysql_get_handle(librdf_storage* storag + + #ifdef HAVE_MYSQL_OPT_RECONNECT + if(1) { +- my_bool value=(context->reconnect) ? 1 : 0; ++ bool value=(context->reconnect) ? 1 : 0; + mysql_options(connection->handle, MYSQL_OPT_RECONNECT, &value); + } + #endif diff --git a/textproc/redland/pkg-plist b/textproc/redland/pkg-plist index 285a2834bc27..587fb3a0f663 100644 --- a/textproc/redland/pkg-plist +++ b/textproc/redland/pkg-plist @@ -32,8 +32,6 @@ lib/librdf.so.0.0.0 %%PGSQL%%lib/redland/librdf_storage_postgresql.so %%SQLITE%%lib/redland/librdf_storage_sqlite.a %%SQLITE%%lib/redland/librdf_storage_sqlite.so -%%VIRTUOSO%%lib/redland/librdf_storage_virtuoso.a -%%VIRTUOSO%%lib/redland/librdf_storage_virtuoso.so libdata/pkgconfig/redland.pc man/man1/rdfproc.1.gz man/man1/redland-config.1.gz @@ -91,6 +89,6 @@ share/gtk-doc/html/redland/style.css share/gtk-doc/html/redland/tutorial-introduction.html share/gtk-doc/html/redland/tutorial.html share/gtk-doc/html/redland/up.png -%%MYSQL%%share/redland/mysql-v1.ttl -%%MYSQL%%share/redland/mysql-v2.ttl +%%MYSQL%%%%DATADIR%%/mysql-v1.ttl +%%MYSQL%%%%DATADIR%%/mysql-v2.ttl %%DATADIR%%/Redland.i |