Subject: Re: broken Makefile for libdvdcss?
To: None <>
From: Alan Barrett <>
List: tech-pkg
Date: 07/29/2005 00:08:04
On Thu, 28 Jul 2005, Krister Walfridsson wrote:
> >No, that will print the _FETCH_MESSAGE even of LIBDVDCSS_MASTER_SITES is
> >defined.  I think you want something more like the appended patch, which
> >conditionally sets BROKEN.
> But this will mark the package as broken even if you already have
> the distfile in the DISTDIR.

Good point.  The appended patch addresses that problem.  I set
PKG_FAIL_REASON instead of BROKEN, because it allows multiple lines of

The patch also allows LIBDVDCSS_MASTER_SITES to be set to a list of
sites, which didn't work before.

--apb (Alan Barrett)

Index: multimedia/libdvdcss/Makefile
--- multimedia/libdvdcss/Makefile	21 Jul 2005 01:35:50 -0000	1.8
+++ multimedia/libdvdcss/Makefile	28 Jul 2005 22:02:33 -0000
@@ -4,12 +4,15 @@
 # that we are not able to provide pointers to the source or homepage
 # for this software, even in other countries.
+# If you know the correct values, you can define LIBDVDCSS_MASTER_SITES
+# and LIBDVDCSS_HOMEPAGE in /etc/mk.conf.
 # Please do not submit any PRs telling us the contents of the HOMEPAGE
 # or MASTER_SITES definitions in this Makefile.
 DISTNAME=	libdvdcss-1.2.9
 CATEGORIES=	multimedia
 EXTRACT_SUFX=	.tar.bz2
@@ -18,6 +21,23 @@
 RESTRICTED=	Legal problems due to CSS code
+.include "../../mk/"
+# If LIBDVDCSS_MASTER_SITES is not defined, then it will be impossible
+# to fetch the distfile.  If, in addition, the distfile has not
+# previously been fetched, then mark the package as broken.
+.  if !exists(${LIBDVDCSS_DISTFILE})
+PKG_FAIL_REASON=	"To build libdvdcss, you must either" \
+			"manually fetch ${LIBDVDCSS_DISTFILE:T}" \
+			"into ${_DISTDIR}," \
+			"or define LIBDVDCSS_MASTER_SITES in" \
+			"/etc/mk.conf or on the command line" \
+			"or in the environment."
+.  endif
 # no source because of the CSS source code in it