I am porting makemkv to freebsd 10.2 and for this reason I wrote the following makefile:
# New ports collection makefile for: makemkv
# Date created: 05 Mar 2012
# Date Updated: 10 April 2016
# Whom: kappei84
#
# $FreeBSD$
#
PORTNAME= makemkv
PORTVERSION= 1.9.9
CATEGORIES= multimedia
DISTNAME= ${PORTNAME}-oss-${PORTVERSION}${EXTRACT_SUFFIX}
MASTER_SITES= http://www.makemkv.com/download/
# Prefix for the pkp-plist
#PLIST_SUB= DATADIR=${PREFIX}
# Missing qt4/qt5 dependency check in case the port is built with --enable-gui
BUILD_DEPENDS= ffmpeg${FFMPEG_SUFX}:${PORTSDIR}/multimedia/ffmpeg${FFMPEG_SUFX}
MAINTAINER=
COMMENT= Make MKV from Blu-ray and DVD
GNU_CONFIGURE= yes
OPTIONS_DEFINE= GUI
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGUI}
CONFIGURE_ARGS+= --enable-gui
.else
CONFIGURE_ARGS+= --disable-gui
.endif # GUI
# flags for the configure script
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
MAKEFILE= Makefile
USES= gmake
USE_OPENSSL= yes
USE_LDCONFIG= yes
USE_QT_VER= 4
QT_COMPONENTS= qmake gui svg webkit xml moc uic rcc imageformats
do-install:
.if ${PORT_OPTIONS:MGUI}
${INSTALL_PROGRAM} ${WRKSRC}/out/${PORTNAME} ${PREFIX}/bin
.endif
.for i in libdriveio.so.0 libmakemkv.so.1 libmmbd.so.0
${INSTALL_PROGRAM} ${WRKSRC}/out/${i} ${PREFIX}/lib
.endfor
@ cd ${PREFIX}/lib ; \
${LN} -sf libdriveio.so.0 libdriveio.so ; \
${LN} -sf libmakemkv.so.1 libmakemkv.so ; \
${LN} -sf libmmbd.so.0 libmmbd.so
.include <bsd.port.mk>
this makefile references the Makefile of the original application and it compiles and creates all the source files necessary to generate the three libraries libdriveio.so.o, libmakemkv.so.1 and libmmbd.so.0 wich are copied into /usr/local/lib with the post install. Up until this step everything works perfectly as you can see from the log below:
gmake[2]: Leaving directory '/usr/ports/multimedia/makemkv/work/makemkv-oss-1.9.9'
===> Staging for makemkv-1.9.9
===> Generating temporary packing list
install -s -m 555 /usr/ports/multimedia/makemkv/work/makemkv-oss-1.9.9/out/libdriveio.so.0 /usr/local/lib
install -s -m 555 /usr/ports/multimedia/makemkv/work/makemkv-oss-1.9.9/out/libmakemkv.so.1 /usr/local/lib
install -s -m 555 /usr/ports/multimedia/makemkv/work/makemkv-oss-1.9.9/out/libmmbd.so.0 /usr/local/lib
What I do not get is the final phase which gets executed after the do-install, which is the registration phase:
====> Compressing man pages (compress-man)
===> Installing for makemkv-1.9.9
===> Checking if makemkv already installed
===> Registering installation for makemkv-1.9.9
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libdriveio.so: No such file or directory
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libdriveio.so.0: No such file or directory
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libmakemkv.so: No such file or directory
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libmakemkv.so.1: No such file or directory
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libmmbd.so.0: No such file or directory
pkg-static: Unable to access file /usr/ports/multimedia/makemkv/work/stage/lib/libmmbd.so: No such file or directory
*** Error code 74
Stop.
make[1]: stopped in /usr/ports/multimedia/makemkv
*** Error code 1
Stop.
make: stopped in /usr/ports/multimedia/makemkv
as you can see some of the files (listed inside a file called pkg-plist) cannot be found under the expected path and the installation fails.
Is there any way to avoid or to change the default folder where the pkg-static is supposed to check? As it is the first port for me, is it necessary to perform this phase and have a pkg-plist or is it also possible to remove such a file as the main libraries have already been copied into the right path?