From nobody@FreeBSD.org  Tue May  1 12:58:31 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id ED86016A413
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 May 2007 12:58:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id CFF8713C4AE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 May 2007 12:58:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l41CwVMt076206
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 May 2007 12:58:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l41CrUW7073951;
	Tue, 1 May 2007 12:53:30 GMT
	(envelope-from nobody)
Message-Id: <200705011253.l41CrUW7073951@www.freebsd.org>
Date: Tue, 1 May 2007 12:53:30 GMT
From: Ganael LAPLANCHE<ganael.laplanche@martymac.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Dvbcut and make patch errors
X-Send-Pr-Version: www-3.0

>Number:         112299
>Category:       ports
>Synopsis:       Dvbcut and make patch errors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    se
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 01 13:00:12 GMT 2007
>Closed-Date:    Tue Jun 26 22:04:39 GMT 2007
>Last-Modified:  Tue Jun 26 22:04:39 GMT 2007
>Originator:     Ganael LAPLANCHE
>Release:        6.2-STABLE
>Organization:
http://contribs.martymac.com
>Environment:
FreeBSD home.martymac.com 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Apr 30 17:59:07 CEST 2007     martymac@home.martymac.com:/usr/src/sys/amd64/compile/MYKERNEL  amd64
>Description:
Dvbcut patches fail to apply cleanly on dvbcut-0.5.4 because some of the patches seem to have been included in the main code.
>How-To-Repeat:
cd /usr/ports/multimedia/dvbcut && make patch
>Fix:
Use the attached shar file for the 'files' directory of the dvbcut port

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files
#	files/patch-Makefile
#	files/patch-SConstruct
#	files/patch-defines.h
#	files/patch-index.h
#
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/patch-Makefile
sed 's/^X//' >files/patch-Makefile << 'END-of-files/patch-Makefile'
X--- Makefile~	Tue Dec  6 08:57:49 2005
X+++ Makefile	Thu Dec 29 00:19:02 2005
X@@ -2,7 +2,9 @@
X 
X build:
X 	scons $(if $(FFMPEG),FFMPEG=$(FFMPEG)) \
X-		$(if $(DEBUG),DEBUG=$(DEBUG))
X+		$(if $(DEBUG),DEBUG=$(DEBUG)) \
X+		$(if $(CFLAGS),CFLAGS="$(CFLAGS)") \
X+		$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)")
X 
X clean:
X 	scons --clean
END-of-files/patch-Makefile
echo x - files/patch-SConstruct
sed 's/^X//' >files/patch-SConstruct << 'END-of-files/patch-SConstruct'
X--- SConstruct~	Sun Dec 11 12:07:09 2005
X+++ SConstruct	Thu Dec 29 00:19:48 2005
X@@ -38,13 +38,17 @@
X 
X ###### BUILD ENVIRONMENT
X 
X+opts.Add('CFLAGS','compiler flags', "-O3 -Wall")
X+opts.Add('LDFLAGS','linker flags', "")
X+
X env=Environment(options=opts, ENV=os.environ)
X debug=int(env['DEBUG'])
X 
X if (debug>0):
X   env.Append(CCFLAGS=['-g3','-Wall'])
X-else:
X-  env.Append(CCFLAGS=['-O3','-Wall'])
X+env.Append(CCFLAGS=Split(env["CFLAGS"]))
X+
X+env.Append(LINKFLAGS=Split(env["LDFLAGS"]))
X 
X env.Replace(CXXFILESUFFIX=".cpp")
X 
END-of-files/patch-SConstruct
echo x - files/patch-defines.h
sed 's/^X//' >files/patch-defines.h << 'END-of-files/patch-defines.h'
X--- src/defines.h.orig	Fri Apr 13 19:36:26 2007
X+++ src/defines.h	Tue May  1 14:25:07 2007
X@@ -40,6 +40,12 @@
X #endif
X   }
X 
X+#if defined(__FreeBSD__)
X+#define mbo32(x) htobe32(x)
X+#define htom32(x) htobe32(x)
X+#define mbo16(x) htobe16(x)
X+#define htom16(x) htobe16(x)
X+#else
X #if __BYTE_ORDER == __LITTLE_ENDIAN
X #define mbo32(x) \
X       ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) | \
X@@ -52,6 +58,7 @@
X #define htom32(x) (x)
X #define mbo16(x) (x)
X #define htom16(x) (x)
X+#endif
X #endif
X 
X #define DVBCUT_QSETTINGS_DOMAIN "dvbcut.sf.net"
END-of-files/patch-defines.h
echo x - files/patch-index.h
sed 's/^X//' >files/patch-index.h << 'END-of-files/patch-index.h'
X--- src/index.h.orig	Fri Apr 13 19:36:26 2007
X+++ src/index.h	Tue May  1 14:32:01 2007
X@@ -20,7 +20,11 @@
X #define _DVBCUT_INDEX_H
X 
X #include <stdint.h>
X+#if defined(__FreeBSD__)
X+#include <sys/endian.h>
X+#else
X #include <byteswap.h>
X+#endif
X #include "types.h"
X #include "pts.h"
X #include "defines.h"
END-of-files/patch-index.h
exit


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->se 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue May 1 13:04:47 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112299 

From: "Ganael LAPLANCHE" <ganael.laplanche@martymac.com>
To: bug-followup@FreeBSD.org, ganael.laplanche@martymac.com
Cc:  
Subject: Re: ports/112299: Dvbcut and make patch errors
Date: Tue,  1 May 2007 15:38:03 +0200 (CEST)

 BTW, I get a lot of build errors because INT64_C is not defined. I can define it
 manually by adding :
 
 #ifndef INT64_C
 #define INT64_C(c) (c ## L)
 #endif
 
 before :
 
 #include <ffmpeg/avformat.h>
 
 in each of these files :
 
 src/lavfmuxer.cpp
 src/lavfmuxer.h
 src/main.cpp
 src/streamdata.h
 
 The compilation continues, but finally stops with this error :
 
 src/psfile.cpp: In constructor `psfile::psfile(const std::string&, inbuffer&, int)':
 src/psfile.cpp:103: error: `ac3_decoder' was not declared in this scope
 scons: *** [src/psfile.o] Error 1
 scons: building terminated because of errors.
 gmake: *** [build] Error 2
 *** Error code 2
 
 Stop in /usr/ports/multimedia/dvbcut.
 
 Ganal LAPLANCHE
 ganael.laplanche@martymac.com
 http://www.martymac.com
 

From: "Ganael LAPLANCHE" <ganael.laplanche@martymac.com>
To: bug-followup@FreeBSD.org
Cc: Stefan Esser <se@FreeBSD.org>
Subject: Re: ports/112299: Dvbcut and make patch errors
Date: Tue,  1 May 2007 18:30:49 +0200 (CEST)

 On Tue, 01 May 2007 17:11:36 +0200, Stefan Esser wrote
 
 Hi Stefan,
 
 I've cvsup'ed to the latest revision of the port. The patches now apply properly.
 
 > you have to #define __STDC_LIMIT_MACROS before this file is read to get them.
 (The easiest way is to define it via CFLAGS.)
 > But this should have been fixed with the upgrade to 0.5.4.
 
 Unfortunately, I've got the same error :
 
 In file included from src/lavfmuxer.h:22,
                  from src/dvbcut.cpp:52:
 /usr/local/include/ffmpeg/avformat.h: In function `void av_init_packet(AVPacket*)':
 /usr/local/include/ffmpeg/avformat.h:66: error: `INT64_C' was not declared in
 this scope
 /usr/local/include/ffmpeg/avformat.h: At global scope:
 /usr/local/include/ffmpeg/avformat.h:292: warning: `AVFrac' is deprecated
 (declared at /usr/local/include/ffmpeg/avformat.h:118)
 scons: *** [src/dvbcut.o] Error 1
 scons: building terminated because of errors.
 gmake: *** [build] Error 2
 *** Error code 2
 
 Stop in /usr/ports/multimedia/dvbcut.
 
 Thank you very much,
 Best regards,
 
 Ganal LAPLANCHE
 ganael.laplanche@martymac.com
 http://www.martymac.com
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Jun 26 22:04:28 UTC 2007 
State-Changed-Why:  
Can't reproduce - dvbcut patches fine. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112299 
>Unformatted:
