[Bug 271625] graphics/png: manpages installed into wrong directory

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 26 May 2023 08:07:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271625

--- Comment #4 from Michael Osipov <michael.osipov@siemens.com> ---
(In reply to Tatsuki Makino from comment #3)

It seems so, looking at './configure --help'.

This truly confuses me:
root@deblndw011x:/var/poudriere/ports/default-head/ftp/curl (main-custom)
# make -V MANPREFIX
/usr/local
root@deblndw011x:/var/poudriere/ports/default-head/ftp/curl (main-custom)
# grep mandir work/curl-8.1.1/Makefile
CONFIGURE_OPTIONS = " '--disable-werror' '--enable-dateparse'
'--enable-dnsshuffle' '--enable-headers-api' '--enable-hsts'
'--enable-http-auth' '--enable-mime' '--enable-netrc'
'--enable-openssl-auto-load-config' '--enable-progress-meter'
'--with-fish-functions-dir=/usr/local/share/fish/completions'
'--with-zsh-functions-dir=/usr/local/share/zsh/site-functions'
'--disable-alt-svc' '--without-brotli' '--disable-ares' '--without-ca-bundle'
'--enable-cookies' '--disable-curldebug' '--disable-debug' '--disable-dict'
'--disable-ftp' '--without-gnutls' '--disable-gopher'
'--with-gssapi=/usr/local' 'CFLAGS=-I/usr/local/include -O2 -pipe 
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing '
'LDFLAGS=-L/usr/local/lib  -L/usr/local/lib -L/usr/lib
-Wl,-rpath,/usr/local/lib:/usr/lib -L/usr/lib -fstack-protector-strong '
'LIBS=-lkrb5 -lgssapi_krb5 -lkrb5 -lgssapi_krb5 -L/usr/local/lib'
'KRB5CONFIG=/usr/local/bin/krb5-config' '--enable-http' '--with-nghttp2'
'--without-libidn2' '--disable-imap' '--enable-ipv6' '--disable-ldap'
'--disable-ldaps' '--without-libssh' '--without-libssh2' '--disable-mqtt'
'--disable-ntlm' '--with-openssl=/usr' '--disable-pop3' '--enable-proxy'
'--without-libpsl' '--without-librtmp' '--disable-rtsp' '--disable-smb'
'--enable-smtp' '--enable-static' '--disable-telnet' '--disable-tftp'
'--enable-pthreads' '--enable-threaded-resolver' '--disable-tls-srp'
'--disable-websockets' '--without-wolfssl' '--without-zstd'
'--with-ca-fallback' '--prefix=/usr/local' '--localstatedir=/var'
'--mandir=/usr/local/man' '--disable-silent-rules'
'--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd12.4'
'build_alias=amd64-portbld-freebsd12.4' 'CC=cc' 'CPPFLAGS=-I/usr/local/include
-I/usr/include -isystem /usr/local/include' 'CPP=cpp'"
mandir = /usr/local/man


root@deblndw011x:/var/poudriere/ports/default-head (main-custom *)
# git diff
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 703a8541e383..1731a6f8446e 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2671,7 +2671,7 @@ SCRIPTS_ENV+= BATCH=yes
 .    if ${PREFIX} == /usr
 MANPREFIX?=    /usr/share
 .    else
-MANPREFIX?=    ${PREFIX}
+MANPREFIX?=    ${PREFIX}/share
 MANDIRS+=  ${PREFIX}/share/man
 .    endif

root@deblndw011x:/var/poudriere/ports/default-head/ftp/curl (main-custom *)
# grep mandir work/curl-8.1.1/Makefile
CONFIGURE_OPTIONS = " '--disable-werror' '--enable-dateparse'
'--enable-dnsshuffle' '--enable-headers-api' '--enable-hsts'
'--enable-http-auth' '--enable-mime' '--enable-netrc'
'--enable-openssl-auto-load-config' '--enable-progress-meter'
'--with-fish-functions-dir=/usr/local/share/fish/completions'
'--with-zsh-functions-dir=/usr/local/share/zsh/site-functions'
'--disable-alt-svc' '--without-brotli' '--disable-ares' '--without-ca-bundle'
'--enable-cookies' '--disable-curldebug' '--disable-debug' '--disable-dict'
'--disable-ftp' '--without-gnutls' '--disable-gopher'
'--with-gssapi=/usr/local' 'CFLAGS=-I/usr/local/include -O2 -pipe 
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing '
'LDFLAGS=-L/usr/local/lib  -L/usr/local/lib -L/usr/lib
-Wl,-rpath,/usr/local/lib:/usr/lib -L/usr/lib -fstack-protector-strong '
'LIBS=-lkrb5 -lgssapi_krb5 -lkrb5 -lgssapi_krb5 -L/usr/local/lib'
'KRB5CONFIG=/usr/local/bin/krb5-config' '--enable-http' '--with-nghttp2'
'--without-libidn2' '--disable-imap' '--enable-ipv6' '--disable-ldap'
'--disable-ldaps' '--without-libssh' '--without-libssh2' '--disable-mqtt'
'--disable-ntlm' '--with-openssl=/usr' '--disable-pop3' '--enable-proxy'
'--without-libpsl' '--without-librtmp' '--disable-rtsp' '--disable-smb'
'--enable-smtp' '--enable-static' '--disable-telnet' '--disable-tftp'
'--enable-pthreads' '--enable-threaded-resolver' '--disable-tls-srp'
'--disable-websockets' '--without-wolfssl' '--without-zstd'
'--with-ca-fallback' '--prefix=/usr/local' '--localstatedir=/var'
'--mandir=/usr/local/share/man' '--disable-silent-rules'
'--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd12.4'
'build_alias=amd64-portbld-freebsd12.4' 'CC=cc' 'CPPFLAGS=-I/usr/local/include
-I/usr/include -isystem /usr/local/include' 'CPP=cpp'"
mandir = /usr/local/share/man


It would ultimately mean that this issue is somewhat invalid, but still should
be incorrectly consistent with other ports.

After looking into kde.mk and lxqt.mk the following works:
root@deblndw011x:/var/poudriere/ports/default-head/graphics/png (main-custom *)
# git diff .
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index 68b60d9274c5..42c5720215e6 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -19,6 +19,8 @@ USES=     cmake:testing cpe pathfix tar:xz
 CPE_PRODUCT=   libpng
 USE_LDCONFIG=  yes

+CMAKE_ARGS+=    -DCMAKE_INSTALL_MANDIR:PATH=${PREFIX}/man
+
 CMAKE_OFF= PNG_TESTS
 CMAKE_TESTING_ON=  PNG_TESTS

root@deblndw011x:/var/poudriere/ports/default-head/graphics/png (main-custom *)
# grep -r MANDIR --color work/.build/
work/.build/CMakeCache.txt:CMAKE_INSTALL_MANDIR:PATH=/usr/local/man
work/.build/CMakeCache.txt://ADVANCED property for variable:
CMAKE_INSTALL_MANDIR
work/.build/CMakeCache.txt:CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1

It pretty much looks like Uses/cmake.mk does not set this in CMAKE_ARGS like it
is done for CONFIGURE_ARGS.

Would it make sense to report another issue for it and provide a patch?
(exp-run is imperative)

-- 
You are receiving this mail because:
You are the assignee for the bug.