Index: audio/forked-daapd/files/patch-libinotify =================================================================== --- /dev/null +++ audio/forked-daapd/files/patch-libinotify @@ -0,0 +1,31 @@ +Check libinotify via pkg-config as it maybe installed in non-default directories + +--- configure.ac.orig 2016-05-06 17:50:14 UTC ++++ configure.ac +@@ -53,7 +53,7 @@ AC_SEARCH_LIBS([pthread_setname_np], [pthread], + AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [Define to 1 if you have pthread_setname_np]), + AC_SEARCH_LIBS([pthread_set_name_np], [pthread], AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [Define to 1 if you have pthread_set_name_np])) + ) +-AC_SEARCH_LIBS([inotify_add_watch], [inotify], [], AC_MSG_ERROR([inotify not found])) ++AC_CHECK_FUNCS([inotify_add_watch],, [PKG_CHECK_MODULES(LIBINOTIFY, [ libinotify ])]) + + dnl Large File Support (LFS) + AC_SYS_LARGEFILE +--- src/Makefile.am.orig 2016-05-06 17:50:14 UTC ++++ src/Makefile.am +@@ -62,13 +62,13 @@ forked_daapd_CPPFLAGS = -D_GNU_SOURCE \ + + forked_daapd_CFLAGS = \ + @ZLIB_CFLAGS@ @AVAHI_CFLAGS@ @SQLITE3_CFLAGS@ @LIBAV_CFLAGS@ \ +- @CONFUSE_CFLAGS@ @MINIXML_CFLAGS@ @LIBPLIST_CFLAGS@ \ ++ @LIBINOTIFY_CFLAGS@ @CONFUSE_CFLAGS@ @MINIXML_CFLAGS@ @LIBPLIST_CFLAGS@ \ + @LIBGCRYPT_CFLAGS@ @GPG_ERROR_CFLAGS@ @ALSA_CFLAGS@ @SPOTIFY_CFLAGS@ \ + @LIBCURL_CFLAGS@ @LIBPROTOBUF_C_CFLAGS@ @GNUTLS_CFLAGS@ @JSON_C_CFLAGS@ + + forked_daapd_LDADD = -lrt \ + @ZLIB_LIBS@ @AVAHI_LIBS@ @SQLITE3_LIBS@ @LIBAV_LIBS@ \ +- @CONFUSE_LIBS@ @LIBEVENT_LIBS@ \ ++ @LIBINOTIFY_LIBS@ @CONFUSE_LIBS@ @LIBEVENT_LIBS@ \ + @MINIXML_LIBS@ @ANTLR3C_LIBS@ @LIBPLIST_LIBS@ \ + @LIBGCRYPT_LIBS@ @GPG_ERROR_LIBS@ @ALSA_LIBS@ @LIBUNISTRING@ @SPOTIFY_LIBS@ \ + @LIBCURL_LIBS@ @LIBPROTOBUF_C_LIBS@ @GNUTLS_LIBS@ @JSON_C_LIBS@ Index: comms/libusbmuxd/Makefile =================================================================== --- comms/libusbmuxd/Makefile +++ comms/libusbmuxd/Makefile @@ -29,8 +29,8 @@ INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify # *_CONFIGURE_WITH can't be used as --with-inotify doesn't work. INOTIFY_CONFIGURE_OFF= --without-inotify -INOTIFY_CFLAGS= -I${LOCALBASE}/include -INOTIFY_LDFLAGS= -L${LOCALBASE}/lib -linotify +INOTIFY_CPPFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +INOTIFY_LIBS= `pkg-config --libs libinotify 2>/dev/null` post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} Index: comms/smstools3/Makefile =================================================================== --- comms/smstools3/Makefile +++ comms/smstools3/Makefile @@ -13,17 +13,15 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libinotify.so:devel/libinotify - CONFLICTS= gnokii-[0-9]* smstools-2.* sendsms-[0-9]* -OPTIONS_DEFINE= STATS UTF8 EXAMPLES DOCS -OPTIONS_DEFAULT= STATS UTF8 +OPTIONS_DEFINE= INOTIFY STATS UTF8 EXAMPLES DOCS +OPTIONS_DEFAULT= INOTIFY STATS UTF8 STATS_DESC= Build status and statistics support WRKSRC= ${WRKDIR}/smstools3 -USES= gmake localbase:ldflags shebangfix +USES= gmake shebangfix SHEBANG_FILES= scripts/hex2dec scripts/hex2bin SHEBANG_LANG= awk awk_OLD_CMD= /bin/gawk @@ -40,11 +38,17 @@ SMSD_USER="${SMSD_USER}" SMSD_GROUP="${SMSD_GROUP}" SUB_FILES= pkg-install pkg-deinstall -LDFLAGS+= -linotify - PORTDOCS= * PORTEXAMPLES= .procmailrc .qmailrc * +INOTIFY_DESC= Outgoing directory notifier +INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify +INOTIFY_USES= pkgconfig +INOTIFY_CFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +INOTIFY_LDFLAGS= `pkg-config --libs libinotify 2>/dev/null` +INOTIFY_CFLAGS_OFF= -DDISABLE_INOTIFY + +STATS_USES= localbase:ldflags STATS_LIB_DEPENDS= libmm.so:devel/mm STATS_CFLAGS_OFF= -DNOSTATS Index: deskutils/nextcloudclient/files/patch-cmake_modules_FindINotify.cmake =================================================================== --- /dev/null +++ deskutils/nextcloudclient/files/patch-cmake_modules_FindINotify.cmake @@ -0,0 +1,11 @@ +--- cmake/modules/FindINotify.cmake.orig 2018-12-26 01:50:50 UTC ++++ cmake/modules/FindINotify.cmake +@@ -10,7 +10,7 @@ + # INOTIFY_LIBRARY, where to find the inotify library. + + find_path(INOTIFY_INCLUDE_DIR sys/inotify.h +- PATH_SUFFIXES inotify) ++ PATH_SUFFIXES libinotify inotify) + mark_as_advanced(INOTIFY_INCLUDE_DIR) + + find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify) Index: deskutils/nextcloudclient/files/patch-src_gui_CMakeLists.txt =================================================================== --- /dev/null +++ deskutils/nextcloudclient/files/patch-src_gui_CMakeLists.txt @@ -0,0 +1,12 @@ +--- src/gui/CMakeLists.txt.orig 2018-12-26 01:50:50 UTC ++++ src/gui/CMakeLists.txt +@@ -151,6 +151,9 @@ ENDIF() + + IF( NOT WIN32 AND NOT APPLE ) + set(client_SRCS ${client_SRCS} folderwatcher_linux.cpp) ++ if(INOTIFY_FOUND) ++ include_directories(SYSTEM ${INOTIFY_INCLUDE_DIR}) ++ endif() + ENDIF() + IF( WIN32 ) + set(client_SRCS ${client_SRCS} folderwatcher_win.cpp) Index: deskutils/owncloudclient/files/patch-cmake_modules_FindINotify.cmake =================================================================== --- /dev/null +++ deskutils/owncloudclient/files/patch-cmake_modules_FindINotify.cmake @@ -0,0 +1,11 @@ +--- cmake/modules/FindINotify.cmake.orig 2018-03-01 15:17:37 UTC ++++ cmake/modules/FindINotify.cmake +@@ -10,7 +10,7 @@ + # INOTIFY_LIBRARY, where to find the inotify library. + + find_path(INOTIFY_INCLUDE_DIR sys/inotify.h +- PATH_SUFFIXES inotify) ++ PATH_SUFFIXES libinotify inotify) + mark_as_advanced(INOTIFY_INCLUDE_DIR) + + find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify) Index: deskutils/owncloudclient/files/patch-src_gui_CMakeLists.txt =================================================================== --- /dev/null +++ deskutils/owncloudclient/files/patch-src_gui_CMakeLists.txt @@ -0,0 +1,12 @@ +--- src/gui/CMakeLists.txt.orig 2018-03-01 15:17:37 UTC ++++ src/gui/CMakeLists.txt +@@ -142,6 +142,9 @@ ENDIF() + + IF( NOT WIN32 AND NOT APPLE ) + set(client_SRCS ${client_SRCS} folderwatcher_linux.cpp) ++ if(INOTIFY_FOUND) ++ include_directories(SYSTEM ${INOTIFY_INCLUDE_DIR}) ++ endif() + ENDIF() + IF( WIN32 ) + set(client_SRCS ${client_SRCS} folderwatcher_win.cpp) Index: devel/RStudio/Makefile =================================================================== --- devel/RStudio/Makefile +++ devel/RStudio/Makefile @@ -42,8 +42,7 @@ trestletech:plumber:v0.4.6:plumber/dependencies/common/plumber CMAKE_ARGS= -DRSTUDIO_TARGET=Desktop \ - -DFREEBSD_RSTUDIO_VERSION:STRING=${PORTVERSION} \ - -DFREEBSD_LIBDIR:STRING=${PREFIX}/lib + -DFREEBSD_RSTUDIO_VERSION:STRING=${PORTVERSION} CMAKE_ARGS+= -DRSTUDIO_BOOST_SIGNALS_VERSION=2 # until Boost 1.69 or RStudio 1.3 MAKE_ENV= HOME=${WRKDIR} \ ANT_OPTS="-Duser.home=${WRKDIR}" @@ -59,7 +58,6 @@ post-patch: @${REINPLACE_CMD} -e ' \ - s|target_link_libraries(rstudio|target_link_libraries(rstudio procstat|; \ s|get_filename_component|#get_filename_component|; \ s|set(CMAKE_PREFIX_PATH "$${QT_BIN_DIR}//..//lib//cmake")|set(CMAKE_PREFIX_PATH "${LOCALBASE}/lib/cmake")|; \ s|/usr/share/|${PREFIX}/share/|g' \ Index: devel/RStudio/files/patch-src_cpp_core_CMakeLists.txt =================================================================== --- devel/RStudio/files/patch-src_cpp_core_CMakeLists.txt +++ devel/RStudio/files/patch-src_cpp_core_CMakeLists.txt @@ -1,6 +1,6 @@ --- src/cpp/core/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC +++ src/cpp/core/CMakeLists.txt -@@ -143,16 +143,17 @@ if (UNIX) +@@ -149,22 +149,26 @@ if (UNIX) } " HAVE_SCANDIR_POSIX) @@ -8,7 +8,9 @@ # platform introspection check_symbol_exists(SA_NOCLDWAIT "signal.h" HAVE_SA_NOCLDWAIT) check_symbol_exists(SO_PEERCRED "sys/socket.h" HAVE_SO_PEERCRED) -+ set(CMAKE_REQUIRED_LIBRARIES ${FREEBSD_LIBDIR}/libinotify.so) ++ find_path(INOTIFY_INCLUDE_DIRS sys/inotify.h PATH_SUFFIXES libinotify inotify) ++ find_library(INOTIFY_LIBRARIES NAMES inotify) ++ set(CMAKE_REQUIRED_LIBRARIES ${INOTIFY_LIBRARIES}) check_function_exists(inotify_init1 HAVE_INOTIFY_INIT1) + set(CMAKE_REQUIRED_LIBRARIES "") check_function_exists(getpeereid HAVE_GETPEEREID) @@ -21,3 +23,24 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + # find packages and libraries + find_library(PTHREAD_LIBRARIES pthread) + if(NOT APPLE) ++ find_library(PROCSTAT_LIBRARIES procstat) + find_library(UTIL_LIBRARIES util) + find_library(UUID_LIBRARIES uuid) + find_library(RT_LIBRARIES rt) +@@ -177,7 +181,13 @@ if (UNIX) + endif() + + # include directories and libraries ++ set(CORE_INCLUDE_DIRS ++ ${CORE_INCLUDE_DIRS} ++ ${INOTIFY_INCLUDE_DIRS} ++ ) + set (CORE_SYSTEM_LIBRARIES ++ ${INOTIFY_LIBRARIES} ++ ${PROCSTAT_LIBRARIES} + ${PTHREAD_LIBRARIES} + ${UTIL_LIBRARIES} + ${UUID_LIBRARIES} Index: devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt =================================================================== --- devel/RStudio/files/patch-src_cpp_diagnostics_CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- src/cpp/diagnostics/CMakeLists.txt.orig 2018-05-30 06:20:49 UTC -+++ src/cpp/diagnostics/CMakeLists.txt -@@ -62,6 +62,7 @@ endif() - # set link dependencies - target_link_libraries(diagnostics - rstudio-core -+ procstat - ) - if(NOT RSTUDIO_SESSION_WIN64) - install(TARGETS diagnostics DESTINATION ${RSTUDIO_INSTALL_BIN}) Index: devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt =================================================================== --- devel/RStudio/files/patch-src_cpp_server_CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ ---- src/cpp/server/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC -+++ src/cpp/server/CMakeLists.txt -@@ -124,6 +124,9 @@ include_directories( - # define executable - add_executable(rserver ${SERVER_SOURCE_FILES} ${SERVER_HEADER_FILES}) - -+# additional libraries -+target_link_libraries(rserver -L${FREEBSD_LIBDIR} -linotify) -+ - # add origin rpath for suse/sles - if(RSTUDIO_PACKAGE_VARIANT STREQUAL "SLES") - set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) Index: devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt =================================================================== --- devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt +++ devel/RStudio/files/patch-src_cpp_session_CMakeLists.txt @@ -46,16 +46,6 @@ # include files -@@ -362,6 +362,9 @@ endif() - # define executable - add_executable(rsession ${SESSION_SOURCE_FILES} ${SESSION_HEADER_FILES}) - -+# additional libraries -+target_link_libraries(rsession -L${FREEBSD_LIBDIR} -linotify -lprocstat) -+ - # skip libR RPATH at development time - if(RSTUDIO_DEVELOPMENT OR RSTUDIO_RUN_IN_PLACE) - set_target_properties(rsession PROPERTIES SKIP_BUILD_RPATH TRUE) @@ -474,11 +477,11 @@ if (NOT RSTUDIO_SESSION_WIN64) DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources) Index: devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt =================================================================== --- devel/RStudio/files/patch-src_cpp_session_postback_CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- src/cpp/session/postback/CMakeLists.txt.orig 2018-05-31 21:11:21 UTC -+++ src/cpp/session/postback/CMakeLists.txt -@@ -43,6 +43,7 @@ endif() - # set link dependencies - target_link_libraries(rpostback - rstudio-core -+ procstat - ) - - if (RSTUDIO_SERVER) Index: devel/gamin/Makefile =================================================================== --- devel/gamin/Makefile +++ devel/gamin/Makefile @@ -17,8 +17,7 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS?=--with-html-dir=${PREFIX}/share/doc \ --without-python -CPPFLAGS+= -DHAVE_LINUX -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib +CPPFLAGS+= -DHAVE_LINUX INSTALL_TARGET= install-strip CONFLICTS= fam-[0-9]* @@ -40,7 +39,8 @@ .if ${PORT_OPTIONS:MLIBINOTIFY} CONFIGURE_ARGS+=--enable-inotify -LIBS+= -linotify +CPPFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` +LIBS+= `pkg-config --libs libinotify 2>/dev/null` LIB_DEPENDS+= libinotify.so:devel/libinotify .else CONFIGURE_ARGS+=--disable-inotify Index: devel/hs-hinotify/Makefile =================================================================== --- devel/hs-hinotify/Makefile +++ devel/hs-hinotify/Makefile @@ -12,6 +12,7 @@ LIB_DEPENDS= libinotify.so:devel/libinotify +USES= pkgconfig USE_CABAL= async hashable .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" Index: devel/hs-hinotify/files/patch-hinotify.cabal =================================================================== --- devel/hs-hinotify/files/patch-hinotify.cabal +++ devel/hs-hinotify/files/patch-hinotify.cabal @@ -5,7 +5,7 @@ hs-source-dirs: src + if os(freebsd) -+ extra-libraries: inotify ++ pkgconfig-depends: libinotify + test-suite test001 type: exitcode-stdio-1.0 Index: devel/kf5-extra-cmake-modules/Makefile =================================================================== --- devel/kf5-extra-cmake-modules/Makefile +++ devel/kf5-extra-cmake-modules/Makefile @@ -3,7 +3,7 @@ PORTNAME= extra-cmake-modules DISTVERSION= ${KDE_FRAMEWORKS_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel kde kde-frameworks MAINTAINER= kde@FreeBSD.org Index: devel/kf5-extra-cmake-modules/files/patch-find-modules_FindInotify.cmake =================================================================== --- /dev/null +++ devel/kf5-extra-cmake-modules/files/patch-find-modules_FindInotify.cmake @@ -0,0 +1,13 @@ +Similar to https://github.com/owncloud/client/commit/7786f1f9a9b6 + +--- find-modules/FindInotify.cmake.orig 2018-12-20 23:31:37 UTC ++++ find-modules/FindInotify.cmake +@@ -46,7 +46,7 @@ + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #============================================================================= + +-find_path(Inotify_INCLUDE_DIRS sys/inotify.h) ++find_path(Inotify_INCLUDE_DIRS sys/inotify.h PATH_SUFFIXES libinotify inotify) + + if(Inotify_INCLUDE_DIRS) + # On Linux there is no library to link against, on the BSDs there is. Index: devel/libinotify/Makefile =================================================================== --- devel/libinotify/Makefile +++ devel/libinotify/Makefile @@ -3,9 +3,12 @@ PORTNAME= libinotify PORTVERSION= 20180201 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES= 29319b23478a.patch:-p1 + MAINTAINER= sunpoet@FreeBSD.org COMMENT= Kevent based inotify compatible library @@ -13,6 +16,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE GNU_CONFIGURE= yes +CONFIGURE_ARGS= --includedir='$${prefix}/include/${PORTNAME}' INSTALL_TARGET= install-strip USE_LDCONFIG= yes USES= autoreconf libtool Index: devel/libinotify/distinfo =================================================================== --- devel/libinotify/distinfo +++ devel/libinotify/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1517739431 SHA256 (libinotify-kqueue-libinotify-kqueue-20180201_GH0.tar.gz) = 15fa6de8b33bb73717755ce9566f757209a855ca20c93e209c6dfbb1697599b2 SIZE (libinotify-kqueue-libinotify-kqueue-20180201_GH0.tar.gz) = 71808 +SHA256 (29319b23478a.patch) = b1eccbd3bee87804d0bc57a26db89ec719c5d7c19b5c915ea09a9eef43371000 +SIZE (29319b23478a.patch) = 772 Index: devel/libinotify/pkg-plist =================================================================== --- devel/libinotify/pkg-plist +++ devel/libinotify/pkg-plist @@ -1,4 +1,4 @@ -include/sys/inotify.h +include/libinotify/sys/inotify.h lib/libinotify.a lib/libinotify.so lib/libinotify.so.0 Index: java/intellij-fsnotifier/Makefile =================================================================== --- java/intellij-fsnotifier/Makefile +++ java/intellij-fsnotifier/Makefile @@ -19,7 +19,7 @@ GH_PROJECT= fsnotifier GH_TAGNAME= a04fbff6e21d58fea7a3ed2a6a21e53cbef4b7af -USES= compiler:c11 +USES= compiler:c11 pkgconfig .include "${.CURDIR}/../intellij/common.mk" Index: java/intellij-fsnotifier/files/patch-Makefile =================================================================== --- /dev/null +++ java/intellij-fsnotifier/files/patch-Makefile @@ -0,0 +1,16 @@ +Check libinotify via pkg-config as it maybe installed in non-default directories + +--- Makefile.orig 2016-02-20 22:55:55 UTC ++++ Makefile +@@ -3,9 +3,8 @@ SRCS= inotify.c main.c util.c + + CSTD= c11 + CFLAGS+= -Wall -Wextra -Wpedantic -D_DEFAULT_SOURCE +-# For libinotify +-CFLAGS+= -I/usr/local/include +-LDFLAGS+= -L/usr/local/lib -linotify ++CFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` ++LDFLAGS+= `pkg-config --libs libinotify 2>/dev/null` + + MAN= + Index: java/openjdk8/Makefile =================================================================== --- java/openjdk8/Makefile +++ java/openjdk8/Makefile @@ -407,7 +407,6 @@ ${WRKSRC}/configure \ ${WRKSRC}/common/autoconf/toolchain.m4 \ ${WRKSRC}/jdk/make/lib/Awt2dLibraries.gmk \ - ${WRKSRC}/jdk/make/lib/NioLibraries.gmk \ ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \ ${WRKSRC}/jdk/src/share/classes/sun/print/PSPrinterJob.java \ ${WRKSRC}/jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java Index: java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk =================================================================== --- java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk +++ java/openjdk8/files/patch-jdk-make-lib-NioLibraries.gmk @@ -7,8 +7,8 @@ + LinuxWatchService.c \ UnixCopyFile.c \ UnixNativeDispatcher.c -+ BUILD_LIBNIO_CFLAGS += -I%%LOCALBASE%%/include -+ BUILD_LIBNIO_LDFLAGS += -L%%LOCALBASE%%/lib -linotify ++ BUILD_LIBNIO_CFLAGS += $(shell pkg-config --cflags libinotify 2>/dev/null) ++ BUILD_LIBNIO_LDFLAGS += $(shell pkg-config --libs libinotify 2>/dev/null) endif ifeq ($(OPENJDK_TARGET_OS), macosx) Index: lang/mono/Makefile =================================================================== --- lang/mono/Makefile +++ lang/mono/Makefile @@ -19,7 +19,6 @@ BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser \ bash:shells/bash \ cmake>0:devel/cmake -LIB_DEPENDS= libinotify.so:devel/libinotify RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \ ca_root_nss>=0:security/ca_root_nss Index: lang/mono/files/patch-configure.ac =================================================================== --- lang/mono/files/patch-configure.ac +++ lang/mono/files/patch-configure.ac @@ -1,5 +1,20 @@ --- configure.ac.orig 2018-04-18 10:51:42.000000000 +0300 +++ configure.ac 2018-06-24 02:38:19.860780000 +0300 +@@ -1736,14 +1736,6 @@ if test x$host_win32 = xno; then + dnl ***************************** + AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") + +- case "$host" in +- *-*-*freebsd*) +- dnl ***************************** +- dnl *** Checks for libinotify *** +- dnl ***************************** +- AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify") +- esac +- + dnl ******************************* + dnl *** Checks for MSG_NOSIGNAL *** + dnl ******************************* @@ -3271,6 +3271,8 @@ BTLS_PLATFORM=i386 ;; Index: multimedia/kodi/Makefile =================================================================== --- multimedia/kodi/Makefile +++ multimedia/kodi/Makefile @@ -36,7 +36,6 @@ libgpg-error.so:security/libgpg-error \ libgnutls.so:security/gnutls \ libidn.so:dns/libidn \ - libinotify.so:devel/libinotify \ libjasper.so:graphics/jasper \ libltdl.so:devel/libltdl \ liblzo2.so:archivers/lzo2 \ @@ -137,7 +136,10 @@ LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray LIBBLURAY_CONFIGURE_ENABLE= libbluray +LIRC_LIB_DEPENDS= libinotify.so:devel/libinotify LIRC_RUN_DEPENDS= lircd:comms/lirc +LIRC_CPPFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +LIRC_LIBS= `pkg-config --libs libinotify 2>/dev/null` MYSQL_USES= mysql MYSQL_CONFIGURE_ENABLE= mysql Index: multimedia/kodi/files/patch-configure.ac =================================================================== --- multimedia/kodi/files/patch-configure.ac +++ multimedia/kodi/files/patch-configure.ac @@ -85,14 +85,6 @@ elif test "$use_arch" = "arm"; then CFLAGS="$CFLAGS -mno-apcs-stack-check" CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check" -@@ -921,6 +959,7 @@ AC_LANG_POP([C++]) - - # Check inotify availability - AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),) -+AC_CHECK_LIB([inotify], [main],,) - - # Python - if test -z "$PYTHON_NOVERSIONCHECK"; then @@ -1169,12 +1208,13 @@ AS_CASE([x$use_libbluray], ) Index: multimedia/obs-qtwebkit/Makefile =================================================================== --- multimedia/obs-qtwebkit/Makefile +++ multimedia/obs-qtwebkit/Makefile @@ -23,9 +23,6 @@ MAKEFILE= GNUmakefile MAKE_ARGS= OBS_INCLUDE=${LOCALBASE}/include OBS_LIB=${LOCALBASE}/lib -post-patch: - @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/GNUmakefile - do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/obs-plugins/ @${MKDIR} ${STAGEDIR}${PREFIX}/share/obs/obs-plugins/qtwebkit-browser/data/locale Index: multimedia/obs-qtwebkit/files/patch-GNUmakefile =================================================================== --- multimedia/obs-qtwebkit/files/patch-GNUmakefile +++ multimedia/obs-qtwebkit/files/patch-GNUmakefile @@ -1,15 +1,19 @@ -Temporary, see: - -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231108 +Check libinotify via pkg-config as it maybe installed in non-default directories --- GNUmakefile.orig 2018-09-02 22:04:19 UTC +++ GNUmakefile -@@ -5,7 +5,7 @@ ifndef OBS_LIB +@@ -5,12 +5,12 @@ ifndef OBS_LIB OBS_LIB = /usr/lib endif -CXXFLAGS = -std=c++11 -Wall -g -fPIC -I$(OBS_INCLUDE) -I./src $(shell pkg-config --cflags Qt5Widgets) $(shell pkg-config --cflags Qt5WebKit) $(shell pkg-config --cflags Qt5WebKitWidgets) -+CXXFLAGS = -std=c++11 -Wall -g -fPIC -I$(OBS_INCLUDE) -I./src $(shell pkg-config --cflags Qt5Widgets) $(shell pkg-config --cflags Qt5WebKit) -I%%LOCALBASE%%/include/qt5/QtWebKitWidgets ++CXXFLAGS = -std=c++11 -Wall -g -fPIC -I$(OBS_INCLUDE) -I./src $(shell pkg-config --cflags Qt5Widgets) $(shell pkg-config --cflags Qt5WebKit) $(shell pkg-config --cflags Qt5WebKitWidgets) $(shell pkg-config --cflags libinotify 2>/dev/null) CXX ?= c++ RM = /bin/rm -rf LDFLAGS = -L$(OBS_LIB) + LDLIBS_LIB = -lobs -lrt +-LDLIBS_RENDERER = $(shell pkg-config --libs Qt5Widgets) $(shell pkg-config --libs Qt5WebKit) $(shell pkg-config --libs Qt5WebKitWidgets) -lrt -linotify ++LDLIBS_RENDERER = $(shell pkg-config --libs Qt5Widgets) $(shell pkg-config --libs Qt5WebKit) $(shell pkg-config --libs Qt5WebKitWidgets) $(shell pkg-config --libs libinotify 2>/dev/null) -lrt + + LIB = build/qtwebkit-browser.so + LIB_OBJ = build/qtwebkit-main.o build/qtwebkit-source.o build/qtwebkit-manager.o Index: multimedia/tvheadend/Makefile =================================================================== --- multimedia/tvheadend/Makefile +++ multimedia/tvheadend/Makefile @@ -67,7 +67,8 @@ INOTIFY_DESC= File system notifications support INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify INOTIFY_CONFIGURE_ENABLE= inotify -INOTIFY_LDFLAGS= -linotify +INOTIFY_CFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +INOTIFY_LDFLAGS= `pkg-config --libs libinotify 2>/dev/null` TRANSCODING_DESC= Transcoding for mobile and web clients TRANSCODING_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg Index: net-mgmt/seafile-client/files/patch-configure.ac =================================================================== --- net-mgmt/seafile-client/files/patch-configure.ac +++ net-mgmt/seafile-client/files/patch-configure.ac @@ -26,20 +26,18 @@ AM_CONDITIONAL([LINUX], [test "$blinux" = "true"]) -@@ -105,6 +114,8 @@ if test "$bwin32" = true; then +@@ -105,6 +114,7 @@ if test "$bwin32" = true; then LIB_MAC= MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601" LIB_CRYPT32=-lcrypt32 -+ LIB_INOTIFY= + LIB_KVM= elif test "$bmac" = true ; then LIB_WS32= LIB_GDI32= -@@ -119,6 +130,24 @@ elif test "$bmac" = true ; then +@@ -119,6 +130,22 @@ elif test "$bmac" = true ; then LIB_MAC="-framework CoreServices" LIB_CRYPT32= LIB_ICONV=-liconv -+ LIB_INOTIFY= + LIB_KVM= +elif test "$bbsd" = true ; then + LIB_WS32= @@ -55,26 +53,34 @@ + MSVC_CFLAGS= + LIB_CRYPT32= + LIB_ICONV=-liconv -+ LIB_INOTIFY=-linotify + LIB_KVM=-lkvm else LIB_WS32= LIB_GDI32= -@@ -132,6 +161,8 @@ else +@@ -132,6 +161,7 @@ else LIB_MAC= MSVC_CFLAGS= LIB_CRYPT32= -+ LIB_INOTIFY=-linotify + LIB_KVM= fi AC_SUBST(LIB_WS32) -@@ -144,6 +175,8 @@ AC_SUBST(LIB_IPHLPAPI) +@@ -144,6 +175,7 @@ AC_SUBST(LIB_IPHLPAPI) AC_SUBST(LIB_SHELL32) AC_SUBST(LIB_PSAPI) AC_SUBST(LIB_MAC) -+AC_SUBST(LIB_INOTIFY) +AC_SUBST(LIB_KVM) AC_SUBST(MSVC_CFLAGS) AC_SUBST(LIB_CRYPT32) AC_SUBST(LIB_ICONV) +@@ -181,6 +209,10 @@ AC_SUBST(JANSSON_LIBS) + PKG_CHECK_MODULES(LIBEVENT, [libevent >= $LIBEVENT_REQUIRED]) + AC_SUBST(LIBEVENT_CFLAGS) + AC_SUBST(LIBEVENT_LIBS) ++ ++PKG_CHECK_MODULES(LIBINOTIFY, [libinotify],,) ++AC_SUBST(LIBINOTIFY_CFLAGS) ++AC_SUBST(LIBINOTIFY_LIBS) + + PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED]) + AC_SUBST(ZLIB_CFLAGS) Index: net-mgmt/seafile-client/files/patch-daemon_Makefile.am =================================================================== --- net-mgmt/seafile-client/files/patch-daemon_Makefile.am +++ net-mgmt/seafile-client/files/patch-daemon_Makefile.am @@ -1,5 +1,13 @@ --- daemon/Makefile.am.orig 2017-01-15 15:47:19 UTC +++ daemon/Makefile.am +@@ -13,6 +13,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \ + @CURL_CFLAGS@ \ + @BPWRAPPER_CFLAGS@ \ + @GNUTLS_CFLAGS@ \ ++ @LIBINOTIFY_CFLAGS@ \ + -Wall + + bin_PROGRAMS = seaf-daemon @@ -61,6 +61,10 @@ if LINUX wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c endif @@ -11,12 +19,12 @@ if WIN32 wt_monitor_src = wt-monitor.c wt-monitor-win32.c wt-monitor-structs.c endif -@@ -124,6 +128,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/ +@@ -124,6 +129,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/libseafile_com @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ \ $(top_builddir)/common/cdc/libcdc.la \ $(top_builddir)/common/index/libindex.la @LIB_WS32@ @LIB_CRYPT32@ \ - @SEARPC_LIBS@ @CCNET_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ + @SEARPC_LIBS@ @CCNET_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ \ -+ @ZLIB_LIBS@ @CURL_LIBS@ @LIB_INOTIFY@ @BPWRAPPER_LIBS@ ++ @ZLIB_LIBS@ @CURL_LIBS@ @LIBINOTIFY_LIBS@ @BPWRAPPER_LIBS@ seaf_daemon_LDFLAGS = @CONSOLE@ Index: net-mgmt/seafile-server/Makefile =================================================================== --- net-mgmt/seafile-server/Makefile +++ net-mgmt/seafile-server/Makefile @@ -18,7 +18,6 @@ libevhtp.so:www/libevhtp \ libzdb.so:databases/libzdb \ libcurl.so:ftp/curl \ - libinotify.so:devel/libinotify \ libccnet.so:net-mgmt/ccnet-server \ libevent.so:devel/libevent \ libuuid.so:misc/e2fsprogs-libuuid \ Index: net-mgmt/seafile-server/files/patch-configure.ac =================================================================== --- net-mgmt/seafile-server/files/patch-configure.ac +++ net-mgmt/seafile-server/files/patch-configure.ac @@ -38,20 +38,18 @@ AM_CONDITIONAL([LINUX], [test "$blinux" = "true"]) -@@ -134,6 +148,8 @@ if test "$bwin32" = true; then +@@ -134,6 +148,7 @@ if test "$bwin32" = true; then LIB_MAC= MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601" LIB_CRYPT32=-lcrypt32 -+ LIB_INOTIFY= + LIB_KVM= LIB_ICONV=-liconv elif test "$bmac" = true ; then LIB_WS32= -@@ -149,6 +165,24 @@ elif test "$bmac" = true ; then +@@ -149,6 +165,22 @@ elif test "$bmac" = true ; then LIB_MAC="-framework CoreServices" LIB_CRYPT32= LIB_ICONV=-liconv -+ LIB_INOTIFY= + LIB_KVM= +elif test "$bbsd" = true ; then + LIB_WS32= @@ -67,25 +65,22 @@ + MSVC_CFLAGS= + LIB_CRYPT32= + LIB_ICONV=-liconv -+ LIB_INOTIFY=-linotify + LIB_KVM=-lkvm else LIB_WS32= LIB_GDI32= -@@ -162,6 +196,8 @@ else +@@ -162,6 +196,7 @@ else LIB_MAC= MSVC_CFLAGS= LIB_CRYPT32= -+ LIB_INOTIFY=-linotify + LIB_KVM= fi AC_SUBST(LIB_WS32) -@@ -174,6 +210,8 @@ AC_SUBST(LIB_IPHLPAPI) +@@ -174,6 +210,7 @@ AC_SUBST(LIB_IPHLPAPI) AC_SUBST(LIB_SHELL32) AC_SUBST(LIB_PSAPI) AC_SUBST(LIB_MAC) -+AC_SUBST(LIB_INOTIFY) +AC_SUBST(LIB_KVM) AC_SUBST(MSVC_CFLAGS) AC_SUBST(LIB_CRYPT32) Index: net/messagelib/files/patch-messageviewer_src_CMakeLists.txt =================================================================== --- /dev/null +++ net/messagelib/files/patch-messageviewer_src_CMakeLists.txt @@ -0,0 +1,20 @@ +--- messageviewer/src/CMakeLists.txt.orig 2019-01-02 07:43:10 UTC ++++ messageviewer/src/CMakeLists.txt +@@ -28,7 +28,7 @@ endif() + configure_file(config-messageviewer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-messageviewer.h) + + # target_include_directories does not handle empty include paths +-include_directories(${GPGME_INCLUDES}) ++include_directories(SYSTEM ${Inotify_INCLUDE_DIRS} ${GPGME_INCLUDES}) + + if(BUILD_TESTING) + add_subdirectory(header/autotests) +@@ -237,7 +237,7 @@ add_library(KF5MessageViewer ${libmessageviewer_SRCS}) + generate_export_header(KF5MessageViewer BASE_NAME messageviewer) + add_library(KF5::MessageViewer ALIAS KF5MessageViewer) + +-target_include_directories(KF5MessageViewer INTERFACE "$;${Inotify_INCLUDE_DIRS}") ++target_include_directories(KF5MessageViewer INTERFACE "$") + + target_link_libraries(KF5MessageViewer + PUBLIC Index: net/samba46/Makefile =================================================================== --- net/samba46/Makefile +++ net/samba46/Makefile @@ -109,6 +109,7 @@ LIB_DEPENDS+= libpopt.so:devel/popt # inotify LIB_DEPENDS+= libinotify.so:devel/libinotify +CPPFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` # GNUTLS LIB_DEPENDS+= libgnutls.so:security/gnutls # NFS4 ACL glue Index: net/samba47/Makefile =================================================================== --- net/samba47/Makefile +++ net/samba47/Makefile @@ -130,6 +130,7 @@ LIB_DEPENDS+= libpopt.so:devel/popt # inotify LIB_DEPENDS+= libinotify.so:devel/libinotify +CPPFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` # GNUTLS LIB_DEPENDS+= libgnutls.so:security/gnutls # NFS4 ACL glue Index: net/samba48/Makefile =================================================================== --- net/samba48/Makefile +++ net/samba48/Makefile @@ -141,6 +141,7 @@ LIB_DEPENDS+= libpopt.so:devel/popt # inotify LIB_DEPENDS+= libinotify.so:devel/libinotify +CPPFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` # GNUTLS LIB_DEPENDS+= libgnutls.so:security/gnutls # NFS4 ACL glue Index: net/unison/Makefile =================================================================== --- net/unison/Makefile +++ net/unison/Makefile @@ -25,7 +25,7 @@ x11_RUN_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 PLIST_SUB= PORTVERSION=${PORTVERSION} -USES= gmake localbase +USES= gmake USE_OCAML= yes WRKSRC_SUBDIR= src NO_OCAML_RUNDEPENDS=yes @@ -46,6 +46,7 @@ OPTIONS_SUB= YES +FSMONITOR_USES= pkgconfig FSMONITOR_LIB_DEPENDS= libinotify.so:devel/libinotify .if ${FLAVOR} == nox11 Index: net/unison/files/patch-fsmonitor_linux_Makefile =================================================================== --- net/unison/files/patch-fsmonitor_linux_Makefile +++ net/unison/files/patch-fsmonitor_linux_Makefile @@ -1,20 +1,14 @@ --- fsmonitor/linux/Makefile.orig 2017-03-23 16:47:46 UTC +++ fsmonitor/linux/Makefile -@@ -18,6 +18,10 @@ else +@@ -18,6 +18,11 @@ else FSMCAMLLIBS=$(FSMOCAMLLIBS) endif +ifeq ($(OSARCH),FreeBSD) -+ CLIBS+=-cclib -linotify ++ COFLAGS+=$(foreach v, $(shell pkg-config --cflags libinotify 2>/dev/null), -ccopt $v) ++ CLIBS+=$(foreach v, $(shell pkg-config --libs libinotify 2>/dev/null), -cclib $v) +endif + buildexecutable:: $(FSMONITOR)$(EXEC_EXT) $(FSMONITOR)$(EXEC_EXT): $(FSMCAMLOBJS) $(FSMCOBJS) -@@ -26,4 +30,4 @@ $(FSMONITOR)$(EXEC_EXT): $(FSMCAMLOBJS) $(FSMCOBJS) - - clean:: - rm -f $(DIR)/*.cm[iox] $(DIR)/*.o $(DIR)/*~ -- rm -f $(FSMONITOR)$(EXEC_EXT) -\ No newline at end of file -+ rm -f $(FSMONITOR)$(EXEC_EXT) Index: net/unison248/Makefile =================================================================== --- net/unison248/Makefile +++ net/unison248/Makefile @@ -30,7 +30,7 @@ x11_RUN_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 PLIST_SUB= PORTVERSION=${PORTVERSION} VERSIONSUFFIX=${VERSIONSUFFIX} -USES= gmake localbase +USES= gmake USE_OCAML= yes WRKSRC_SUBDIR= src NO_OCAML_RUNDEPENDS=yes @@ -52,6 +52,7 @@ OPTIONS_SUB= YES +FSMONITOR_USES= pkgconfig FSMONITOR_LIB_DEPENDS= libinotify.so:devel/libinotify .if ${FLAVOR} == nox11 Index: net/unison248/files/patch-fsmonitor_linux_Makefile =================================================================== --- net/unison248/files/patch-fsmonitor_linux_Makefile +++ net/unison248/files/patch-fsmonitor_linux_Makefile @@ -1,20 +1,14 @@ --- fsmonitor/linux/Makefile.orig 2017-03-23 16:47:46 UTC +++ fsmonitor/linux/Makefile -@@ -18,6 +18,10 @@ else +@@ -18,6 +18,11 @@ else FSMCAMLLIBS=$(FSMOCAMLLIBS) endif +ifeq ($(OSARCH),FreeBSD) -+ CLIBS+=-cclib -linotify ++ COFLAGS+=$(foreach v, $(shell pkg-config --cflags libinotify 2>/dev/null), -ccopt $v) ++ CLIBS+=$(foreach v, $(shell pkg-config --libs libinotify 2>/dev/null), -cclib $v) +endif + buildexecutable:: $(FSMONITOR)$(EXEC_EXT) $(FSMONITOR)$(EXEC_EXT): $(FSMCAMLOBJS) $(FSMCOBJS) -@@ -26,4 +30,4 @@ $(FSMONITOR)$(EXEC_EXT): $(FSMCAMLOBJS) $(FSMCOBJS) - - clean:: - rm -f $(DIR)/*.cm[iox] $(DIR)/*.o $(DIR)/*~ -- rm -f $(FSMONITOR)$(EXEC_EXT) -\ No newline at end of file -+ rm -f $(FSMONITOR)$(EXEC_EXT) Index: security/ossec-hids-local/Makefile =================================================================== --- security/ossec-hids-local/Makefile +++ security/ossec-hids-local/Makefile @@ -12,7 +12,7 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gmake readline ssl +USES= gmake pkgconfig readline ssl OSSEC_TYPE?= local Index: security/ossec-hids-local/files/patch-src_Makefile =================================================================== --- security/ossec-hids-local/files/patch-src_Makefile +++ security/ossec-hids-local/files/patch-src_Makefile @@ -10,6 +10,17 @@ USE_PRELUDE?=no USE_ZEROMQ?=no USE_GEOIP?=no +@@ -195,8 +198,8 @@ OSSEC_WINDRES =${QUIET_CCBIN}${MING_BASE}windres + ifneq (,$(filter ${USE_INOTIFY},auto yes y Y 1)) + DEFINES+=-DINOTIFY_ENABLED + ifeq (${uname_S},FreeBSD) +- OSSEC_LDFLAGS+=-linotify -L/usr/local/lib -I/usr/local/include +- OSSEC_CFLAGS+=-I/usr/local/include ++ OSSEC_LDFLAGS+=$(shell pkg-config --libs libinotify 2>/dev/null) ++ OSSEC_CFLAGS+=$(shell pkg-config --cflags libinotify 2>/dev/null) + endif + endif + @@ -366,10 +369,10 @@ endif install: install-${TARGET} Index: security/sssd/files/patch-src__external__inotify.m4 =================================================================== --- security/sssd/files/patch-src__external__inotify.m4 +++ security/sssd/files/patch-src__external__inotify.m4 @@ -2,16 +2,17 @@ index 9572f6d..2a5a8cf 100644 --- src/external/inotify.m4 +++ src/external/inotify.m4 -@@ -20,10 +20,10 @@ int main () { +@@ -18,12 +18,7 @@ int main () { + + SSS_AC_EXPAND_LIB_DIR() AS_IF([test x"$inotify_works" != xyes], - [AC_CHECK_LIB([inotify], - [inotify_init], +- [AC_CHECK_LIB([inotify], +- [inotify_init], - [INOTIFY_LIBS="$sss_extra_libdir -linotify" -+ [INOTIFY_LIBS="-L$sss_extra_libdir -linotify" - inotify_works=yes], - [inotify_works=no], +- inotify_works=yes], +- [inotify_works=no], - [$sss_extra_libdir])] -+ [-L$sss_extra_libdir])] ++ [PKG_CHECK_MODULES(INOTIFY, [libinotify])] ) AS_IF([test x"$inotify_works" = xyes], Index: sysutils/conky/Makefile =================================================================== --- sysutils/conky/Makefile +++ sysutils/conky/Makefile @@ -10,7 +10,6 @@ MAINTAINER= madpilot@FreeBSD.org COMMENT?= Advanced, highly configurable system monitor for X11 -LIB_DEPENDS= libinotify.so:devel/libinotify BUILD_DEPENDS= db2x_xsltproc:textproc/docbook2X \ docbook-xsl>=0:textproc/docbook-xsl \ xsltproc:textproc/libxslt @@ -33,12 +32,12 @@ USE_GITHUB= yes GH_ACCOUNT= brndnmtthws -OPTIONS_DEFINE= APCUPSD CURL DOCS EXAMPLES IPV6 METAR MOC MPD NCURSES RSS \ +OPTIONS_DEFINE= APCUPSD CURL DOCS EXAMPLES INOTIFY IPV6 METAR MOC MPD NCURSES RSS \ X11 XMMS2 XOAP OPTIONS_GROUP?= X11 OPTIONS_GROUP_X11= ARGB DOUBLE_BUFFER IMLIB2 XFT XINERAMA LUA_CAIRO LUA_IMLIB2 LUA_RSVG -OPTIONS_DEFAULT?= X11 ARGB DOUBLE_BUFFER XFT +OPTIONS_DEFAULT?= X11 ARGB DOUBLE_BUFFER INOTIFY XFT APCUPSD_DESC= Monitor APCUPSD APCUPSD_CMAKE_BOOL= BUILD_APCUPSD @@ -58,6 +57,12 @@ IMLIB2_LIB_DEPENDS= libImlib2.so:graphics/imlib2 IMLIB2_IMPLIES= X11 +INOTIFY_DESC= Inotify-based auto config reload +INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify +INOTIFY_CMAKE_ON= -DCMAKE_REQUIRED_DEFINITIONS:STRING="${INOTIFY_CFLAGS}" +INOTIFY_CFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +INOTIFY_LDFLAGS= `pkg-config --libs libinotify 2>/dev/null` + IPV6_CMAKE_BOOL= BUILD_IPV6 LUA_CAIRO_DESC= Lua-Cairo binding @@ -129,7 +134,7 @@ -e 's/-D_POSIX_C_SOURCE=200809L/& -D__BSD_VISIBLE=1 -D_XOPEN_SOURCE=700/' \ ${WRKSRC}/cmake/Conky.cmake @${REINPLACE_CMD} -e 's,^set(INCLUDE_SEARCH_PATH \(.*\)),set(INCLUDE_SEARCH_PATH \1 ${LUA_INCDIR}),' \ - -e 's/ -lbsd/ -lintl -linotify/' \ + -e 's/ -lbsd/ -lintl/' \ ${WRKSRC}/cmake/ConkyPlatformChecks.cmake @${REINPLACE_CMD} -e 's,LOCALBASE,${LOCALBASE},' \ ${WRKSRC}/doc/docgen.sh Index: sysutils/incron/Makefile =================================================================== --- sysutils/incron/Makefile +++ sysutils/incron/Makefile @@ -17,11 +17,13 @@ LIB_DEPENDS= libinotify.so:devel/libinotify +USES= pkgconfig USE_GITHUB= indeed GH_ACCOUNT= ar- GH_TAGNAME= 81421d3a8bde0989d7e167d8a814d5232896c930 -CPPFLAGS+= -I${LOCALBASE}/include -D__NR_inotify_init -LDFLAGS+= -L${LOCALBASE}/lib -linotify +CPPFLAGS+= -D__NR_inotify_init +CFLAGS+= `pkg-config --cflags libinotify 2>/dev/null` +LDFLAGS+= `pkg-config --libs libinotify 2>/dev/null` MAKE_ARGS= PREFIX="${PREFIX}" USER=${UID} \ DOCDIR="${PREFIX}/etc" \ MANPATH=${MANPREFIX}/man Index: sysutils/inotify-tools/Makefile =================================================================== --- sysutils/inotify-tools/Makefile +++ sysutils/inotify-tools/Makefile @@ -13,7 +13,7 @@ LIB_DEPENDS= libinotify.so:devel/libinotify -USES= autoreconf gmake libtool localbase +USES= autoreconf gmake libtool pkgconfig USE_GITHUB= yes GH_ACCOUNT= rvoicilas GNU_CONFIGURE= yes Index: sysutils/inotify-tools/files/patch-configure.ac =================================================================== --- sysutils/inotify-tools/files/patch-configure.ac +++ /dev/null @@ -1,10 +0,0 @@ ---- configure.ac.orig 2014-11-09 20:57:04 UTC -+++ configure.ac -@@ -44,6 +44,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], t - - - # Checks for libraries. -+AC_SEARCH_LIBS(inotify_init, inotify) - - # Checks for header files. - AC_CHECK_HEADERS([sys/inotify.h mcheck.h]) Index: sysutils/inotify-tools/files/patch-libinotify =================================================================== --- /dev/null +++ sysutils/inotify-tools/files/patch-libinotify @@ -0,0 +1,49 @@ +Check libinotify via pkg-config as it maybe installed in non-default directories + +--- configure.ac.orig 2018-01-06 11:10:51 UTC ++++ configure.ac +@@ -44,11 +44,16 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], test "$STATIC_B + + + # Checks for libraries. ++AC_CHECK_FUNCS([inotify_init],, [PKG_CHECK_MODULES(LIBINOTIFY, libinotify)]) + + # Checks for header files. + AC_CHECK_HEADERS([sys/inotify.h mcheck.h]) + AC_LANG(C) + AC_MSG_CHECKING([whether sys/inotify.h actually works]) ++ac_save_CFLAGS=$CFLAGS ++ac_save_LIBS=$LIBS ++CFLAGS="$CFLAGS $LIBINOTIFY_CFLAGS" ++LIBS="$LIBS $LIBINOTIFY_LIBS" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[return (-1 == inotify_init());]] +@@ -56,6 +59,8 @@ AC_COMPILE_IFELSE( + [AC_MSG_RESULT([yup]); AC_DEFINE([SYS_INOTIFY_H_EXISTS_AND_WORKS],[1],[sys/inotify.h exists and works correctly])], + [AC_MSG_RESULT([nope, using own inotify headers])] + ) ++CFLAGS=$ac_save_CFLAGS ++LIBS=$ac_save_LIBS + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +--- libinotifytools/src/Makefile.am.orig 2018-01-06 11:10:51 UTC ++++ libinotifytools/src/Makefile.am +@@ -1,6 +1,8 @@ + SUBDIRS = inotifytools + + lib_LTLIBRARIES = libinotifytools.la ++libinotifytools_la_CFLAGS = $(LIBINOTIFY_CFLAGS) ++libinotifytools_la_LIBADD = $(LIBINOTIFY_LIBS) + libinotifytools_la_SOURCES = inotifytools.c inotifytools_p.h redblack.c redblack.h + libinotifytools_la_LDFLAGS = -version-info 4:1:4 + +--- src/Makefile.am.orig 2018-01-06 11:10:51 UTC ++++ src/Makefile.am +@@ -9,3 +9,5 @@ LDADD = ../libinotifytools/src/libinotifytools.la + if STATIC_BINARY_ENABLE + AM_LDFLAGS = -static-libtool-libs + endif ++ ++AM_CFLAGS += $(LIBINOTIFY_CFLAGS) Index: sysutils/lsyncd/Makefile =================================================================== --- sysutils/lsyncd/Makefile +++ sysutils/lsyncd/Makefile @@ -13,7 +13,7 @@ LIB_DEPENDS= libinotify.so:devel/libinotify -USES= cmake localbase lua +USES= cmake lua USE_GITHUB= yes GH_ACCOUNT= axkibe USE_RC_SUBR= lsyncd Index: sysutils/lsyncd/files/patch-CMakeLists.txt =================================================================== --- sysutils/lsyncd/files/patch-CMakeLists.txt +++ sysutils/lsyncd/files/patch-CMakeLists.txt @@ -1,11 +1,21 @@ --- CMakeLists.txt.orig 2018-03-09 12:39:11 UTC +++ CMakeLists.txt +@@ -20,6 +20,9 @@ option( WITH_FSEVENTS "Compile with inotify file notif + + if( WITH_INOTIFY ) + set( LSYNCD_SRC ${LSYNCD_SRC} inotify.c ) ++ find_path(Inotify_INCLUDE_DIRS sys/inotify.h PATH_SUFFIXES libinotify inotify) ++ find_library(Inotify_LIBRARIES NAMES inotify) ++ include_directories( SYSTEM ${Inotify_INCLUDE_DIRS} ) + endif( WITH_INOTIFY ) + + if( WITH_FSEVENTS ) @@ -104,8 +104,8 @@ add_custom_target( tests # compiling and linking it all together add_executable( lsyncd ${LSYNCD_SRC} ) -target_link_libraries( lsyncd ${LUA_LIBRARIES} ) -+target_link_libraries( lsyncd ${LUA_LIBRARIES} /usr/local/lib/libinotify.so ) ++target_link_libraries( lsyncd ${LUA_LIBRARIES} ${Inotify_LIBRARIES} ) -install( TARGETS lsyncd RUNTIME DESTINATION bin ) -install( FILES doc/manpage/lsyncd.1 DESTINATION man ) Index: x11-fm/qtfm/Makefile =================================================================== --- x11-fm/qtfm/Makefile +++ x11-fm/qtfm/Makefile @@ -18,7 +18,7 @@ LIB_DEPENDS= libinotify.so:devel/libinotify -USES= dos2unix qmake qt:4 +USES= dos2unix pkgconfig qmake qt:4 DOS2UNIX_REGEX= .*\.(h|cpp) USE_QT= gui network moc_build rcc_build \ imageformats_run Index: x11-fm/qtfm/files/patch-qtfm.pro =================================================================== --- x11-fm/qtfm/files/patch-qtfm.pro +++ x11-fm/qtfm/files/patch-qtfm.pro @@ -1,11 +1,13 @@ --- qtfm.pro.orig 2012-06-04 19:48:11.000000000 +0800 +++ qtfm.pro 2018-07-22 18:29:04.602178000 +0800 -@@ -31,7 +31,7 @@ - CONFIG += release warn_off thread +@@ -32,6 +32,10 @@ RESOURCES += resources.qrc QT+= network --LIBS += -lmagic -+LIBS += -lmagic -linotify + LIBS += -lmagic ++ ++# Also look for inotify shim on BSDs ++CONFIG += link_pkgconfig ++packagesExist(libinotify): PKGCONFIG += libinotify TARGET = qtfm target.path = /usr/bin Index: x11-fm/worker/Makefile =================================================================== --- x11-fm/worker/Makefile +++ x11-fm/worker/Makefile @@ -38,7 +38,8 @@ HAL_USES= gettext-runtime INOTIFY_LIB_DEPENDS= libinotify.so:devel/libinotify -INOTIFY_LDFLAGS= -L${LOCALBASE}/lib +INOTIFY_CPPFLAGS= `pkg-config --cflags libinotify 2>/dev/null` +INOTIFY_LIBS= `pkg-config --libs libinotify 2>/dev/null` LUA_CONFIGURE_OFF= --disable-lua LUA_USES= lua:51 Index: x11-toolkits/gtk-sharp30/Makefile =================================================================== --- x11-toolkits/gtk-sharp30/Makefile +++ x11-toolkits/gtk-sharp30/Makefile @@ -14,7 +14,6 @@ LICENSE= LGPL20 LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libinotify.so:devel/libinotify RUN_DEPENDS= p5-XML-LibXML>=0:textproc/p5-XML-LibXML GNU_CONFIGURE= yes