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

Collapse All | Expand All

(-)multimedia/makemkv/Makefile (+264 lines)
Line 0 Link Here
1
# Created by: Felix Palmen <felix@palmen-it.de>
2
# $FreeBSD$
3
4
PORTNAME=	makemkv
5
PORTVERSION=	1.15.0
6
CATEGORIES=	multimedia
7
MASTER_SITES=	http://www.makemkv.com/download/:makemkv \
8
		http://www.makemkv.com/download/old/:makemkv \
9
		KERNEL_ORG/linux/kernel/v2.6:linux \
10
		GNU/binutils:binutils \
11
		GNU/glibc:glibc \
12
		GNU/gmp:gmp \
13
		GNU/mpfr:mpfr \
14
		GNU/mpc:mpc \
15
		GCC/releases/gcc-${GCCVERSION}:gcc \
16
		SF/opencore-amr/fdk-aac/:fdkaac \
17
		https://ffmpeg.org/releases/:ffmpeg \
18
		https://www.openssl.org/source/old/${OPENSSLVERSION}/:openssl
19
DISTFILES=	makemkv-oss-${PORTVERSION}.tar.gz:makemkv \
20
		makemkv-bin-${PORTVERSION}.tar.gz:makemkv \
21
		linux-${LINUXVERSION}.tar.xz:linux \
22
		binutils-${BINUTILSVERSION}.tar.bz2:binutils \
23
		glibc-${GLIBCVERSION}.tar.xz:glibc \
24
		gmp-${GMPVERSION}.tar.xz:gmp \
25
		mpfr-${MPFRVERSION}.tar.xz:mpfr \
26
		mpc-${MPCVERSION}.tar.gz:mpc \
27
		gcc-${GCCVERSION}.tar.gz:gcc \
28
		fdk-aac-${FDKAACVERSION}.tar.gz:fdkaac \
29
		ffmpeg-${FFMPEGVERSION}.tar.bz2:ffmpeg \
30
		openssl-${OPENSSLFULLVER}.tar.gz:openssl
31
DIST_SUBDIR=	${PORTNAME}
32
33
MAINTAINER=	felix@palmen-it.de
34
COMMENT=	Video converter reading from DVD and Bluray
35
36
LICENSE=	MAKEMKV FDK GPLv2 GPLv3 LGPL21+ LGPL3 OpenSSL
37
LICENSE_COMB=	multi
38
LICENSE_NAME_MAKEMKV=	The MakeMKV EULA
39
LICENSE_NAME_FDK=	The FDK AAC License
40
LICENSE_FILE_MAKEMKV=	${WRKDIR}/makemkv-bin-${PORTVERSION}/src/eula_en_linux.txt
41
LICENSE_FILE_FDK=	${WRKDIR}/fdk-aac-${FDKAACVERSION}/NOTICE
42
LICENSE_PERMS_MAKEMKV=	no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell \
43
			no-auto-accept
44
LICENSE_PERMS_FDK=	dist-mirror no-dist-sell pkg-mirror no-pkg-sell \
45
			auto-accept
46
LICENSE_DISTFILES_FDK=	fdk-aac-${FDKAACVERSION}.tar.gz
47
LICENSE_DISTFILES_GPLv2=	binutils-${BINUTILSVERSION}.tar.bz2 \
48
				glibc-${GLIBCVERSION}.tar.xz \
49
				linux-${LINUXVERSION}.tar.xz \
50
				gcc-${GCCVERSION}.tar.gz
51
LICENSE_DISTFILES_LGPL21+ =	ffmpeg-${FFMPEGVERSION}.tar.bz2
52
LICENSE_DISTFILES_GPLv3=	gmp-${GMPVERSION}.tar.xz \
53
				mpfr-${MPFRVERSION}.tar.xz
54
LICENSE_DISTFILES_LGPL3=	mpc-${MPCVERSION}.tar.gz
55
LICENSE_DISTFILES_OpenSSL=	openssl-${OPENSSLFULLVER}.tar.gz
56
LICENSE_DISTFILES_MAKEMKV=	makemkv-bin-${PORTVERSION}.tar.gz \
57
				makemkv-oss-${PORTVERSION}.tar.gz
58
59
ONLY_FOR_ARCHS=	amd64 i386
60
USES=	gmake linux pkgconfig perl5
61
USE_LINUX=	base expat expat:build openssl openssl:build
62
USE_PERL5=	build
63
USE_GCC=	yes
64
BUILD_DEPENDS=	nasm>0:devel/nasm \
65
		${LOCALBASE}/include/expat.h:textproc/expat2 \
66
		patchelf>0:sysutils/patchelf \
67
		gawk>0:lang/gawk \
68
		gsed>0:textproc/gsed
69
70
RESTRICTED=	yes
71
RESTRICTED_FILES=	makemkv-bin-${PORTVERSION}.tar.gz
72
73
WRKSRC=		${WRKDIR}/makemkv-oss-${PORTVERSION}
74
75
SUB_FILES=	update-makemkv-drives
76
SUB_LIST=	LINUXBASE=${LINUXBASE}
77
PLIST_SUB=	LINUXBASE=${LINUXBASE}
78
79
LINUXVERSION=	2.6.32.27
80
BINUTILSVERSION=	2.27
81
GLIBCVERSION=	2.17
82
GMPVERSION=	5.1.3
83
MPFRVERSION=	3.1.2
84
MPCVERSION=	1.0.3
85
GCCVERSION=	5.5.0
86
FDKAACVERSION=	2.0.1
87
FFMPEGVERSION=	4.2.2
88
OPENSSLVERSION=	1.0.2
89
OPENSSLPATCHLEVEL=	k
90
OPENSSLFULLVER=	${OPENSSLVERSION}${OPENSSLPATCHLEVEL}
91
92
LINUXARCH=	${ARCH:S/amd64/x86_64/}
93
LINUXTRIPLET=	${LINUXARCH}-unknown-linux-gnu
94
LINUXLIBDIR=	${LINUXBASE}/${"${LINUXARCH:Mx86_64}" != "":?lib64:lib}
95
GNUCROSSDIR=	${WRKDIR}/gnuroot/${LINUXTRIPLET}
96
GNUCROSSLIBDIR=	${GNUCROSSDIR}/${"${LINUXARCH:Mx86_64}" != "":?lib64:lib}
97
OPENSSLTARGET=	${"${LINUXARCH:Mx86_64}" != "":?linux-x86_64:linux-elf}
98
99
PATCHELF_CMD?=	${LOCALBASE}/bin/patchelf
100
101
CFLAGS+=	-DFORCE_OPENSSL_NO_EC -I${WRKDIR}/gnuroot/include \
102
		-I${WRKDIR}/openssl-${OPENSSLFULLVER}/include
103
SSP_CFLAGS=
104
LDFLAGS+=	-L${WRKDIR}/gnuroot/lib -Wl,-rpath-link=${WRKDIR}/gnuroot/lib
105
HAS_CONFIGURE=	yes
106
CONFIGURE_ARGS=	--prefix=${PREFIX} --disable-gui --host=${LINUXTRIPLET} \
107
		--libdir=${PREFIX}/lib/makemkv
108
CONFIGURE_ENV=	CC=${LINUXTRIPLET}-gcc CXX=${LINUXTRIPLET}-g++ \
109
		CFLAGS="${CFLAGS:N-Wl,-rpath=*}" \
110
		CXXFLAGS="${CXXFLAGS:N-Wl,-rpath=*}" \
111
		LDFLAGS="${LDFLAGS:N-Wl,-rpath=*}" \
112
		PATH=${WRKDIR}/gnuroot/bin:${PATH} \
113
		PKG_CONFIG_PATH=${WRKDIR}/gnuroot/lib/pkgconfig
114
MAKE_ENV=	PATH=${WRKDIR}/gnuroot/bin:${PATH}
115
STRIP_CMD=	${WRKDIR}/gnuroot/bin/${LINUXTRIPLET}-strip
116
117
post-extract:
118
		@${MV} -f ${WRKDIR}/gmp-${GMPVERSION} \
119
			${WRKDIR}/gcc-${GCCVERSION}/gmp
120
		@${MV} -f ${WRKDIR}/mpfr-${MPFRVERSION} \
121
			${WRKDIR}/gcc-${GCCVERSION}/mpfr
122
		@${MV} -f ${WRKDIR}/mpc-${MPCVERSION} \
123
			${WRKDIR}/gcc-${GCCVERSION}/mpc
124
		@${MKDIR} ${WRKDIR}/gnuroot/lib
125
		@cd ${WRKDIR}/gnuroot/lib; \
126
			${LN} -s ${LINUXLIBDIR}/libz.so.1; \
127
			${LN} -s libz.so.1 libz.so; \
128
			${LN} -s ${LINUXLIBDIR}/libcrypto.so.10; \
129
			${LN} -s libcrypto.so.10 libcrypto.so; \
130
			${LN} -s ${LINUXLIBDIR}/libexpat.so.1; \
131
			${LN} -s libexpat.so.1 libexpat.so
132
		@${MKDIR} ${WRKDIR}/gnuroot/include
133
		@cd ${WRKDIR}/gnuroot/include; \
134
			${LN} -s /usr/include/zlib.h; \
135
			${LN} -s /usr/include/zconf.h; \
136
			${LN} -s ${LOCALBASE}/include/expat.h; \
137
			${LN} -s ${LOCALBASE}/include/expat_config.h; \
138
			${LN} -s ${LOCALBASE}/include/expat_external.h
139
		@${MKDIR} ${WRKDIR}/binutils-build
140
		@${MKDIR} ${WRKDIR}/gcc-build
141
		@${MKDIR} ${WRKDIR}/glibc-build
142
143
post-patch:
144
		@${REINPLACE_CMD} -e 's:INSTALL) -D:INSTALL):' \
145
			${WRKSRC}/Makefile.in
146
		@${REINPLACE_CMD} -e 's:/bin/bash:/bin/sh:' \
147
			-e 's:x86_64:amd64:' \
148
			-e 's:-t \([^ ]*\) \([^ ]*\):\2 \1:' \
149
			${WRKDIR}/makemkv-bin-${PORTVERSION}/Makefile
150
		@${REINPLACE_CMD} -e 's:3\.79:4.*:' \
151
			${WRKDIR}/glibc-${GLIBCVERSION}/configure
152
		@${REINPLACE_CMD} -e 's:#ifndef __u_char_defined:#if 0:' \
153
			-e 's:#ifndef __daddr_t_defined:#if 0:' \
154
			${WRKDIR}/glibc-${GLIBCVERSION}/sunrpc/rpc/types.h
155
		@${REINPLACE_CMD} -e 's:^\([[:space:]]*\)sed :\1gsed :' \
156
			${WRKDIR}/glibc-${GLIBCVERSION}/Makerules
157
158
pre-configure:
159
		# Linux headers
160
		cd ${WRKDIR}/linux-${LINUXVERSION}; \
161
		${MAKE_CMD} V=1 HOSTCC=${CC} ARCH=${LINUXARCH} \
162
			INSTALL_HDR_PATH=${GNUCROSSDIR} headers_install; \
163
		# Binutils
164
		cd ${WRKDIR}/binutils-build; \
165
		CC=${CC} CXX=${CXX} ../binutils-${BINUTILSVERSION}/configure \
166
			--target=${LINUXTRIPLET} \
167
			--prefix=${WRKDIR}/gnuroot \
168
			--disable-multilib --disable-nls; \
169
		${MAKE_CMD} ${_MAKE_JOBS} && \
170
		${MAKE_CMD} install
171
		# GCC compiler
172
		cd ${WRKDIR}/gcc-build; \
173
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
174
		CC=${CC} CXX=${CXX} ../gcc-${GCCVERSION}/configure \
175
			--target=${LINUXTRIPLET} \
176
			--prefix=${WRKDIR}/gnuroot \
177
			--enable-languages=c,c++ --disable-multilib; \
178
		${MAKE_CMD} ${_MAKE_JOBS} all-gcc && \
179
		${MAKE_CMD} install-gcc
180
		# Glibc headers / startup code
181
		cd ${WRKDIR}/glibc-build; \
182
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
183
		export nargs=0; \
184
		BUILD_CC=${CC} CC=${LINUXTRIPLET}-gcc \
185
		../glibc-${GLIBCVERSION}/configure \
186
			--host=${LINUXTRIPLET} \
187
			--prefix=${GNUCROSSDIR} \
188
			--with-binutils=${WRKDIR}/gnuroot/bin \
189
			--with-headers=${GNUCROSSDIR}/include \
190
			--disable-profile --disable-multilib \
191
			--enable-kernel=2.6.32 libc_cv_forced_unwind=yes \
192
			libc_cv_ssp=no; \
193
		${MAKE_CMD} install-bootstrap-headers=yes install-headers; \
194
		${MAKE_CMD} ${_MAKE_JOBS} csu/subdir_lib; \
195
		${INSTALL_DATA} csu/crt1.o csu/crti.o csu/crtn.o \
196
			${GNUCROSSDIR}/lib; \
197
		${LINUXTRIPLET}-gcc -nostdlib -nostartfiles -shared \
198
			-x c /dev/null -o ${GNUCROSSDIR}/lib/libc.so; \
199
		${TOUCH} ${GNUCROSSDIR}/include/gnu/stubs.h
200
		# GCC support libs
201
		cd ${WRKDIR}/gcc-build; \
202
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
203
		${MAKE_CMD} ${_MAKE_JOBS} all-target-libgcc; \
204
		${MAKE_CMD} install-target-libgcc
205
		# Glibc library
206
		cd ${WRKDIR}/glibc-build; \
207
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
208
		${MAKE_CMD} ${_MAKE_JOBS}; \
209
		${MAKE_CMD} install
210
		# GCC libstdc++
211
		${ECHO_CMD} '#/bin/sh\ntrue' \
212
			>${WRKDIR}/gnuroot/bin/ldconfig
213
		${CHMOD} +x ${WRKDIR}/gnuroot/bin/ldconfig
214
		cd ${WRKDIR}/gcc-build; \
215
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
216
		${MAKE_CMD} ${_MAKE_JOBS}; \
217
		${MAKE_CMD} install
218
		# FDK AAC
219
		cd ${WRKDIR}/fdk-aac-${FDKAACVERSION}; \
220
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
221
		export CXXFLAGS="${CFLAGS}"; \
222
		LDFLAGS=-L${WRKDIR}/gnuroot/lib \
223
		./configure --prefix=${WRKDIR}/gnuroot \
224
			--disable-shared --enable-static --with-pic \
225
			--host=${LINUXTRIPLET} --disable-silent-rules; \
226
		${MAKE_CMD} ${_MAKE_JOBS} install
227
		# ffmpeg
228
		cd ${WRKDIR}/ffmpeg-${FFMPEGVERSION}; \
229
		export PATH=${WRKDIR}/gnuroot/bin:$$PATH; \
230
		export CFLAGS="${CFLAGS}"; \
231
		PKG_CONFIG_PATH=${WRKDIR}/gnuroot/lib/pkgconfig \
232
		CPPFLAGS="-Dcaddr_t=void\* -D__daddr_t_defined" \
233
		LDFLAGS=-L${WRKDIR}/gnuroot/lib \
234
		./configure --prefix=${WRKDIR}/gnuroot \
235
			--disable-shared --enable-static --enable-pic \
236
			--enable-libfdk-aac --pkg-config=pkg-config \
237
			--cross-prefix=${LINUXTRIPLET}- --arch=${LINUXARCH} \
238
			--target-os=linux --host-cc=${CC}; \
239
		CFLAGS="${CFLAGS}" \
240
		${MAKE_CMD} ${_MAKE_JOBS} V=1 ARCH=x86 all install
241
		# OpenSSL headers
242
		cd ${WRKDIR}/openssl-${OPENSSLFULLVER}; \
243
		./Configure --openssldir= --prefix=/usr ${OPENSSLTARGET}
244
245
pre-install:
246
		${MKDIR} ${STAGEDIR}${PREFIX}/lib/makemkv
247
248
post-install:
249
		${INSTALL_MAN} ${FILESDIR}/makemkvcon.1 \
250
			${STAGEDIR}${PREFIX}/man/man1
251
		${INSTALL_LIB} ${GNUCROSSLIBDIR}/libstdc++.so.6 \
252
			${STAGEDIR}${PREFIX}/lib/makemkv
253
		cd ${WRKDIR}/makemkv-bin-${PORTVERSION}; \
254
		${MKDIR} tmp; \
255
		${ECHO_CMD} accepted > tmp/eula_accepted; \
256
		${MAKE_CMD} DESTDIR=${STAGEDIR} PREFIX=${PREFIX} install
257
		${PATCHELF_CMD} --set-rpath ${PREFIX}/lib/makemkv \
258
			${STAGEDIR}${PREFIX}/bin/makemkvcon
259
		${REINPLACE_CMD} -e 's:/sys/bus/scsi:/etc/makemkv/:' \
260
			${STAGEDIR}${PREFIX}/bin/makemkvcon
261
		${INSTALL_SCRIPT} ${WRKDIR}/update-makemkv-drives \
262
			${STAGEDIR}${PREFIX}/sbin
263
264
.include <bsd.port.mk>
(-)multimedia/makemkv/distinfo (+25 lines)
Line 0 Link Here
1
TIMESTAMP = 1585042908
2
SHA256 (makemkv/makemkv-oss-1.15.0.tar.gz) = a9213fa7cbf2bf2f03d90cd350ad53aa82394bc3991c440e9e369e4169f3ed06
3
SIZE (makemkv/makemkv-oss-1.15.0.tar.gz) = 6383576
4
SHA256 (makemkv/makemkv-bin-1.15.0.tar.gz) = 442d67d5368390263c30fca2d980ebfffb716be227b9f056b69961d2b11b26ff
5
SIZE (makemkv/makemkv-bin-1.15.0.tar.gz) = 9516617
6
SHA256 (makemkv/linux-2.6.32.27.tar.xz) = 96c20c370ed440db61624d93f34721a09a69b12bb81b1b03bb735041983fb1bd
7
SIZE (makemkv/linux-2.6.32.27.tar.xz) = 52652044
8
SHA256 (makemkv/binutils-2.27.tar.bz2) = 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
9
SIZE (makemkv/binutils-2.27.tar.bz2) = 26099568
10
SHA256 (makemkv/glibc-2.17.tar.xz) = 6914e337401e0e0ade23694e1b2c52a5f09e4eda3270c67e7c3ba93a89b5b23e
11
SIZE (makemkv/glibc-2.17.tar.xz) = 10981956
12
SHA256 (makemkv/gmp-5.1.3.tar.xz) = dee2eda37f4ff541f30019932db0c37f6f77a30ba3609234933b1818f9b07071
13
SIZE (makemkv/gmp-5.1.3.tar.xz) = 1818812
14
SHA256 (makemkv/mpfr-3.1.2.tar.xz) = 399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b
15
SIZE (makemkv/mpfr-3.1.2.tar.xz) = 1074388
16
SHA256 (makemkv/mpc-1.0.3.tar.gz) = 617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
17
SIZE (makemkv/mpc-1.0.3.tar.gz) = 669925
18
SHA256 (makemkv/gcc-5.5.0.tar.gz) = 3aabce75d6dd206876eced17504b28d47a724c2e430dbd2de176beb948708983
19
SIZE (makemkv/gcc-5.5.0.tar.gz) = 123816630
20
SHA256 (makemkv/fdk-aac-2.0.1.tar.gz) = 840133aa9412153894af03b27b03dde1188772442c316a4ce2a24ed70093f271
21
SIZE (makemkv/fdk-aac-2.0.1.tar.gz) = 2865456
22
SHA256 (makemkv/ffmpeg-4.2.2.tar.bz2) = b620d187c26f76ca19e74210a0336c3b8380b97730df5cdf45f3e69e89000e5c
23
SIZE (makemkv/ffmpeg-4.2.2.tar.bz2) = 10953320
24
SHA256 (makemkv/openssl-1.0.2k.tar.gz) = 6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
25
SIZE (makemkv/openssl-1.0.2k.tar.gz) = 5309236
(-)multimedia/makemkv/files/makemkvcon.1 (+103 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.
95
.Sh KNOWN ISSUES
96
To find optical drives,
97
.Nm
98
uses some entries from Linux' sysfs that aren't present on
99
.Fx .
100
A script `update-makemkv-drives` is included to fake these entries and is run
101
automatically on installation.
102
If your system's configuration changes, you must run this script as root
103
manually, so new or changed drives can be found.
(-)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 (+45 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
Known issues on FreeBSD:
25
26
* Only the commandline interface works, so there is no GUI in this port. The
27
  port includes a small manpage to get you started using makemkvcon.
28
* makemkvcon always crashes on exit (after completing its job), so be aware
29
  this might leave core files on your system.
30
* To find optical drives, makemkvcon uses some entries from Linux' sysfs that
31
  aren't present on FreeBSD. A script `update-makemkv-drives` is included with
32
  the port that fakes these entries. It is run automatically on installation,
33
  but if the system's configuration changes, it must be run manually again by
34
  root.
35
36
Requirements:
37
38
* A custom FreeBSD kernel with sg devices (Linux' "scsi generic" interface) is
39
  required to use makemkvcon. To build such a kernel, add "device sg" to your
40
  kernel configuration and follow the instructions at
41
  https://www.freebsd.org/doc/handbook/kernelconfig-building.html
42
* Make sure you have the "linux" kernel module loaded. On amd64, "linux64" is
43
  also required.
44
45
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 (+12 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
lib/makemkv/libstdc++.so.6
6
man/man1/makemkvcon.1.gz
7
sbin/update-makemkv-drives
8
share/MakeMKV/appdata.tar
9
share/MakeMKV/blues.jar
10
share/MakeMKV/blues.policy
11
@postexec update-makemkv-drives
12
@preunexec rm -fr %%LINUXBASE%%/etc/makemkv

Return to bug 238004