On Wed, 07 Jul 2010, Stuart Henderson wrote: > It's pointless to remove this, it's ?= so it's already overridden > by the ports infrastructure, better to not touch things in patches > unless it's needed, everything you change increases the chances > of a conflicting patch in the future..
Ok. > > +-CFLAGS += -Wall -Wextra -pedantic > > Ah, I didn't realise this was bad with gcc3. > Personally I'd just zap -Wextra on this line and leave the others, > but either way is ok with me. Good, updated diff following... Are you okay with the s/wget/ftp/ bits? Ciao, dav 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 7 Jul 2010 11:28:55 -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,22 @@ 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 -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 7 Jul 2010 11:28:55 -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-config_mk =================================================================== RCS file: patches/patch-config_mk diff -N patches/patch-config_mk --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-config_mk 7 Jul 2010 11:28:55 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- config.mk.orig Fri Jun 25 17:13:11 2010 ++++ config.mk Wed Jul 7 13:27:30 2010 +@@ -14,7 +14,7 @@ font_dir = ${main_dir}/share/feh/fonts + + # default CFLAGS + CFLAGS ?= -g -O2 +-CFLAGS += -Wall -Wextra -pedantic ++CFLAGS += -Wall -pedantic + + # Comment these out if you don't have libxinerama + xinerama = -DHAVE_LIBXINERAMA Index: patches/patch-src_getopt_c =================================================================== RCS file: patches/patch-src_getopt_c diff -N patches/patch-src_getopt_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_getopt_c 7 Jul 2010 11:28:55 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- src/getopt.c.orig Wed Jul 7 11:40:32 2010 ++++ src/getopt.c Wed Jul 7 11:40:47 2010 +@@ -36,6 +36,7 @@ + #endif + + #include <stdio.h> ++#include <string.h> + + /* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C Index: patches/patch-src_imlib_c =================================================================== RCS file: patches/patch-src_imlib_c diff -N patches/patch-src_imlib_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_imlib_c 7 Jul 2010 11:28:55 -0000 @@ -0,0 +1,49 @@ +$OpenBSD$ +--- src/imlib.c.orig Fri Jun 25 17:13:11 2010 ++++ src/imlib.c Wed Jul 7 12:12:42 2010 +@@ -435,6 +435,7 @@ char *feh_http_load_image(char *url) + close(sockno); + fclose(fp); + } else { ++ int fd; + int pid; + int status; + +@@ -443,18 +444,20 @@ char *feh_http_load_image(char *url) + free(tmpname); + return(NULL); + } else if (pid == 0) { +- char *quiet = NULL; +- +- if (!opt.verbose) +- quiet = estrdup("-q"); +- +- execlp("wget", "wget", "--cache=off", "-O", tmpname, url, quiet, NULL); +- eprintf("url: exec failed: wget:"); ++ if (!opt.verbose) { ++ if ((fd = open("/dev/null", O_WRONLY)) != -1) { ++ dup2(fd, fileno(stdout)); ++ dup2(fd, fileno(stderr)); ++ } ++ if (fd > 2) close(fd); ++ } ++ execlp("ftp", "ftp", "-o", tmpname, url, (char *)NULL); ++ eprintf("url: exec failed: ftp:"); + } else { + waitpid(pid, &status, 0); + + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { +- weprintf("url: wget failed to load URL %s\n", url); ++ weprintf("url: ftp failed to load URL %s\n", url); + unlink(tmpname); + free(tmpname); + return(NULL); +@@ -962,7 +965,7 @@ void feh_edit_inplace_lossless_rotate(winwidget w, int + } else if (pid == 0) { + + execlp("jpegtran", "jpegtran", "-copy", "all", "-rotate", +- rotate_str, "-outfile", file_str, file_str, NULL); ++ rotate_str, "-outfile", file_str, file_str, (char *)NULL); + + eprintf("lossless rotate: exec failed: jpegtran:"); + } else { 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 7 Jul 2010 11:28:55 -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 7 Jul 2010 11:28:55 -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