mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
- Update MASTER_SITES to https
- Switch to options helpers, CMAKE_BOOL, PORTEXAMPLES - Install examples into designated EXAMPLESDIR, instead of bin/ - Fix inability to enable PYTHON and DOCS at the same time PR: 252922 Submitted by: amdmi3 Approved by: maintainer timeout (bsam, 2 weeks)
This commit is contained in:
parent
cf482f760d
commit
736061b91b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=564721
@ -2,9 +2,9 @@
|
||||
|
||||
PORTNAME= libftdi1
|
||||
PORTVERSION= 1.5
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.intra2net.com/en/developer/libftdi/download/
|
||||
MASTER_SITES= https://www.intra2net.com/en/developer/libftdi/download/
|
||||
|
||||
MAINTAINER= bsam@FreeBSD.org
|
||||
COMMENT= Library (using libusb) to talk to FTDI chips
|
||||
@ -21,6 +21,10 @@ LIB_DEPENDS= libconfuse.so:devel/libconfuse
|
||||
USES= cmake:insource compiler:c++11-lang gettext-runtime pkgconfig tar:bzip2
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
PORTDOCS= ChangeLog README
|
||||
PORTEXAMPLES= baud_test bitbang bitbang2 bitbang_cbus bitbang_ft2232 \
|
||||
eeprom find_all serial_test simple stream_test
|
||||
|
||||
OPTIONS_DEFINE= PYTHON BOOST DOCS EXAMPLES
|
||||
OPTIONS_DEFAULT=PYTHON BOOST
|
||||
OPTIONS_SUB= yes
|
||||
@ -28,53 +32,26 @@ OPTIONS_SUB= yes
|
||||
BOOST_DESC= Build with boost
|
||||
PYTHON_DESC= Build Python bindings
|
||||
|
||||
PORTDOCS= ChangeLog README
|
||||
EXAMPLES_CMAKE_BOOL= EXAMPLES
|
||||
|
||||
PYTHON_USES= python
|
||||
PYTHON_CMAKE_BOOL= PYTHON_BINDINGS
|
||||
PYTHON_BUILD_DEPENDS= swig:devel/swig
|
||||
|
||||
BOOST_CMAKE_BOOL= FTDIPP
|
||||
BOOST_LIB_DEPENDS= libboost_system.so:devel/boost-libs
|
||||
BOOST_PORTEXAMPLES= find_all_pp
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
CMAKE_ARGS+= -DDOCUMENTATION:BOOL=true \
|
||||
-DPYTHON_BINDINGS:BOOL=false
|
||||
.else
|
||||
CMAKE_ARGS+= -DDOCUMENTATION:BOOL=false
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
CMAKE_ARGS+= -DEXAMPLES:BOOL=true
|
||||
.else
|
||||
CMAKE_ARGS+= -DEXAMPLES:BOOL=false
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
USES+= python
|
||||
CMAKE_ARGS+= -DPYTHON_BINDINGS:BOOL=true \
|
||||
-DDOCUMENTATION:BOOL=false
|
||||
BUILD_DEPENDS+= swig:devel/swig
|
||||
.else
|
||||
CMAKE_ARGS+= -DPYTHON_BINDINGS:BOOL=false
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MBOOST}
|
||||
CMAKE_ARGS+= -DFTDIPP:BOOL=true
|
||||
LIB_DEPENDS+= libboost_system.so:devel/boost-libs
|
||||
.else
|
||||
CMAKE_ARGS+= -DFTDIPP:BOOL=false
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
.for fname in baud_test bitbang bitbang2 bitbang_cbus bitbang_ft2232 eeprom find_all serial_test simple stream_test
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/examples/${fname} ${STAGEDIR}${PREFIX}/bin/ftdi1_${fname}_example
|
||||
post-install-EXAMPLES-on:
|
||||
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
.for fname in ${PORTEXAMPLES}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/examples/${fname} ${STAGEDIR}${EXAMPLESDIR}/
|
||||
.endfor
|
||||
.if ${PORT_OPTIONS:MBOOST}
|
||||
.for fname in find_all_pp
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/examples/${fname} ${STAGEDIR}${PREFIX}/bin/ftdi1_${fname}_example
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,16 +1,5 @@
|
||||
bin/ftdi_eeprom
|
||||
bin/libftdi1-config
|
||||
%%EXAMPLES%%bin/ftdi1_baud_test_example
|
||||
%%EXAMPLES%%bin/ftdi1_bitbang2_example
|
||||
%%EXAMPLES%%bin/ftdi1_bitbang_cbus_example
|
||||
%%EXAMPLES%%bin/ftdi1_bitbang_example
|
||||
%%EXAMPLES%%bin/ftdi1_bitbang_ft2232_example
|
||||
%%EXAMPLES%%bin/ftdi1_eeprom_example
|
||||
%%EXAMPLES%%bin/ftdi1_find_all_example
|
||||
%%EXAMPLES%%%%BOOST%%bin/ftdi1_find_all_pp_example
|
||||
%%EXAMPLES%%bin/ftdi1_serial_test_example
|
||||
%%EXAMPLES%%bin/ftdi1_simple_example
|
||||
%%EXAMPLES%%bin/ftdi1_stream_test_example
|
||||
libdata/pkgconfig/libftdi1.pc
|
||||
libdata/pkgconfig/libftdipp1.pc
|
||||
lib/cmake/libftdi1/LibFTDI1Config.cmake
|
||||
|
Loading…
Reference in New Issue
Block a user