Index: head/multimedia/Makefile =================================================================== --- head/multimedia/Makefile +++ head/multimedia/Makefile @@ -28,6 +28,7 @@ SUBDIR += bombono SUBDIR += bsdbktr_tvtune SUBDIR += camserv + SUBDIR += ccextractor SUBDIR += cclive SUBDIR += cheese SUBDIR += clipgrab Index: head/multimedia/ccextractor/Makefile =================================================================== --- head/multimedia/ccextractor/Makefile +++ head/multimedia/ccextractor/Makefile @@ -0,0 +1,48 @@ +# $FreeBSD$ + +PORTNAME= ccextractor +DISTVERSIONPREFIX= v +DISTVERSION= 0.85 +CATEGORIES= multimedia + +MAINTAINER= oz@nixil.net +COMMENT= Closed caption extractor for MPEG and H264 files + +LICENSE= GPLv2 + +LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 \ + libgmp.so:math/gmp \ + libgnutls.so:security/gnutls \ + libogg.so:audio/libogg \ + libopencv_core.so:graphics/opencv-core \ + libpng.so:graphics/png \ + libschroedinger-1.0.so:multimedia/schroedinger \ + libtheoraenc.so:multimedia/libtheora \ + libv4l2.so:multimedia/libv4l \ + libva-x11.so:multimedia/libva \ + libvdpau.so:multimedia/libvdpau \ + libvorbisenc.so:audio/libvorbis \ + libvpx.so:multimedia/libvpx \ + libx264.so:multimedia/libx264 \ + libx265.so:multimedia/x265 \ + libxvidcore.so:multimedia/xvid + +USES= cmake:outsource iconv localbase:ldflags pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= CCExtractor +USE_XORG= x11 +USE_LDCONFIG= yes + +CMAKE_SOURCE_PATH= ${WRKSRC}/src +CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=ON +CMAKE_ARGS+= -DWITH_OCR:BOOL=OFF # fails: CFLAGS get semicolon-separated for some reason +CMAKE_ARGS+= -DWITH_SHARING:BOOL=OFF # enable when net/nanomsg is available + +OPTIONS_DEFINE= FFMPEG +OPTIONS_DEFAULT= FFMPEG + +FFMPEG_CMAKE_BOOL= WITH_FFMPEG +FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg + +.include Index: head/multimedia/ccextractor/distinfo =================================================================== --- head/multimedia/ccextractor/distinfo +++ head/multimedia/ccextractor/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1510096237 +SHA256 (CCExtractor-ccextractor-v0.85_GH0.tar.gz) = bef7ceeb38a97a098b61f324999241cb4bbd83ce6e873ddfdd74e2562c845ccd +SIZE (CCExtractor-ccextractor-v0.85_GH0.tar.gz) = 36800425 Index: head/multimedia/ccextractor/files/patch-src_CMakeLists.txt =================================================================== --- head/multimedia/ccextractor/files/patch-src_CMakeLists.txt +++ head/multimedia/ccextractor/files/patch-src_CMakeLists.txt @@ -0,0 +1,28 @@ +--- src/CMakeLists.txt.orig 2017-01-23 20:33:53 UTC ++++ src/CMakeLists.txt +@@ -29,19 +29,19 @@ aux_source_directory ("${PROJECT_SOURCE_ + aux_source_directory ("${PROJECT_SOURCE_DIR}/lib_hash" SOURCEFILE) + + # Adding some platform specific library path +-link_directories (/opt/local/lib) +-link_directories (/usr/local/lib) ++#link_directories (/opt/local/lib) ++#link_directories (/usr/local/lib) + +-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Wall -g -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64") ++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64") + add_subdirectory (lib_ccx) + + aux_source_directory (${PROJECT_SOURCE_DIR} SOURCEFILE) + set (EXTRA_LIBS ${EXTRA_LIBS} ccx) + set (EXTRA_LIBS ${EXTRA_LIBS} m) + +-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +-set (EXTRA_LIBS ${EXTRA_LIBS} iconv) +-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|FreeBSD") ++#set (EXTRA_LIBS ${EXTRA_LIBS} iconv) ++endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|FreeBSD") + + + find_package (PkgConfig) Index: head/multimedia/ccextractor/files/patch-src_lib__ccx_CMakeLists.txt =================================================================== --- head/multimedia/ccextractor/files/patch-src_lib__ccx_CMakeLists.txt +++ head/multimedia/ccextractor/files/patch-src_lib__ccx_CMakeLists.txt @@ -0,0 +1,10 @@ +--- src/lib_ccx/CMakeLists.txt.orig 2017-11-23 22:34:32 UTC ++++ src/lib_ccx/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_policy (SET CMP0037 NEW) + +-set (CMAKE_C_FLAGS "-O0 -Wall -g -std=gnu99") ++set (CMAKE_C_FLAGS "-Wall -std=gnu99") + + if (WITH_FFMPEG) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG") Index: head/multimedia/ccextractor/files/patch-src_lib__ccx_ffmpeg__intgr.c =================================================================== --- head/multimedia/ccextractor/files/patch-src_lib__ccx_ffmpeg__intgr.c +++ head/multimedia/ccextractor/files/patch-src_lib__ccx_ffmpeg__intgr.c @@ -0,0 +1,11 @@ +--- src/lib_ccx/ffmpeg_intgr.c.orig 2017-01-23 20:33:53 UTC ++++ src/lib_ccx/ffmpeg_intgr.c +@@ -3,7 +3,7 @@ + #ifdef ENABLE_FFMPEG + #include + #include +-#include ++#include + #include + #include + #include Index: head/multimedia/ccextractor/pkg-descr =================================================================== --- head/multimedia/ccextractor/pkg-descr +++ head/multimedia/ccextractor/pkg-descr @@ -0,0 +1,4 @@ +CExtractor is a tool that produces subtitles from TV use. +Global accessibility (all users, all content, all countries) is the goal. + +WWW: https://www.ccextractor.org Index: head/multimedia/ccextractor/pkg-plist =================================================================== --- head/multimedia/ccextractor/pkg-plist +++ head/multimedia/ccextractor/pkg-plist @@ -0,0 +1,53 @@ +bin/ccextractor +include/activity.h +include/asf_constants.h +include/avc_functions.h +include/bitstream.h +include/ccx_common_char_encoding.h +include/ccx_common_common.h +include/ccx_common_constants.h +include/ccx_common_option.h +include/ccx_common_platform.h +include/ccx_common_structs.h +include/ccx_common_timing.h +include/ccx_decoders_608.h +include/ccx_decoders_708.h +include/ccx_decoders_708_encoding.h +include/ccx_decoders_708_output.h +include/ccx_decoders_common.h +include/ccx_decoders_isdb.h +include/ccx_decoders_structs.h +include/ccx_decoders_vbi.h +include/ccx_decoders_xds.h +include/ccx_demuxer.h +include/ccx_dtvcc.h +include/ccx_encoders_common.h +include/ccx_encoders_helpers.h +include/ccx_encoders_spupng.h +include/ccx_encoders_structs.h +include/ccx_encoders_xds.h +include/ccx_gxf.h +include/ccx_mp4.h +include/ccx_share.h +include/ccx_sub_entry_message.pb-c.h +include/compile_info.h +include/configuration.h +include/disable_warnings.h +include/dvb_subtitle_decoder.h +include/dvd_subtitle_decoder.h +include/ffmpeg_intgr.h +include/file_buffer.h +include/hamming.h +include/hardsubx.h +include/lib_ccx.h +include/list.h +include/networking.h +include/ocr.h +include/spupng_encoder.h +include/stdintmsc.h +include/teletext.h +include/ts_functions.h +include/utility.h +include/wtv_constants.h +lib/libccx.so +libdata/pkgconfig/ccx.pc