pkgsrc-WIP-discuss archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/mupen64plus in progress



Hi pkgsrc-wip,
   I'm trying to make a package for mupen64plus.

   The old wip/mupen64 is completely deprecated and the software is no longer
   supported, that's why I'm writing the Makefile for the new mupen64plus.

   It's a little painful because there is a lot of flags according to the
   architecture and the OS and for the moment I just have netbsd-i386 so I can't
   try it on linux + pkgsrc nor netbsd-amd64.

   That's why I need your help to finish it and the major problem is fix the
   video-rice issue (see attachement.). I give you what I done for the moment.

   King regards.

-- 
Demelier David

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
--- /dev/null   2010-02-16 19:41:24.000000000 +0000
+++ Makefile    2010-02-16 19:37:27.000000000 +0000
@@ -0,0 +1,33 @@
+DISTNAME= mupen64plus-bundle-src-${VERSION}
+PKGNAME= mupen64plus-${VERSION}
+VERSION= 1.99.3
+CATEGORIES= emulators
+MASTER_SITES= http://mupen64plus.googlecode.com/files/
+EXTRACT_SUFX= .tar.gz
+
+USE_LANGUAGES+=        c c++
+USE_TOOLS+= gmake pkg-config
+
+# fix the core makefile.
+SUBST_CLASSES+=   core
+SUBST_STAGE.core= pre-build
+SUBST_MESSAGE.core= Fixing mupen64plus-core makefile
+SUBST_FILES.core= ${WRKSRC}/source/mupen64plus-core/projects/unix/Makefile
+SUBST_SED.core+=  -e 's,@LOCALBASE@,${LOCALBASE},'
+
+# fix the video makefile.
+SUBST_CLASSES+=   video
+SUBST_STAGE.video= pre-build
+SUBST_MESSAGE.video= Fixing mupen64plus-video-rice makefile
+SUBST_FILES.video= 
${WRKSRC}/source/mupen64plus-video-rice/projects/unix/Makefile
+SUBST_SED.video+=  -e 's,@LOCALBASE@,${LOCALBASE},'
+
+do-build:
+       cd ${WRKSRC}; sh m64p_build.sh
+
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
--- /dev/null   2010-02-16 19:41:24.000000000 +0000
+++ distinfo    2010-02-16 19:40:36.000000000 +0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+SHA1 (mupen64plus-bundle-src-1.99.3.tar.gz) = 
506c5bccaff73a7d671f18b2e51fa64f7675bcaf
+RMD160 (mupen64plus-bundle-src-1.99.3.tar.gz) = 
850dfd67b7db289f97645f595d5cb4d0e85ca79f
+Size (mupen64plus-bundle-src-1.99.3.tar.gz) = 1464315 bytes
+SHA1 (patch-aa) = 5ca6c237b7ac0418eceae9d30a5a34cec67f33c2
+SHA1 (patch-ab) = 148393e8e88c0358e37a8076a99db3cf40f444be
+SHA1 (patch-ac) = 3452c8aa3c7963afbb117a549a7db53409d0f49a
+SHA1 (patch-ad) = d80bc1f2af1bb7c4db1b6f3e9111f3dd19bf77f5
+SHA1 (patch-ae) = 7715954fb131a64bf4bfe3cf90200b0b5abafb71
+SHA1 (patch-af) = c46b1b603e9efdf12d01fa8f868cb2e0c6b122c6
+SHA1 (patch-ag) = e846fe3efb8c3f7c24354bcc8e238f8d0f056b82
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-aa    2010-02-16 15:53:08.000000000 +0000
@@ -0,0 +1,59 @@
+--- m64p_build.sh.orig 2010-02-16 15:42:51.000000000 +0000
++++ m64p_build.sh      2010-02-16 15:46:17.000000000 +0000
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ # *   Mupen64plus - m64p_build.sh                                           *
+ # *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
+@@ -26,8 +26,8 @@
+ mkdir -p test
+ 
+ echo "************************************ Building core library"
+-make -C source/mupen64plus-core/projects/unix clean
+-make -C source/mupen64plus-core/projects/unix all $@
++gmake -C source/mupen64plus-core/projects/unix clean
++gmake -C source/mupen64plus-core/projects/unix all $@
+ cp source/mupen64plus-core/projects/unix/libmupen64plus.so.2.* ./test/
+ mv source/mupen64plus-core/projects/unix/libmupen64plus.so.2 ./test/
+ cp source/mupen64plus-core/data/mupen64plus.ini ./test/
+@@ -36,29 +36,29 @@
+ gunzip --stdout source/mupen64plus-core/roms/mupen64plus.v64.gz > 
./test/m64p_test_rom.v64
+ 
+ echo "************************************ Building console front-end"
+-make -C source/mupen64plus-ui-console/projects/unix clean
+-make -C source/mupen64plus-ui-console/projects/unix all $@
++gmake -C source/mupen64plus-ui-console/projects/unix clean
++gmake -C source/mupen64plus-ui-console/projects/unix all $@
+ cp source/mupen64plus-ui-console/projects/unix/mupen64plus ./test
+ 
+ echo "************************************ Building audio plugin"
+-make -C source/mupen64plus-audio-sdl/projects/unix clean
+-make -C source/mupen64plus-audio-sdl/projects/unix all $@
++gmake -C source/mupen64plus-audio-sdl/projects/unix clean
++gmake -C source/mupen64plus-audio-sdl/projects/unix all $@
+ cp source/mupen64plus-audio-sdl/projects/unix/mupen64plus-audio-sdl.so ./test
+ 
+ echo "************************************ Building input plugin"
+-make -C source/mupen64plus-input-sdl/projects/unix clean
+-make -C source/mupen64plus-input-sdl/projects/unix all $@
++gmake -C source/mupen64plus-input-sdl/projects/unix clean
++gmake -C source/mupen64plus-input-sdl/projects/unix all $@
+ cp source/mupen64plus-input-sdl/projects/unix/mupen64plus-input-sdl.so ./test
+ cp source/mupen64plus-input-sdl/data/InputAutoCfg.ini ./test/
+ 
+ echo "************************************ Building RSP plugin"
+-make -C source/mupen64plus-rsp-hle/projects/unix clean
+-make -C source/mupen64plus-rsp-hle/projects/unix all $@
++gmake -C source/mupen64plus-rsp-hle/projects/unix clean
++gmake -C source/mupen64plus-rsp-hle/projects/unix all $@
+ cp source/mupen64plus-rsp-hle/projects/unix/mupen64plus-rsp-hle.so ./test
+ 
+ echo "************************************ Building video plugin"
+-make -C source/mupen64plus-video-rice/projects/unix clean
+-make -C source/mupen64plus-video-rice/projects/unix all $@
++gmake -C source/mupen64plus-video-rice/projects/unix clean
++gmake -C source/mupen64plus-video-rice/projects/unix all $@
+ cp source/mupen64plus-video-rice/projects/unix/mupen64plus-video-rice.so 
./test
+ cp source/mupen64plus-video-rice/data/RiceVideoLinux.ini ./test/
+ 
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-ab    2010-02-16 17:38:50.000000000 +0000
@@ -0,0 +1,27 @@
+--- source/mupen64plus-core/projects/unix/Makefile.orig        2010-02-14 
02:46:51.000000000 +0100
++++ source/mupen64plus-core/projects/unix/Makefile     2010-02-16 
18:38:22.000000000 +0100
+@@ -39,6 +39,9 @@
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++endif
+ ifeq ("$(OS)","NONE")
+   $(error OS type "$(UNAME)" not supported.  Please file bug report at 
'http://code.google.com/p/mupen64plus/issues')
+ endif
+@@ -98,6 +101,14 @@
+   LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME)
+   LIBS += -L${LOCALBASE}/lib -lGL -lGLU
+ endif
++ifeq ($(OS), NETBSD)
++  TARGET = libmupen64plus.so.2.0.0
++  SONAME = libmupen64plus.so.2
++  CFLAGS += -I@LOCALBASE@/include -I../../src/
++  LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME)
++  LIBS = -L@LOCALBASE@/lib -lGL -lGLU -lpng -lz -lm -lfreetype
++endif
++
+ ifeq ($(OS), LINUX)
+   TARGET = libmupen64plus.so.2.0.0
+   SONAME = libmupen64plus.so.2
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-ac    2010-02-16 17:48:41.000000000 +0000
@@ -0,0 +1,23 @@
+--- source/mupen64plus-ui-console/projects/unix/Makefile.orig  2010-02-16 
18:46:25.000000000 +0100
++++ source/mupen64plus-ui-console/projects/unix/Makefile       2010-02-16 
18:48:00.000000000 +0100
+@@ -35,6 +35,9 @@
+ ifeq ("$(UNAME)","FreeBSD")
+   OS = FREEBSD
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++endif
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+ endif
+@@ -111,6 +114,10 @@
+   LDFLAGS += -m32 -m elf_i386
+ endif
+ 
++ifeq ($(OS), NETBSD)
++  LDFLAGS = -lpthread
++endif
++
+ # set mupen64plus core API header path
+ ifneq ("$(APIDIR)","")
+   CFLAGS += "-I$(APIDIR)"
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-ad    2010-02-16 18:55:42.000000000 +0000
@@ -0,0 +1,35 @@
+--- source/mupen64plus-audio-sdl/projects/unix/Makefile.orig   2010-02-14 
02:46:54.000000000 +0100
++++ source/mupen64plus-audio-sdl/projects/unix/Makefile        2010-02-16 
19:54:40.000000000 +0100
+@@ -44,6 +44,11 @@
+   SHARED = -shared
+   SO_EXTENSION = so
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++  SHARED = -shared
++  SO_EXTENSION = so
++endif
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+   SHARED = -shared
+@@ -143,6 +148,10 @@
+     CFLAGS  += $(shell sdl-config --cflags)
+     LDFLAGS += $(shell sdl-config --libs)
+ endif
++ifeq ($(OS),NETBSD)
++    CFLAGS  += $(shell sdl-config --cflags)
++    LDFLAGS = $(shell sdl-config --libs)
++endif
+ 
+ # test for presence of libsamplerate
+ ifneq ($(strip $(shell pkg-config samplerate --modversion 2> /dev/null)),)
+@@ -189,6 +198,9 @@
+ ifeq ($(OS),OSX)
+   STRIP       ?= strip -x 
+ endif
++ifeq ($(OS),NETBSD)
++  STRIP ?= strip -s
++endif
+ 
+ # set special flags for given Makefile parameters
+ ifeq ($(DEBUG),1)
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-ae    2010-02-16 19:09:19.000000000 +0000
@@ -0,0 +1,25 @@
+--- source/mupen64plus-input-sdl/projects/unix/Makefile.orig   2010-02-16 
20:05:40.000000000 +0100
++++ source/mupen64plus-input-sdl/projects/unix/Makefile        2010-02-16 
20:08:08.000000000 +0100
+@@ -43,6 +43,11 @@
+   SO_EXTENSION = so
+   SHARED = -shared
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++  SO_EXTENSION = so
++  SHARED = -shared
++endif
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+   SO_EXTENSION = so
+@@ -136,6 +141,10 @@
+     CFLAGS  += `${SDL_CONFIG} --cflags`
+     LDFLAGS += `${SDL_CONFIG} --libs`
+ endif
++ifeq ($(OS),NETBSD)
++    CFLAGS  += $(shell sdl-config --cflags)
++    LDFLAGS = $(shell sdl-config --libs)
++endif
+ ifeq ("$(UNAME)","Darwin")
+     CFLAGS  += $(shell sdl-config --cflags)
+     # sdl-config on mac screws up when we're trying to build a library and 
not an executable
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-af    2010-02-16 19:13:47.000000000 +0000
@@ -0,0 +1,25 @@
+--- source/mupen64plus-rsp-hle/projects/unix/Makefile.orig     2010-02-16 
20:10:31.000000000 +0100
++++ source/mupen64plus-rsp-hle/projects/unix/Makefile  2010-02-16 
20:12:44.000000000 +0100
+@@ -44,6 +44,11 @@
+   SO_EXTENSION = so
+   SHARED = -shared
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++  SO_EXTENSION = so
++  SHARED = -shared
++endif
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+   SO_EXTENSION = so
+@@ -100,6 +105,10 @@
+   LDFLAGS += -m32 -m elf_i386
+ endif
+ 
++ifeq ($(OS),NETBSD)
++  LDFLAGS = #
++endif
++
+ # set special flags per-system
+ ifeq ($(OS), LINUX)
+   ifeq ($(CPU), X86)
--- /dev/null   2010-02-16 19:48:55.000000000 +0000
+++ patches/patch-ag    2010-02-16 19:40:14.000000000 +0000
@@ -0,0 +1,40 @@
+--- source/mupen64plus-video-rice/projects/unix/Makefile.orig  2010-02-16 
19:15:08.000000000 +0000
++++ source/mupen64plus-video-rice/projects/unix/Makefile       2010-02-16 
19:29:08.000000000 +0000
+@@ -44,6 +44,11 @@
+   SO_EXTENSION = so
+   SHARED = -shared
+ endif
++ifeq ("$(UNAME)","NetBSD")
++  OS = NETBSD
++  SO_EXTENSION = so
++  SHARED = -shared
++endif
+ ifeq ("$(UNAME)","GNU/kFreeBSD")
+   OS = FREEBSD
+   SO_EXTENSION = so
+@@ -105,6 +110,14 @@
+ ifeq ($(OS),FREEBSD)
+   LDFLAGS += -lGL
+ endif
++
++# 
++# TODO: For the moment I don't made a SUBST to the X11 headers.
++#
++ifeq ($(OS), NETBSD)
++  CFLAGS = -I@LOCALBASE@/include -I /usr/X11R7/include/
++  LDFLAGS = -lpng -LGL
++endif
+ ifeq ($(OS), LINUX)
+   LDFLAGS += -lGL
+   ifeq ($(CPU), X86)
+@@ -138,6 +151,10 @@
+     CFLAGS  += `${SDL_CONFIG} --cflags`
+     LDFLAGS += `${SDL_CONFIG} --libs`
+ endif
++ifeq ($(OS),NETBSD)
++    CFLAGS  += $(shell sdl-config --cflags)
++    LDFLAGS += $(shell sdl-config --libs)
++endif
+ ifeq ($(OS),OSX)
+     CFLAGS  += $(shell sdl-config --cflags) -DPIC
+     # sdl-config on mac screws up when we're trying to build a library and 
not an executable
g++ -o _obj/Render.o -I/usr/pkg/include -I /usr/X11R7/include/ 
-I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE 
-I../../../mupen64plus-core/src/api -c ../../src/Render.cpp
In file included from ../../src/Render.cpp:20:
../../src/osal_preproc.h:92:25: warning: no newline at end of file
In file included from ../../src/liblinux/BMGImage.h:29,
                 from ../../src/liblinux/pngrw.h:35,
                 from ../../src/liblinux/BMGLibPNG.h:36,
                 from ../../src/Render.cpp:28:
../../src/liblinux/../osal_preproc.h:92:25: warning: no newline at end of file
../../src/liblinux/BMGImage.h:62: warning: #pragma pack(push[, id], <n>) is not 
supported on this target
../../src/liblinux/BMGImage.h:77: warning: #pragma pack(pop[, id], <n>) is not 
supported on this target
g++ -o _obj/RenderBase.o -I/usr/pkg/include -I /usr/X11R7/include/ 
-I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE 
-I../../../mupen64plus-core/src/api -c ../../src/RenderBase.cpp
In file included from ../../src/RenderBase.cpp:23:
../../src/osal_preproc.h:92:25: warning: no newline at end of file
../../src/RenderBase.cpp: In function 'void SSEVec3Transform(int)':
../../src/RenderBase.cpp:478: error: unknown register name '%xmm7' in 'asm'
../../src/RenderBase.cpp:478: error: unknown register name '%xmm6' in 'asm'
../../src/RenderBase.cpp:478: error: unknown register name '%xmm5' in 'asm'
../../src/RenderBase.cpp:478: error: unknown register name '%xmm4' in 'asm'
../../src/RenderBase.cpp:478: error: unknown register name '%xmm1' in 'asm'
../../src/RenderBase.cpp:478: error: unknown register name '%xmm0' in 'asm'
../../src/RenderBase.cpp: In function 'void SSEVec3TransformNormal()':
../../src/RenderBase.cpp:617: error: unknown register name '%xmm7' in 'asm'
../../src/RenderBase.cpp:617: error: unknown register name '%xmm6' in 'asm'
../../src/RenderBase.cpp:617: error: unknown register name '%xmm5' in 'asm'
../../src/RenderBase.cpp:617: error: unknown register name '%xmm4' in 'asm'
../../src/RenderBase.cpp:617: error: unknown register name '%xmm1' in 'asm'
../../src/RenderBase.cpp:617: error: unknown register name '%xmm0' in 'asm'
../../src/RenderBase.cpp: In function 'unsigned int SSELightVert()':
../../src/RenderBase.cpp:1266: error: unknown register name '%xmm5' in 'asm'
../../src/RenderBase.cpp:1266: error: unknown register name '%xmm4' in 'asm'
../../src/RenderBase.cpp:1266: error: unknown register name '%xmm3' in 'asm'
../../src/RenderBase.cpp:1266: error: unknown register name '%xmm1' in 'asm'
../../src/RenderBase.cpp:1266: error: unknown register name '%xmm0' in 'asm'
gmake: *** [_obj/RenderBase.o] Error 1
gmake: Leaving directory 
`/usr/pkgsrc/wip/mupen64plus/work/mupen64plus-bundle-src-1.99.3/source/mupen64plus-video-rice/projects/unix'
*** Error code 2

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
pkgsrc-wip-discuss mailing list
pkgsrc-wip-discuss%lists.sourceforge.net@localhost
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-discuss


Home | Main Index | Thread Index | Old Index