ports/devel/electron32/files/patch-tools_gn_build_gen.py
Hiroki Tagato 63a5b151bf devel/electron32: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://electronjs.org/
2024-09-23 04:58:21 +09:00

34 lines
1.2 KiB
Python

--- tools/gn/build/gen.py.orig 2024-04-15 20:45:30 UTC
+++ tools/gn/build/gen.py
@@ -94,6 +94,12 @@ class Platform(object):
def is_solaris(self):
return self._platform == 'solaris'
+ def is_openbsd(self):
+ return self._platform == 'openbsd'
+
+ def is_freebsd(self):
+ return self._platform == 'freebsd'
+
def is_posix(self):
return self._platform in ['linux', 'freebsd', 'darwin', 'aix', 'openbsd', 'haiku', 'solaris', 'msys', 'netbsd', 'serenity']
@@ -304,7 +310,7 @@ def WriteGenericNinja(path, static_libraries, executab
'linux': 'build_linux.ninja.template',
'freebsd': 'build_linux.ninja.template',
'aix': 'build_aix.ninja.template',
- 'openbsd': 'build_openbsd.ninja.template',
+ 'openbsd': 'build_linux.ninja.template',
'haiku': 'build_haiku.ninja.template',
'solaris': 'build_linux.ninja.template',
'netbsd': 'build_linux.ninja.template',
@@ -539,6 +545,9 @@ def WriteGNNinja(path, platform, host, options, args_l
if platform.is_posix() and not platform.is_haiku():
ldflags.append('-pthread')
+
+ if platform.is_openbsd():
+ libs.append('-lkvm')
if platform.is_mingw() or platform.is_msys():
cflags.extend(['-DUNICODE',