aboutsummaryrefslogtreecommitdiff
path: root/comms/usbmuxd
diff options
context:
space:
mode:
authorAlberto Villa <avilla@FreeBSD.org>2012-04-18 23:23:10 +0000
committerAlberto Villa <avilla@FreeBSD.org>2012-04-18 23:23:10 +0000
commit85a578b04914f9cfa0be8c5989351394b288c065 (patch)
treef4f2ca899216a2baf0479155a2df26f838de02fa /comms/usbmuxd
parent21dc63c9a680af5b1b8cd331cb1ab03ec05edc2f (diff)
downloadports-85a578b04914f9cfa0be8c5989351394b288c065.tar.gz
ports-85a578b04914f9cfa0be8c5989351394b288c065.zip
Notes
Diffstat (limited to 'comms/usbmuxd')
-rw-r--r--comms/usbmuxd/Makefile26
-rw-r--r--comms/usbmuxd/files/patch-Modules__FindInotify.cmake30
-rw-r--r--comms/usbmuxd/files/patch-libusbmuxd__CMakeLists.txt26
3 files changed, 74 insertions, 8 deletions
diff --git a/comms/usbmuxd/Makefile b/comms/usbmuxd/Makefile
index 2302ae77b218..a14557e2d64c 100644
--- a/comms/usbmuxd/Makefile
+++ b/comms/usbmuxd/Makefile
@@ -6,12 +6,12 @@
PORTNAME= usbmuxd
PORTVERSION= 1.0.7
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= comms
-MASTER_SITES= http://marcansoft.com/uploads/${PORTNAME}/
+MASTER_SITES= http://www.libimobiledevice.org/downloads/
MAINTAINER= avilla@FreeBSD.org
-COMMENT= A daemon for multiplexing connections over USB to an iPhone/iPod Touch
+COMMENT= Daemon for multiplexing connections over USB to an iPhone/iPod Touch
LIB_DEPENDS= plist.1:${PORTSDIR}/devel/libplist
@@ -22,18 +22,28 @@ USE_LDCONFIG= yes
PORTDOCS= AUTHORS README README.devel
-.include <bsd.port.pre.mk>
+OPTIONS= INOTIFY "Use inotify instead of polling (saves energy)" off
+
+.include <bsd.port.options.mk>
+
+.ifdef(WITH_INOTIFY)
+LIB_DEPENDS+= inotify.0:${PORTSDIR}/devel/libinotify
+.else
+CMAKE_ARGS+= -DWANT_INOTIFY:BOOL=FALSE
+.endif
.if ${OSVERSION} <= 800107 || ${OSVERSION} >= 900000 && ${OSVERSION} <= 900002
-BROKEN= requires libusb 1.0.3
+IGNORE= requires libusb 1.0.3
.endif
pre-configure:
- ${REINPLACE_CMD} -e 's|$${LIB_SUFFIX}/pkgconfig|data/pkgconfig|' \
+ ${REINPLACE_CMD} -e 's,$${LIB_SUFFIX}/pkgconfig,data/pkgconfig,' \
${WRKSRC}/CMakeLists.txt
+ ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
+ ${WRKSRC}/Modules/FindInotify.cmake
pre-install:
- ${REINPLACE_CMD} -e '1 s|python|env python|' \
+ ${REINPLACE_CMD} -e '1 s,python,env python,' \
${WRKSRC}/python-client/*.py
post-install:
@@ -47,4 +57,4 @@ post-install:
.endfor
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/comms/usbmuxd/files/patch-Modules__FindInotify.cmake b/comms/usbmuxd/files/patch-Modules__FindInotify.cmake
new file mode 100644
index 000000000000..c1f4b25798ec
--- /dev/null
+++ b/comms/usbmuxd/files/patch-Modules__FindInotify.cmake
@@ -0,0 +1,30 @@
+--- ./Modules/FindInotify.cmake.orig 2012-04-18 16:08:32.799038053 +0200
++++ ./Modules/FindInotify.cmake 2012-04-18 16:18:43.588979805 +0200
+@@ -1,11 +1,20 @@
+-set(INOTIFY_H "NOTFOUND")
+-find_file(INOTIFY_H
+- "sys/inotify.h"
+- PATHS ENV INCLUDE
++find_path(INOTIFY_INCLUDE_DIR
++ NAMES sys/inotify.h
++ PATHS
++ /usr/local/include
++ /usr/include
+ )
+
+-if (INOTIFY_H)
++find_library(INOTIFY_LIBRARY
++ NAMES inotify
++ PATHS
++ /usr/local/lib
++ /usr/lib
++ /lib
++)
++
++if(INOTIFY_INCLUDE_DIR AND INOTIFY_LIBRARY)
+ set(INOTIFY_FOUND TRUE)
+-else()
++else(INOTIFY_INCLUDE_DIR AND INOTIFY_LIBRARY)
+ set(INOTIFY_FOUND FALSE)
+-endif()
++endif(INOTIFY_INCLUDE_DIR AND INOTIFY_LIBRARY)
diff --git a/comms/usbmuxd/files/patch-libusbmuxd__CMakeLists.txt b/comms/usbmuxd/files/patch-libusbmuxd__CMakeLists.txt
new file mode 100644
index 000000000000..577b5c193eb6
--- /dev/null
+++ b/comms/usbmuxd/files/patch-libusbmuxd__CMakeLists.txt
@@ -0,0 +1,26 @@
+--- ./libusbmuxd/CMakeLists.txt.orig 2012-04-18 16:20:48.468900320 +0200
++++ ./libusbmuxd/CMakeLists.txt 2012-04-18 16:27:25.439000508 +0200
+@@ -2,17 +2,20 @@
+ find_package(Threads)
+
+ option(WANT_INOTIFY "Build with inotify support" ON)
++
++add_library (libusbmuxd SHARED libusbmuxd.c sock_stuff.c ${CMAKE_SOURCE_DIR}/common/utils.c)
++find_library (PTHREAD pthread)
++
+ if (WANT_INOTIFY)
+ find_package(Inotify)
+ if (INOTIFY_FOUND)
+ add_definitions("-DHAVE_INOTIFY")
++ include_directories(${INOTIFY_INCLUDE_DIR})
++ target_link_libraries(libusbmuxd ${INOTIFY_LIBRARY})
+ message("-- libusbmuxd will be built with inotify support")
+ endif()
+ endif(WANT_INOTIFY)
+
+-add_library (libusbmuxd SHARED libusbmuxd.c sock_stuff.c ${CMAKE_SOURCE_DIR}/common/utils.c)
+-find_library (PTHREAD pthread)
+-
+ if (HAVE_PLIST)
+ add_definitions("-DHAVE_PLIST")
+ message("-- libusbmuxd will be built with protocol version 1 support")