Bug 177803 - [PATCH] Fix port: net/minidlna missing dependency on iconv
Summary: [PATCH] Fix port: net/minidlna missing dependency on iconv
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-12 11:30 UTC by Chris Rees
Modified: 2013-05-04 19:00 UTC (History)
0 users

See Also:


Attachments
file.dat (215 bytes, text/plain; charset="us-ascii")
2013-05-04 18:51 UTC, dfilter service
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees freebsd_committer freebsd_triage 2013-04-12 11:30:00 UTC
	Minidlna requires libiconv, which is normally pulled in from flac.

	However, when flac is compiled WITHOUT_NLS, minidlna build fails because it still depends on iconv.

Fix: 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--ixo6T2kHaxsxVQg73bHpFTO7UMhwTSyWDFdk5oRqqGOUH7Bc
Content-Type: text/plain; name="patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch.txt"

Index: Makefile
===================================================================
--- Makefile	(revision 315789)
+++ Makefile	(working copy)
@@ -20,6 +20,8 @@
 		FLAC:${PORTSDIR}/audio/flac      	\
 		avformat:${PORTSDIR}/multimedia/ffmpeg
 
+USE_ICONV=	yes
+
 MAKE_JOBS_SAFE=	yes
 MAKEFILE=	${FILESDIR}/BSDmakefile
 MAKE_ENV+=	FILESDIR="${FILESDIR}" INSTALL_DATA="${INSTALL_DATA}"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-12 11:30:07 UTC
Maintainer of net/minidlna,

Please note that PR ports/177803 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177803

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-12 11:30:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 William Grzybowski 2013-04-12 12:18:13 UTC
I approved.

Thank you.

--
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
Comment 4 Chris Rees freebsd_committer freebsd_triage 2013-04-12 13:08:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

This was mine
Comment 5 Chris Rees freebsd_committer freebsd_triage 2013-04-12 14:10:02 UTC
On 12 April 2013 12:18, William Grzybowski <william88@gmail.com> wrote:
> I approved.
>
> Thank you.

Actually, it turns out it's a little more complicated than that.  Some
dependencies were also compiled without NLS, which made it fail there
(I couldn't work out which).

The patch below actually makes the port respect WITHOUT_NLS, which is
the correct behaviour in the first place.

WITHOUT_NLS:
http://www.bayofrum.net:8080/tb/index.php?action=display_markup_log&build=9.1-local&id=412

WITH_NLS:
http://www.bayofrum.net/tb/index.php?action=display_markup_log&build=8.2-local&id=2377

http://www.bayofrum.net/~crees/patches/minidlna-nls.diff

Chris
Comment 6 Chris Rees freebsd_committer freebsd_triage 2013-04-14 17:15:09 UTC
Responsible Changed
From-To: crees->wg

Aha, you can commit to your own ports now :)
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-05-04 18:51:41 UTC
Author: crees
Date: Sat May  4 17:51:27 2013
New Revision: 317329
URL: http://svnweb.freebsd.org/changeset/ports/317329

Log:
  Fix build when flac is compiled WITHOUT_NLS
  
  PR:		ports/177803
  Approved by:	william (maintainer)

Added:
  head/net/minidlna/files/config.h.in
     - copied unchanged from r315789, head/net/minidlna/files/config.h
Deleted:
  head/net/minidlna/files/config.h
Modified:
  head/net/minidlna/Makefile
  head/net/minidlna/files/BSDmakefile

Modified: head/net/minidlna/Makefile
==============================================================================
--- head/net/minidlna/Makefile	Sat May  4 17:29:38 2013	(r317328)
+++ head/net/minidlna/Makefile	Sat May  4 17:51:27 2013	(r317329)
@@ -3,6 +3,7 @@
 
 PORTNAME=	minidlna
 PORTVERSION=	1.0.25
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net multimedia www
 MASTER_SITES=	SF
@@ -33,6 +34,16 @@ SUB_LIST+=	USER=${USERS}
 USERS=	dlna
 GROUPS=	dlna
 
+.include <bsd.port.options.mk>
+
+do-configure:
+.if ${PORT_OPTIONS:MNLS}
+	${CP} ${FILESDIR}/config.h.in ${WRKSRC}/config.h
+.else
+	${SED} 's,^#define HAVE_ICONV_H,/* & */,' ${FILESDIR}/config.h.in > \
+		${WRKSRC}/config.h
+.endif
+
 post-install:
 	${FMT} ${PKGMESSAGE}
 

Modified: head/net/minidlna/files/BSDmakefile
==============================================================================
--- head/net/minidlna/files/BSDmakefile	Sat May  4 17:29:38 2013	(r317328)
+++ head/net/minidlna/files/BSDmakefile	Sat May  4 17:51:27 2013	(r317329)
@@ -4,7 +4,7 @@ NO_MAN=	Ha-ha...
 OS!=	uname
 VERS!=	uname -r
 
-CFLAGS=-I${FILESDIR} -I${.CURDIR} -I${LOCALBASE}/include -I${LOCALBASE}/include/ffmpeg
+CFLAGS=	-I${.CURDIR} -I${LOCALBASE}/include -I${LOCALBASE}/include/ffmpeg
 CFLAGS+=-I${LOCALBASE}/include/libavutil
 CFLAGS+=-DPREFIX='"${PREFIX}"' -DOS='"${OS}"' -DOSVERSION='"${VERS}"'
 CFLAGS+=-Wformat -Wunused -Wall

Copied: head/net/minidlna/files/config.h.in (from r315789, head/net/minidlna/files/config.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/minidlna/files/config.h.in	Sat May  4 17:51:27 2013	(r317329, copy of r315789, head/net/minidlna/files/config.h)
@@ -0,0 +1,34 @@
+/* MiniDLNA Project
+ * http://sourceforge.net/projects/minidlna/
+ * (c) 2008-2009 Justin Maggard
+ * generated by ./genconfig.sh on ÎÄ 13 ÞÅÒ 2010 00:06:49 EDT */
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define PFRULE_INOUT_COUNTS
+#define OS_NAME		OS
+#define OS_VERSION	OS "/" OSVERSION
+#define OS_URL		"http://www." OS ".org/"
+
+/* full path of the file database */
+#define DEFAULT_DB_PATH	"/var/db/minidlna"
+#define DEFAULT_LOG_PATH	"/var/log"
+
+/* Comment the following line to use home made daemonize() func instead
+ * of BSD daemon() */
+#define USE_DAEMON
+
+/* Enable if the system inotify.h exists.  Otherwise our own inotify.h will be used. */
+/*#define HAVE_INOTIFY_H*/
+
+/* Enable if the system iconv.h exists.  ID3 tag reading in various character sets will not work properly otherwise. */
+#define HAVE_ICONV_H
+
+/* Enable NETGEAR-specific tweaks. */
+/*#define NETGEAR*/
+/* Enable ReadyNAS-specific tweaks. */
+/*#define READYNAS*/
+/* Compile in TiVo support. */
+/* #define TIVO_SUPPORT -- not yet ported to FreeBSD */
+
+#endif
Comment 8 Chris Rees freebsd_committer freebsd_triage 2013-05-04 18:53:19 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!