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

Collapse All | Expand All

(-)multimedia/Makefile (+1 lines)
Lines 250-255 Link Here
250
    SUBDIR += lxdvdrip
250
    SUBDIR += lxdvdrip
251
    SUBDIR += m2tstoavi
251
    SUBDIR += m2tstoavi
252
    SUBDIR += m2vrequantiser
252
    SUBDIR += m2vrequantiser
253
    SUBDIR += makemkv
253
    SUBDIR += mediainfo
254
    SUBDIR += mediainfo
254
    SUBDIR += mencoder
255
    SUBDIR += mencoder
255
    SUBDIR += mimms
256
    SUBDIR += mimms
(-)multimedia/makemkv/Makefile (+151 lines)
Line 0 Link Here
1
# Created by: Felix Palmen <felix@palmen-it.de>
2
# $FreeBSD$
3
4
PORTNAME=	makemkv
5
PORTVERSION=	1.14.5
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
PLIST_SUB=	LINUXBASE=${LINUXBASE}
54
55
FDKAACVERSION=	2.0.0
56
FFMPEGVERSION=	4.2.1
57
OPENSSLVERSION=	${"${linux_ARGS:Mc7}" != "":?1.0.2:1.0.1}
58
OPENSSLPATCHLEVEL=	${"${linux_ARGS:Mc7}" != "":?k:e}
59
OPENSSLFULLVER=	${OPENSSLVERSION}${OPENSSLPATCHLEVEL}
60
61
LINUXARCH=	${ARCH:S/amd64/x86_64/}
62
LINUXTRIPLET=	${LINUXARCH}-redhat-linux
63
LINUXLIBDIR=	${LINUXBASE}/${"${LINUXARCH:Mx86_64}" != "":?lib64:lib}
64
OPENSSLTARGET=	${"${LINUXARCH:Mx86_64}" != "":?linux-x86_64:linux-elf}
65
66
PATCHELF_CMD=	${LOCALBASE}/bin/patchelf
67
68
CFLAGS+=	-DFORCE_OPENSSL_NO_EC \
69
		-I${WRKDIR}/openssl-${OPENSSLFULLVER}/include
70
CPPFLAGS+=	-I${LOCALBASE}/include
71
LDFLAGS+=	-L${WRKDIR}/staticlibs/lib
72
HAS_CONFIGURE=	yes
73
CONFIGURE_ARGS=	--prefix=${PREFIX} --disable-gui --host=${LINUXTRIPLET} \
74
		--libdir=${PREFIX}/lib/makemkv
75
CONFIGURE_ENV=	CC=${LINUXTRIPLET}-gcc CXX=${LINUXTRIPLET}-g++ \
76
		PATH=${WRKDIR}/staticlibs/bin:${PATH} \
77
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig
78
MAKE_ENV=	PATH=${WRKDIR}/staticlibs/bin:${PATH}
79
80
post-patch:
81
		@${REINPLACE_CMD} -e 's:INSTALL) -D:INSTALL):' \
82
			${WRKSRC}/Makefile.in
83
		@${REINPLACE_CMD} -e 's:/bin/bash:/bin/sh:' \
84
			-e 's:x86_64:amd64:' \
85
			-e 's:-t \([^ ]*\) \([^ ]*\):\2 \1:' \
86
			${WRKDIR}/makemkv-bin-${PORTVERSION}/Makefile
87
88
pre-configure:
89
		${MKDIR} ${WRKDIR}/staticlibs/bin
90
		cd ${WRKDIR}/staticlibs/bin; \
91
		for t in gcc link ld objdump ar nm strip ranlib g++; do \
92
			${LN} -s ${LINUXBASE}/bin/$$t ${LINUXTRIPLET}-$$t; \
93
		done
94
		${MKDIR} ${WRKDIR}/staticlibs/lib
95
		cd ${WRKDIR}/staticlibs/lib; \
96
			${LN} -s ${LINUXLIBDIR}/libz.so.1 libz.so; \
97
			${LN} -s ${LINUXLIBDIR}/libcrypto.so.10 libcrypto.so; \
98
			${LN} -s ${LINUXLIBDIR}/libexpat.so.1 libexpat.so
99
		cd ${WRKDIR}/fdk-aac-${FDKAACVERSION}; \
100
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
101
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
102
		CXXFLAGS="${CFLAGS}" \
103
		./configure --prefix=${WRKDIR}/staticlibs \
104
			--disable-shared --enable-static --with-pic \
105
			--host=${LINUXTRIPLET} --disable-silent-rules; \
106
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
107
		CXXFLAGS="${CFLAGS}" \
108
		${MAKE_CMD} install
109
		cd ${WRKDIR}/ffmpeg-${FFMPEGVERSION}; \
110
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
111
		PKG_CONFIG_PATH=${WRKDIR}/staticlibs/lib/pkgconfig \
112
		CPPFLAGS="-Dcaddr_t=void\* -D__daddr_t_defined" \
113
		LDFLAGS=-L${WRKDIR}/staticlibs/lib \
114
		CFLAGS="${CFLAGS}" \
115
		./configure --prefix=${WRKDIR}/staticlibs \
116
			--disable-shared --enable-static --enable-pic \
117
			--enable-libfdk-aac --pkg-config=pkg-config \
118
			--cross-prefix=${LINUXTRIPLET}- --arch=${LINUXARCH} \
119
			--target-os=linux --host-cc=${CC}; \
120
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
121
		CFLAGS="${CFLAGS}" \
122
		${MAKE_CMD} V=1 ARCH=x86 && \
123
		PATH=${WRKDIR}/staticlibs/bin:$$PATH \
124
		${MAKE_CMD} install
125
		cd ${WRKDIR}/openssl-${OPENSSLFULLVER}; \
126
		./Configure --openssldir= --prefix=/usr ${OPENSSLTARGET}
127
128
pre-install:
129
		${MKDIR} ${STAGEDIR}${PREFIX}/lib/makemkv
130
131
post-install:
132
		${INSTALL_MAN} ${FILESDIR}/makemkvcon.1 \
133
			${STAGEDIR}${PREFIX}/man/man1
134
		cd ${WRKDIR}/makemkv-bin-${PORTVERSION}; \
135
		${MKDIR} tmp; \
136
		${ECHO_CMD} accepted > tmp/eula_accepted; \
137
		${MAKE_CMD} DESTDIR=${STAGEDIR} PREFIX=${PREFIX} install
138
		${PATCHELF_CMD} --set-rpath ${PREFIX}/lib/makemkv \
139
			${STAGEDIR}${PREFIX}/bin/makemkvcon
140
		${REINPLACE_CMD} -e 's:/sys/bus/scsi:/etc/makemkv/:' \
141
			${STAGEDIR}${PREFIX}/bin/makemkvcon
142
		${INSTALL_SCRIPT} ${WRKDIR}/update-makemkv-drives \
143
			${STAGEDIR}${PREFIX}/sbin
144
145
.include <bsd.port.pre.mk>
146
147
.if ${linux_ARGS} == c6
148
SSP_CFLAGS?=	-fstack-protector
149
.endif
150
151
.include <bsd.port.post.mk>
(-)multimedia/makemkv/distinfo (+13 lines)
Line 0 Link Here
1
TIMESTAMP = 1569080682
2
SHA256 (makemkv/makemkv-oss-1.14.5.tar.gz) = d177f5962054d3b866d871aa06f1611dcced7ef2f0dcd41a771a50467505e1c9
3
SIZE (makemkv/makemkv-oss-1.14.5.tar.gz) = 4384596
4
SHA256 (makemkv/makemkv-bin-1.14.5.tar.gz) = 3a5a34facad3705518cbef26dfd424bc075e3a19a2a159b9bac3261220e8d3e6
5
SIZE (makemkv/makemkv-bin-1.14.5.tar.gz) = 9465109
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.2.1.tar.bz2) = 682a9fa3f6864d7f0dbf224f86b129e337bc60286e0d00dffcd710998d521624
9
SIZE (makemkv/ffmpeg-4.2.1.tar.bz2) = 10953293
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