mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
Convert to new options framework
This commit is contained in:
parent
cc3c3f6015
commit
c43626e815
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=297770
@ -21,16 +21,17 @@ USE_GNOME= gnomehack pkgconfig
|
||||
USE_AUTOTOOLS= libtool
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
OPTIONS= CPU_CLIP "Allow machine-dependent clipping" off
|
||||
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 !defined(WITH_CPU_CLIP)
|
||||
CONFIGURE_ARGS+= --disable-cpu-clip
|
||||
.if ${PORT_OPTIONS:MCPU_CLIP}
|
||||
MANUAL_PACKAGE_BUILD= CPU_CLIP may customize the package for the build machine
|
||||
.else
|
||||
MANUAL_PACKAGE_BUILD= WITH_CPU_CLIP may customize the package for the build machine
|
||||
CONFIGURE_ARGS+= --disable-cpu-clip
|
||||
.endif
|
||||
|
||||
.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
|
||||
@ -39,7 +40,7 @@ BUILD_DEPENDS += ${LOCALBASE}/lib/libfftw3.so:${PORTSDIR}/math/fftw3
|
||||
CONFIGURE_ARGS+= --disable-fftw
|
||||
.endif
|
||||
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
LIB_DEPENDS+= sndfile.1:${PORTSDIR}/audio/libsndfile
|
||||
.elif defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
|
||||
BUILD_DEPENDS += ${LOCALBASE}/lib/libsndfile.so:${PORTSDIR}/audio/libsndfile
|
||||
@ -48,10 +49,10 @@ CONFIGURE_ARGS+= --disable-sndfile
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if defined(NOPORTDOCS)
|
||||
.if empty(PORT_OPTIONS:MDOCS)
|
||||
@${REINPLACE_CMD} -e '/SUBDIRS =/s/doc //' ${WRKSRC}/Makefile.in
|
||||
.endif
|
||||
.if defined(NOPORTEXAMPLES)
|
||||
.if empty(PORT_OPTIONS:MEXAMPLES)
|
||||
@${REINPLACE_CMD} -e '/SUBDIRS =/s/examples //' ${WRKSRC}/Makefile.in
|
||||
.endif
|
||||
|
||||
|
@ -35,22 +35,24 @@ MAN1= sndfile-concat.1 sndfile-cmp.1 sndfile-convert.1 \
|
||||
PORTDOCS= AUTHORS ChangeLog NEWS README libsndfile.css \
|
||||
new_file_type.HOWTO libsndfile.jpg *.html
|
||||
|
||||
OPTIONS= CPU_CLIP "Allow machine-dependent clipping" off \
|
||||
EXTERNAL "Enable FLAC and Ogg Vorbis support" on
|
||||
OPTIONS_DEFINE= CPU_CLIP EXTERNAL DOCS
|
||||
OPTIONS_DEFAULT= EXTERNAL
|
||||
CPU_CLIP_DESC= Allow machine-dependent clipping
|
||||
EXTERNAL_DESC= Enable FLAC and Ogg Vorbis support
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !defined(WITH_CPU_CLIP)
|
||||
CONFIGURE_ARGS+= --disable-cpu-clip
|
||||
.else
|
||||
.if ${PORT_OPTIONS:MCPU_CLIP}
|
||||
MANUAL_PACKAGE_BUILD= WITH_CPU_CLIP may customize the package for the build machine
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-cpu-clip
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_EXTERNAL)
|
||||
CONFIGURE_ARGS+=--disable-external-libs
|
||||
.else
|
||||
.if ${PORT_OPTIONS:MEXTERNAL}
|
||||
LIB_DEPENDS+= FLAC.10:${PORTSDIR}/audio/flac \
|
||||
vorbis.4:${PORTSDIR}/audio/libvorbis
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-external-libs
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@ -61,7 +63,7 @@ check regression-test test: build
|
||||
check
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${TAR} -C ${WRKSRC}/doc --exclude "*Makefile*" --exclude "*.in" \
|
||||
-cf - . | ${TAR} -C ${DOCSDIR} --unlink -xf -
|
||||
|
@ -20,11 +20,13 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}${SVGPNG}
|
||||
NO_BUILD= yes
|
||||
PLIST= ${WRKDIR}/pkg-plist
|
||||
|
||||
OPTIONS= PNG "Install png files" on
|
||||
OPTIONS_DEFINE= PNG
|
||||
OPTIONS_DEFAULT= PNG
|
||||
PNG_DESC= Install png files
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if !defined(WITHOUT_PNG)
|
||||
.if ${PORT_OPTIONS:MPNG}
|
||||
SVGPNG= -full
|
||||
.else
|
||||
SVGPNG= -svgonly
|
||||
@ -45,4 +47,4 @@ do-install:
|
||||
@${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
|
||||
@${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user