Index: head/multimedia/nordlicht/files/patch-source.c =================================================================== --- head/multimedia/nordlicht/files/patch-source.c (revision 432740) +++ head/multimedia/nordlicht/files/patch-source.c (nonexistent) @@ -1,66 +0,0 @@ -For ffmpeg 3.x compatibility - -https://github.com/nordlicht/nordlicht/commit/5505a1898ab997a23b75553794eff6609447c43b.patch -https://github.com/nordlicht/nordlicht/commit/6e534a0c273756b88eecea7f510b6aa8a62dd789.patch - ---- source.c.orig 2016-01-24 19:35:50 UTC -+++ source.c -@@ -6,9 +6,34 @@ - #include - #include - -+// Changes for ffmpeg 3.0 -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,24,0) -+# include -+# define av_free_packet av_packet_unref -+# define avpicture_get_size(fmt,w,h) av_image_get_buffer_size(fmt,w,h,1) -+#endif -+ -+// PIX_FMT was renamed to AV_PIX_FMT on this version -+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51,74,100) -+# define AVPixelFormat PixelFormat -+# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 -+# define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P -+# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P -+# define AV_PIX_FMT_YUVJ440P PIX_FMT_YUVJ440P -+# define AV_PIX_FMT_YUVJ444P PIX_FMT_YUVJ444P -+# define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P -+# define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P -+# define AV_PIX_FMT_YUV440P PIX_FMT_YUV440P -+# define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P -+#endif -+ - #if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52, 8, 0) --#define av_frame_alloc avcodec_alloc_frame --#define av_frame_free av_freep -+# define av_frame_alloc avcodec_alloc_frame -+# if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,59,100) -+# define av_frame_free av_freep -+# else -+# define av_frame_free avcodec_free_frame -+# endif - #endif - - #define HEURISTIC_NUMBER_OF_FRAMES 1800 // how many frames will the heuristic look at? -@@ -244,13 +269,17 @@ source* source_init(const char *filename - s->scaleframe = av_frame_alloc(); - s->scaleframe->width = s->video->frame->width; - s->scaleframe->height = s->video->frame->height; -- s->scaleframe->format = PIX_FMT_RGB24; -+ s->scaleframe->format = AV_PIX_FMT_RGB24; - -- s->buffer = (uint8_t *)av_malloc(sizeof(uint8_t)*avpicture_get_size(PIX_FMT_RGB24, s->scaleframe->width, s->scaleframe->height)); -- avpicture_fill((AVPicture *)s->scaleframe, s->buffer, PIX_FMT_RGB24, s->video->frame->width, s->video->frame->height); -+ s->buffer = (uint8_t *)av_malloc(sizeof(uint8_t)*avpicture_get_size(s->scaleframe->format, s->scaleframe->width, s->scaleframe->height)); -+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,24,0) -+ av_image_fill_arrays(s->scaleframe->data, s->scaleframe->linesize, s->buffer, s->scaleframe->format, s->video->frame->width, s->video->frame->height, 1); -+ #else -+ avpicture_fill((AVPicture *)s->scaleframe, s->buffer, s->scaleframe->format, s->video->frame->width, s->video->frame->height); -+ #endif - - s->sws_context = sws_getCachedContext(NULL, s->video->frame->width, s->video->frame->height, s->video->frame->format, -- s->scaleframe->width, s->scaleframe->height, PIX_FMT_RGB24, SWS_AREA, NULL, NULL, NULL); -+ s->scaleframe->width, s->scaleframe->height, s->scaleframe->format, SWS_AREA, NULL, NULL, NULL); - } - - s->keyframes = NULL; Property changes on: head/multimedia/nordlicht/files/patch-source.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/nordlicht/files/patch-CMakeLists.txt =================================================================== --- head/multimedia/nordlicht/files/patch-CMakeLists.txt (revision 432740) +++ head/multimedia/nordlicht/files/patch-CMakeLists.txt (nonexistent) @@ -1,13 +0,0 @@ ---- CMakeLists.txt.orig 2016-01-24 19:35:50 UTC -+++ CMakeLists.txt -@@ -63,8 +63,8 @@ install(TARGETS nordlicht DESTINATION bi - install(FILES nordlicht.h DESTINATION include) - - if (NOT WIN32) -- install(FILES ${CMAKE_BINARY_DIR}/nordlicht.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(FILES ${CMAKE_BINARY_DIR}/nordlicht.1 DESTINATION share/man/man1) -+ install(FILES ${CMAKE_BINARY_DIR}/nordlicht.pc DESTINATION libdata/pkgconfig) -+ install(FILES ${CMAKE_BINARY_DIR}/nordlicht.1 DESTINATION man/man1) - endif() - - add_custom_target(check testsuite) Property changes on: head/multimedia/nordlicht/files/patch-CMakeLists.txt ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/nordlicht/files/patch-image.c =================================================================== --- head/multimedia/nordlicht/files/patch-image.c (revision 432740) +++ head/multimedia/nordlicht/files/patch-image.c (nonexistent) @@ -1,68 +0,0 @@ -For ffmpeg 3.x compatibility - -https://github.com/nordlicht/nordlicht/commit/5505a1898ab997a23b75553794eff6609447c43b.patch -https://github.com/nordlicht/nordlicht/commit/6e534a0c273756b88eecea7f510b6aa8a62dd789.patch -and https://github.com/nordlicht/nordlicht/pull/63/commits/b8f439c2796d6b1de73511c0610aecb31c942790 - ---- image.c.orig 2016-01-24 19:35:50 UTC -+++ image.c -@@ -5,11 +5,36 @@ - #include - #include - -+// Changes for ffmpeg 3.0 -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,24,0) -+# include -+# define av_free_packet av_packet_unref -+# define avpicture_get_size(fmt,w,h) av_image_get_buffer_size(fmt,w,h,1) -+#endif -+ -+// PIX_FMT was renamed to AV_PIX_FMT on this version -+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51,74,100) -+# define AVPixelFormat PixelFormat -+# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 -+# define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P -+# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P -+# define AV_PIX_FMT_YUVJ440P PIX_FMT_YUVJ440P -+# define AV_PIX_FMT_YUVJ444P PIX_FMT_YUVJ444P -+# define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P -+# define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P -+# define AV_PIX_FMT_YUV440P PIX_FMT_YUV440P -+# define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P -+#endif -+ - #if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52, 8, 0) --#define av_frame_alloc avcodec_alloc_frame --#define av_frame_free av_freep -+# define av_frame_alloc avcodec_alloc_frame -+# if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,59,100) -+# define av_frame_free av_freep -+# else -+# define av_frame_free avcodec_free_frame -+# endif - void av_frame_get_buffer(AVFrame *frame, int magic) { avpicture_alloc((AVPicture *)frame, frame->format, frame->width, frame->height); } --void av_frame_copy(AVFrame *dst, AVFrame *src) { memcpy(dst->data[0], src->data[0], sizeof(uint8_t)*avpicture_get_size(PIX_FMT_RGB24, dst->width, dst->height)); } -+void av_frame_copy(AVFrame *dst, AVFrame *src) { memcpy(dst->data[0], src->data[0], sizeof(uint8_t)*avpicture_get_size(AV_PIX_FMT_RGB24, dst->width, dst->height)); } - #endif - - #define MAX_FILTER_SIZE 256 -@@ -25,7 +50,7 @@ image *image_init(const int width, const - i->frame = (AVFrame *) av_frame_alloc(); - i->frame->width = width; - i->frame->height = height; -- i->frame->format = PIX_FMT_RGB24; // best choice? -+ i->frame->format = AV_PIX_FMT_RGB24; // best choice? - av_frame_get_buffer(i->frame, 16); // magic number? - return i; - } -@@ -240,7 +265,9 @@ int image_write_png(const image *i, cons - encoder_context = avcodec_alloc_context3(encoder); - encoder_context->width = i->frame->width; - encoder_context->height = i->frame->height; -- encoder_context->pix_fmt = PIX_FMT_RGB24; -+ encoder_context->pix_fmt = AV_PIX_FMT_RGB24; -+ encoder_context->time_base.num = 1; -+ encoder_context->time_base.den = 1; - if (avcodec_open2(encoder_context, encoder, NULL) < 0) { - error("Could not open output codec."); - return -1; Property changes on: head/multimedia/nordlicht/files/patch-image.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/nordlicht/Makefile =================================================================== --- head/multimedia/nordlicht/Makefile (revision 432740) +++ head/multimedia/nordlicht/Makefile (revision 432741) @@ -1,29 +1,40 @@ # Created by: Tobias Kortkamp # $FreeBSD$ PORTNAME= nordlicht -PORTVERSION= 0.4.4 +PORTVERSION= 0.4.5 DISTVERSIONPREFIX= v -PORTREVISION= 2 CATEGORIES= multimedia MAINTAINER= t@tobik.me COMMENT= Create moodbars from video files LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE.md BUILD_DEPENDS= help2man:misc/help2man LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libpopt.so:devel/popt \ libpng.so:graphics/png USE_GITHUB= yes -USES= cmake:outsource pkgconfig +USES= cmake:outsource pkgconfig shebangfix USE_LDCONFIG= yes +PLIST_SUB= PORTVERSION=${PORTVERSION} + BROKEN_aarch64= Fails to install: runaway process BROKEN_powerpc64= Does not build + +SHEBANG_FILES= utils/mpv-nordlicht + +post-patch: + @${REINPLACE_CMD} \ + -e 's|$${CMAKE_INSTALL_LIBDIR}/pkgconfig|libdata/pkgconfig|' \ + -e 's|share/man/man1|man/man1|' ${WRKSRC}/CMakeLists.txt + +post-install: + @cd ${WRKSRC}/utils && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} .include Index: head/multimedia/nordlicht/distinfo =================================================================== --- head/multimedia/nordlicht/distinfo (revision 432740) +++ head/multimedia/nordlicht/distinfo (revision 432741) @@ -1,2 +1,3 @@ -SHA256 (nordlicht-nordlicht-v0.4.4_GH0.tar.gz) = f430b60426a022aad07f5064b7b046e26b18c75606de652c168d23b97cbd13f8 -SIZE (nordlicht-nordlicht-v0.4.4_GH0.tar.gz) = 41252 +TIMESTAMP = 1484929858 +SHA256 (nordlicht-nordlicht-v0.4.5_GH0.tar.gz) = e9f65f631496ed3f1572f74d6f471259f47fb25545b225e97e238b18c152d9d6 +SIZE (nordlicht-nordlicht-v0.4.5_GH0.tar.gz) = 42584 Index: head/multimedia/nordlicht/pkg-plist =================================================================== --- head/multimedia/nordlicht/pkg-plist (revision 432740) +++ head/multimedia/nordlicht/pkg-plist (revision 432741) @@ -1,7 +1,11 @@ bin/nordlicht include/nordlicht.h lib/libnordlicht.so lib/libnordlicht.so.0 -lib/libnordlicht.so.0.4.4 +lib/libnordlicht.so.%%PORTVERSION%% libdata/pkgconfig/nordlicht.pc man/man1/nordlicht.1.gz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mpv-nordlicht +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mpv-nordlicht.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nordlicht.thumbnailer +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/youtube-nordlicht