From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 3 00:03:20 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF89216A4DA for ; Thu, 3 Aug 2006 00:03:20 +0000 (UTC) (envelope-from robb_force@hotmail.com) Received: from bay0-omc1-s37.bay0.hotmail.com (bay0-omc1-s37.bay0.hotmail.com [65.54.246.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62AF743D45 for ; Thu, 3 Aug 2006 00:03:20 +0000 (GMT) (envelope-from robb_force@hotmail.com) Received: from hotmail.com ([207.46.9.154]) by bay0-omc1-s37.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Aug 2006 17:03:20 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 2 Aug 2006 17:03:20 -0700 Message-ID: Received: from 209.36.244.254 by BAY120-DAV16.phx.gbl with DAV; Thu, 03 Aug 2006 00:03:19 +0000 X-Originating-IP: [209.36.244.254] X-Originating-Email: [robb_force@hotmail.com] X-Sender: robb_force@hotmail.com From: "Robb Force" To: References: <20060801235125.GA6671@megan.kiwi-computer.com> Date: Wed, 2 Aug 2006 17:03:18 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-OriginalArrivalTime: 03 Aug 2006 00:03:20.0200 (UTC) FILETIME=[3AA3D880:01C6B690] Subject: Re: Need help creating Daphne laserdisc emulator port X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 00:03:20 -0000 Edited for length.. > > I would like to create a port of the Daphne laserdisc emulator and have made > > some progress I think. This is my first attempt at anything like this and > > Did you check out: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ Yes, I was following the handbook at first to get started then looked at finished ports. > You won't need the pkg list, there's a better way to achieve this > correctly. Noted, I'll create a new list using the methods mentioned in the handbook. > > .if ${MACHINE_ARCH} == "i386" > > This should be "ARCH" not "MACHINE_ARCH". > > > MAKE_ENV+= USE_MMX_RGB2YUV=1 > > MAKE_ENV+= PFLAGS="-DNATIVE_CPU_X86 -DMMX_RGB2YUV" > > .endif > > I've never seen PFLAGS before. In what language is the emulator written? Made the change to ARCH. It appears to be written in C++ since it requires the G++ compiler. I think I left some details out after looking at this a bit more. The Daphne texts explain that it will compile under FreeBSD. To compile there is step to create a Makefile.vars for your OS before doing the make command. Here are the contents of the FreeBSD vars file. <----------------------------------------------- # This file contains FreeBSD-specific environment variables # It is included by Makefile if a symlink is created to point to it # debugging version #DFLAGS = -g -DCPU_DEBUG # optimized version DFLAGS = -O3 -march=i686 -DX86_ASM -DGCC_X86_ASM -fomit-frame-pointer \ -fexpensive-optimizations -funroll-loops # to tell Makefile to assemble the MMX code export USE_MMX = 1 # platform-specific compile flags PFLAGS = ${DFLAGS} `sdl11-config --cflags` -DUNIX -DFREEBSD \ -DNATIVE_CPU_X86 -DMMX_RGB2YUV # platform-specific lib flags LIBS = `sdl11-config --libs` -lSDL_mixer -lz -logg -lvorbis -lvorbisfile <------------------------------------------------ There are some PFLAGS in the vars file, which might be why the NetBSD port had them? I'm not sure about the optimizations, I already have -O2 -pipe and I have march defined in make.conf. Should the DFLAGS in Makefile.vars be patched? Additionally, I have had trouble compiling Daphne and discovered it's due to a bug in gcc with the -DGCC_X86_ASM flag, so I'm thinking I would need to patch the Makefile.vars. > > - There is a note in the Daphne instructions that explains "You also need to > > compile libvldp2.so which comes with DAPHNE and has its own set of > > instructions inside the vldp2 directory. Go read those after you're done > > here." I only see "CONFIGURE_DIRS= src/vldp2" and installing the library in > > the NetBSD makefile. Here's the link I've been referring to > > http://pkgsrc.se/wip/daphne > > I'm not sure what you're saying here. Where was this CONFIGURE_DIRS > variable set? In the NetBSD makefile? The instructions say the vldp2 library must be compiled and installed since Daphne requires it to run. It seems like it might need it to compile too, but I'm not sure I can compile the library with this: cd ../daphne/src/vldp2/ ./configure make install clean This creates libvldp2.so in ../daphne so then I do: mkdir /usr/local/lib/daphne cp ../daphne/libvldp2.so /usr/local/lib/daphne/ ldconfig -m /usr/local/lib/daphne This seems to get the library dependency fixed. So, can I add this somewhere to the port Makefile? Like in post-extract or something? Anyway thanks for you help so far! Nate