diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-03 21:35:42 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-03 21:35:42 +0000 |
commit | 8f510cdc6d3c116680405042ea6de70b26a416f0 (patch) | |
tree | c3b41266865b137b7ff603a20c536d0fe9ccb46e | |
parent | 3c0a036bf73f0dc3e761f04887d33207184341e9 (diff) | |
download | ports-8f510cdc6d3c116680405042ea6de70b26a416f0.tar.gz ports-8f510cdc6d3c116680405042ea6de70b26a416f0.zip |
Notes
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/libftdi1/Makefile | 72 | ||||
-rw-r--r-- | devel/libftdi1/distinfo | 2 | ||||
-rw-r--r-- | devel/libftdi1/files/patch-CMakeLists.txt | 11 | ||||
-rw-r--r-- | devel/libftdi1/files/patch-cmake__FindUSB1.cmake | 11 | ||||
-rw-r--r-- | devel/libftdi1/files/patch-examples__CMakeLists.txt | 13 | ||||
-rw-r--r-- | devel/libftdi1/pkg-descr | 7 | ||||
-rw-r--r-- | devel/libftdi1/pkg-plist | 36 |
8 files changed, 153 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index fc675cadff12..787529b7f853 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1007,6 +1007,7 @@ SUBDIR += libfortuna SUBDIR += libfreefare SUBDIR += libftdi + SUBDIR += libftdi1 SUBDIR += libg19 SUBDIR += libg19draw SUBDIR += libgalago diff --git a/devel/libftdi1/Makefile b/devel/libftdi1/Makefile new file mode 100644 index 000000000000..e5855a947a89 --- /dev/null +++ b/devel/libftdi1/Makefile @@ -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> diff --git a/devel/libftdi1/distinfo b/devel/libftdi1/distinfo new file mode 100644 index 000000000000..e6addfddea45 --- /dev/null +++ b/devel/libftdi1/distinfo @@ -0,0 +1,2 @@ +SHA256 (libftdi1-1.1.tar.bz2) = c0b1af1a13e2c6682a1d8041e5b164a1e0d90267cd378bb51e059bd62f821e21 +SIZE (libftdi1-1.1.tar.bz2) = 99690 diff --git a/devel/libftdi1/files/patch-CMakeLists.txt b/devel/libftdi1/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..83bb5ffe5d60 --- /dev/null +++ b/devel/libftdi1/files/patch-CMakeLists.txt @@ -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 ) diff --git a/devel/libftdi1/files/patch-cmake__FindUSB1.cmake b/devel/libftdi1/files/patch-cmake__FindUSB1.cmake new file mode 100644 index 000000000000..4ca87bb1c046 --- /dev/null +++ b/devel/libftdi1/files/patch-cmake__FindUSB1.cmake @@ -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) diff --git a/devel/libftdi1/files/patch-examples__CMakeLists.txt b/devel/libftdi1/files/patch-examples__CMakeLists.txt new file mode 100644 index 000000000000..8cb42fc63c86 --- /dev/null +++ b/devel/libftdi1/files/patch-examples__CMakeLists.txt @@ -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) diff --git a/devel/libftdi1/pkg-descr b/devel/libftdi1/pkg-descr new file mode 100644 index 000000000000..b1a9fb861a61 --- /dev/null +++ b/devel/libftdi1/pkg-descr @@ -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/ diff --git a/devel/libftdi1/pkg-plist b/devel/libftdi1/pkg-plist new file mode 100644 index 000000000000..87387fd892c6 --- /dev/null +++ b/devel/libftdi1/pkg-plist @@ -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 |