mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
- 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
This commit is contained in:
parent
5efaf4b916
commit
36112e575f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=337014
@ -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}
|
||||
WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${PORTNAME}-184ef87
|
||||
|
||||
USES= pkgconfig
|
||||
OPTIONS_SINGLE= GTK
|
||||
OPTIONS_SINGLE_GTK= GTK2 GTK3
|
||||
OPTIONS_DEFAULT= GTK2
|
||||
|
||||
USES= gmake pkgconfig shebangfix
|
||||
SHEBANG_FILES= configure
|
||||
USE_BZIP2= yes
|
||||
USE_GNOME= gtk20
|
||||
USE_CSTD= gnu89
|
||||
CFLAGS+= -DNO_INOTIFY -DBINARY_NAME=\"${PORTNAME}\"
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
GTK2_CONFIGURE_ON= --gtk-version=2
|
||||
GTK2_USE= GNOME=gtk20
|
||||
|
||||
GTK3_CONFIGURE_ON= --gtk-version=3
|
||||
GTK3_USE= GNOME=gtk30
|
||||
|
||||
MAN1= pqiv.1
|
||||
PORTDOCS= README.markdown
|
||||
PLIST_FILES= bin/pqiv
|
||||
|
||||
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>
|
||||
|
||||
.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
|
||||
|
||||
post-patch:
|
||||
@(cd ${PATCH_WRKSRC} && ${SED} 's|$$PACKAGE_VERSION|${PORTVERSION}| ; \
|
||||
s|$$BINARY_NAME|${PORTNAME}|' < pqiv.1.template > pqiv.1)
|
||||
|
||||
do-build:
|
||||
(cd ${BUILD_WRKSRC} && ${CC} ${CPPFLAGS} ${CFLAGS} ${SORTFILE} pqiv.c \
|
||||
-o pqiv ${LDFLAGS})
|
||||
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>
|
||||
|
@ -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
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user