diff --git a/graphics/imv/Makefile b/graphics/imv/Makefile index 9f0d913cd704..4a20c27439dd 100644 --- a/graphics/imv/Makefile +++ b/graphics/imv/Makefile @@ -1,79 +1,84 @@ 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=/ MAINTAINER= eduardo@FreeBSD.org COMMENT= Simple image viewer WWW= https://sr.ht/~exec64/imv/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= a2x:textproc/asciidoc LIB_DEPENDS= libicuuc.so:devel/icu \ libinih.so:devel/inih \ libxkbcommon.so:x11/libxkbcommon RUN_DEPENDS= bash:shells/bash USES= compiler:c11 desktop-file-utils gl gnome meson pkgconfig USE_GL= egl USE_GNOME= cairo pango CONFLICTS_INSTALL= renameutils OPTIONS_DEFINE= FREEIMAGE HEIF JPEG NSGIF PNG SVG TEST TIFF OPTIONS_DEFAULT= ALL FREEIMAGE HEIF JPEG NSGIF PNG SVG TIFF OPTIONS_SINGLE= WIN OPTIONS_SINGLE_WIN= ALL WAYLAND X11 OPTIONS_SUB= yes ALL_DESC= Both Wayland and X11 support FREEIMAGE_DESC= FreeImage backend (support for many image formats) NSGIF_DESC= NetSurf GIF backend (support for animated GIF) WIN_DESC= Windowing system ALL_CATEGORIES= wayland ALL_LIB_DEPENDS+= libwayland-client.so:graphics/wayland ALL_USES= xorg ALL_USE= GL=glu \ XORG=x11,xcb ALL_MESON_ON= -Dwindows=all FREEIMAGE_LIB_DEPENDS= libfreeimage.so:graphics/freeimage FREEIMAGE_MESON_ENABLED= freeimage HEIF_LIB_DEPENDS= libheif.so:graphics/libheif HEIF_MESON_ENABLED= libheif JPEG_LIB_DEPENDS= libturbojpeg.so:graphics/libjpeg-turbo JPEG_MESON_ENABLED= libjpeg NSGIF_LIB_DEPENDS= libnsgif.so:graphics/libnsgif NSGIF_MESON_ENABLED= libnsgif PNG_LIB_DEPENDS= libpng16.so:graphics/png PNG_MESON_ENABLED= libpng SVG_USE= GNOME=librsvg2 SVG_MESON_ENABLED= librsvg TEST_LIB_DEPENDS= libcmocka.so:sysutils/cmocka TEST_MESON_ENABLED= test TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff TIFF_MESON_ENABLED= libtiff WAYLAND_CATEGORIES= wayland WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \ libwayland-egl.so:graphics/wayland WAYLAND_MESON_ON= -Dwindows=wayland X11_USES= xorg 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,11 +1,19 @@ ---- 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 : [ - ['freeimage', 'library', 'freeimage'], + ['freeimage', 'dependency', 'freeimage', []], ['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 @@ -1,12 +1,12 @@ bin/imv 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 man/man5/imv.5.gz share/applications/imv-dir.desktop share/applications/imv.desktop