On 2010/07/06 09:53, David Coppa wrote: > This diff updates feh to its latest version (1.8). > > I'm pretty sure some things can be done in a better way, > so feedback is welcome...
I'd rather override MAKE_FLAGS than patch Makefiles, it also saves an unnecessary and slightly expensive (on some arch) call to SUBST_CMD. Diff below. I'd also consider patching to use ftp(1) instead of depending on wget. It's more complicated to handle quiet mode though as there's no straightforward equivalent of wget -q (see src/imlib.c). Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/feh/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- Makefile 10 Aug 2009 06:31:44 -0000 1.10 +++ Makefile 6 Jul 2010 11:32:25 -0000 @@ -2,11 +2,11 @@ COMMENT= lightweight image viewer -DISTNAME= feh-1.3.4 -PKGNAME= ${DISTNAME}p0 +DISTNAME= feh-1.8 +EXTRACT_SUFX= .tar.bz2 CATEGORIES= graphics -HOMEPAGE= http://www.linuxbrit.co.uk/feh/ +HOMEPAGE= https://derf.homelinux.org/~derf/projects/feh/ MAINTAINER= Victor Sahlstedt <sa...@legonet.org> @@ -15,16 +15,23 @@ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= Imlib2 X11 Xext c freetype jpeg m png pthread-stubs \ - xcb z -MASTER_SITES= http://www.linuxbrit.co.uk/downloads/ +WANTLIB= Imlib2 X11 Xinerama c m png + +MASTER_SITES= ${HOMEPAGE} LIB_DEPENDS= giblib.>=1::devel/giblib +RUN_DEPENDS= ::net/wget -USE_X11= Yes -CONFIGURE_STYLE=gnu +CFLAGS+= -I${LOCALBASE}/include \ + -I${LOCALBASE}/include/libpng \ + -I${X11BASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib +MAKE_FLAGS= LDFLAGS="${LDFLAGS}" man_dir="${DESTDIR}${PREFIX}/man" +FAKE_FLAGS= PREFIX="${PREFIX}" +USE_X11= Yes +USE_GMAKE= Yes NO_REGRESS= Yes .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/feh/distinfo,v retrieving revision 1.7 diff -u -p -r1.7 distinfo --- distinfo 5 Apr 2007 16:19:55 -0000 1.7 +++ distinfo 6 Jul 2010 11:32:25 -0000 @@ -1,5 +1,5 @@ -MD5 (feh-1.3.4.tar.gz) = PTW6PS8Gk7AZgAeH8RA4kQ== -RMD160 (feh-1.3.4.tar.gz) = fifTHPl0sw/DIdTb7y/Ub70h00w= -SHA1 (feh-1.3.4.tar.gz) = zwL9SDJboCRnx/eRY0oo6Y7b6AE= -SHA256 (feh-1.3.4.tar.gz) = gbnyu8Ff/aRkCVhwF1NEe5XNLL8RvI6F3QD90qL4MSQ= -SIZE (feh-1.3.4.tar.gz) = 409530 +MD5 (feh-1.8.tar.bz2) = /oEzSAX02ptfHjW0XERKGg== +RMD160 (feh-1.8.tar.bz2) = H2xQ+a8iYykIgUHSaSeQcUTsyNY= +SHA1 (feh-1.8.tar.bz2) = FHtWCCgbgb6NH3z5RP12HouGrgY= +SHA256 (feh-1.8.tar.bz2) = nuPw2dG5cErgExo7UcgiDnAevj0EV64hEicz+ukVsKw= +SIZE (feh-1.8.tar.bz2) = 358172 Index: patches/patch-Makefile_in =================================================================== RCS file: patches/patch-Makefile_in diff -N patches/patch-Makefile_in --- patches/patch-Makefile_in 19 Sep 2005 16:32:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2005/09/19 16:32:23 bernd Exp $ ---- Makefile.in.orig Sat Jul 23 01:31:30 2005 -+++ Makefile.in Mon Sep 19 18:25:12 2005 -@@ -90,7 +90,7 @@ INCLUDES = -I/usr/X11R6/include $(X_CFLA - man_MANS = feh.1 - - docs_DATA = README AUTHORS ChangeLog TODO --docsdir = $(prefix)/doc/feh -+docsdir = $(prefix)/share/doc/feh - - EXTRA_DIST = feh.spec feh.1 $(docs_DATA) - Index: patches/patch-src_keyevents_c =================================================================== RCS file: patches/patch-src_keyevents_c diff -N patches/patch-src_keyevents_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_keyevents_c 6 Jul 2010 11:32:25 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ +--- src/keyevents.c.orig Mon Jul 5 08:53:35 2010 ++++ src/keyevents.c Mon Jul 5 08:54:09 2010 +@@ -261,11 +261,13 @@ void feh_event_handle_keypress(XEvent * ev) + /* erroneously recognized as '+' in the *kbuf switch. Work around this. */ + len = 0; + winwid->zoom = winwid->zoom * 1.25; ++ winwidget_sanitise_offsets(winwid); + winwidget_render_image(winwid, 0, 0); + break; + case XK_KP_Subtract: + len = 0; + winwid->zoom = winwid->zoom * 0.75; ++ winwidget_sanitise_offsets(winwid); + winwidget_render_image(winwid, 0, 0); + break; + case XK_KP_Multiply: Index: patches/patch-src_slideshow_c =================================================================== RCS file: patches/patch-src_slideshow_c diff -N patches/patch-src_slideshow_c --- patches/patch-src_slideshow_c 20 Dec 2005 06:08:17 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_slideshow_c,v 1.1 2005/12/20 06:08:17 pvalchev Exp $ ---- src/slideshow.c.orig Mon Dec 19 22:28:52 2005 -+++ src/slideshow.c Mon Dec 19 22:29:04 2005 -@@ -353,8 +353,8 @@ feh_action_run(feh_file * file, char *ac - D_ENTER(4); - if (action) - { -- D(3, ("Running action %s\n", action)); - char *sys; -+ D(3, ("Running action %s\n", action)); - sys = feh_printf(action, file); - - if (opt.verbose && !opt.list && !opt.customlist) Index: patches/patch-src_support_c =================================================================== RCS file: patches/patch-src_support_c diff -N patches/patch-src_support_c --- patches/patch-src_support_c 19 Sep 2005 16:32:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- src/support.c.orig Wed Sep 14 20:33:40 2005 -+++ src/support.c Wed Sep 14 20:33:53 2005 -@@ -233,7 +233,7 @@ feh_wm_set_bg(char *fil, Imlib_Image im, - char *path; - path = estrjoin("/", home, ".fehbg", NULL); - if ((fp = fopen(path, "w")) == NULL) { -- wprintf("Can't open %s for write", path); -+ printf("Can't open %s for write", path); - } else { - fprintf(fp, "%s\n", fehbg); - fclose(fp); Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/feh/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 15 Sep 2004 00:50:08 -0000 1.2 +++ pkg/PLIST 6 Jul 2010 11:32:25 -0000 @@ -1,8 +1,10 @@ @comment $OpenBSD: PLIST,v 1.2 2004/09/15 00:50:08 espie Exp $ -bin/cam -bin/feh -bin/gen_cam_menu.sh +...@bin bin/feh +bin/feh-cam +bin/gen-cam-menu +...@man man/man1/feh-cam.1 @man man/man1/feh.1 +...@man man/man1/gen-cam-menu.1 share/doc/feh/ share/doc/feh/AUTHORS share/doc/feh/ChangeLog @@ -18,7 +20,6 @@ share/feh/images/about.png share/feh/images/menubg_aluminium.png share/feh/images/menubg_aqua.png share/feh/images/menubg_black.png -share/feh/images/menubg_britney.png share/feh/images/menubg_brushed.png share/feh/images/menubg_chrome.png share/feh/images/menubg_default.png