From nobody Sat Jan 06 22:52:48 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T6wZm63ZMz55jDl; Sat, 6 Jan 2024 22:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T6wZm5YSgz4QmT; Sat, 6 Jan 2024 22:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704581568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLoxZBEVarThtLCJ/x4GZIE99iFh0TtwoScmz2Tpljo=; b=XX0nuvdIF1+OSMb02qlHqpktbJlhp7gaD4RfqljnG0bkj3MbQq9Zo4eKFA2q7LW7ZozGqE +FOPLM4oupm2n5O/QOBIUfyYKr1mww8EfGowHumd/36VeKxLnlPMPltUIAmSWdsMGhYRn9 8Pl+vEB5JQ+nrM5I8B9Pv6NeNYSufOuuLhyJo8CpGIpuNYnX1bajRgKT9mQUfiALBN9+J2 6YA7vQvjfNe5DWhGrJz8var886wWbRrUoVPay3vQQBhyFxmg1INdNGuY3af288irgfc8jM i8qz/AZ58VgFl+teu/8y5qMrdXyVAW+Ai2pU/4iM0yilTQoxXyum8yWscKNf+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704581568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLoxZBEVarThtLCJ/x4GZIE99iFh0TtwoScmz2Tpljo=; b=OqB/t59tLrw4pCXgo3vMFMh6aH5mKhWvWA9xDHVjY4i0T5RlALx1ZRx6LqSeu6kMPhnfoh fB8gHrJs34FfhdxdajjAUPn1rpZvUiFNNmECDQxTGN7FrTvy4WdNP8ER5PVmT+9reNRWiU Cwa1YNuFuP8WLSA3ipvy4EHkcYeY8XhXCEBas4Mlg03X4955o+gtkW44rxvbVIzTI+8zYG o+gFfQRBNEoxBGYJv9QVg+MuVOTmBrkEBQouqdPF5YBfrD0wDKcGWin0lE+THocKYBJd17 w+3oBEFybLxSELKJeM7y+G4Fc1t+LXJq9qOO70buj1GY9VBfqVNCgq31K6fcfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704581568; a=rsa-sha256; cv=none; b=CSdeSpK9uMbD80iCCJAItMCrlpDu2dTw0uhI0iqZTOt55YbaeaeXh4ulxWANjHxi744tSd QBmPlzdeisx9raWK3QY7TWq1uuSVIT73ZZj17mrG9SJn/766CiPQKR8B5g8jIp4D4AQGpg J4KWc4d1ZxdrW52w/U7Ut/gIXHQRwY0qVaILF7cmCS2mXiakupUM1LDIs0ZasEGOoZGC4G Ycy4ibmLQiqjKcu9d2VujRxdRxVjiW+BCA4FuZY9tAV5K+ckH+nMzBGDQRQMHuUsALyR8o ErLpMaM86AARVjljPJSqiGt0zufS0+QjfkZRv6aDpoZdyuex4DCAdtL123MzFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T6wZm4cGhz10qf; Sat, 6 Jan 2024 22:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 406MqmmT017209; Sat, 6 Jan 2024 22:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 406Mqmso017206; Sat, 6 Jan 2024 22:52:48 GMT (envelope-from git) Date: Sat, 6 Jan 2024 22:52:48 GMT Message-Id: <202401062252.406Mqmso017206@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nuno Teixeira Subject: git: 3ef68ca2451c - main - graphics/imv: Install imv_config as imv_config.sample List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ef68ca2451cad33eebe3619777fd7f96a709bad Auto-Submitted: auto-generated The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ef68ca2451cad33eebe3619777fd7f96a709bad commit 3ef68ca2451cad33eebe3619777fd7f96a709bad Author: embhd AuthorDate: 2024-01-06 22:46:50 +0000 Commit: Nuno Teixeira CommitDate: 2024-01-06 22:52:07 +0000 graphics/imv: Install imv_config as imv_config.sample - Use @sample macro on installed config .sample While I'm here: - Fix hardcoded paths in imv program and manual(1) PR: 276157 --- graphics/imv/Makefile | 7 ++++++- graphics/imv/files/patch-doc_imv.1.txt | 15 +++++++++++++++ graphics/imv/files/patch-meson.build | 12 ++++++++++-- graphics/imv/files/patch-src_imv.c | 12 ++++++++++++ graphics/imv/pkg-plist | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/graphics/imv/Makefile b/graphics/imv/Makefile index 9f0d913cd704..4a20c27439dd 100644 --- a/graphics/imv/Makefile +++ b/graphics/imv/Makefile @@ -1,7 +1,7 @@ PORTNAME= imv DISTVERSIONPREFIX= v DISTVERSION= 4.4.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= https://git.sr.ht/~exec64/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ @@ -76,4 +76,9 @@ X11_USE= GL=glu \ XORG=x11,xcb X11_MESON_ON= -Dwindows=x11 +post-patch: + @${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' \ + ${WRKSRC}/src/imv.c \ + ${WRKSRC}/doc/imv.1.txt + .include diff --git a/graphics/imv/files/patch-doc_imv.1.txt b/graphics/imv/files/patch-doc_imv.1.txt new file mode 100644 index 000000000000..448979dea168 --- /dev/null +++ b/graphics/imv/files/patch-doc_imv.1.txt @@ -0,0 +1,15 @@ +--- doc/imv.1.txt.orig 2023-01-18 22:20:52 UTC ++++ doc/imv.1.txt +@@ -265,10 +265,9 @@ - $HOME/.imv/config + - $HOME/.config/imv/config + - $HOME/.imv_config + - $HOME/.imv/config +-- /usr/local/etc/imv_config +-- /etc/imv_config ++- @PREFIX@/etc/imv_config + +-A default config file is shipped with imv into /etc/imv_config ++A default config file is shipped with imv into @PREFIX@/etc/imv_config + + For documentation on the config file format, see **imv**(5). + diff --git a/graphics/imv/files/patch-meson.build b/graphics/imv/files/patch-meson.build index fb6f49490f59..ac1369ba632f 100644 --- a/graphics/imv/files/patch-meson.build +++ b/graphics/imv/files/patch-meson.build @@ -1,6 +1,6 @@ ---- meson.build.orig 2021-03-15 09:06:48 UTC +--- meson.build.orig 2023-01-18 22:20:52 UTC +++ meson.build -@@ -101,7 +101,7 @@ files_msg = files('src/imv_msg.c', 'src/ipc_common.c') +@@ -120,7 +120,7 @@ foreach backend : [ enabled_backends = [] foreach backend : [ @@ -9,3 +9,11 @@ ['libtiff', 'dependency', 'libtiff-4', []], ['libpng', 'dependency', 'libpng', []], ['libjpeg', 'dependency', 'libturbojpeg', []], +@@ -204,6 +204,7 @@ install_data( + files('files/imv_config'), + install_dir: get_option('sysconfdir'), + install_mode: 'rw-r--r--', ++ rename: 'imv_config.sample', + ) + + dep_cmocka = dependency('cmocka', required: get_option('test')) diff --git a/graphics/imv/files/patch-src_imv.c b/graphics/imv/files/patch-src_imv.c new file mode 100644 index 000000000000..5f30caad1c1a --- /dev/null +++ b/graphics/imv/files/patch-src_imv.c @@ -0,0 +1,12 @@ +--- src/imv.c.orig 2024-01-06 21:47:38 UTC ++++ src/imv.c +@@ -1425,8 +1425,7 @@ static char *get_config_path(void) + "$HOME/.config/imv/config", + "$HOME/.imv_config", + "$HOME/.imv/config", +- "/usr/local/etc/imv_config", +- "/etc/imv_config", ++ "@PREFIX@/etc/imv_config", + }; + + for (size_t i = 0; i < sizeof(config_paths) / sizeof(char*); ++i) { diff --git a/graphics/imv/pkg-plist b/graphics/imv/pkg-plist index 318d84a328f0..ab9113da7e0f 100644 --- a/graphics/imv/pkg-plist +++ b/graphics/imv/pkg-plist @@ -3,7 +3,7 @@ bin/imv-dir bin/imv-msg %%ALL%%bin/imv-wayland %%ALL%%bin/imv-x11 -etc/imv_config +@sample etc/imv_config.sample man/man1/imv-dir.1.gz man/man1/imv-msg.1.gz man/man1/imv.1.gz