- Update to 0.9

PR:		138816
Submitted by:	Ports Fury
Feature safe:	yes
This commit is contained in:
Martin Wilke 2009-09-16 14:27:10 +00:00
parent a58b060f98
commit 4e80e27d2a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=241519
3 changed files with 85 additions and 21 deletions

View file

@ -6,36 +6,35 @@
#
PORTNAME= pqiv
PORTVERSION= 0.8
PORTREVISION= 1
PORTVERSION= 0.9
CATEGORIES= graphics
MASTER_SITES= http://www.pberndt.com/raw//Programme/Linux/pqiv/_download/
MASTER_SITES= http://www.pberndt.com/raw/Programme/Linux/pqiv/_download/
EXTRACT_SUFX= .tbz
MAINTAINER= ports@FreeBSD.org
COMMENT= Pretty Quick Image Viewer
USE_BZIP2= yes
USE_GNOME= gtk20 glib20 pango pkgconfig
CFLAGS+= -DNO_INOTIFY
PLIST_FILES= bin/pqiv
PORTDOCS= README
MAN1= pqiv.1
MANCOMPRESSED= no
OPTIONS= SORTING "Enable sorting of loaded files" on \
COMPOSITE "Enable support for transparent windows" on \
FADING "Enable support for fading images" on \
COMMANDS "Enable support for external command execution" on \
CONFIG "Enable support for a configuration file" on
USE_BZIP2= yes
USE_GNOME= gtk20
CFLAGS+= -DNO_INOTIFY -DBINARY_NAME=\"${PORTNAME}\"
MAN1= pqiv.1
PORTDOCS= README
PLIST_FILES= bin/pqiv
.include <bsd.port.pre.mk>
.if defined(WITHOUT_SORTING)
CFLAGS+= -DNO_SORTING
SORTFILE= # Empty
.else
SORTFILE= ${WRKSRC}/lib/strnatcmp.c
SORTFILE= lib/strnatcmp.c
.endif
.if defined(WITHOUT_COMPOSITE)
CFLAGS+= -DNO_COMPOSITING
@ -50,17 +49,19 @@ CFLAGS+= -DNO_COMMANDS
CFLAGS+= -DNO_CONFIG_FILE
.endif
post-patch:
@(cd ${WRKSRC} && ${SED} 's|$$PACKAGE_VERSION|${PORTVERSION}|' \
< pqiv.1.template > pqiv.1)
do-build:
${CC} ${CFLAGS} `${pkgconfig_DETECT} --libs --cflags gtk+-2.0 gthread-2.0 pango glib-2.0` \
${SORTFILE} ${WRKSRC}/pqiv.c -o ${WRKSRC}/pqiv
@${REINPLACE_CMD} 's|$$PACKAGE_VERSION|${PORTVERSION}|' \
${WRKSRC}/pqiv.1.template
(cd ${WRKSRC} && ${CC} ${CFLAGS} `${pkgconfig_DETECT} --libs --cflags gtk+-2.0 gthread-2.0` \
${SORTFILE} pqiv.c -o pqiv)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pqiv ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/pqiv.1.template ${MAN1PREFIX}/man/man1/pqiv.1
${INSTALL_MAN} ${WRKSRC}/pqiv.1 ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

View file

@ -1,3 +1,3 @@
MD5 (pqiv-0.8.tbz) = 457da031724e965ec695c80a9cfec925
SHA256 (pqiv-0.8.tbz) = 365332bab4b13ca56da6935e7155af20658e67d323808942dce23e880466f66d
SIZE (pqiv-0.8.tbz) = 31307
MD5 (pqiv-0.9.tbz) = 15bb82cf22af0d3fbd74ce9481ea503b
SHA256 (pqiv-0.9.tbz) = 21bb2bf3c5fefc5882432cbde9540e18292ed8f021afc279195639ed16a56e75
SIZE (pqiv-0.9.tbz) = 31821

View file

@ -0,0 +1,63 @@
--- pqiv.c.orig 2009-05-06 06:10:47.000000000 +0900
+++ pqiv.c 2009-09-02 02:26:40.000000000 +0900
@@ -234,7 +234,7 @@
}}}
*/
g_print("usage: pqiv [options] <files or folders>\n"
- "(p)qiv version " RELEASE " by Phillip Berndt\n"
+ "PQIV version " RELEASE " by Phillip Berndt\n"
"\n");
if(claim != 0) {
g_print("I don't understand the meaning of %c\n\n", claim);
@@ -272,7 +272,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"
@@ -296,7 +296,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
@@ -1824,12 +1824,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) != 0) {
@@ -2253,14 +2253,14 @@
optionCommands[i] = (char*)g_malloc(strlen(optarg) + 1);
strcpy(optionCommands[i], 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] = (char*)g_malloc(14);
- memcpy(optionCommands[i], "qiv-command 0", 14);
+ memcpy(optionCommands[i], BINARY_NAME "-command 0", 14);
optionCommands[i][12] += i;
}
break;