# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= gn VERSION= 2072 KEYWORDS= devel VARIANTS= standard SDESC[standard]= Meta-build system to generate Ninja build files HOMEPAGE= https://gn.googlesource.com/gn CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/cglogic:gn:v2072 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none NOT_FOR_OPSYS= sunos USES= ninja python:build shebangfix c++:single C_USES[linux]= iconv LICENSE= BSD3CLAUSE:single LICENSE_FILE= BSD3CLAUSE:{{WRKSRC}}/LICENSE LICENSE_SCHEME= solo FPC_EQUIVALENT= devel/gn SHEBANG_FILES= build/gen.py MUST_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes CONFIGURE_WRKSRC= {{WRKSRC}}/out CONFIGURE_SCRIPT= build/gen.py CONFIGURE_ARGS= --allow-warnings CONFIGURE_ENV= GN_VERSION=2072 CC={{CC}} CXX={{CXX}} LD={{CXX}} AR={{AR}} BUILD_TARGET= #nothing CFLAGS= -Wno-deprecated-copy VAR_OPSYS[linux]= LDFLAGS=-liconv pre-configure: ${REINPLACE_CMD} -e 's/"python"/"${PYTHON_CMD:T}"/' \ ${WRKSRC}/src/gn/exec_process_unittest.cc do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/gn ${STAGEDIR}${PREFIX}/bin [FILE:64:descriptions/desc.single] GN is a meta-build system that generates build files for Ninja. [FILE:101:distinfo] db79ae073bcac3944c56f5f166c4b764a58c06594134c85b742bf859b42c5a66 1056984 cglogic-gn-2072.tar.gz [FILE:7:manifests/plist.single] bin/gn [FILE:1976:patches/patch-build_gen.py] .git/ is missing in archive, so use version from environment --- build/gen.py.orig 2023-09-11 17:14:35 UTC +++ build/gen.py @@ -47,6 +47,10 @@ class Platform(object): self._platform = 'fuchsia' elif self._platform.startswith('freebsd'): self._platform = 'freebsd' + elif self._platform.startswith('dragonfly'): + self._platform = 'freebsd' + elif self._platform.startswith('midnight'): + self._platform = 'freebsd' elif self._platform.startswith('netbsd'): self._platform = 'netbsd' elif self._platform.startswith('openbsd'): @@ -216,25 +220,16 @@ def main(argv): def GenerateLastCommitPosition(host, header): - ROOT_TAG = 'initial-commit' - describe_output = subprocess.check_output( - ['git', 'describe', 'HEAD', '--abbrev=12', '--match', ROOT_TAG], - shell=host.is_windows(), cwd=REPO_ROOT) - mo = re.match(ROOT_TAG + '-(\d+)-g([0-9a-f]+)', describe_output.decode()) - if not mo: - raise ValueError( - 'Unexpected output from git describe when generating version header') - contents = '''// Generated by build/gen.py. #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ #define LAST_COMMIT_POSITION_NUM %s -#define LAST_COMMIT_POSITION "%s (%s)" +#define LAST_COMMIT_POSITION "%s" #endif // OUT_LAST_COMMIT_POSITION_H_ -''' % (mo.group(1), mo.group(1), mo.group(2)) +''' % (os.environ['GN_VERSION'], os.environ['GN_VERSION']) # Only write/touch this file if the commit position has changed. old_contents = '' @@ -278,6 +273,8 @@ def WriteGenericNinja(path, static_libra 'darwin': 'build_mac.ninja.template', 'linux': 'build_linux.ninja.template', 'freebsd': 'build_linux.ninja.template', + 'dragonfly': 'build_linux.ninja.template', + 'midnightbsd': 'build_linux.ninja.template', 'aix': 'build_aix.ninja.template', 'openbsd': 'build_openbsd.ninja.template', 'haiku': 'build_haiku.ninja.template', [FILE:389:patches/patch-src_gn_args.cc] --- src/gn/args.cc.orig 2022-11-10 16:29:39 UTC +++ src/gn/args.cc @@ -310,8 +310,12 @@ void Args::SetSystemVarsLocked(Scope* de os = "mac"; #elif defined(OS_LINUX) os = "linux"; +#elif defined(OS_DRAGONFLY) + os = "freebsd"; #elif defined(OS_FREEBSD) os = "freebsd"; +#elif defined(OS_NETBSD) + os = "netbsd"; #elif defined(OS_AIX) os = "aix"; #elif defined(OS_OPENBSD) [FILE:294:patches/patch-src_gn_version.h] --- src/gn/version.h.orig 2022-11-10 16:29:39 UTC +++ src/gn/version.h @@ -15,6 +15,15 @@ #undef minor #endif +// Undefine major/minor from sys/types.h +#ifdef major +#undef major +#endif + +#ifdef minor +#undef minor +#endif + // Represents a semantic version. class Version { public: [FILE:1025:patches/patch-src_util_build__config.h] --- src/util/build_config.h.orig 2022-11-10 16:29:39 UTC +++ src/util/build_config.h @@ -40,6 +40,8 @@ #define OS_WIN 1 #elif defined(__Fuchsia__) #define OS_FUCHSIA 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 #elif defined(__FreeBSD__) #define OS_FREEBSD 1 #elif defined(__NetBSD__) @@ -67,13 +69,14 @@ // For access to standard BSD features, use OS_BSD instead of a // more specific macro. -#if defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD) +#if defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLY) #define OS_BSD 1 #endif // For access to standard POSIXish features, use OS_POSIX instead of a // more specific macro. #if defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_ASMJS) || \ + defined(OS_DRAGONFLY) || \ defined(OS_FREEBSD) || defined(OS_LINUX) || defined(OS_MACOSX) || \ defined(OS_NACL) || defined(OS_NETBSD) || defined(OS_OPENBSD) || \ defined(OS_QNX) || defined(OS_SOLARIS) || defined(OS_HAIKU) || \ [FILE:614:patches/patch-src_util_exe__path.cc] --- src/util/exe_path.cc.orig 2022-11-10 16:29:39 UTC +++ src/util/exe_path.cc @@ -15,7 +15,7 @@ #include #include "base/win/win_util.h" -#elif defined(OS_FREEBSD) || defined(OS_NETBSD) +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_DRAGONFLY) #include #include #include @@ -57,7 +57,7 @@ base::FilePath GetExePath() { return base::FilePath(system_buffer); } -#elif defined(OS_FREEBSD) +#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) base::FilePath GetExePath() { int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};