diff --git a/srcpkgs/xnp2/INSTALL.msg b/srcpkgs/xnp2/INSTALL.msg new file mode 100644 index 00000000000..53fc91ec76d --- /dev/null +++ b/srcpkgs/xnp2/INSTALL.msg @@ -0,0 +1,7 @@ +The following packages are not required for operation, but are necessary +to support extra features: + +SDL2 Required when using sound and joystick. +SDL2_mixer Required when playing PCM such as floppy seek sound. +libXxf86vm Required when using full screen function to change screen resolution. +libusb Required when supporting C86 BOX. diff --git a/srcpkgs/xnp2/patches/define_cplusplus.patch b/srcpkgs/xnp2/patches/define_cplusplus.patch new file mode 100644 index 00000000000..3245b948d1b --- /dev/null +++ b/srcpkgs/xnp2/patches/define_cplusplus.patch @@ -0,0 +1,17 @@ +--- x11/compiler.h.old 2018-02-02 17:00:29.174895866 +0000 ++++ x11/compiler.h 2018-02-02 17:00:41.199160781 +0000 +@@ -117,12 +117,14 @@ + #define MAX_PATH MAXPATHLEN + #endif + ++#ifndef __cplusplus + #ifndef max + #define max(a,b) (((a) > (b)) ? (a) : (b)) + #endif + #ifndef min + #define min(a,b) (((a) < (b)) ? (a) : (b)) + #endif ++#endif /* __cplusplus */ + + #ifndef ZeroMemory + #define ZeroMemory(d,n) memset((d), 0, (n)) diff --git a/srcpkgs/xnp2/template b/srcpkgs/xnp2/template new file mode 100644 index 00000000000..1070cad41c2 --- /dev/null +++ b/srcpkgs/xnp2/template @@ -0,0 +1,27 @@ +# Template file for 'xnp2' +pkgname=xnp2 +version=0.86 +revision=1 +build_wrksrc=x11 +build_style=gnu-configure +configure_args="--enable-ia32 --enable-build-all" +hostmakedepends="pkg-config nasm" +makedepends="gtk+-devel SDL2-devel" +short_desc="A port for UNIX with X11 of the Neko Project II PC-9801 emulator" +maintainer="hipperson0 " +license="BSD" +homepage="https://www.nonakap.org/np2" +distfiles="https://www.nonakap.org/np2/release/xnp2-${version}.tar.bz2" +checksum=e0b8c93f54682a4b3373907fd9ffe78094f95f7430dffc5038eccbcc4c3f78fd + +do_install() { + vbin xnp2 + vbin xnp21 + vman xnp2.1 + vman xnp2.1j + vman xnp21.1 + vman xnp21.1j + vdoc README.ja + sed '/\*\//q' main.c > LICENSE + vlicense LICENSE +}