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

Collapse All | Expand All

(-)multimedia/makemkv/Makefile (+141 lines)
Line 0 Link Here
1
# Created by: Felix Palmen <felix@palmen-it.de>
2
# $FreeBSD$
3
4
PORTNAME=	makemkv
5
PORTVERSION=	1.14.3
6
CATEGORIES=	multimedia
7
MASTER_SITES=	http://www.makemkv.com/download/old/:makemkv \
8
		http://www.makemkv.com/download/: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
FDKAACVERSION=	2.0.0
52
FFMPEGVERSION=	4.1.3
53
OPENSSLVERSION=	${"${linux_ARGS:Mc7}" != "":?1.0.2:1.0.1}
54
OPENSSLPATCHLEVEL=	${"${linux_ARGS:Mc7}" != "":?k:e}
55
OPENSSLFULLVER=	${OPENSSLVERSION}${OPENSSLPATCHLEVEL}
56
57
LINUXTRIPLET=	${LINUX_ARCH}-redhat-linux
58
LINUXLIBDIR=	${LINUXBASE}/${"${LINUX_ARCH:Mx86_64}" != "":?lib64:lib}
59
OPENSSLTARGET=	${"${LINUX_ARCH:Mx86_64}" != "":?linux-x86_64:linux-elf}
60
61
PATCHELF_CMD=	${LOCALBASE}/bin/patchelf
62
OPTPREFIX=	/opt/makemkv
63
64
CFLAGS+=	-DFORCE_OPENSSL_NO_EC \
65
		-I${WRKDIR}/openssl-${OPENSSLFULLVER}/include
66
CPPFLAGS+=	-I${LOCALBASE}/include
67
LDFLAGS+=	-L${WRKDIR}/staticlibs/lib
68
HAS_CONFIGURE=	yes
69
CONFIGURE_ARGS=	--prefix=${OPTPREFIX} --disable-gui --host=${LINUXTRIPLET}
70
CONFIGURE_ENV=	CC=${LINUXTRIPLET}-gcc CXX=${LINUXTRIPLET}-g++ \
71
		PATH=${WRKDIR}/staticlibs/bin:${PATH} \
72
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig
73
MAKE_ENV=	PATH=${WRKDIR}/staticlibs/bin:${PATH}
74
75
post-patch:
76
		@${REINPLACE_CMD} -e 's:INSTALL) -D:INSTALL):' \
77
			${WRKSRC}/Makefile.in
78
		@${REINPLACE_CMD} -e 's:/bin/bash:/bin/sh:' \
79
			-e 's:x86_64:amd64:' \
80
			-e 's:-t \([^ ]*\) \([^ ]*\):\2 \1:' \
81
			${WRKDIR}/makemkv-bin-${PORTVERSION}/Makefile
82
83
pre-configure:
84
		${MKDIR} ${WRKDIR}/staticlibs/bin
85
		cd ${WRKDIR}/staticlibs/bin; \
86
		for t in gcc link ld objdump ar nm strip ranlib g++; do \
87
			${LN} -s ${LINUXBASE}/bin/$$t ${LINUXTRIPLET}-$$t; \
88
		done
89
		${MKDIR} ${WRKDIR}/staticlibs/lib
90
		cd ${WRKDIR}/staticlibs/lib; \
91
			${LN} -s ${LINUXLIBDIR}/libz.so.1 libz.so; \
92
			${LN} -s ${LINUXLIBDIR}/libcrypto.so.10 libcrypto.so; \
93
			${LN} -s ${LINUXLIBDIR}/libexpat.so.1 libexpat.so
94
		cd ${WRKDIR}/fdk-aac-${FDKAACVERSION}; \
95
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
96
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
97
		./configure --prefix=${WRKDIR}/staticlibs \
98
			--disable-shared --enable-static --with-pic \
99
			--host=${LINUXTRIPLET}; \
100
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
101
		${MAKE_CMD} install
102
		cd ${WRKDIR}/ffmpeg-${FFMPEGVERSION}; \
103
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
104
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig \
105
		CPPFLAGS="-Dcaddr_t=void\* -D__daddr_t_defined" \
106
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
107
		./configure --prefix=${WRKDIR}/staticlibs \
108
			--disable-shared --enable-static --enable-pic \
109
			--enable-libfdk-aac --pkg-config=pkg-config \
110
			--cross-prefix=${LINUXTRIPLET}- --arch=${LINUX_ARCH} \
111
			--target-os=linux --host-cc=${CC}; \
112
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
113
		${MAKE_CMD} ARCH=x86 && \
114
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
115
		${MAKE_CMD} install
116
		cd ${WRKDIR}/openssl-${OPENSSLFULLVER}; \
117
		./Configure --openssldir= --prefix=/usr ${OPENSSLTARGET}
118
119
pre-install:
120
		${MKDIR} ${STAGEDIR}${OPTPREFIX}/lib
121
		${MKDIR} ${STAGEDIR}${OPTPREFIX}/bin
122
		${MKDIR} ${STAGEDIR}${OPTPREFIX}/share
123
		${MKDIR} ${STAGEDIR}${PREFIX}/man/man1
124
		${INSTALL_MAN} ${FILESDIR}/makemkvcon.1 \
125
			${STAGEDIR}${PREFIX}/man/man1
126
127
post-stage:
128
		cd ${WRKDIR}/makemkv-bin-${PORTVERSION}; \
129
		${MKDIR} tmp; \
130
		${ECHO_CMD} accepted > tmp/eula_accepted; \
131
		${MAKE_CMD} DESTDIR=${STAGEDIR} PREFIX=${OPTPREFIX} install
132
		${PATCHELF_CMD} --set-rpath ${OPTPREFIX}/lib \
133
			${STAGEDIR}${OPTPREFIX}/bin/makemkvcon
134
		${REINPLACE_CMD} -e 's:/sys/bus/scsi:/opt/makemkv/:' \
135
			${STAGEDIR}${OPTPREFIX}/bin/makemkvcon
136
		${INSTALL_SCRIPT} ${SCRIPTDIR}/makemkvcon \
137
			${STAGEDIR}${PREFIX}/bin
138
		${INSTALL_SCRIPT} ${SCRIPTDIR}/update-makemkv-drives \
139
			${STAGEDIR}${PREFIX}/sbin
140
141
.include <bsd.port.mk>
(-)multimedia/makemkv/distinfo (+13 lines)
Line 0 Link Here
1
TIMESTAMP = 1557042960
2
SHA256 (makemkv/makemkv-oss-1.14.3.tar.gz) = 222cf2dcfde7a84944353c7edd326e18e3d35b7a7e575484111f64a4b1b9fec9
3
SIZE (makemkv/makemkv-oss-1.14.3.tar.gz) = 4384183
4
SHA256 (makemkv/makemkv-bin-1.14.3.tar.gz) = e0b10e94ea98643e05da009f867e58481e721fb5c0551d6e5aa2f7756f3e2bb4
5
SIZE (makemkv/makemkv-bin-1.14.3.tar.gz) = 9117659
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 (+92 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
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. Use
41
.Dq disc:0
42
here to have
43
.Nm
44
read from the first video disc it can find.
45
.It Ar title_spec
46
Determines which titles to read. This can be either a whole number from
47
.Sy 0
48
to
49
.Sy n-1
50
for a disc with
51
.Sy n
52
titles to read exactly one title, or the string
53
.Dq all
54
to read all titles found.
55
.It Ar target_directory
56
The path where to store the converted
57
.Sy .mkv
58
files.
59
.El
60
.Sh FILES
61
.Bl -tag -width Ds
62
.It Pa ~/.MakeMKV/settings.conf
63
You may put a license key in this file in the following format:
64
.Dl app_Key = Qq XXXXXXXXXXXXXXXX...
65
You can either buy a license or use the key, that is freely available
66
as long as MakeMKV is in beta from
67
.Lk https://www.makemkv.com/forum/ .
68
.El
69
.Sh EXAMPLES
70
71
.Dl % makemkvcon mkv disc:0 0 Pf .
72
73
This command reads the first title from the first disc it can find and stores
74
a converted
75
.Sy .mkv
76
file in the current directory.
77
.Sh SEE ALSO
78
This manpage only describes the most commonly used options. A more complete
79
documentation is available online at
80
.Lk https://www.makemkv.com/developers/usage.txt
81
82
For some examples what you can put in your configuration file, see
83
.Lk http://wiki.indie-it.com/wiki/MakeMKV
84
.Sh BUGS
85
On
86
.Fx
87
.Ns ,
88
.Nm
89
crashes with a signal 11 (segmentation fault) after finishing its job. Be aware
90
this might leave a
91
.Sy .core
92
file on your file system.
(-)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 (+7 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
(-)multimedia/makemkv/pkg-plist (+18 lines)
Line 0 Link Here
1
@dir /opt
2
@dir /opt/makemkv
3
@dir /opt/makemkv/bin
4
@dir /opt/makemkv/lib
5
@dir /opt/makemkv/share
6
@dir /opt/makemkv/share/MakeMKV
7
/opt/makemkv/bin/makemkvcon
8
/opt/makemkv/lib/libdriveio.so.0
9
/opt/makemkv/lib/libmakemkv.so.1
10
/opt/makemkv/lib/libmmbd.so.0
11
/opt/makemkv/share/MakeMKV/appdata.tar
12
/opt/makemkv/share/MakeMKV/blues.jar
13
/opt/makemkv/share/MakeMKV/blues.policy
14
bin/makemkvcon
15
man/man1/makemkvcon.1.gz
16
sbin/update-makemkv-drives
17
@postexec update-makemkv-drives
18
@preunexec rm -fr /opt/makemkv/devices; rm -fr /opt/makemkv/drivers
(-)multimedia/makemkv/scripts/makemkvcon (+3 lines)
Line 0 Link Here
1
#!/bin/sh
2
exec /opt/makemkv/bin/makemkvcon "$@"
3
(-)multimedia/makemkv/scripts/update-makemkv-drives (+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 /opt/makemkv/devices
10
rm -fr /opt/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 /opt/makemkv/devices/$LOC/scsi_generic/$SGDEV
39
		mkdir -p /opt/makemkv/drivers/sr
40
		ln -s ../../devices/$LOC /opt/makemkv/drivers/sr/$LOC
41
		echo 5 >/opt/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

Return to bug 238004