1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00
freebsd-ports/audio/libsamplerate/Makefile
Tijl Coosemans aad09bc5e2 When linking a library libA with a library libB using libtool, if libB.la
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)
2014-04-23 13:25:16 +00:00

64 lines
1.6 KiB
Makefile

# Created by: <dmagda+libsamplerate@ee.ryerson.ca>
# $FreeBSD$
PORTNAME= libsamplerate
PORTVERSION= 0.1.8
PORTREVISION= 5
CATEGORIES= audio
MASTER_SITES= http://www.mega-nerd.com/SRC/
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Secret Rabbit Code: a Sample Rate Converter for audio
LICENSE= GPLv2
USES= libtool:oldver pathfix pkgconfig
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
OPTIONS_DEFINE= CPU_CLIP DOCS EXAMPLES
CPU_CLIP_DESC= Allow machine-dependent clipping
.include <bsd.port.options.mk>
MAKE_ARGS+= htmldocdir=${PREFIX}/share/doc/libsamplerate
.if ${PORT_OPTIONS:MCPU_CLIP}
MANUAL_PACKAGE_BUILD= CPU_CLIP may customize the package for the build machine
.else
CONFIGURE_ARGS+= --disable-cpu-clip
.endif
.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
BUILD_DEPENDS += ${LOCALBASE}/lib/libfftw3.so:${PORTSDIR}/math/fftw3
.else
CONFIGURE_ARGS+= --disable-fftw
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
LIB_DEPENDS+= libsndfile.so:${PORTSDIR}/audio/libsndfile
.elif defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
BUILD_DEPENDS += libsndfile>=0:${PORTSDIR}/audio/libsndfile
.else
CONFIGURE_ARGS+= --disable-sndfile
.endif
post-patch:
.if empty(PORT_OPTIONS:MDOCS)
@${REINPLACE_CMD} -e '/SUBDIRS =/s/doc //' ${WRKSRC}/Makefile.in
.endif
.if empty(PORT_OPTIONS:MEXAMPLES)
@${REINPLACE_CMD} -e '/SUBDIRS =/s/examples //' ${WRKSRC}/Makefile.in
.endif
.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
check regression-test test: build
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \
check
.endif
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsamplerate.so.1
.include <bsd.port.mk>