Subject: pkg/32803: multimedia/xvidcore builds not just on i386 [with patches]
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Rhialto <rhialto@falu.nl>
List: pkgsrc-bugs
Date: 02/12/2006 14:00:01
>Number:         32803
>Category:       pkg
>Synopsis:       multimedia/xvidcore builds not just on i386
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 12 14:00:01 +0000 2006
>Originator:     Rhialto
>Release:        NetBSD 3.0
>Organization:
	
>Environment:
	
	
System: NetBSD radl.falu.nl 3.0 NetBSD 3.0 (Radls Doordringend Onjuiste Akkoord) #0: Sat Jan 28 16:44:07 CET 2006 root@radl.falu.nl:/usr/src/sys/arch/amd64/compile/RADL amd64
Architecture: x86_64
Machine: amd64
>Description:
	I built xvidcore on amd64 and Alpha, and both built fine.
>How-To-Repeat:
	# After the patches, on Alpha or amd64:
	cd multimedia/xvidcore && make
	...
	C: utils/mem_align.c
	C: utils/mem_transfer.c
	C: utils/timer.c
	L: libxvidcore.a
	L: libxvidcore.so.4.0

	---------------------------------------------------------------
	XviD has been successfully built.

	* Binaries are currently located in the '=build' directory
	* To install them on your system, you can run '# make install'
	as root.
	---------------------------------------------------------------
>Fix:

--- Makefile.orig	2006-02-12 14:38:53.000000000 +0100
+++ Makefile	2006-02-12 14:39:08.000000000 +0100
@@ -11,10 +11,6 @@
 HOMEPAGE=	http://www.xvid.org/
 COMMENT=	ISO MPEG-4 compliant video codec
 
-ONLY_FOR_PLATFORM+=	*-*-i386
-
-BUILD_DEPENDS+=	nasm>=0.98.34:../../devel/nasm
-
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/build/generic

	To eliminate a bunch of warnings:

--- ../../src/portab.h.orig	2004-12-19 12:38:48.000000000 +0100
+++ ../../src/portab.h	2006-02-12 14:37:21.000000000 +0100
@@ -73,21 +73,17 @@
 
 #if defined(ARCH_IS_32BIT)
 #    define CACHE_LINE 64
-#    define ptr_t uint32_t
-#    define intptr_t int32_t
+#    define ptr_t uintptr_t
 #    if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
 #        include <stdarg.h>
 #    else
-#        define uintptr_t uint32_t
 #    endif
 #elif defined(ARCH_IS_64BIT)
 #    define CACHE_LINE  64
-#    define ptr_t uint64_t
-#    define intptr_t int64_t
+#    define ptr_t uintptr_t
 #    if defined (_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
 #        include <stdarg.h>
 #    else
-#        define uintptr_t uint64_t
 #    endif
 #else
 #    error You are trying to compile XviD without defining address bus size.



-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.

>Unformatted: