Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2006 17:03:18 -0700
From:      "Robb Force" <robb_force@hotmail.com>
To:        <freebsd-emulation@freebsd.org>
Subject:   Re: Need help creating Daphne laserdisc emulator port
Message-ID:  <BAY120-DAV163923F00AB3E04A57CF83F0530@phx.gbl>
References:  <BAY120-DAV116116741B092D0227CAAAF05D0@phx.gbl> <20060801235125.GA6671@megan.kiwi-computer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY120-DAV163923F00AB3E04A57CF83F0530>