On 2011-06-27, Anthony J. Bentley <[email protected]> wrote:
> pkg/DESCR:
> DeSmuME is a Nintendo DS emulator under GNU GPL. It can boot homebrew
> and games, some of which are playable.
>
> Runs quite well on amd64/i386. The port is not really finished
> though... it mysteriously fails to build if graphics/agg is installed.

diff below relative to your tgz:

- avoid conflict with ALIGN macro in <machine/param.h> (this should
go upstream if possible)
- add proper deps for xdg desktop files and regen PLIST
- add wantlib/lib dep for agg
- drop unneeded patch to NDSSystem.h
- sync wantlib
- adjust Makefile closer to Makefile.template
- more accurate license marker (source files say "GPL v2 or newer")

builds/packages ok but otherwise untested.

pkg/DESCR could do with adjusting, it doesn't read very clearly
at present.


diff --git Makefile Makefile
index bff20b3..abb268e 100644
--- Makefile
+++ Makefile
@@ -8,27 +8,35 @@ CATEGORIES =  emulators
 
 HOMEPAGE =     http://desmume.org/
 
-# GPLv2
+# GPLv2+
 PERMIT_PACKAGE_CDROM =         Yes
 PERMIT_PACKAGE_FTP =           Yes
 PERMIT_DISTFILES_CDROM =       Yes
 PERMIT_DISTFILES_FTP =         Yes
 
-WANTLIB += c m pthread stdc++ z GL GLU ICE SM X11 Xau Xcomposite
-WANTLIB += Xcursor Xdamage Xdmcp Xext Xfixes Xi Xinerama Xmu Xrandr Xrender
-WANTLIB += Xt Xxf86vm drm expat fontconfig freetype pixman-1 pthread-stubs
+WANTLIB += agg c m pthread stdc++ z GL GLU ICE SM X11 Xcomposite
+WANTLIB += Xcursor Xdamage Xext Xfixes Xi Xinerama Xmu Xrandr Xrender
+WANTLIB += Xt expat fontconfig freetype pixman-1 pthread-stubs
 WANTLIB += xcb xcb-render xcb-shm png iconv xml2 gdk_pixbuf-2.0 gio-2.0
 WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 intl pangox-1.0 SDL
 WANTLIB += glade-2.0 atk-1.0 cairo gdk-x11-2.0 gdkglext-x11-1.0 gtk-x11-2.0
 WANTLIB += gtkglext-x11-1.0 pango-1.0 pangocairo-1.0 pangoft2-1.0
 
-LIB_DEPENDS =  graphics/png textproc/libxml graphics/gdk-pixbuf2 \
-               x11/gtkglext devel/sdl devel/libglade2
+MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=desmume/}
 
-MODULES =      textproc/intltool lang/lua
+RUN_DEPENDS =  devel/desktop-file-utils
 
-CONFIGURE_STYLE =      gnu
+LIB_DEPENDS =  devel/sdl \
+               devel/libglade2 \
+               graphics/agg \
+               graphics/gdk-pixbuf2 \
+               graphics/png \
+               textproc/libxml \
+               x11/gtkglext
 
-MASTER_SITES =         ${MASTER_SITE_SOURCEFORGE:=desmume/}
+MODULES =      textproc/intltool \
+               lang/lua
+
+CONFIGURE_STYLE =      gnu
 
 .include <bsd.port.mk>
diff --git patches/patch-src_NDSSystem_h patches/patch-src_NDSSystem_h
deleted file mode 100644
index 39358ee..0000000
--- patches/patch-src_NDSSystem_h
+++ /dev/null
@@ -1,11 +0,0 @@
-$OpenBSD$
---- src/NDSSystem.h.orig       Sat Jun 18 16:03:31 2011
-+++ src/NDSSystem.h    Sat Jun 18 16:03:40 2011
-@@ -28,6 +28,7 @@
- #include "wifi.h"
- #include "emufile.h"
- #include "firmware.h"
-+#include "types.h"
- 
- #include <string>
- 
diff --git patches/patch-src_OGLRender_cpp patches/patch-src_OGLRender_cpp
new file mode 100644
index 0000000..3b02f24
--- /dev/null
+++ patches/patch-src_OGLRender_cpp
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/OGLRender.cpp.orig     Fri Jul  1 10:17:51 2011
++++ src/OGLRender.cpp  Fri Jul  1 10:18:09 2011
+@@ -76,7 +76,7 @@ static void ENDGL() {
+ #include "shaders.h"
+ #include "texcache.h"
+ 
+-static ALIGN(16) u8  GPU_screen3D                     [256*192*4];
++static DMALIGN(16) u8  GPU_screen3D                   [256*192*4];
+ 
+ static const unsigned short map3d_cull[4] = {GL_FRONT_AND_BACK, GL_FRONT, 
GL_BACK, 0};
+ static const int texEnv[4] = { GL_MODULATE, GL_DECAL, GL_MODULATE, 
GL_MODULATE };
diff --git patches/patch-src_gfx3d_cpp patches/patch-src_gfx3d_cpp
new file mode 100644
index 0000000..5df4bfd
--- /dev/null
+++ patches/patch-src_gfx3d_cpp
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/gfx3d.cpp.orig Fri Jul  1 10:17:51 2011
++++ src/gfx3d.cpp      Fri Jul  1 10:18:05 2011
+@@ -606,7 +606,7 @@ static void SetVertex()
+               s16coord[2]
+       };
+ 
+-      ALIGN(16) s32 coordTransformed[4] = { coord[0], coord[1], coord[2], 
(1<<12) };
++      DMALIGN(16) s32 coordTransformed[4] = { coord[0], coord[1], coord[2], 
(1<<12) };
+ 
+       if (texCoordinateTransform == 3)
+       {
diff --git patches/patch-src_types_h patches/patch-src_types_h
new file mode 100644
index 0000000..0e6243c
--- /dev/null
+++ patches/patch-src_types_h
@@ -0,0 +1,26 @@
+$OpenBSD$
+--- src/types.h.orig   Fri Jul  1 10:17:51 2011
++++ src/types.h        Fri Jul  1 10:18:24 2011
+@@ -90,17 +90,17 @@
+ 
+ 
+ #if defined(_MSC_VER) || defined(__INTEL_COMPILER)
+-#define ALIGN(X) __declspec(align(X))
++#define DMALIGN(X) __declspec(align(X))
+ #elif __GNUC__
+-#define ALIGN(X) __attribute__ ((aligned (X)))
++#define DMALIGN(X) __attribute__ ((aligned (X)))
+ #else
+-#define ALIGN(X)
++#define DMALIGN(X)
+ #endif
+ 
+-#define CACHE_ALIGN ALIGN(32)
++#define CACHE_ALIGN DMALIGN(32)
+ 
+ //use this for example when you want a byte value to be better-aligned
+-#define FAST_ALIGN ALIGN(4)
++#define FAST_ALIGN DMALIGN(4)
+ 
+ #ifndef FASTCALL
+ #ifdef __MINGW32__
diff --git pkg/PLIST pkg/PLIST
index c4bdcba..5183a6b 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -5,7 +5,6 @@
 @man man/man1/desmume-cli.1
 @man man/man1/desmume-glade.1
 @man man/man1/desmume.1
-share/applications/
 share/applications/desmume-glade.desktop
 share/applications/desmume.desktop
 share/desmume/
@@ -15,3 +14,5 @@ share/desmume/glade/DeSmuMe.glade
 share/desmume/glade/DeSmuMe_Dtools.glade
 share/pixmaps/
 share/pixmaps/DeSmuME.xpm
+@exec %D/bin/update-desktop-database
+@unexec-delete %D/bin/update-desktop-database

Reply via email to