1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00
freebsd-ports/graphics/fv/Makefile
John Marino 560d2eb0bf Explicitly link libraries on 10 unmaintained ports
The following ports will not build with a binutils 2.22+ linker built
with standard options.  This has been obvious with DPorts, but difficult
to see on FreeBSD.  However, setting the ports compiler as a recent gcc
(e.g lang/gcc48) is an excellent way to detect the unspecified but needed
libraries as these recent GCC compilers use the latest binutils linkers.
These patches were tested on FreeBSD 8.4 and DragonFly 3.5
2013-10-07 23:40:23 +00:00

62 lines
1.3 KiB
Makefile

# Created by: Igor Pokrovsky <ip@doom.homeunix.org>
# $FreeBSD$
PORTNAME= fv
PORTVERSION= 1.03
PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= http://www.eaflux.com/fv/sources/
DISTNAME= ${PORTNAME}-src-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Viewer of hdr/pfm images
LICENSE= GPLv2
LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
USES= pkgconfig
USE_ZIP= yes
USE_GL= glut
USE_GMAKE= yes
ALL_TARGET= ${PORTNAME}
CXXFLAGS+= $$(pkg-config --cflags libpng15) \
-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+= $$(pkg-config --libs libpng15) \
-L${LOCALBASE}/lib -lglut -lGLU -lGL -lbz2 -lm -lz ${PTHREAD_LIBS}
PORTDOCS= AUTHORS ChangeLog README
PLIST_FILES= bin/${PORTNAME}
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ((${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505)
LIB_DEPENDS+= lzma.5:${PORTSDIR}/archivers/xz
CXXFLAGS+= $$(pkg-config --cflags liblzma)
LDFLAGS+= $$(pkg-config --libs liblzma)
.else
LDFLAGS+= -llzma
.endif
.if !defined(WITH_DEBUG)
CXXFLAGS+= -DNDEBUG
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|^CXX=|CXX?=| ; \
s|^CXXFLAGS=|CXXFLAGS?=| ; \
s|^LDFLAGS=|LDFLAGS?=|' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
.include <bsd.port.mk>