diff options
Diffstat (limited to 'multimedia/zoneminder-h264/files')
14 files changed, 0 insertions, 521 deletions
diff --git a/multimedia/zoneminder-h264/files/README.FreeBSD b/multimedia/zoneminder-h264/files/README.FreeBSD deleted file mode 100644 index 0a4c888a2608..000000000000 --- a/multimedia/zoneminder-h264/files/README.FreeBSD +++ /dev/null @@ -1,160 +0,0 @@ - -ZoneMinder is a free, open source Closed-circuit television software -application developed for Unix-like operating systems which supports -IP, USB and Analog cameras. - -New installs -============ - -ZoneMinder requires a MySQL (or MySQL forks) database backend and -a http server, capable to execute PHP and CGI scripts. - -To simplify things, we assume, that you use MySQL and NGINX on -the same server. - -1. Preliminary steps - -1.1 Install databases/mysql56-server or newer - You may choose your favourite method - ports or packages here. - FreeBSD default setting use STRICT_TRANS_TABLES sql_mode. It's mandatory to disable it. Edit your my.cnf accordingly - - The following SQL mode should be compatible with ZM: - sql_mode= NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION - - ZoneMinder use very simple queries, however it tends to write to - the database quite a lot depending on your capture mode and number - of cameras. So tweak your MySQL instance accordantly - - Now, enable and start MySQL - sysrc mysql_server_enable="YES" - service mysql-server start - -1.2 Install www/nginx - We provide an example for an HTTP install, however, you should use - HTTPS if you plan to expose your installation to the public. There - are plenty guides how to do it and security/letsencrypt.sh is a - good way to get a valid SSL certificate. - - Your server block should include the following: - - server { - root /usr/local/www/zoneminder; - try_files $uri $uri/ /index.php$is_args$args; - index index.php; - - location = /cgi-bin/nph-zms { - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock; - } - - location ~ \.php$ { - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass unix:/var/run/php-fpm.sock; - } - - location /api { - rewrite ^/api/(.+)$ /api/index.php?p=$1 last; - } - } - -1.2.1 ZoneMinder has it's own authentication system, however it's recommend to use NGINX basic - auth over HTTPS if you don't need fine grain control to ZoneMinder components. - -1.2.2 If you choose ZoneMinder authentication, it's recommended to prohibit access to - image and events folder as it's possible to guess file names inside it. - - location ~ ^/(?:images|events)/ { - deny all; - } - - Enable and start NGINX - sysrc nginx_enable="YES" - service nginx start - -1.3 Install www/fcgiwrap - As NGINX lacks it's own CGI wrapper, we need external one. Please - note that ZoneMinder's montage page use simultaneous access to all - cameras, so you need to use at least as many fcgiwrap workers as - your number of cameras. The following example assumes you have 4. - - Enable and start FcgiWrap - sysrc fcgiwrap_enable="YES" - sysrc fcgiwrap_user="www" - sysrc fcgiwrap_socket_owner="www" - sysrc fcgiwrap_flags="-c 4" - -1.4 PHP is installed as a dependency to ZoneMinder. However, you should - tweak some of it's settings. - Edit /usr/local/etc/php-fpm.conf and set - - listen = /var/run/php-fpm.sock - listen.owner = www - listen.group = www - env[PATH] = /usr/local/bin:/usr/bin:/bin - - If you want to set another path for the socket file, make sure you - change it in your NGINX config well. The env[PATH] needs to be set - to locate the zip utility as ZoneMinder's export functions rely on - exec(). Sorry, chroot folks. - - PHP throws warning if date.timezone option is not set. The best place - to do it is to create new ini file in /usr/local/etc/php with overrides - - date.timezone = "UTC" - - Enable and start php-fpm - sysrc php_fpm_enable="YES" - service php-fpm start - -1.5 ZoneMinder constantly keeps the last N frames from its cameras to - preserve them when alarm occurs. This can be a performance hog if - placed on spindle drive. The best practice is put it on tmpfs. - See https://www.freebsd.org/cgi/man.cgi?query=tmpfs for more - information. - - ZoneMinder will use /tmp for default. If you plan to change it, see - ZM_PATH_MAP setting. - - Mapping /tmp to tmpfs is actually a recommended step under FreeBSD. - Edit /etc/fstab and add the following: - - tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0 - - The size of temporary files depends on your number of cameras - number and frames you plan to keep. My 12 3Mbit cameras with 25 - last frames consumes 6 GB. - -2. ZoneMinder installation - - Connect to MySQL under root and create zm user and populate database. - - mysql -u root -p - - CREATE DATABASE zm; - GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'; - FLUSH PRIVILEGES; - quit; - - mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql - -2.1 If you have chosen to change the ZoneMinder MySQL credentials to something - other than zmuser/zmpass then you must now edit /usr/local/etc/zm.conf. Change - ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step. - - Enable and start ZoneMinder - sysrc zoneminder_enable="YES" - service zoneminder start - -Upgrades -======== - -1. Stop ZoneMinder - service zoneminder stop - -2. Upgrade database - sudo -u www zmupdate.pl - -3. Start ZoneMinder - service zoneminder start diff --git a/multimedia/zoneminder-h264/files/patch-CMakeLists.txt b/multimedia/zoneminder-h264/files/patch-CMakeLists.txt deleted file mode 100644 index 0ef66381c452..000000000000 --- a/multimedia/zoneminder-h264/files/patch-CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ ---- CMakeLists.txt.orig 2016-10-03 17:21:50 UTC -+++ CMakeLists.txt -@@ -385,13 +385,13 @@ find_library(MYSQLCLIENT_LIBRARIES mysql - if(MYSQLCLIENT_LIBRARIES) - set(HAVE_LIBMYSQLCLIENT 1) - list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}") -- find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h) -+ find_path(MYSQLCLIENT_INCLUDE_DIR mysql.h /usr/local/include/mysql /usr/include/mysql) - if(MYSQLCLIENT_INCLUDE_DIR) - include_directories("${MYSQLCLIENT_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}") - endif(MYSQLCLIENT_INCLUDE_DIR) - mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR) -- check_include_file("mysql/mysql.h" HAVE_MYSQL_H) -+ check_include_file("mysql.h" HAVE_MYSQL_H) - if(NOT HAVE_MYSQL_H) - message(FATAL_ERROR - "ZoneMinder requires MySQL headers - check that MySQL development packages are installed") -@@ -711,13 +711,6 @@ endif(NOT ZM_WEB_GROUP) - message(STATUS "Using web user: ${ZM_WEB_USER}") - message(STATUS "Using web group: ${ZM_WEB_GROUP}") - --# Check for polkit --find_package(Polkit) --if(NOT POLKIT_FOUND) -- message(FATAL_ERROR -- "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.") --endif(NOT POLKIT_FOUND) -- - # Some variables that zm expects - set(ZM_PID "${ZM_RUNDIR}/zm.pid") - set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf") diff --git a/multimedia/zoneminder-h264/files/patch-ffmpeg4 b/multimedia/zoneminder-h264/files/patch-ffmpeg4 deleted file mode 100644 index 5504569c09a6..000000000000 --- a/multimedia/zoneminder-h264/files/patch-ffmpeg4 +++ /dev/null @@ -1,122 +0,0 @@ -Partially based on https://github.com/ZoneMinder/zoneminder/commit/e17bcb9178d0 - ---- src/zm_mpeg.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_mpeg.cpp -@@ -240,7 +240,11 @@ void VideoStream::SetupCodec( int colours, int subpixe - { - // Quality based bitrate control (VBR). Scale is 1..31 where 1 is best. - // This gets rid of artifacts in the beginning of the movie; and well, even quality. -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ c->flags |= AV_CODEC_FLAG_QSCALE; -+#else - c->flags |= CODEC_FLAG_QSCALE; -+#endif - c->global_quality = FF_QP2LAMBDA * (31 - (31 * (bitrate / 100.0))); - } - else -@@ -265,7 +269,11 @@ void VideoStream::SetupCodec( int colours, int subpixe - - // some formats want stream headers to be separate - if ( of->flags & AVFMT_GLOBALHEADER ) -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - else - { -@@ -425,7 +433,9 @@ void VideoStream::OpenStream( ) - } - - video_outbuf = NULL; -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if ( !(of->flags & AVFMT_RAWPICTURE) ) -+#endif - { - /* allocate output buffer */ - /* XXX: API change will be done */ -@@ -672,6 +682,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t - AVPacket *pkt = packet_buffers[packet_index]; - av_init_packet( pkt ); - int got_packet = 0; -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if ( of->flags & AVFMT_RAWPICTURE ) - { - #if LIBAVCODEC_VERSION_CHECK(52, 30, 2, 30, 2) -@@ -685,6 +696,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t - got_packet = 1; - } - else -+#endif - { - opicture_ptr->pts = c->frame_number; - opicture_ptr->quality = c->global_quality; ---- src/zm_sdp.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_sdp.cpp -@@ -483,7 +483,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont - uint8_t *dest = - (uint8_t *)av_malloc(packet_size + sizeof(start_sequence) + - stream->codec->extradata_size + -+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0) -+ AV_INPUT_BUFFER_PADDING_SIZE); -+#else - FF_INPUT_BUFFER_PADDING_SIZE); -+#endif - if(dest) { - if(stream->codec->extradata_size) { - // av_realloc? -@@ -494,7 +498,11 @@ AVFormatContext *SessionDescriptor::generateFormatCont - memcpy(dest+stream->codec->extradata_size, start_sequence, sizeof(start_sequence)); - memcpy(dest+stream->codec->extradata_size+sizeof(start_sequence), decoded_packet, packet_size); - memset(dest+stream->codec->extradata_size+sizeof(start_sequence)+ -+#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0) -+ packet_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); -+#else - packet_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); -+#endif - - stream->codec->extradata= dest; - stream->codec->extradata_size+= sizeof(start_sequence)+packet_size; ---- src/zm_videostore.cpp.orig 2017-02-21 21:28:53 UTC -+++ src/zm_videostore.cpp -@@ -113,7 +113,11 @@ VideoStore::VideoStore(const char *filename_in, const - - video_st->codec->codec_tag = 0; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ video_st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - video_st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - - if ( orientation ) { -@@ -146,7 +150,11 @@ VideoStore::VideoStore(const char *filename_in, const - } - audio_st->codec->codec_tag = 0; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { -+#if LIBAVCODEC_VERSION_CHECK(56, 35, 0, 64, 0) -+ audio_st->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - audio_st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - } - } else { -@@ -283,6 +291,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt, - - /*opkt.flags |= AV_PKT_FLAG_KEY;*/ - -+#if !LIBAVFORMAT_VERSION_CHECK(57, 0, 0, 0, 0) - if (video_st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (fmt->flags & AVFMT_RAWPICTURE)) { - /* store AVPicture in AVPacket, as expected by the output format */ - avpicture_fill(&pict, opkt.data, video_st->codec->pix_fmt, video_st->codec->width, video_st->codec->height); -@@ -290,6 +299,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt, - opkt.size = sizeof(AVPicture); - opkt.flags |= AV_PKT_FLAG_KEY; - } -+#endif - - memcpy(&safepkt, &opkt, sizeof(AVPacket)); - diff --git a/multimedia/zoneminder-h264/files/patch-misc_CMakeLists.txt b/multimedia/zoneminder-h264/files/patch-misc_CMakeLists.txt deleted file mode 100644 index 0b53dbfb6b68..000000000000 --- a/multimedia/zoneminder-h264/files/patch-misc_CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ ---- misc/CMakeLists.txt.orig 2016-10-03 17:21:50 UTC -+++ misc/CMakeLists.txt -@@ -13,6 +13,7 @@ configure_file(zoneminder-tmpfiles.conf. - #install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc") - - # Install Policykit rules and actions into the proper folders --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions") --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d") -+# polkit is not required for FreeBSD -+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions") -+#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d") - diff --git a/multimedia/zoneminder-h264/files/patch-scripts_CMakeLists.txt b/multimedia/zoneminder-h264/files/patch-scripts_CMakeLists.txt deleted file mode 100644 index 296d79e2f0db..000000000000 --- a/multimedia/zoneminder-h264/files/patch-scripts_CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- scripts/CMakeLists.txt.orig 2016-10-03 17:21:50 UTC -+++ scripts/CMakeLists.txt -@@ -32,7 +32,7 @@ FOREACH(PERLSCRIPT ${perlscripts}) - ENDFOREACH(PERLSCRIPT ${perlscripts}) - - # Install the perl scripts --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) - if(NOT ZM_NO_X10) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) - endif(NOT ZM_NO_X10) diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__image.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__image.cpp deleted file mode 100644 index d7831c666925..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__image.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- src/zm_image.cpp.orig 2016-10-03 17:21:50 UTC -+++ src/zm_image.cpp -@@ -1649,12 +1649,9 @@ Image *Image::Highlight( unsigned int n_ - for ( unsigned int j = 0; j < n_images; j++ ) - { - uint8_t *psrc = images[j]->buffer+c; -- --#ifndef SOLARIS -- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) --#else -- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) --#endif -+ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); -+ -+ if (diff >= RGB_VAL(threshold,c)) - { - count++; - } diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.cpp deleted file mode 100644 index af64061269a4..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/zm_local_camera.cpp.orig 2016-10-03 17:21:50 UTC -+++ src/zm_local_camera.cpp -@@ -33,7 +33,7 @@ - #include <limits.h> - - /* Workaround for GNU/kFreeBSD */ --#if defined(__FreeBSD_kernel__) -+#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) - #ifndef ENODATA - #define ENODATA ENOATTR - #endif diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.h b/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.h deleted file mode 100644 index d33768c27437..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__local__camera.h +++ /dev/null @@ -1,14 +0,0 @@ ---- src/zm_local_camera.h.orig 2016-10-03 17:21:50 UTC -+++ src/zm_local_camera.h -@@ -41,6 +41,11 @@ - #define VIDEO_MAX_FRAME 32 - #endif - -+// Required on systems with v4l1 but without v4l2 headers -+#ifndef VIDEO_MAX_FRAME -+#define VIDEO_MAX_FRAME 32 -+#endif -+ - #include "zm_ffmpeg.h" - - // diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__logger.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__logger.cpp deleted file mode 100644 index a1426bbc8fa3..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__logger.cpp +++ /dev/null @@ -1,23 +0,0 @@ ---- src/zm_logger.cpp.orig 2016-11-03 11:08:37 UTC -+++ src/zm_logger.cpp -@@ -515,8 +515,9 @@ void Logger::logPrint( bool hex, const c - va_list argPtr; - struct timeval timeVal; - -- const char * const file = basename(filepath); -- -+ char *filecopy = strdup(filepath); -+ const char * const file = basename(filecopy); -+ - if ( level < PANIC || level > DEBUG9 ) - Panic( "Invalid logger level %d", level ); - -@@ -635,6 +636,8 @@ void Logger::logPrint( bool hex, const c - abort(); - exit( -1 ); - } -+ -+ free(filecopy); - } - } - diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp deleted file mode 100644 index 39e596ba6d23..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- src/zm_monitor.cpp.orig 2016-11-03 20:26:18 UTC -+++ src/zm_monitor.cpp -@@ -161,7 +161,7 @@ bool Monitor::MonitorLink::connect() - return( false ); - } - mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 ); -- if ( mem_ptr < 0 ) -+ if ( mem_ptr < (void *)0 ) - { - Debug( 3, "Can't shmat link memory: %s", strerror(errno) ); - connected = false; -@@ -195,7 +195,7 @@ bool Monitor::MonitorLink::disconnect() - connected = false; - - #if ZM_MEM_MAPPED -- if ( mem_ptr > 0 ) -+ if ( mem_ptr > (void *)0 ) - { - msync( mem_ptr, mem_size, MS_ASYNC ); - munmap( mem_ptr, mem_size ); -@@ -576,7 +576,7 @@ bool Monitor::connect() { - exit( -1 ); - } - mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 ); -- if ( mem_ptr < 0 ) -+ if ( mem_ptr < (void *)0 ) - { - Error( "Can't shmat: %s", strerror(errno)); - exit( -1 ); diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__signal.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__signal.cpp deleted file mode 100644 index 7b5188d96fc7..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__signal.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/zm_signal.cpp.orig 2016-10-03 17:21:50 UTC -+++ src/zm_signal.cpp -@@ -63,17 +63,9 @@ RETSIGTYPE zm_die_handler(int signal) - ucontext_t *uc = (ucontext_t *) context; - cr2 = info->si_addr; - #if defined(__x86_64__) -- #ifdef __FreeBSD_kernel__ - ip = (void *)(uc->uc_mcontext.mc_rip); -- #else -- ip = (void *)(uc->uc_mcontext.gregs[REG_RIP]); -- #endif - #else -- #ifdef __FreeBSD_kernel__ - ip = (void *)(uc->uc_mcontext.mc_eip); -- #else -- ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]); -- #endif - #endif // defined(__x86_64__) - - // Print the signal address and instruction pointer if available diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__stream.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__stream.cpp deleted file mode 100644 index b36333a57371..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zm__stream.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/zm_stream.cpp.orig 2017-05-09 14:54:48 UTC -+++ src/zm_stream.cpp -@@ -332,7 +332,7 @@ void StreamBase::openComms() - - strncpy( loc_addr.sun_path, loc_sock_path, sizeof(loc_addr.sun_path) ); - loc_addr.sun_family = AF_UNIX; -- if ( bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path)+sizeof(loc_addr.sun_family)+1 ) < 0 ) -+ if ( ::bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path)+sizeof(loc_addr.sun_family)+1 ) < 0 ) - { - Fatal( "Can't bind: %s", strerror(errno) ); - } diff --git a/multimedia/zoneminder-h264/files/patch-src_zmf.cpp b/multimedia/zoneminder-h264/files/patch-src_zmf.cpp deleted file mode 100644 index 874c1a595348..000000000000 --- a/multimedia/zoneminder-h264/files/patch-src_zmf.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/zmf.cpp.orig 2017-05-09 14:54:48 UTC -+++ src/zmf.cpp -@@ -92,7 +92,7 @@ int OpenSocket( int monitor_id ) - strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); - addr.sun_family = AF_UNIX; - -- if ( bind( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)) < 0 ) -+ if ( ::bind( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)) < 0 ) - { - Error( "Can't bind: %s", strerror(errno) ); - exit( -1 ); -@@ -331,7 +331,7 @@ int main( int argc, char *argv[] ) - Debug( 1, "Got image, writing to %s", path ); - - FILE *fd = 0; -- if ( (fd = fopen( path, "w" )) < 0 ) -+ if ( (fd = fopen( path, "w" )) == NULL ) - { - Error( "Can't fopen '%s': %s", path, strerror(errno) ); - exit( -1 ); diff --git a/multimedia/zoneminder-h264/files/zoneminder.in b/multimedia/zoneminder-h264/files/zoneminder.in deleted file mode 100644 index b7a30a941a6c..000000000000 --- a/multimedia/zoneminder-h264/files/zoneminder.in +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: zoneminder -# REQUIRE: LOGIN mysql -# KEYWORD: shutdown -# -# Add these lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# zoneminder_enable (bool): Set to NO by default. -# Set it to YES to enable zoneminder. - -. /etc/rc.subr - -name=zoneminder -rcvar=zoneminder_enable - -load_rc_config $name - -: ${zoneminder_enable="NO"} - -command=%%PREFIX%%/bin/zmpkg.pl -pidfile=/var/run/zm/zm.pid -extra_commands="logrot version" - -start_cmd="zm_cmd" -stop_cmd="zm_cmd" -status_cmd="zm_cmd" -logrot_cmd="zm_cmd" -version_cmd="zm_cmd" - -zm_cmd() { - ${command} ${rc_arg} -} - -run_rc_command "$1" |