aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanilo <danilo@FreeBSD.org>2013-12-20 22:18:11 +0800
committerdanilo <danilo@FreeBSD.org>2013-12-20 22:18:11 +0800
commit9b3ecee994873d26a01e6848590a417994be1f7e (patch)
treed11f8f0cea80927d328ed0be38ffaee0692c6c76
parent2001ee57186fb828a9693156c11985fed2cc5a61 (diff)
downloadfreebsd-ports-gnome-9b3ecee994873d26a01e6848590a417994be1f7e.tar.gz
freebsd-ports-gnome-9b3ecee994873d26a01e6848590a417994be1f7e.tar.zst
freebsd-ports-gnome-9b3ecee994873d26a01e6848590a417994be1f7e.zip
- Update from 0.12 to 2.1
- Take maintainership - Remove all deprecated options - Add shebangfix to USES - Add GTK2 and GTK3 options - Add stage support
-rw-r--r--graphics/pqiv/Makefile85
-rw-r--r--graphics/pqiv/distinfo4
-rw-r--r--graphics/pqiv/files/patch-pqiv.c62
3 files changed, 26 insertions, 125 deletions
diff --git a/graphics/pqiv/Makefile b/graphics/pqiv/Makefile
index 6608136c1d57..a80328911548 100644
--- a/graphics/pqiv/Makefile
+++ b/graphics/pqiv/Makefile
@@ -2,83 +2,46 @@
# $FreeBSD$
PORTNAME= pqiv
-PORTVERSION= 0.12
-PORTREVISION= 1
+PORTVERSION= 2.1
CATEGORIES= graphics
-MASTER_SITES= GHC
-EXTRACT_SUFX= .tbz
+MASTER_SITES= GH
-MAINTAINER= ports@FreeBSD.org
+DISTNAME= ${PORTVERSION}
+
+MAINTAINER= danilo@FreeBSD.org
COMMENT= Pretty Quick Image Viewer
LICENSE= GPLv2
-OPTIONS_DEFINE= SORTING COMPOSITE FADING COMMANDS CONFIG ANIMATIONS DOCS
-OPTIONS_DEFAULT=SORTING COMPOSITE FADING COMMANDS CONFIG ANIMATIONS
-SORTING_DESC= Enable sorting of loaded files
-COMPOSITE_DESC= Enable support for transparent windows
-FADING_DESC= Enable support for fading images
-COMMANDS_DESC= Enable support for external command execution
-CONFIG_DESC= Enable support for a configuration file
-ANIMATIONS_DESC=Enable support for animations
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
USE_GITHUB= yes
GH_ACCOUNT= phillipberndt
-WRKSRC= ${WRKDIR}/${DISTNAME}
-
-USES= pkgconfig
-USE_BZIP2= yes
-USE_GNOME= gtk20
-USE_CSTD= gnu89
-CFLAGS+= -DNO_INOTIFY -DBINARY_NAME=\"${PORTNAME}\"
+WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${PORTNAME}-184ef87
-MAN1= pqiv.1
-PORTDOCS= README.markdown
-PLIST_FILES= bin/pqiv
+OPTIONS_SINGLE= GTK
+OPTIONS_SINGLE_GTK= GTK2 GTK3
+OPTIONS_DEFAULT= GTK2
-CPPFLAGS+= `pkg-config --cflags gtk+-2.0 gthread-2.0`
-LDFLAGS+= `pkg-config --libs gtk+-2.0 gthread-2.0`
-
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+USES= gmake pkgconfig shebangfix
+SHEBANG_FILES= configure
+USE_BZIP2= yes
+HAS_CONFIGURE= yes
-.if empty(PORT_OPTIONS:MSORTING)
-CFLAGS+= -DNO_SORTING
-SORTFILE= # Empty
-.else
-SORTFILE= lib/strnatcmp.c
-.endif
-.if empty(PORT_OPTIONS:MCOMPOSITE)
-CFLAGS+= -DNO_COMPOSITING
-.endif
-.if empty(PORT_OPTIONS:MFADING)
-CFLAGS+= -DNO_FADING
-.endif
-.if empty(PORT_OPTIONS:MCOMMANDS)
-CFLAGS+= -DNO_COMMANDS
-.endif
-.if empty(PORT_OPTIONS:MCONFIG)
-CFLAGS+= -DNO_CONFIG_FILE
-.endif
-.if empty(PORT_OPTIONS:MANIMATIONS)
-CFLAGS+= -DNO_ANIMATIONS
-.endif
+GTK2_CONFIGURE_ON= --gtk-version=2
+GTK2_USE= GNOME=gtk20
-post-patch:
- @(cd ${PATCH_WRKSRC} && ${SED} 's|$$PACKAGE_VERSION|${PORTVERSION}| ; \
- s|$$BINARY_NAME|${PORTNAME}|' < pqiv.1.template > pqiv.1)
+GTK3_CONFIGURE_ON= --gtk-version=3
+GTK3_USE= GNOME=gtk30
-do-build:
- (cd ${BUILD_WRKSRC} && ${CC} ${CPPFLAGS} ${CFLAGS} ${SORTFILE} pqiv.c \
- -o pqiv ${LDFLAGS})
+PORTDOCS= README.markdown
+PLIST_FILES= bin/pqiv man/man1/pqiv.1.gz
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/pqiv ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/pqiv.1 ${MAN1PREFIX}/man/man1
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README.markdown ${DOCSDIR}
-.endif
+ ${INSTALL_PROGRAM} ${WRKSRC}/pqiv ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/pqiv.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.markdown ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/graphics/pqiv/distinfo b/graphics/pqiv/distinfo
index 173c29226df3..bc5a039ffd18 100644
--- a/graphics/pqiv/distinfo
+++ b/graphics/pqiv/distinfo
@@ -1,2 +1,2 @@
-SHA256 (pqiv-0.12.tbz) = 646c69f2f4e7289913f6b8e8ae984befba9debf0d2b4cc8af9955504a1fccf1e
-SIZE (pqiv-0.12.tbz) = 33284
+SHA256 (2.1.tar.bz2) = d1028f17606f21a700e64720282cdb383f5eef874879abfbecfe8636752c4f1e
+SIZE (2.1.tar.bz2) = 49568
diff --git a/graphics/pqiv/files/patch-pqiv.c b/graphics/pqiv/files/patch-pqiv.c
deleted file mode 100644
index d953af9df211..000000000000
--- a/graphics/pqiv/files/patch-pqiv.c
+++ /dev/null
@@ -1,62 +0,0 @@
---- pqiv.c.orig 2009-10-08 19:49:20.000000000 +0900
-+++ pqiv.c 2009-10-10 17:43:14.000000000 +0900
-@@ -288,7 +288,7 @@
- #ifndef NO_COMMANDS
- " -<n> s Set command number n (1-9) to s \n"
- " See manpage for advanced commands (starting with > or |) \n"
-- " -q Use the qiv-command script for commands \n"
-+ " -q Use the " BINARY_NAME "-command script for commands \n"
- #endif
-
- "\n"
-@@ -312,7 +312,7 @@
- " v Vertical flip \n"
- " i Show/hide info box \n"
- " s Slideshow toggle \n"
-- " a Hardlink current image to .qiv-select/ \n"
-+ " a Hardlink current image to ." BINARY_NAME "-select/ \n"
- #ifndef NO_COMMANDS
- " <n> Run command n (1-3) \n"
- #endif
-@@ -1955,12 +1955,12 @@
- }
- break;
- /* }}} */
-- /* BIND: a: Hardlink current image to .qiv-select/ {{{ */
-+ /* BIND: a: Hardlink current image to ." BINARY_NAME "-select/ {{{ */
- case GDK_a:
-- mkdir("./.qiv-select", 0755);
-+ mkdir("./." BINARY_NAME "-select", 0755);
- buf2 = basename(currentFile->fileName); /* Static memory, do not free */
-- buf = (char*)g_malloc(strlen(buf2) + 15);
-- sprintf(buf, "./.qiv-select/%s", buf2);
-+ buf = (char*)g_malloc(strlen(buf2) + 15 + strlen(BINARY_NAME) );
-+ sprintf(buf, "./." BINARY_NAME "-select/%s", buf2);
- if(link(currentFile->fileName, buf) != 0) {
- /* Failed to link image, try copying it */
- if(copyFile(currentFile->fileName, buf) != TRUE) {
-@@ -2252,8 +2252,6 @@
- /* glib & threads initialization {{{ */
- DEBUG1("Debug mode enabled");
- g_type_init();
-- g_thread_init(NULL);
-- gdk_threads_init();
- if(gtk_init_check(&argc, &argv) == FALSE) {
- die("Failed to open X11 display.");
- }
-@@ -2436,13 +2434,13 @@
- }
- optionCommands[i] = g_strdup((gchar*)optarg);
- break;
-- /* OPTION: -q: Use the qiv-command script for commands */
-+ /* OPTION: -q: Use the BINARY_NAME-command script for commands */
- case 'q':
- for(i=0; i<10; i++) {
- if(optionCommands[i] != NULL) {
- g_free(optionCommands[i]);
- }
-- optionCommands[i] = g_strdup("qiv-command 0");
-+ optionCommands[i] = g_strdup(BINARY_NAME "-command 0");
- optionCommands[i][12] += i;
- }
- break;