git: e77794c03ab0 - main - comms/libmodbus: Optionize MANPAGES

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Tue, 27 Sep 2022 13:27:09 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e77794c03ab0f2f7c187b4856da2c002dc629bd1

commit e77794c03ab0f2f7c187b4856da2c002dc629bd1
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-09-27 13:25:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-09-27 13:27:01 +0000

    comms/libmodbus: Optionize MANPAGES
    
    PR:             251422
    Reported by:    chris@chrullrich.net
---
 comms/libmodbus/Makefile  |  11 ++--
 comms/libmodbus/pkg-plist | 130 +++++++++++++++++++++++-----------------------
 2 files changed, 72 insertions(+), 69 deletions(-)

diff --git a/comms/libmodbus/Makefile b/comms/libmodbus/Makefile
index 05ce946ed13e..ee78187d095c 100644
--- a/comms/libmodbus/Makefile
+++ b/comms/libmodbus/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	libmodbus
 PORTVERSION=	3.1.7
+PORTREVISION=	1
 CATEGORIES=	comms
 MASTER_SITES=	https://libmodbus.org/releases/
 
@@ -10,9 +11,6 @@ WWW=		https://libmodbus.org/
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING.LESSER
 
-BUILD_DEPENDS=	a2x:textproc/asciidoc \
-		xmlto:textproc/xmlto
-
 USES=		cpe gmake libtool pathfix
 USE_LDCONFIG=	yes
 
@@ -20,6 +18,11 @@ GNU_CONFIGURE=	yes
 
 INSTALL_TARGET=	install-strip
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=		DOCS MANPAGES
+OPTIONS_DEFAULT=	MANPAGES
+OPTIONS_SUB=		yes
+
+MANPAGES_BUILD_DEPENDS=	a2x:textproc/asciidoc \
+			xmlto:textproc/xmlto
 
 .include <bsd.port.mk>
diff --git a/comms/libmodbus/pkg-plist b/comms/libmodbus/pkg-plist
index f4efc2ac6e56..f351d886ba84 100644
--- a/comms/libmodbus/pkg-plist
+++ b/comms/libmodbus/pkg-plist
@@ -6,71 +6,71 @@ lib/libmodbus.so
 lib/libmodbus.so.5
 lib/libmodbus.so.5.1.0
 libdata/pkgconfig/libmodbus.pc
-man/man3/modbus_close.3.gz
-man/man3/modbus_connect.3.gz
-man/man3/modbus_flush.3.gz
-man/man3/modbus_free.3.gz
-man/man3/modbus_get_byte_from_bits.3.gz
-man/man3/modbus_get_byte_timeout.3.gz
-man/man3/modbus_get_float.3.gz
-man/man3/modbus_get_float_abcd.3.gz
-man/man3/modbus_get_float_badc.3.gz
-man/man3/modbus_get_float_cdab.3.gz
-man/man3/modbus_get_float_dcba.3.gz
-man/man3/modbus_get_header_length.3.gz
-man/man3/modbus_get_indication_timeout.3.gz
-man/man3/modbus_get_response_timeout.3.gz
-man/man3/modbus_get_slave.3.gz
-man/man3/modbus_get_socket.3.gz
-man/man3/modbus_mapping_free.3.gz
-man/man3/modbus_mapping_new.3.gz
-man/man3/modbus_mapping_new_start_address.3.gz
-man/man3/modbus_mask_write_register.3.gz
-man/man3/modbus_new_rtu.3.gz
-man/man3/modbus_new_tcp.3.gz
-man/man3/modbus_new_tcp_pi.3.gz
-man/man3/modbus_read_bits.3.gz
-man/man3/modbus_read_input_bits.3.gz
-man/man3/modbus_read_input_registers.3.gz
-man/man3/modbus_read_registers.3.gz
-man/man3/modbus_receive.3.gz
-man/man3/modbus_receive_confirmation.3.gz
-man/man3/modbus_reply.3.gz
-man/man3/modbus_reply_exception.3.gz
-man/man3/modbus_report_slave_id.3.gz
-man/man3/modbus_rtu_get_rts.3.gz
-man/man3/modbus_rtu_get_rts_delay.3.gz
-man/man3/modbus_rtu_get_serial_mode.3.gz
-man/man3/modbus_rtu_set_custom_rts.3.gz
-man/man3/modbus_rtu_set_rts.3.gz
-man/man3/modbus_rtu_set_rts_delay.3.gz
-man/man3/modbus_rtu_set_serial_mode.3.gz
-man/man3/modbus_send_raw_request.3.gz
-man/man3/modbus_set_bits_from_byte.3.gz
-man/man3/modbus_set_bits_from_bytes.3.gz
-man/man3/modbus_set_byte_timeout.3.gz
-man/man3/modbus_set_debug.3.gz
-man/man3/modbus_set_error_recovery.3.gz
-man/man3/modbus_set_float.3.gz
-man/man3/modbus_set_float_abcd.3.gz
-man/man3/modbus_set_float_badc.3.gz
-man/man3/modbus_set_float_cdab.3.gz
-man/man3/modbus_set_float_dcba.3.gz
-man/man3/modbus_set_indication_timeout.3.gz
-man/man3/modbus_set_response_timeout.3.gz
-man/man3/modbus_set_slave.3.gz
-man/man3/modbus_set_socket.3.gz
-man/man3/modbus_strerror.3.gz
-man/man3/modbus_tcp_accept.3.gz
-man/man3/modbus_tcp_listen.3.gz
-man/man3/modbus_tcp_pi_accept.3.gz
-man/man3/modbus_tcp_pi_listen.3.gz
-man/man3/modbus_write_and_read_registers.3.gz
-man/man3/modbus_write_bit.3.gz
-man/man3/modbus_write_bits.3.gz
-man/man3/modbus_write_register.3.gz
-man/man3/modbus_write_registers.3.gz
-man/man7/libmodbus.7.gz
+%%MANPAGES%%man/man3/modbus_close.3.gz
+%%MANPAGES%%man/man3/modbus_connect.3.gz
+%%MANPAGES%%man/man3/modbus_flush.3.gz
+%%MANPAGES%%man/man3/modbus_free.3.gz
+%%MANPAGES%%man/man3/modbus_get_byte_from_bits.3.gz
+%%MANPAGES%%man/man3/modbus_get_byte_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_get_float.3.gz
+%%MANPAGES%%man/man3/modbus_get_float_abcd.3.gz
+%%MANPAGES%%man/man3/modbus_get_float_badc.3.gz
+%%MANPAGES%%man/man3/modbus_get_float_cdab.3.gz
+%%MANPAGES%%man/man3/modbus_get_float_dcba.3.gz
+%%MANPAGES%%man/man3/modbus_get_header_length.3.gz
+%%MANPAGES%%man/man3/modbus_get_indication_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_get_response_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_get_slave.3.gz
+%%MANPAGES%%man/man3/modbus_get_socket.3.gz
+%%MANPAGES%%man/man3/modbus_mapping_free.3.gz
+%%MANPAGES%%man/man3/modbus_mapping_new.3.gz
+%%MANPAGES%%man/man3/modbus_mapping_new_start_address.3.gz
+%%MANPAGES%%man/man3/modbus_mask_write_register.3.gz
+%%MANPAGES%%man/man3/modbus_new_rtu.3.gz
+%%MANPAGES%%man/man3/modbus_new_tcp.3.gz
+%%MANPAGES%%man/man3/modbus_new_tcp_pi.3.gz
+%%MANPAGES%%man/man3/modbus_read_bits.3.gz
+%%MANPAGES%%man/man3/modbus_read_input_bits.3.gz
+%%MANPAGES%%man/man3/modbus_read_input_registers.3.gz
+%%MANPAGES%%man/man3/modbus_read_registers.3.gz
+%%MANPAGES%%man/man3/modbus_receive.3.gz
+%%MANPAGES%%man/man3/modbus_receive_confirmation.3.gz
+%%MANPAGES%%man/man3/modbus_reply.3.gz
+%%MANPAGES%%man/man3/modbus_reply_exception.3.gz
+%%MANPAGES%%man/man3/modbus_report_slave_id.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_get_rts.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_get_rts_delay.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_get_serial_mode.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_set_custom_rts.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_set_rts.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_set_rts_delay.3.gz
+%%MANPAGES%%man/man3/modbus_rtu_set_serial_mode.3.gz
+%%MANPAGES%%man/man3/modbus_send_raw_request.3.gz
+%%MANPAGES%%man/man3/modbus_set_bits_from_byte.3.gz
+%%MANPAGES%%man/man3/modbus_set_bits_from_bytes.3.gz
+%%MANPAGES%%man/man3/modbus_set_byte_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_set_debug.3.gz
+%%MANPAGES%%man/man3/modbus_set_error_recovery.3.gz
+%%MANPAGES%%man/man3/modbus_set_float.3.gz
+%%MANPAGES%%man/man3/modbus_set_float_abcd.3.gz
+%%MANPAGES%%man/man3/modbus_set_float_badc.3.gz
+%%MANPAGES%%man/man3/modbus_set_float_cdab.3.gz
+%%MANPAGES%%man/man3/modbus_set_float_dcba.3.gz
+%%MANPAGES%%man/man3/modbus_set_indication_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_set_response_timeout.3.gz
+%%MANPAGES%%man/man3/modbus_set_slave.3.gz
+%%MANPAGES%%man/man3/modbus_set_socket.3.gz
+%%MANPAGES%%man/man3/modbus_strerror.3.gz
+%%MANPAGES%%man/man3/modbus_tcp_accept.3.gz
+%%MANPAGES%%man/man3/modbus_tcp_listen.3.gz
+%%MANPAGES%%man/man3/modbus_tcp_pi_accept.3.gz
+%%MANPAGES%%man/man3/modbus_tcp_pi_listen.3.gz
+%%MANPAGES%%man/man3/modbus_write_and_read_registers.3.gz
+%%MANPAGES%%man/man3/modbus_write_bit.3.gz
+%%MANPAGES%%man/man3/modbus_write_bits.3.gz
+%%MANPAGES%%man/man3/modbus_write_register.3.gz
+%%MANPAGES%%man/man3/modbus_write_registers.3.gz
+%%MANPAGES%%man/man7/libmodbus.7.gz
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/MIGRATION
 %%PORTDOCS%%%%DOCSDIR%%/NEWS