motion: Update to 4.2
authorRosen Penev <redacted>
Tue, 6 Nov 2018 04:23:17 +0000 (20:23 -0800)
committerRosen Penev <redacted>
Tue, 6 Nov 2018 04:38:56 +0000 (20:38 -0800)
Signed-off-by: Rosen Penev <redacted>
multimedia/motion/Makefile
multimedia/motion/patches/010-Initialize-the-thread-at-start-of-main.patch [deleted file]

index 8b3ca6fd47309ef3a2b787ffe94613c8eb7fee1d..534a0c6241cf402e4bcadac978a56420b8d36e1c 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=motion
-PKG_VERSION:=4.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=4.2
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
 PKG_LICENSE:=GPLv2
@@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
-PKG_HASH:=2074b935bdfe28f84c2c3233274b06908336778f303bb13530d4299c3f8aa4e2
+PKG_HASH:=6ef8504fc5be00a49c82c4045c0004fbf575d9a5df8687025a9b06923efda2a9
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
 
 PKG_BUILD_PARALLEL:=1
@@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/motion
   SECTION:=multimedia
   CATEGORY:=Multimedia
-  DEPENDS:=+libjpeg +libpthread
+  DEPENDS:=+libjpeg +libpthread +libmicrohttpd
   TITLE:=webcam motion sensing and logging
   URL:=https://motion-project.github.io/
 endef
@@ -45,6 +45,7 @@ CONFIGURE_ARGS+= \
        --without-mysql \
        --without-pgsql \
        --without-sqlite3 \
+       --without-bktr
 
 define Package/motion/install
        $(INSTALL_DIR) $(1)/etc
diff --git a/multimedia/motion/patches/010-Initialize-the-thread-at-start-of-main.patch b/multimedia/motion/patches/010-Initialize-the-thread-at-start-of-main.patch
deleted file mode 100644 (file)
index 5e8eafa..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-From 3c7cbd685017c1bf9ba2eaa811b63842bec28f64 Mon Sep 17 00:00:00 2001
-From: Mr-DaveDev <MotionMrDaveDev@gmail.com>
-Date: Mon, 1 Jan 2018 13:07:08 -0700
-Subject: [PATCH] Initialize the thread at start of main
-
-Closes #589
----
- logger.c |  5 -----
- motion.c | 30 ++++++++++++++++--------------
- 2 files changed, 16 insertions(+), 19 deletions(-)
-
-diff --git a/logger.c b/logger.c
-index c55044b..5ef2f85 100644
---- a/logger.c
-+++ b/logger.c
-@@ -193,11 +193,6 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
-     //printf("log_type %d, type %d level %d\n", log_type, type, level);
--    /*
--     * If pthread_getspecific fails (e.g., because the thread's TLS doesn't
--     * contain anything for thread number, it returns NULL which casts to zero,
--     * which is nice because that's what we want in that case.
--     */
-     threadnr = (unsigned long)pthread_getspecific(tls_key_threadnr);
-     /*
-diff --git a/motion.c b/motion.c
-index 985d4b2..9fe58c1 100644
---- a/motion.c
-+++ b/motion.c
-@@ -2886,10 +2886,6 @@ static void motion_startup(int daemonize, int argc, char *argv[])
-     }
--    //set_log_level(cnt_list[0]->log_level);
--
--    MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
--
-     if ((cnt_list[0]->conf.log_file) && (strncmp(cnt_list[0]->conf.log_file, "syslog", 6))) {
-         set_log_mode(LOGMODE_FILE);
-         ptr_logfile = set_logfile(cnt_list[0]->conf.log_file);
-@@ -2908,6 +2904,8 @@ static void motion_startup(int daemonize, int argc, char *argv[])
-         MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Logging to syslog");
-     }
-+    MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
-+
-     if ((cnt_list[0]->conf.log_type_str == NULL) ||
-         !(cnt_list[0]->log_type = get_log_type(cnt_list[0]->conf.log_type_str))) {
-         cnt_list[0]->log_type = TYPE_DEFAULT;
-@@ -3053,8 +3051,22 @@ int main (int argc, char **argv)
-      */
-     struct sigaction sig_handler_action;
-     struct sigaction sigchild_action;
-+
-+
-     setup_signals(&sig_handler_action, &sigchild_action);
-+    /*
-+     * Create and a thread attribute for the threads we spawn later on.
-+     * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
-+     * their termination cannot be synchronized through 'pthread_join'.
-+     */
-+    pthread_attr_init(&thread_attr);
-+    pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
-+
-+    /* Create the TLS key for thread number. */
-+    pthread_key_create(&tls_key_threadnr, NULL);
-+    pthread_setspecific(tls_key_threadnr, (void *)(0));
-+
-     motion_startup(1, argc, argv);
-     ffmpeg_global_init();
-@@ -3102,16 +3114,6 @@ int main (int argc, char **argv)
-     if (cnt_list[0]->conf.setup_mode)
-         MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion running in setup mode.");
--    /*
--     * Create and a thread attribute for the threads we spawn later on.
--     * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
--     * their termination cannot be synchronized through 'pthread_join'.
--     */
--    pthread_attr_init(&thread_attr);
--    pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
--
--    /* Create the TLS key for thread number. */
--    pthread_key_create(&tls_key_threadnr, NULL);
-     do {
-         if (restart) {
--- 
-2.7.4
-
git clone https://git.99rst.org/PROJECT