View | Details | Raw Unified | Return to bug 238004 | Differences between
and this patch

Collapse All | Expand All

(-)multimedia/Makefile (+1 lines)
Lines 249-254 Link Here
249
    SUBDIR += lxdvdrip
249
    SUBDIR += lxdvdrip
250
    SUBDIR += m2tstoavi
250
    SUBDIR += m2tstoavi
251
    SUBDIR += m2vrequantiser
251
    SUBDIR += m2vrequantiser
252
    SUBDIR += makemkv
252
    SUBDIR += mediainfo
253
    SUBDIR += mediainfo
253
    SUBDIR += mencoder
254
    SUBDIR += mencoder
254
    SUBDIR += mimms
255
    SUBDIR += mimms
(-)multimedia/makemkv/Makefile (+139 lines)
Line 0 Link Here
1
# Created by: Felix Palmen <felix@palmen-it.de>
2
# $FreeBSD$
3
4
PORTNAME=	makemkv
5
PORTVERSION=	1.14.4
6
CATEGORIES=	multimedia
7
MASTER_SITES=	http://www.makemkv.com/download/:makemkv \
8
		http://www.makemkv.com/download/old/:makemkv \
9
		SF/opencore-amr/fdk-aac/:fdkaac \
10
		https://ffmpeg.org/releases/:ffmpeg \
11
		https://www.openssl.org/source/old/${OPENSSLVERSION}/:openssl
12
DISTFILES=	makemkv-oss-${PORTVERSION}.tar.gz:makemkv \
13
		makemkv-bin-${PORTVERSION}.tar.gz:makemkv \
14
		fdk-aac-${FDKAACVERSION}.tar.gz:fdkaac \
15
		ffmpeg-${FFMPEGVERSION}.tar.bz2:ffmpeg \
16
		openssl-${OPENSSLFULLVER}.tar.gz:openssl
17
DIST_SUBDIR=	${PORTNAME}
18
19
MAINTAINER=	felix@palmen-it.de
20
COMMENT=	Video converter reading from DVD and Bluray
21
22
LICENSE=	MAKEMKV FDK LGPL21+ OpenSSL
23
LICENSE_COMB=	multi
24
LICENSE_NAME_MAKEMKV=	The MakeMKV EULA
25
LICENSE_NAME_FDK=	The FDK AAC License
26
LICENSE_FILE_MAKEMKV=	${WRKDIR}/makemkv-bin-${PORTVERSION}/src/eula_en_linux.txt
27
LICENSE_FILE_FDK=	${WRKDIR}/fdk-aac-${FDKAACVERSION}/NOTICE
28
LICENSE_PERMS_MAKEMKV=	no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell \
29
			no-auto-accept
30
LICENSE_PERMS_FDK=	dist-mirror no-dist-sell pkg-mirror no-pkg-sell \
31
			auto-accept
32
LICENSE_DISTFILES_FDK=	fdk-aac-${FDKAACVERSION}.tar.gz
33
LICENSE_DISTFILES_LGPL21+ =	ffmpeg-${FFMPEGVERSION}.tar.bz2
34
LICENSE_DISTFILES_OpenSSL=	openssl-${OPENSSLFULLVER}.tar.gz
35
LICENSE_DISTFILES_MAKEMKV=	makemkv-bin-${PORTVERSION}.tar.gz \
36
				makemkv-oss-${PORTVERSION}.tar.gz
37
38
ONLY_FOR_ARCHS=	amd64 i386
39
USES=	gmake linux pkgconfig perl5
40
USE_LINUX=	base expat expat:build openssl openssl:build devtools:build
41
USE_PERL5=	build
42
BUILD_DEPENDS=	nasm>0:devel/nasm \
43
		${LOCALBASE}/include/expat.h:textproc/expat2 \
44
		patchelf>0:sysutils/patchelf
45
46
RESTRICTED=	yes
47
RESTRICTED_FILES=	makemkv-bin-${PORTVERSION}.tar.gz
48
49
WRKSRC=		${WRKDIR}/makemkv-oss-${PORTVERSION}
50
51
SUB_FILES=	update-makemkv-drives
52
SUB_LIST=	LINUXBASE=${LINUXBASE}
53
54
FDKAACVERSION=	2.0.0
55
FFMPEGVERSION=	4.1.3
56
OPENSSLVERSION=	${"${linux_ARGS:Mc7}" != "":?1.0.2:1.0.1}
57
OPENSSLPATCHLEVEL=	${"${linux_ARGS:Mc7}" != "":?k:e}
58
OPENSSLFULLVER=	${OPENSSLVERSION}${OPENSSLPATCHLEVEL}
59
60
LINUXTRIPLET=	${LINUX_ARCH}-redhat-linux
61
LINUXLIBDIR=	${LINUXBASE}/${"${LINUX_ARCH:Mx86_64}" != "":?lib64:lib}
62
OPENSSLTARGET=	${"${LINUX_ARCH:Mx86_64}" != "":?linux-x86_64:linux-elf}
63
64
PATCHELF_CMD=	${LOCALBASE}/bin/patchelf
65
66
CFLAGS+=	-DFORCE_OPENSSL_NO_EC \
67
		-I${WRKDIR}/openssl-${OPENSSLFULLVER}/include
68
CPPFLAGS+=	-I${LOCALBASE}/include
69
LDFLAGS+=	-L${WRKDIR}/staticlibs/lib
70
HAS_CONFIGURE=	yes
71
CONFIGURE_ARGS=	--prefix=${PREFIX} --disable-gui --host=${LINUXTRIPLET} \
72
		--libdir=${PREFIX}/lib/makemkv
73
CONFIGURE_ENV=	CC=${LINUXTRIPLET}-gcc CXX=${LINUXTRIPLET}-g++ \
74
		PATH=${WRKDIR}/staticlibs/bin:${PATH} \
75
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig
76
MAKE_ENV=	PATH=${WRKDIR}/staticlibs/bin:${PATH}
77
78
post-patch:
79
		@${REINPLACE_CMD} -e 's:INSTALL) -D:INSTALL):' \
80
			${WRKSRC}/Makefile.in
81
		@${REINPLACE_CMD} -e 's:/bin/bash:/bin/sh:' \
82
			-e 's:x86_64:amd64:' \
83
			-e 's:-t \([^ ]*\) \([^ ]*\):\2 \1:' \
84
			${WRKDIR}/makemkv-bin-${PORTVERSION}/Makefile
85
86
pre-configure:
87
		${MKDIR} ${WRKDIR}/staticlibs/bin
88
		cd ${WRKDIR}/staticlibs/bin; \
89
		for t in gcc link ld objdump ar nm strip ranlib g++; do \
90
			${LN} -s ${LINUXBASE}/bin/$$t ${LINUXTRIPLET}-$$t; \
91
		done
92
		${MKDIR} ${WRKDIR}/staticlibs/lib
93
		cd ${WRKDIR}/staticlibs/lib; \
94
			${LN} -s ${LINUXLIBDIR}/libz.so.1 libz.so; \
95
			${LN} -s ${LINUXLIBDIR}/libcrypto.so.10 libcrypto.so; \
96
			${LN} -s ${LINUXLIBDIR}/libexpat.so.1 libexpat.so
97
		cd ${WRKDIR}/fdk-aac-${FDKAACVERSION}; \
98
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
99
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
100
		./configure --prefix=${WRKDIR}/staticlibs \
101
			--disable-shared --enable-static --with-pic \
102
			--host=${LINUXTRIPLET}; \
103
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
104
		${MAKE_CMD} install
105
		cd ${WRKDIR}/ffmpeg-${FFMPEGVERSION}; \
106
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
107
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig \
108
		CPPFLAGS="-Dcaddr_t=void\* -D__daddr_t_defined" \
109
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
110
		./configure --prefix=${WRKDIR}/staticlibs \
111
			--disable-shared --enable-static --enable-pic \
112
			--enable-libfdk-aac --pkg-config=pkg-config \
113
			--cross-prefix=${LINUXTRIPLET}- --arch=${LINUX_ARCH} \
114
			--target-os=linux --host-cc=${CC}; \
115
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
116
		${MAKE_CMD} ARCH=x86 && \
117
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
118
		${MAKE_CMD} install
119
		cd ${WRKDIR}/openssl-${OPENSSLFULLVER}; \
120
		./Configure --openssldir= --prefix=/usr ${OPENSSLTARGET}
121
122
pre-install:
123
		${MKDIR} ${STAGEDIR}${PREFIX}/lib/makemkv
124
125
post-install:
126
		${INSTALL_MAN} ${FILESDIR}/makemkvcon.1 \
127
			${STAGEDIR}${PREFIX}/man/man1
128
		cd ${WRKDIR}/makemkv-bin-${PORTVERSION}; \
129
		${MKDIR} tmp; \
130
		${ECHO_CMD} accepted > tmp/eula_accepted; \
131
		${MAKE_CMD} DESTDIR=${STAGEDIR} PREFIX=${PREFIX} install
132
		${PATCHELF_CMD} --set-rpath ${PREFIX}/lib/makemkv \
133
			${STAGEDIR}${PREFIX}/bin/makemkvcon
134
		${REINPLACE_CMD} -e 's:/sys/bus/scsi:/etc/makemkv/:' \
135
			${STAGEDIR}${PREFIX}/bin/makemkvcon
136
		${INSTALL_SCRIPT} ${WRKDIR}/update-makemkv-drives \
137
			${STAGEDIR}${PREFIX}/sbin
138
139
.include <bsd.port.mk>
(-)multimedia/makemkv/distinfo (+13 lines)
Line 0 Link Here
1
TIMESTAMP = 1560153976
2
SHA256 (makemkv/makemkv-oss-1.14.4.tar.gz) = 4061d95d088c1f924ac1b061a9a10f09eee9bfd9f638dcd37c8bf57602a63658
3
SIZE (makemkv/makemkv-oss-1.14.4.tar.gz) = 4385464
4
SHA256 (makemkv/makemkv-bin-1.14.4.tar.gz) = 63c86822f34283e10660ac1a06d6f868cd12a891742d25807809575e1bddb56e
5
SIZE (makemkv/makemkv-bin-1.14.4.tar.gz) = 9135402
6
SHA256 (makemkv/fdk-aac-2.0.0.tar.gz) = f7d6e60f978ff1db952f7d5c3e96751816f5aef238ecf1d876972697b85fd96c
7
SIZE (makemkv/fdk-aac-2.0.0.tar.gz) = 2864593
8
SHA256 (makemkv/ffmpeg-4.1.3.tar.bz2) = 29a679685bd7bc29158110f367edf67b31b451f2176f9d79d0f342b9e22d6a2a
9
SIZE (makemkv/ffmpeg-4.1.3.tar.bz2) = 10689073
10
SHA256 (makemkv/openssl-1.0.1e.tar.gz) = f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3
11
SIZE (makemkv/openssl-1.0.1e.tar.gz) = 4459777
12
SHA256 (makemkv/openssl-1.0.2k.tar.gz) = 6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
13
SIZE (makemkv/openssl-1.0.2k.tar.gz) = 5309236
(-)multimedia/makemkv/files/makemkvcon.1 (+94 lines)
Line 0 Link Here
1
.Dd May 20, 2019
2
.Dt MAKEMKVCON 1
3
.Os
4
.Sh NAME
5
.Nm makemkvcon
6
.Nd read video from DVD or Bluray disc and convert to mkv format
7
.Sh SYNOPSIS
8
.Nm
9
.Op Fl -minlength= Ns Ar seconds
10
.Cm info
11
.Ar source_spec
12
.Nm
13
.Op Fl -minlength= Ns Ar seconds
14
.Cm mkv
15
.Ar source_spec
16
.Ar title_spec
17
.Pa target_directory
18
.Sh DESCRIPTION
19
The
20
.Nm
21
utility shows information about a video disc in an optical drive, the
22
.Cm mkv
23
subcommand also converts selected titles from the disc to
24
.Sy .mkv
25
files in a given location.
26
.sp
27
The arguments are as follows:
28
.Bl -tag -width Ds
29
.It Fl -minlength= Ns Ar seconds
30
Only consider video titles with a minimal length of
31
.Ar seconds . No If you use the
32
.Cm mkv
33
subcommand after the
34
.Cm info
35
subcommand, make sure to pass the same value for
36
.Ar seconds ,
37
as filtering out titles with a smaller length happens before
38
numbering the titles.
39
.It Ar source_spec
40
Read video disc from the given source.
41
Use
42
.Dq disc:0
43
here to have
44
.Nm
45
read from the first video disc it can find.
46
.It Ar title_spec
47
Determines which titles to read.
48
This can be either a whole number from
49
.Sy 0
50
to
51
.Sy n-1
52
for a disc with
53
.Sy n
54
titles to read exactly one title, or the string
55
.Dq all
56
to read all titles found.
57
.It Ar target_directory
58
The path where to store the converted
59
.Sy .mkv
60
files.
61
.El
62
.Sh FILES
63
.Bl -tag -width Ds
64
.It Pa ~/.MakeMKV/settings.conf
65
You may put a license key in this file in the following format:
66
.Dl app_Key = Qq XXXXXXXXXXXXXXXX...
67
You can either buy a license or use the key, that is freely available
68
as long as MakeMKV is in beta from
69
.Lk https://www.makemkv.com/forum/ .
70
.El
71
.Sh EXAMPLES
72
.Bd -literal -offset indent
73
% makemkvcon mkv disc:0 0 .
74
.Ed
75
.sp
76
This command reads the first title from the first disc it can find and stores
77
a converted
78
.Sy .mkv
79
file in the current directory.
80
.Sh SEE ALSO
81
This manpage only describes the most commonly used options.
82
A more complete documentation is available online at
83
.Lk https://www.makemkv.com/developers/usage.txt
84
.sp
85
For some examples what you can put in your configuration file, see
86
.Lk http://wiki.indie-it.com/wiki/MakeMKV
87
.Sh BUGS
88
On
89
.Fx Ns ,
90
.Nm
91
crashes with a signal 11 (segmentation fault) after finishing its job.
92
Be aware this might leave a
93
.Sy .core
94
file on your file system.
(-)multimedia/makemkv/files/update-makemkv-drives.in (+58 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
trap 'rm -fr $TMPFIFODIR' EXIT
4
TMPFIFODIR=$(mktemp -d)
5
mkfifo $TMPFIFODIR/campipe
6
7
SGDEVS=
8
9
rm -fr %%LINUXBASE%%/etc/makemkv/devices
10
rm -fr %%LINUXBASE%%/etc/makemkv/drivers
11
12
camcontrol devlist | grep -E '[(,]cd[0-9]+[,)]' > $TMPFIFODIR/campipe &
13
while read line
14
do
15
	SCBUS=`echo $line | grep -Eo 'scbus[0-9]+' | sed -e 's:scbus::'`
16
	TARGET=`echo $line | grep -Eo 'target [0-9]+' | sed -e 's:target ::'`
17
	LUN=`echo $line | grep -Eo 'lun [0-9]+' | sed -e 's:lun ::'`
18
	SGDEV=`echo $line | grep -Eo '(.*)' | grep -Eo 'sg[0-9]+'`
19
	if [ -n "$SCBUS" -a -n "$TARGET" -a -n "$LUN" ]; then
20
		if [ -z "$SGDEV" ]; then
21
			cat <<EOF
22
Optical drive without 'sg' device found! Make sure your kernel supports
23
sg devices. To build a kernel with sg devices, you must add the following
24
to your kernel configuration:
25
26
device		sg
27
28
Refer to
29
<https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html>
30
for building a custom kernel.
31
32
When finished, re-run this script (update-makemkv-drives).
33
EOF
34
			exit 1
35
		fi
36
		SGDEVS="$SGDEVS /dev/$SGDEV"
37
		LOC=$SCBUS:0:$TARGET:$LUN
38
		mkdir -p %%LINUXBASE%%/etc/makemkv/devices/$LOC/scsi_generic/$SGDEV
39
		mkdir -p %%LINUXBASE%%/etc/makemkv/drivers/sr
40
		ln -s ../../devices/$LOC %%LINUXBASE%%/etc/makemkv/drivers/sr/$LOC
41
		echo 5 >%%LINUXBASE%%/etc/makemkv/devices/$LOC/type
42
	fi
43
done < $TMPFIFODIR/campipe
44
45
if [ -z "$SGDEVS" ]; then
46
	cat <<EOF
47
No usable optical drives found. Make sure your drive (/dev/cd*) is available.
48
Check the output of "camcontrol devlist".
49
50
When finished, re-run this script (update-makemkv-drives).
51
EOF
52
	exit 1
53
fi
54
55
echo devices linked: $SGDEVS.
56
57
echo "When your configuration changes, re-run this script (update-makemkv-drives)."
58
(-)multimedia/makemkv/pkg-descr (+24 lines)
Line 0 Link Here
1
Video converter reading from DVD and Bluray
2
3
MakeMKV is your one-click solution to convert video that you own into free and
4
patents-unencumbered format that can be played everywhere. MakeMKV is a format
5
converter, otherwise called "transcoder". It converts the video clips from
6
proprietary (and usually encrypted) disc into a set of MKV files, preserving
7
most information but not changing it in any way. The MKV format can store
8
multiple video/audio tracks with all meta-information and preserve chapters.
9
There are many players that can play MKV files nearly on all platforms, and
10
there are tools to convert MKV files to many formats, including DVD and Blu-ray
11
discs.
12
13
* Reads DVD and Blu-ray discs
14
* Reads Blu-ray discs protected with latest versions of AACS and BD+
15
* Preserves all video and audio tracks, including HD audio
16
* Preserves chapters information
17
* Preserves all meta-information (track language, audio type)
18
* Fast conversion - converts as fast as your drive can read data.
19
* No additional software is required for conversion or decryption.
20
* Functionality to open DVD discs is free and will always stay free.
21
* All features (including Blu-ray decryption and processing) are free during
22
  BETA.
23
24
WWW: https://www.makemkv.com
(-)multimedia/makemkv/pkg-message (+14 lines)
Line 0 Link Here
1
This port doesn't include the MakeMKV GUI as it doesn't work on FreeBSD.
2
3
To enable makemkvcon to find a drive on FreeBSD, a part of Linux' sysfs must
4
be faked. The included script `update-makemkv-drives' creates these faked
5
sysfs entries and is run automatically after installation. If your hardware
6
configuration changes, make sure to re-run `update-makemkv-drives'.
7
8
If makemkvcon refuses to work as root, check the permissions of
9
/compat/linux/tmp -- it should be world-writable and sticky. To set these
10
permissions, use the command
11
12
  chmod 1777 /compat/linux/tmp
13
14
(-)multimedia/makemkv/pkg-plist (+11 lines)
Line 0 Link Here
1
bin/makemkvcon
2
lib/makemkv/libdriveio.so.0
3
lib/makemkv/libmakemkv.so.1
4
lib/makemkv/libmmbd.so.0
5
man/man1/makemkvcon.1.gz
6
sbin/update-makemkv-drives
7
share/MakeMKV/appdata.tar
8
share/MakeMKV/blues.jar
9
share/MakeMKV/blues.policy
10
@postexec update-makemkv-drives
11
@preunexec rm -fr %%LINUXBASE%%/etc/makemkv

Return to bug 238004