mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
93 lines
3.0 KiB
Plaintext
93 lines
3.0 KiB
Plaintext
From 3c96436d127fdd37d68b01341a60e27f09aa3734 Mon Sep 17 00:00:00 2001
|
|
From: Kacper Kasper <kacperkasper@gmail.com>
|
|
Date: Sun, 21 Apr 2019 00:05:13 +0200
|
|
Subject: Haiku support
|
|
|
|
Original patchset by Calvin Hill <calvin@hakobaito.co.uk>
|
|
|
|
diff --git a/build/gen.py b/build/gen.py
|
|
index 922bf46..8a42fd3 100755
|
|
--- a/build/gen.py
|
|
+++ b/build/gen.py
|
|
@@ -151,15 +151,6 @@ def main(argv):
|
|
|
|
|
|
def GenerateLastCommitPosition(host, header):
|
|
- ROOT_TAG = 'initial-commit'
|
|
- describe_output = subprocess.check_output(
|
|
- ['git', 'describe', 'HEAD', '--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_
|
|
@@ -169,7 +160,7 @@ def GenerateLastCommitPosition(host, header):
|
|
#define LAST_COMMIT_POSITION "%s (%s)"
|
|
|
|
#endif // OUT_LAST_COMMIT_POSITION_H_
|
|
-''' % (mo.group(1), mo.group(1), mo.group(2))
|
|
+''' % (999999, 999999, "091169b")
|
|
|
|
# Only write/touch this file if the commit position has changed.
|
|
old_contents = ''
|
|
@@ -363,7 +354,7 @@ def WriteGNNinja(path, platform, host, options):
|
|
cflags.extend([
|
|
'-D_FILE_OFFSET_BITS=64',
|
|
'-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS',
|
|
- '-pthread',
|
|
+ '-pthread' if not platform.is_haiku() else '',
|
|
'-pipe',
|
|
'-fno-exceptions',
|
|
'-fno-rtti',
|
|
@@ -404,7 +395,7 @@ def WriteGNNinja(path, platform, host, options):
|
|
ldflags.append('-maix64')
|
|
elif platform.is_haiku():
|
|
cflags.append('-fPIC')
|
|
- cflags.extend(['-D_BSD_SOURCE'])
|
|
+ cflags.extend(['-D_BSD_SOURCE','-D__USE_XOPEN2K8'])
|
|
|
|
if platform.is_posix() and not platform.is_haiku():
|
|
ldflags.append('-pthread')
|
|
diff --git a/src/base/files/file_posix.cc b/src/base/files/file_posix.cc
|
|
index 349cbfe..1faf7fa 100644
|
|
--- a/src/base/files/file_posix.cc
|
|
+++ b/src/base/files/file_posix.cc
|
|
@@ -93,7 +93,7 @@ void File::Info::FromStat(const stat_wrapper_t& stat_info) {
|
|
int64_t last_accessed_nsec = stat_info.st_atimespec.tv_nsec;
|
|
time_t creation_time_sec = stat_info.st_ctimespec.tv_sec;
|
|
int64_t creation_time_nsec = stat_info.st_ctimespec.tv_nsec;
|
|
-#elif defined(OS_AIX)
|
|
+#elif defined(OS_AIX) || defined(OS_HAIKU)
|
|
time_t last_modified_sec = stat_info.st_mtime;
|
|
int64_t last_modified_nsec = 0;
|
|
time_t last_accessed_sec = stat_info.st_atime;
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From a3f1533b5aeed9ae16c93f5bf38e82fe9cee645f Mon Sep 17 00:00:00 2001
|
|
From: Begasus <begasus@gmail.com>
|
|
Date: Sun, 18 Feb 2024 15:58:32 +0100
|
|
Subject: Disable deprecated warnings
|
|
|
|
|
|
diff --git a/build/gen.py b/build/gen.py
|
|
index 8a42fd3..080248e 100755
|
|
--- a/build/gen.py
|
|
+++ b/build/gen.py
|
|
@@ -362,6 +362,7 @@ def WriteGNNinja(path, platform, host, options):
|
|
'-Wall',
|
|
'-Wextra',
|
|
'-Wno-unused-parameter',
|
|
+ '-Wno-deprecated-copy',
|
|
'-std=c++17'
|
|
])
|
|
|
|
--
|
|
2.42.1
|
|
|