mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
aad09bc5e2
exists, libtool will add all libraries libB.la refers to (dependency_libs field) to the linker command line and store them in the dependency_libs field of libA.la. So everything that subsequently links with libA will also link to these extra libraries. This causes too much overlinking. This commit modifies Mk/Uses/libtool.mk so it empties the dependency_libs field in .la libraries during staging. However, because .la libraries have very limited use when dependency_libs is empty it makes sense to completely remove them during staging. So with this commit USES=libtool is modified to remove .la libraries and a new form (USES=libtool:keepla) is introduced in case they need to be kept (dependency_libs is still emptied). PORTREVISION is bumped on all ports with USES=libtool that install .la libraries. Most ports are also changed to add :keepla because .la libraries have to be kept around as long as there are dependent ports with .la libraries that refer to them in their dependency_libs field. In most cases :keepla can be removed again as soon as all dependent ports that install .la libraries have some form of USES=libtool added to their Makefile. PR: ports/188759 Exp-run: bdrewery Approved by: portmgr (bdrewery)
83 lines
2.1 KiB
Makefile
83 lines
2.1 KiB
Makefile
# Created by: gahr
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= fox
|
|
PORTVERSION= 1.7.46
|
|
PORTREVISION= 3
|
|
CATEGORIES= x11-toolkits
|
|
MASTER_SITES= http://ftp.fox-toolkit.org/pub/ \
|
|
ftp://ftp.fox-toolkit.org/pub/
|
|
PKGNAMESUFFIX= ${PORTVERSION:R:S/.//}
|
|
|
|
MAINTAINER= gahr@FreeBSD.org
|
|
COMMENT= Fast and extensive C++ GUI toolkit -- devel version
|
|
|
|
OPTIONS_DEFINE= DOCS JPEG PNG TIFF WEBP
|
|
OPTIONS_DEFAULT=JPEG PNG TIFF WEBP
|
|
|
|
MAJORVER= ${PORTVERSION:R}
|
|
PLIST_SUB+= MAJORVER=${MAJORVER}
|
|
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${MAJORVER}
|
|
|
|
GNU_CONFIGURE= yes
|
|
USES= libtool:keepla pathfix
|
|
USE_GL= glut
|
|
USE_XORG= sm xft
|
|
USE_LDCONFIG= yes
|
|
CONFIGURE_ARGS= --with-opengl=yes \
|
|
--bindir=${PREFIX}/bin/${PORTNAME}-${MAJORVER}
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
PORTDOCS= *
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MJPEG}
|
|
LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
|
|
.else
|
|
CONFIGURE_ARGS+=--disable-jpeg
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MPNG}
|
|
LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png
|
|
.else
|
|
CONFIGURE_ARGS+=--disable-png
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MTIFF}
|
|
LIB_DEPENDS+= libtiff.so:${PORTSDIR}/graphics/tiff
|
|
.else
|
|
CONFIGURE_ARGS+=--disable-tiff
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MWEBP}
|
|
LIB_DEPENDS+= libwebp.so:${PORTSDIR}/graphics/webp
|
|
.else
|
|
CONFIGURE_ARGS+=--disable-webp
|
|
.endif
|
|
|
|
.if ${ARCH} == "powerpc"
|
|
BROKEN= Does not link on powerpc
|
|
.endif
|
|
|
|
post-patch:
|
|
# Rename man pages as in manpage.1 --> manpage-17.1 to avoid
|
|
# conflicts with fox14 and fox16
|
|
files=$$(${FIND} ${WRKSRC} -name *.1); \
|
|
for f in $$files; do \
|
|
${MV} $$f `echo $$f | sed -e 's|\.1|-17.1|'`; \
|
|
done;
|
|
${FIND} ${WRKSRC} -name Makefile.am -o -name Makefile.in | ${XARGS} \
|
|
${REINPLACE_CMD} -i '' -e '/man_MANS/s|\.1|-17.1|g'
|
|
${REINPLACE_CMD} -e '/^Libs:/s|$$| -pthread|; s|"||g' ${WRKSRC}/fox17.pc.in
|
|
.if !${PORT_OPTIONS:MDOCS}
|
|
${REINPLACE_CMD} -e '/^SUBDIRS/s/ doc//' ${WRKSRC}/Makefile.am ${WRKSRC}/Makefile.in
|
|
.endif
|
|
|
|
post-install:
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libFOX-${MAJORVER}.so \
|
|
${STAGEDIR}${PREFIX}/lib/libCHART-${MAJORVER}.so
|
|
|
|
.include <bsd.port.mk>
|