2012-10-03 13:17:32 +00:00
|
|
|
# Created by: Alexander Novitsky <alecn2002@yandex.ru>
|
2005-08-01 15:54:16 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= fox
|
2013-10-07 13:14:12 +00:00
|
|
|
PORTVERSION= 1.6.49
|
2014-04-23 13:25:16 +00:00
|
|
|
PORTREVISION= 2
|
2005-08-01 15:54:16 +00:00
|
|
|
CATEGORIES= x11-toolkits
|
2013-02-25 08:23:02 +00:00
|
|
|
MASTER_SITES= ftp://ftp.fox-toolkit.org/pub/ \
|
|
|
|
http://ftp.fox-toolkit.org/pub/
|
2013-10-07 13:14:12 +00:00
|
|
|
PKGNAMESUFFIX= ${PORTVERSION:R:S/.//}
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2010-09-14 09:33:55 +00:00
|
|
|
MAINTAINER= gahr@FreeBSD.org
|
2006-10-01 22:58:59 +00:00
|
|
|
COMMENT= Fast and extensive C++ GUI toolkit -- ver.1.6
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2013-10-07 13:14:12 +00:00
|
|
|
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
|
|
|
libpng15.so:${PORTSDIR}/graphics/png \
|
|
|
|
libtiff.so:${PORTSDIR}/graphics/tiff
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2013-10-07 13:14:12 +00:00
|
|
|
MAJORVER= ${PORTVERSION:R}
|
|
|
|
PLIST_SUB+= MAJORVER=${MAJORVER}
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2014-04-23 13:25:16 +00:00
|
|
|
USES= libtool:keepla pathfix
|
2005-08-01 15:54:16 +00:00
|
|
|
USE_GL= yes
|
2006-10-01 22:58:59 +00:00
|
|
|
USE_LDCONFIG= yes
|
2014-03-02 23:34:42 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2013-10-07 13:14:12 +00:00
|
|
|
CONFIGURE_ARGS= --with-opengl --with-x
|
|
|
|
PORTDOCS= *
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2013-04-23 16:41:07 +00:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include -fPIC
|
2011-09-23 22:26:39 +00:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2013-10-07 13:14:12 +00:00
|
|
|
OPTIONS_DEFINE= OPTIMIZED_CFLAGS CUPS DEBUG DOCS APPS PROFILE SHM XFT
|
2012-10-03 13:17:32 +00:00
|
|
|
OPTIONS_DEFAULT=SHM XFT
|
|
|
|
APPS_DESC= Install sample applications
|
|
|
|
SHM_DESC= Shared Memory support
|
2005-08-01 15:54:16 +00:00
|
|
|
|
2012-10-03 13:17:32 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2006-10-01 22:58:59 +00:00
|
|
|
|
2005-08-01 15:54:16 +00:00
|
|
|
##
|
|
|
|
## Additional Options
|
|
|
|
##
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MXFT}
|
2013-10-07 13:14:12 +00:00
|
|
|
CONFIGURE_ARGS+=--with-xft=yes
|
|
|
|
USE_XORG+= xft
|
2005-08-01 15:54:16 +00:00
|
|
|
CPPFLAGS+= `freetype-config --cflags`
|
|
|
|
LDFLAGS+= `freetype-config --libs`
|
2012-10-03 13:17:32 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-xft=no
|
2005-08-01 15:54:16 +00:00
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MSHM}
|
2005-08-01 15:54:16 +00:00
|
|
|
CONFIGURE_ARGS+= --with-xshm=yes
|
2012-10-03 13:17:32 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-xshm=no
|
2005-08-01 15:54:16 +00:00
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MCUPS}
|
2013-10-07 13:14:12 +00:00
|
|
|
LIB_DEPENDS+= libcups.so:${PORTSDIR}/print/cups-client
|
2005-08-01 15:54:16 +00:00
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MDEBUG}
|
2005-08-01 15:54:16 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-debug
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --enable-release
|
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MAPPS}
|
2005-08-01 15:54:16 +00:00
|
|
|
PLIST_SUB+= APPS=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= APPS="@comment "
|
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
|
2005-08-01 15:54:16 +00:00
|
|
|
# turn distribution-recommended optimization flags back on
|
2010-03-23 21:19:44 +00:00
|
|
|
CXXFLAGS+= -O2 -Wuninitialized -ffast-math -finline-functions -fexpensive-optimizations
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MPROFILE} == "" # Incompatible with profiling flags
|
2010-03-23 21:19:44 +00:00
|
|
|
CXXFLAGS+= -fomit-frame-pointer
|
|
|
|
.endif
|
2005-08-01 15:54:16 +00:00
|
|
|
.endif
|
|
|
|
#
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MPROFILE}
|
2005-08-01 15:54:16 +00:00
|
|
|
CONFIGURE_ARGS+= --with-profiling=gprof
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2013-10-07 13:14:12 +00:00
|
|
|
# Rename man pages as in manpage.1 --> manpage-16.1 to avoid
|
|
|
|
# conflicts with fox14 and fox17
|
|
|
|
files=$$(${FIND} ${WRKSRC} -name *.1); \
|
|
|
|
for f in $$files; do \
|
|
|
|
${MV} $$f `echo $$f | sed -e 's|\.1|-16.1|'`; \
|
|
|
|
done;
|
|
|
|
${FIND} ${WRKSRC} -name Makefile.am -o -name Makefile.in | ${XARGS} \
|
|
|
|
${REINPLACE_CMD} -i '' -e '/man_MANS/s|\.1|-16.1|g'
|
2012-02-22 13:19:55 +00:00
|
|
|
${REINPLACE_CMD} -e '/^Libs:/s|$$| ${PTHREAD_LIBS}|; s|"||g' ${WRKSRC}/fox.pc.in
|
2005-08-01 15:54:16 +00:00
|
|
|
# CXXFLAGS safeness
|
|
|
|
@${REINPLACE_CMD} -E -e \
|
|
|
|
's|-O2|${CXXFLAGS}|g ; \
|
2013-10-07 13:14:12 +00:00
|
|
|
s|-lc_r|${PTHREAD_LIBS}|g' \
|
2005-08-01 15:54:16 +00:00
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
|
|
|
# doc prefix safeness
|
|
|
|
@${REINPLACE_CMD} -E -e \
|
|
|
|
's|^(htmldir).*$$|\1=${DOCSDIR}/html|' \
|
|
|
|
${WRKSRC}/doc/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -E -e \
|
|
|
|
's|^(artdir).*$$|\1=${DOCSDIR}/html|' \
|
|
|
|
${WRKSRC}/doc/art/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -E -e \
|
|
|
|
's|^(screenshotsdir).*$$|\1=${DOCSDIR}/html|' \
|
|
|
|
${WRKSRC}/doc/screenshots/Makefile.in
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS} == ""
|
2007-03-29 10:52:52 +00:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
'/^SUBDIRS/s/ doc//' \
|
|
|
|
${WRKSRC}/Makefile.in
|
|
|
|
.endif
|
2012-10-03 13:17:32 +00:00
|
|
|
.if ${PORT_OPTIONS:MAPPS} == ""
|
2005-08-01 15:54:16 +00:00
|
|
|
@${REINPLACE_CMD} -E -e \
|
|
|
|
's,^(SUBDIRS.*)adie,\1,; \
|
|
|
|
s,^(SUBDIRS.*)pathfinder,\1,; \
|
|
|
|
s,^(SUBDIRS.*)calculator,\1,' \
|
|
|
|
${WRKSRC}/Makefile.in
|
|
|
|
.endif
|
|
|
|
|
2012-10-03 13:17:32 +00:00
|
|
|
.include <bsd.port.mk>
|