diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2013-12-20 11:56:54 +0000 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2013-12-20 11:56:54 +0000 |
commit | 1d9173233bb057fcabc9c3df1138f6a41e546315 (patch) | |
tree | fe624bda0ff2a3ef3ecf96b207f42085731e5e43 /graphics/zgv | |
parent | 323c935da854238e5b4cccf626e31b276e5d3697 (diff) | |
download | ports-1d9173233bb057fcabc9c3df1138f6a41e546315.tar.gz ports-1d9173233bb057fcabc9c3df1138f6a41e546315.zip |
Notes
Diffstat (limited to 'graphics/zgv')
-rw-r--r-- | graphics/zgv/Makefile | 80 | ||||
-rw-r--r-- | graphics/zgv/files/patch-zgv_io.c | 11 | ||||
-rw-r--r-- | graphics/zgv/pkg-plist | 12 |
3 files changed, 72 insertions, 31 deletions
diff --git a/graphics/zgv/Makefile b/graphics/zgv/Makefile index 62facca27bba..8a90d5bf70be 100644 --- a/graphics/zgv/Makefile +++ b/graphics/zgv/Makefile @@ -5,49 +5,67 @@ PORTNAME= zgv PORTVERSION= 5.9 PORTREVISION= 5 CATEGORIES= graphics -MASTER_SITES= ${MASTER_SITE_SUNSITE} -MASTER_SITE_SUBDIR= apps/graphics/viewers/svga +MASTER_SITES= SUNSITE/apps/graphics/viewers/svga MAINTAINER= ports@FreeBSD.org COMMENT= Graphics viewer for SVGAlib -LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \ - vga.1:${PORTSDIR}/graphics/svgalib \ - jpeg.11:${PORTSDIR}/graphics/jpeg \ - png15:${PORTSDIR}/graphics/png +LICENSE= GPLv2 # (or later) -ONLY_FOR_ARCHS= i386 -USE_GMAKE= yes +LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ + libpng15.so:${PORTSDIR}/graphics/png \ + libtiff.so:${PORTSDIR}/graphics/tiff + +OPTIONS_DEFINE= SDL + +USES= gmake ALL_TARGET= zgv info -MAKE_ENV= ZGV_LIBS="${LDFLAGS}" -BINMODE= 4755 -PLIST_FILES= bin/zgv etc/zgvrc.sample -.if !defined(NO_INSTALL_MANPAGES) -MAN1= zgv.1 -.endif -.if !defined(NOPORTDOCS) -INFO= zgv -PORTDOCS= NEWS README SECURITY TODO INSTALL +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MSDL} +USE_SDL= sdl +MAKE_ENV+= BACKEND=SDL +CPPFLAGS+= $$(${SDL_CONFIG} --cflags) +LDFLAGS+= $$(${SDL_CONFIG} --libs) +.else +LIB_DEPENDS+= libvga.so:${PORTSDIR}/graphics/svgalib +MAKE_ENV+= BACKEND=SVGALIB +ONLY_FOR_ARGS= i386 amd64 .endif -NO_STAGE= yes +post-extract: + @${RM} ${WRKSRC}/doc/zgv + post-patch: - ${RM} ${WRKSRC}/doc/zgv - @${REINPLACE_CMD} -e 's|ZGV_LIBS=|ZGV_LIBS+=|' ${WRKSRC}/src/Makefile + @${REINPLACE_CMD} -e \ + 's|^CC=|#CC=|g ; \ + s|^CFLAGS=|#CFLAGS=|g ; \ + s|^BACKEND=|#BACKEND=|g ; \ + s|^PREFIX=|#PREFIX=|g ; \ + s|/usr/X11R6|$${LOCALBASE}|g' ${WRKSRC}/config.mk + @${REINPLACE_CMD} -e \ + 's|-I/usr/local/include|$${CPPFLAGS}|g ; \ + s|-L/usr/local/lib|$${LDFLAGS}|g ; \ + s|=-lSDL|=|g' ${WRKSRC}/src/Makefile + @${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ + 's|SDL/SDL|SDL|g' do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/zgv ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/doc/sample.zgvrc ${PREFIX}/etc/zgvrc.sample -.if !defined(NOPORTDOCS) - ${INSTALL_DATA} ${WRKSRC}/doc/zgv ${PREFIX}/${INFO_PATH}/zgv.info - ${MKDIR} ${DOCSDIR} -.for i in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} zgv \ + ${STAGEDIR}${PREFIX}/bin/zgv) + (cd ${WRKSRC}/doc && ${INSTALL_MAN} zgv.1 \ + ${STAGEDIR}${MANPREFIX}/man/man1/zgv.1) + (cd ${WRKSRC}/doc && ${INSTALL_DATA} sample.zgvrc \ + ${STAGEDIR}${PREFIX}/etc/zgvrc.sample) + (cd ${WRKSRC}/doc && ${INSTALL_DATA} zgv \ + ${STAGEDIR}${PREFIX}/${INFO_PATH}/zgvrc.info) + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for i in NEWS README SECURITY TODO INSTALL + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor -.endif -.if !defined(NO_INSTALL_MANPAGES) - ${INSTALL_MAN} ${WRKSRC}/doc/zgv.1 ${MAN1PREFIX}/man/man1 -.endif .include <bsd.port.mk> diff --git a/graphics/zgv/files/patch-zgv_io.c b/graphics/zgv/files/patch-zgv_io.c new file mode 100644 index 000000000000..f9ee6707369e --- /dev/null +++ b/graphics/zgv/files/patch-zgv_io.c @@ -0,0 +1,11 @@ +--- src/zgv_io.c.orig ++++ src/zgv_io.c +@@ -645,7 +645,7 @@ + case SDLK_INSERT: return(RK_INSERT); + case SDLK_DELETE: return(RK_DELETE); + case SDLK_RETURN: return(RK_ENTER); +- default: ++ default: ; + /* stop complaints */ + } + diff --git a/graphics/zgv/pkg-plist b/graphics/zgv/pkg-plist new file mode 100644 index 000000000000..b3ab9e3d9a59 --- /dev/null +++ b/graphics/zgv/pkg-plist @@ -0,0 +1,12 @@ +@mode 4555 +bin/zgv +@mode +etc/zgvrc.sample +info/zgvrc.info +man/man1/zgv.1.gz +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/SECURITY +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%@dirrm %%DOCSDIR%% |