On Fri, April 28, 2017 10:43, Frederic Cambus wrote:
> Hi ports@,
>
> Here is a diff to install the .desktop file. This allows using sxiv with
> xdg-open.
>
> While there, remove unneeded WRKDIST variable and do some minor
> reformatting.
>
> Comments? OK?

Hi!
You're missing icons for desktop file.
This diff was sitting in my tree for ages:

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/sxiv/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    6 Jan 2016 20:02:19 -0000       1.9
+++ Makefile    2 Aug 2016 09:37:55 -0000
@@ -5,6 +5,7 @@ COMMENT =       simple (or small or suckless)
 GH_PROJECT=    sxiv
 GH_ACCOUNT=    muennich
 GH_TAGNAME=    v1.3.2
+REVISION =     0

 CATEGORIES =   graphics x11

@@ -17,6 +18,8 @@ WANTLIB +=    Imlib2 exif gif X11 c

 LIB_DEPENDS =  graphics/imlib2 \
                graphics/libexif
+RUN_DEPENDS =  devel/desktop-file-utils\
+               x11/gtk+3,-guic

 MAKE_FLAGS =   CC=${CC} MANPREFIX=${PREFIX}/man \
                CFLAGS="${CFLAGS} -I${X11BASE}/include -I${PREFIX}/include" \
@@ -25,5 +28,10 @@ MAKE_FLAGS = CC=${CC} MANPREFIX=${PREFIX
 NO_TEST =      Yes

 WRKDIST=       ${WRKDIR}/${PKGNAME}
+
+post-install:
+       cd ${WRKSRC}/icon/ && make install
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
+       ${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications/

 .include <bsd.port.mk>
Index: patches/patch-icon_Makefile
===================================================================
RCS file: patches/patch-icon_Makefile
diff -N patches/patch-icon_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-icon_Makefile 2 Aug 2016 09:37:55 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- icon/Makefile.orig Sat Sep  5 14:20:51 2015
++++ icon/Makefile      Sat Sep  5 14:21:04 2015
+@@ -5,7 +5,7 @@ all:
+
+ install:
+       for f in $(ICONS); do \
+-              dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \
++              dir="$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \
+               mkdir -p "$$dir"; \
+               cp "$$f" "$$dir/sxiv.png"; \
+               chmod 644 "$$dir/sxiv.png"; \
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/sxiv/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   16 Apr 2015 10:27:26 -0000      1.3
+++ pkg/PLIST   2 Aug 2016 09:37:55 -0000
@@ -1,6 +1,16 @@
 @comment $OpenBSD: PLIST,v 1.3 2015/04/16 10:27:26 jung Exp $
 @bin bin/sxiv
 @man man/man1/sxiv.1
+share/applications/sxiv.desktop
 share/examples/sxiv/
 share/examples/sxiv/image-info
 share/examples/sxiv/key-handler
+share/icons/hicolor/128x128/apps/sxiv.png
+share/icons/hicolor/16x16/apps/sxiv.png
+share/icons/hicolor/32x32/apps/sxiv.png
+share/icons/hicolor/48x48/apps/sxiv.png
+share/icons/hicolor/64x64/apps/sxiv.png
+@exec %D/bin/update-desktop-database
+@unexec-delete %D/bin/update-desktop-database
+@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
+@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor

OK kirby@ for merged diff.

>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/sxiv/Makefile,v
> retrieving revision 1.9
> diff -u -p -r1.9 Makefile
> --- Makefile  6 Jan 2016 20:02:19 -0000       1.9
> +++ Makefile  28 Apr 2017 07:42:01 -0000
> @@ -2,9 +2,10 @@
>
>  COMMENT =    simple (or small or suckless) X Image Viewer
>
> -GH_PROJECT=  sxiv
> -GH_ACCOUNT=  muennich
> -GH_TAGNAME=  v1.3.2
> +GH_PROJECT = sxiv
> +GH_ACCOUNT = muennich
> +GH_TAGNAME = v1.3.2
> +REVISION =   0
>
>  CATEGORIES = graphics x11
>
> @@ -15,6 +16,8 @@ PERMIT_PACKAGE_CDROM =              Yes
>
>  WANTLIB +=   Imlib2 exif gif X11 c
>
> +RUN_DEPENDS =        devel/desktop-file-utils
> +
>  LIB_DEPENDS =        graphics/imlib2 \
>               graphics/libexif
>
> @@ -24,6 +27,8 @@ MAKE_FLAGS =        CC=${CC} MANPREFIX=${PREFIX
>
>  NO_TEST =    Yes
>
> -WRKDIST=     ${WRKDIR}/${PKGNAME}
> +post-install:
> +     ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
> +     ${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications
>
>  .include <bsd.port.mk>
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/sxiv/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 16 Apr 2015 10:27:26 -0000      1.3
> +++ pkg/PLIST 28 Apr 2017 07:42:01 -0000
> @@ -1,6 +1,9 @@
>  @comment $OpenBSD: PLIST,v 1.3 2015/04/16 10:27:26 jung Exp $
>  @bin bin/sxiv
>  @man man/man1/sxiv.1
> +share/applications/sxiv.desktop
>  share/examples/sxiv/
>  share/examples/sxiv/image-info
>  share/examples/sxiv/key-handler
> +@exec %D/bin/update-desktop-database
> +@unexec-delete %D/bin/update-desktop-database
>
>


Reply via email to