Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38951 - Patch with cleanup of mpeg-tools code and fixes for amd64
Summary: Patch with cleanup of mpeg-tools code and fixes for amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-21 12:43 UTC by Mikael Rosbacke
Modified: 2004-02-25 07:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for general cleanup and amd64. (cleanup64bits.patch,5.71 KB, patch)
2004-01-21 12:45 UTC, Mikael Rosbacke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Rosbacke 2004-01-21 12:43:13 UTC
I have spent some time cleaning up the code for mpeg-tools. It is from 1995 and have aged somewhat. The source havn't been touched since then so I suspect it has been abandoned.
General cleanup consists of:
1. Adding missing include files like <libstd.h> and <malloc.h>
2. Changing 'void main() { ... }' to 'int main() { ... return 0; }'

In addition, some heavy modifications of the file convert/mtv/archdep.h to allow amd64 to build this package.

In my own ebuild, I added the lines:
	#General cleanup and 64 bit fixes.
	cd ${S}/../..
	epatch ${FILESDIR}/cleanup64bits.patch
To the end of the unpack function.
I also placed the file 'cleanup64bits.patch' in the files directory.

For the curious, The files touched by this patch are:
mpeg_encode: bitio.c opts.c libpnmrw.c jpeg.c  
convert: ppmtoeyuv.c eyuvtoppm.c eyuvtojpeg.c mtv/archdep.h mtv/movieToVid.c

The only part critical for compilation on the amd64 platform is archdep.h. But I suspect the compiler would generate bad code if the '#include <malloc.h>' is left out in some other files.
For details, see the patch file.  
I suggest we add ~amd64 to the ebuild after this.

 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



ortage 2.0.49-r20 (default-amd64-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.1-gentoo) 
================================================================= 
System uname: 2.6.1-gentoo x86_64 4 
Gentoo Base System version 1.4.3.12 
ACCEPT_KEYWORDS="amd64" 
AUTOCLEAN="yes" 
CFLAGS="-O2" 
CHOST="x86_64-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="ftp://gentoo.linux.no/pub/gentoo/ 
ftp://trumpetti.atm.tut.fi/gentoo/ http://ds.thn.htu.se/linux/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="3dnow X acpi alsa amd64 apm arts avi berkdb cdr crypt cups dvdr emacs 
encode esd foomaticdb freetype gdbm gif gnome gpm gtk gtk2 imlib jpeg kde 
libg++ libwww mikmod mmx motif mpeg multilib ncurses nls oggvorbis opengl oss 
pam pdflib perl png ppds python qt quicktime radeon readline samba sdl slang 
spell sse ssl tcpd tetex truetype usb xml2 xmms xv zlib linguas_sv"
Comment 1 Mikael Rosbacke 2004-01-21 12:45:35 UTC
Created attachment 24194 [details, diff]
Patch for general cleanup and amd64.

See above.
Comment 2 Brad House 2004-02-22 17:40:45 UTC
you marked the hardware wrong
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2004-02-25 07:15:04 UTC
Added to CVS, thanks!