Date: Sun, 3 Aug 2014 21:35:43 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r363939 - in head/devel: . libftdi1 libftdi1/files Message-ID: <53deab2f.52f1.5196bda0@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Sun Aug 3 21:35:42 2014 New Revision: 363939 URL: http://svnweb.freebsd.org/changeset/ports/363939 QAT: https://qat.redports.org/buildarchive/r363939/ Log: New port: devel/libftdi1 Talking to FTDI's FT2232C, FT232BM and FT245BM type chips including the popular bitbang mode, using libusb. WWW: http://www.intra2net.com/en/developer/libftdi/ Please note that this is an updated version of devel/libftdi, but dependencies require both versions to be available for a while. PR: 191656 Submitted by: uffe@uffe.org Added: head/devel/libftdi1/ head/devel/libftdi1/Makefile (contents, props changed) head/devel/libftdi1/distinfo (contents, props changed) head/devel/libftdi1/files/ head/devel/libftdi1/files/patch-CMakeLists.txt (contents, props changed) head/devel/libftdi1/files/patch-cmake__FindUSB1.cmake (contents, props changed) head/devel/libftdi1/files/patch-examples__CMakeLists.txt (contents, props changed) head/devel/libftdi1/pkg-descr (contents, props changed) head/devel/libftdi1/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Sun Aug 3 21:25:42 2014 (r363938) +++ head/devel/Makefile Sun Aug 3 21:35:42 2014 (r363939) @@ -1007,6 +1007,7 @@ SUBDIR += libfortuna SUBDIR += libfreefare SUBDIR += libftdi + SUBDIR += libftdi1 SUBDIR += libg19 SUBDIR += libg19draw SUBDIR += libgalago Added: head/devel/libftdi1/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/Makefile Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,72 @@ +# $FreeBSD$ + +PORTNAME= libftdi1 +PORTVERSION= 1.1 +CATEGORIES= devel +MASTER_SITES= http://www.intra2net.com/en/developer/libftdi/download/ + +MAINTAINER= uffe@uffe.org +COMMENT= Library (using libusb) to talk to FTDI chips + +LICENSE= GPLv2 + +LIB_DEPENDS= libconfuse.so:${PORTSDIR}/devel/libconfuse + +OPTIONS_DEFINE= PYTHON BOOST DOCS EXAMPLES +OPTIONS_DEFAULT= PYTHON BOOST DOCS EXAMPLES +OPTIONS_SUB= yes + +BOOST_DESC= Build with boost +PYTHON_DESC= Build Python bindings + +USES= pathfix pkgconfig cmake tar:bzip2 +USE_LDCONFIG= yes + +PORTDOCS= COPYING.LIB ChangeLog README + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MDOCS} +CMAKE_ARGS+= -DDOCUMENTATION:BOOL=true +.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} +USE_PYTHON= 2 +CMAKE_ARGS+= -DPYTHON_BINDINGS:BOOL=true +BUILD_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20 +.else +CMAKE_ARGS+= -DPYTHON_BINDINGS:BOOL=false +.endif + +.if ${PORT_OPTIONS:MBOOST} +CMAKE_ARGS+= -DFTDIPP:BOOL=true +LIB_DEPENDS+= libboost_system.so:${PORTSDIR}/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 +.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} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ +.endif + +.include <bsd.port.mk> Added: head/devel/libftdi1/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/distinfo Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,2 @@ +SHA256 (libftdi1-1.1.tar.bz2) = c0b1af1a13e2c6682a1d8041e5b164a1e0d90267cd378bb51e059bd62f821e21 +SIZE (libftdi1-1.1.tar.bz2) = 99690 Added: head/devel/libftdi1/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/files/patch-CMakeLists.txt Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2014-08-02 12:32:47.000000000 +0200 ++++ CMakeLists.txt 2014-08-02 12:34:30.000000000 +0200 +@@ -168,7 +168,7 @@ + configure_file(${CMAKE_SOURCE_DIR}/libftdi1.pc.in ${CMAKE_BINARY_DIR}/libftdi1.pc @ONLY) + configure_file(${CMAKE_SOURCE_DIR}/libftdipp1.pc.in ${CMAKE_BINARY_DIR}/libftdipp1.pc @ONLY) + install(FILES ${CMAKE_BINARY_DIR}/libftdi1.pc ${CMAKE_BINARY_DIR}/libftdipp1.pc +- DESTINATION lib${LIB_SUFFIX}/pkgconfig) ++ DESTINATION libdata${LIB_SUFFIX}/pkgconfig) + + if (UNIX OR MINGW) + configure_file ( libftdi1-config.in ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config @ONLY ) Added: head/devel/libftdi1/files/patch-cmake__FindUSB1.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/files/patch-cmake__FindUSB1.cmake Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,11 @@ +--- cmake/FindUSB1.cmake.orig 2014-08-02 12:05:59.000000000 +0200 ++++ cmake/FindUSB1.cmake 2014-08-02 12:06:34.000000000 +0200 +@@ -26,7 +26,7 @@ + PATH_SUFFIXES libusb-1.0 + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 usb + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) Added: head/devel/libftdi1/files/patch-examples__CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/files/patch-examples__CMakeLists.txt Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,13 @@ +--- examples/CMakeLists.txt.orig 2014-08-03 23:07:13.000000000 +0200 ++++ examples/CMakeLists.txt 2014-08-03 23:08:06.000000000 +0200 +@@ -36,8 +36,8 @@ + if(FTDI_BUILD_CPP) + if(Boost_FOUND) + message(STATUS "Building libftdi++ examples.") +- include_directories(BEFORE ${CMAKE_SOURCE_DIR}/ftdipp +- ${Boost_INCLUDE_DIRS}) ++ include_directories(BEFORE ${CMAKE_SOURCE_DIR}/ftdipp) ++ include_directories(AFTER ${Boost_INCLUDE_DIRS}) + + # Target + add_executable(find_all_pp find_all_pp.cpp) Added: head/devel/libftdi1/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/pkg-descr Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,7 @@ +libftdi1 - A library (using libusb) to talk to FTDI's FT2232C, +FT232BM and FT245BM type chips including the popular bitbang mode. + +Note: When you get a -5 error "can't claim usb device" during +ftdi_usb_open(), make sure the kernel ftdi_sio driver is unloaded. + +WWW: http://www.intra2net.com/en/developer/libftdi/ Added: head/devel/libftdi1/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libftdi1/pkg-plist Sun Aug 3 21:35:42 2014 (r363939) @@ -0,0 +1,36 @@ +bin/ftdi_eeprom +bin/libftdi1-config +bin/ftdi1_baud_test_example +bin/ftdi1_bitbang2_example +bin/ftdi1_bitbang_cbus_example +bin/ftdi1_bitbang_example +bin/ftdi1_bitbang_ft2232_example +bin/ftdi1_eeprom_example +bin/ftdi1_find_all_example +%%BOOST%%bin/ftdi1_find_all_pp_example +bin/ftdi1_serial_test_example +bin/ftdi1_simple_example +bin/ftdi1_stream_test_example +libdata/pkgconfig/libftdi1.pc +libdata/pkgconfig/libftdipp1.pc +lib/cmake/libftdi1/LibFTDI1Config.cmake +lib/cmake/libftdi1/UseLibFTDI1.cmake +@dirrmtry lib/cmake/libftdi1 +@dirrmtry lib/cmake +include/libftdi1/ftdi.h +%%BOOST%%include/libftdi1/ftdi.hpp +@dirrmtry include/libftdi1 +lib/libftdi1.a +lib/libftdi1.so +lib/libftdi1.so.2 +lib/libftdi1.so.2.1.0 +%%BOOST%%lib/libftdipp1.a +%%BOOST%%lib/libftdipp1.so +%%BOOST%%lib/libftdipp1.so.2 +%%BOOST%%lib/libftdipp1.so.2.1.0 +%%PYTHON%%%%PYTHON_SITELIBDIR%%/_ftdi1.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/ftdi1.py +%%PYTHON%%share/libftdi/examples/complete.py +%%PYTHON%%share/libftdi/examples/simple.py +%%PYTHON%%@dirrmtry share/libftdi/examples +%%PYTHON%%@dirrmtry share/libftdi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53deab2f.52f1.5196bda0>