pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add pcem.
Module Name: pkgsrc-wip
Committed By: nia <nia%netbsd.org@localhost>
Pushed By: nee
Date: Sat Mar 6 22:50:02 2021 +0100
Changeset: f060bee178d97c9b3447d8e0cbc25d3127cd92e1
Modified Files:
Makefile
Added Files:
pcem/DESCR
pcem/Makefile
pcem/PLIST
pcem/TODO
pcem/distinfo
pcem/options.mk
pcem/patches/patch-configure
pcem/patches/patch-src_codegen__allocator.c
pcem/patches/patch-src_codegen__backend__arm.c
pcem/patches/patch-src_codegen__backend__arm64.c
pcem/patches/patch-src_codegen__backend__x86-64.c
pcem/patches/patch-src_codegen__backend__x86.c
pcem/patches/patch-src_codegen__x86-64.c
pcem/patches/patch-src_vid__voodoo__codegen__x86-64.h
pcem/patches/patch-src_vid__voodoo__codegen__x86.h
pcem/patches/patch-src_wx-sdl2.c
pcem/patches/patch-src_wx-thread.c
Log Message:
Add pcem.
Emulator for various IBM PC computers and clones.
Supports hardware from the 8088 to the 486 and Pentium, graphics cards
such at the 3DFX Voodoo, sound cards such as the Sound Blaster 16
Ensoniq AudioPCI, and Gravis UltraSound.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f060bee178d97c9b3447d8e0cbc25d3127cd92e1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
pcem/DESCR | 5 +++
pcem/Makefile | 29 ++++++++++++
pcem/PLIST | 0
pcem/TODO | 1 +
pcem/distinfo | 17 +++++++
pcem/options.mk | 15 +++++++
pcem/patches/patch-configure | 15 +++++++
pcem/patches/patch-src_codegen__allocator.c | 21 +++++++++
pcem/patches/patch-src_codegen__backend__arm.c | 22 +++++++++
pcem/patches/patch-src_codegen__backend__arm64.c | 31 +++++++++++++
pcem/patches/patch-src_codegen__backend__x86-64.c | 24 ++++++++++
pcem/patches/patch-src_codegen__backend__x86.c | 31 +++++++++++++
pcem/patches/patch-src_codegen__x86-64.c | 40 +++++++++++++++++
.../patch-src_vid__voodoo__codegen__x86-64.h | 24 ++++++++++
pcem/patches/patch-src_vid__voodoo__codegen__x86.h | 33 ++++++++++++++
pcem/patches/patch-src_wx-sdl2.c | 52 ++++++++++++++++++++++
pcem/patches/patch-src_wx-thread.c | 15 +++++++
18 files changed, 376 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 84830a6621..fd4c0116de 100644
--- a/Makefile
+++ b/Makefile
@@ -2938,6 +2938,7 @@ SUBDIR+= pbbuttonsd
SUBDIR+= pbcopper
SUBDIR+= pbseqan
SUBDIR+= pbzx
+SUBDIR+= pcem
SUBDIR+= pcp
SUBDIR+= pcsx2
SUBDIR+= pdb2ldif
diff --git a/pcem/DESCR b/pcem/DESCR
new file mode 100644
index 0000000000..275a02e5bf
--- /dev/null
+++ b/pcem/DESCR
@@ -0,0 +1,5 @@
+Emulator for various IBM PC computers and clones.
+
+Supports hardware from the 8088 to the 486 and Pentium, graphics cards
+such at the 3DFX Voodoo, sound cards such as the Sound Blaster 16
+Ensoniq AudioPCI, and Gravis UltraSound.
diff --git a/pcem/Makefile b/pcem/Makefile
new file mode 100644
index 0000000000..83886854c1
--- /dev/null
+++ b/pcem/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+DISTNAME= PCemV17Linux
+PKGNAME= ${DISTNAME:S/Linux$//1:S/V/-/1:tl}
+CATEGORIES= emulators
+MASTER_SITES= https://pcem-emulator.co.uk/files/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://pcem-emulator.co.uk/
+COMMENT= Emulator for various IBM PC computers and clones
+LICENSE= gnu-gpl-v2
+
+TOOL_DEPENDS+= dos2unix-[0-9]*:../../converters/dos2unix
+
+WRKSRC= ${WRKDIR}
+GNU_CONFIGURE= yes
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+CPPFLAGS.NetBSD+= -Doff64_t=off_t
+
+CONFIGURE_ARGS+= --disable-sdltest
+CONFIGURE_ARGS+= --disable-sdlframework
+
+.include "options.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../x11/wxGTK30/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/pcem/PLIST b/pcem/PLIST
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/pcem/TODO b/pcem/TODO
new file mode 100644
index 0000000000..1e7f373d2e
--- /dev/null
+++ b/pcem/TODO
@@ -0,0 +1 @@
+It's looking in the wrong place for wxwidget headers so the build fails.
diff --git a/pcem/distinfo b/pcem/distinfo
new file mode 100644
index 0000000000..bc7e656191
--- /dev/null
+++ b/pcem/distinfo
@@ -0,0 +1,17 @@
+$NetBSD$
+
+SHA1 (PCemV17Linux.tar.gz) = 3dfca75d674e891bee3c02820aef1ef05b3ab6d4
+RMD160 (PCemV17Linux.tar.gz) = 7df7b32b7a8c48f6477bb10e1524efc755f89a63
+SHA512 (PCemV17Linux.tar.gz) = 6d84c8cbe9b6116f6439f542ac08139cfc5652a34b615a1ed841a6f8c227e77f1d26573ec35d57511b9a69e7472fbe51f2abb9307f8f8c1207c74fbe8107cadd
+Size (PCemV17Linux.tar.gz) = 1880868 bytes
+SHA1 (patch-configure) = 15b5d8950398d22f5943e8b7c73d25ca417ef766
+SHA1 (patch-src_codegen__allocator.c) = 32cdde00c9d4610c6507082738fcb8763f0b5023
+SHA1 (patch-src_codegen__backend__arm.c) = 50154c7c40d95b41a6b8217f448508a18a6e10c6
+SHA1 (patch-src_codegen__backend__arm64.c) = af94ccb5db9fc1550f057d4001d42826cd86cb43
+SHA1 (patch-src_codegen__backend__x86-64.c) = abed7d65085ca8a0bf5c9c2c64c43a05aa433d4b
+SHA1 (patch-src_codegen__backend__x86.c) = 1dda1dc776744b07f4dc829f3754cbad83fda3b5
+SHA1 (patch-src_codegen__x86-64.c) = 836124d0d8d022b0367d83afcf711c929ae7d6f6
+SHA1 (patch-src_vid__voodoo__codegen__x86-64.h) = ab689a5d27f9d927900185923ec2a372f54de6c7
+SHA1 (patch-src_vid__voodoo__codegen__x86.h) = c12ef58bc6e84c019831341d1323149770f040b1
+SHA1 (patch-src_wx-sdl2.c) = f4f599bbf2bd84017ad14064df89f0a496c8b706
+SHA1 (patch-src_wx-thread.c) = bb50cc7ec5f8005cad922d6aff76943b67dddd01
diff --git a/pcem/options.mk b/pcem/options.mk
new file mode 100644
index 0000000000..c82bfe8ec6
--- /dev/null
+++ b/pcem/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.pcem
+
+PKG_SUPPORTED_OPTIONS+= alsa
+PKG_SUGGESTED_OPTIONS.Linux+= alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CONFIGURE_ARGS+= --enable-alsa
+. include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-alsa
+.endif
diff --git a/pcem/patches/patch-configure b/pcem/patches/patch-configure
new file mode 100644
index 0000000000..db712cf791
--- /dev/null
+++ b/pcem/patches/patch-configure
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix shell portability.
+
+--- configure.orig 2020-12-01 20:38:33.000000000 +0000
++++ configure
+@@ -5150,7 +5150,7 @@ if test "$wxWin" != 1; then
+ " "$LINENO" 5
+ fi
+
+-if test "$enable_alsa" == "yes"; then
++if test "$enable_alsa" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5
+ $as_echo_n "checking for snd_pcm_open in -lasound... " >&6; }
+ if ${ac_cv_lib_asound_snd_pcm_open+:} false; then :
diff --git a/pcem/patches/patch-src_codegen__allocator.c b/pcem/patches/patch-src_codegen__allocator.c
new file mode 100644
index 0000000000..124212348e
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__allocator.c
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_allocator.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_allocator.c
+@@ -1,11 +1,10 @@
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined WIN32 || defined _WIN32 || defined _WIN32
++#include <windows.h>
++#else
+ #include <sys/mman.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #endif
+-#if defined WIN32 || defined _WIN32 || defined _WIN32
+-#include <windows.h>
+-#endif
+
+ #include "ibm.h"
+ #include "codegen.h"
diff --git a/pcem/patches/patch-src_codegen__backend__arm.c b/pcem/patches/patch-src_codegen__backend__arm.c
new file mode 100644
index 0000000000..c88d30620c
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__backend__arm.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_backend_arm.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_backend_arm.c
+@@ -11,12 +11,11 @@
+ #include "x86.h"
+ #include "x87.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if defined WIN32 || defined _WIN32 || defined _WIN32
+ #include <windows.h>
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ void *codegen_mem_load_byte;
diff --git a/pcem/patches/patch-src_codegen__backend__arm64.c b/pcem/patches/patch-src_codegen__backend__arm64.c
new file mode 100644
index 0000000000..d6a76af06d
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__backend__arm64.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_backend_arm64.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_backend_arm64.c
+@@ -11,12 +11,11 @@
+ #include "x86.h"
+ #include "x87.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if defined WIN32 || defined _WIN32 || defined _WIN32
+ #include <windows.h>
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ void *codegen_mem_load_byte;
+@@ -278,7 +277,7 @@ void codegen_backend_init()
+ {
+ codeblock_t *block;
+ int c;
+-#if defined(__linux__) || defined(__APPLE__)
++#ifndef _WIN32
+ void *start;
+ size_t len;
+ long pagesize = sysconf(_SC_PAGESIZE);
diff --git a/pcem/patches/patch-src_codegen__backend__x86-64.c b/pcem/patches/patch-src_codegen__backend__x86-64.c
new file mode 100644
index 0000000000..a6b45c3118
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__backend__x86-64.c
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_backend_x86-64.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_backend_x86-64.c
+@@ -10,14 +10,13 @@
+ #include "codegen_reg.h"
+ #include "x86.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined WIN32 || defined _WIN32 || defined _WIN32
++#include <windows.h>
++#else
+ #include <sys/mman.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #endif
+-#if defined WIN32 || defined _WIN32 || defined _WIN32
+-#include <windows.h>
+-#endif
+
+ void *codegen_mem_load_byte;
+ void *codegen_mem_load_word;
diff --git a/pcem/patches/patch-src_codegen__backend__x86.c b/pcem/patches/patch-src_codegen__backend__x86.c
new file mode 100644
index 0000000000..2cd68a3fcd
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__backend__x86.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_backend_x86.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_backend_x86.c
+@@ -11,12 +11,11 @@
+ #include "codegen_reg.h"
+ #include "x86.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if defined WIN32 || defined _WIN32 || defined _WIN32
+ #include <windows.h>
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ void *codegen_mem_load_byte;
+@@ -262,7 +261,7 @@ void codegen_backend_init()
+ {
+ codeblock_t *block;
+ int c;
+-#if defined(__linux__) || defined(__APPLE__)
++#ifndef _WIN32
+ void *start;
+ size_t len;
+ long pagesize = sysconf(_SC_PAGESIZE);
diff --git a/pcem/patches/patch-src_codegen__x86-64.c b/pcem/patches/patch-src_codegen__x86-64.c
new file mode 100644
index 0000000000..cd1d5939d8
--- /dev/null
+++ b/pcem/patches/patch-src_codegen__x86-64.c
@@ -0,0 +1,40 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/codegen_x86-64.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/codegen_x86-64.c
+@@ -15,12 +15,11 @@
+ #include "codegen_ops.h"
+ #include "codegen_ops_x86-64.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if WIN64
+ #include <windows.h>
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ int codegen_flat_ds, codegen_flat_ss;
+@@ -63,7 +62,7 @@ void codegen_init()
+ {
+ int c;
+
+-#if defined(__linux__) || defined(__APPLE__)
++#ifndef WIN64
+ void *start;
+ size_t len;
+ long pagesize = sysconf(_SC_PAGESIZE);
+@@ -83,7 +82,7 @@ void codegen_init()
+ for (c = 0; c < BLOCK_SIZE; c++)
+ codeblock[c].pc = BLOCK_PC_INVALID;
+
+-#if defined(__linux__) || defined(__APPLE__)
++#ifndef WIN64
+ start = (void *)((long)codeblock & pagemask);
+ len = ((BLOCK_SIZE * sizeof(codeblock_t)) + pagesize) & pagemask;
+ if (mprotect(start, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
diff --git a/pcem/patches/patch-src_vid__voodoo__codegen__x86-64.h b/pcem/patches/patch-src_vid__voodoo__codegen__x86-64.h
new file mode 100644
index 0000000000..bb1ac81398
--- /dev/null
+++ b/pcem/patches/patch-src_vid__voodoo__codegen__x86-64.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/vid_voodoo_codegen_x86-64.h.orig 2020-12-01 20:40:53.000000000 +0000
++++ src/vid_voodoo_codegen_x86-64.h
+@@ -5,14 +5,13 @@
+ fbzColorPath
+ */
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if WIN64
+ #define BITMAP windows_BITMAP
+ #include <windows.h>
+ #undef BITMAP
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ #include <xmmintrin.h>
diff --git a/pcem/patches/patch-src_vid__voodoo__codegen__x86.h b/pcem/patches/patch-src_vid__voodoo__codegen__x86.h
new file mode 100644
index 0000000000..80bcc055ca
--- /dev/null
+++ b/pcem/patches/patch-src_vid__voodoo__codegen__x86.h
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/vid_voodoo_codegen_x86.h.orig 2020-12-01 20:40:53.000000000 +0000
++++ src/vid_voodoo_codegen_x86.h
+@@ -5,14 +5,13 @@
+ fbzColorPath
+ */
+
+-#if defined(__linux__) || defined(__APPLE__)
+-#include <sys/mman.h>
+-#include <unistd.h>
+-#endif
+ #if defined WIN32 || defined _WIN32 || defined _WIN32
+ #define BITMAP windows_BITMAP
+ #include <windows.h>
+ #undef BITMAP
++#else
++#include <sys/mman.h>
++#include <unistd.h>
+ #endif
+
+ #include <xmmintrin.h>
+@@ -3367,7 +3366,7 @@ voodoo_recomp++;
+ void voodoo_codegen_init(voodoo_t *voodoo)
+ {
+ int c;
+-#if defined(__linux__) || defined(__APPLE__)
++#ifndef _WIN32
+ void *start;
+ size_t len;
+ long pagesize = sysconf(_SC_PAGESIZE);
diff --git a/pcem/patches/patch-src_wx-sdl2.c b/pcem/patches/patch-src_wx-sdl2.c
new file mode 100644
index 0000000000..beeeda4696
--- /dev/null
+++ b/pcem/patches/patch-src_wx-sdl2.c
@@ -0,0 +1,52 @@
+$NetBSD$
+
+Assume non-Windows is unixy.
+
+--- src/wx-sdl2.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/wx-sdl2.c
+@@ -238,7 +238,7 @@ int dir_exists(char* path)
+
+ void get_pcem_path(char *s, int size)
+ {
+-#ifdef __linux
++#if !defined(__APPLE__) && !defined(__WINDOWS__)
+ wx_get_home_directory(s);
+ strcat(s, ".pcem/");
+ #else
+@@ -399,8 +399,6 @@ void wx_initmenu()
+ wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+c, s, wxITEM_RADIO);
+ }
+ }
+-#elif __linux__
+- wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+1, "Host CD/DVD Drive (/dev/cdrom)", wxITEM_RADIO);
+ #elif __APPLE__
+ int c;
+
+@@ -421,6 +419,8 @@ void wx_initmenu()
+ wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+c, name, wxITEM_RADIO);
+ }
+ }
++#else
++ wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+1, "Host CD/DVD Drive (/dev/cdrom)", wxITEM_RADIO);
+ #endif
+ }
+
+@@ -511,7 +511,7 @@ int pc_main(int argc, char** argv)
+ {
+ paths_init();
+
+-#ifdef __linux__
++#if !defined(__APPLE__) && !defined(__WINDOWS__)
+ char s[1024];
+ /* create directories if they don't exist */
+ if (!wx_setup(pcem_path))
+@@ -538,7 +538,8 @@ int pc_main(int argc, char** argv)
+
+ sound_init();
+
+-#ifdef __linux__
++#if !defined(__APPLE__) && !defined(__WINDOWS__)
++ char s[1024];
+ /* check if cfg exists, and if not create it */
+ append_filename(s, pcem_path, "pcem.cfg", 511);
+ if (!wx_file_exists(s))
diff --git a/pcem/patches/patch-src_wx-thread.c b/pcem/patches/patch-src_wx-thread.c
new file mode 100644
index 0000000000..10f269f45c
--- /dev/null
+++ b/pcem/patches/patch-src_wx-thread.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Test for the actual define.
+
+--- src/wx-thread.c.orig 2020-12-01 20:40:51.000000000 +0000
++++ src/wx-thread.c
+@@ -171,7 +171,7 @@ int thread_wait_event(event_t *handle, i
+ event_pthread_t *event = (event_pthread_t *)handle;
+ struct timespec abstime;
+
+-#ifdef __linux__
++#ifdef CLOCK_REALTIME
+ clock_gettime(CLOCK_REALTIME, &abstime);
+ #else
+ struct timeval now;
Home |
Main Index |
Thread Index |
Old Index