mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
209 lines
5.9 KiB
Plaintext
209 lines
5.9 KiB
Plaintext
From 1c4626e12c898849c7dd0196f1c972c9257c8c20 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Fri, 18 Apr 2025 20:59:28 +0200
|
|
Subject: Haiku build fixes
|
|
|
|
Use the gnu++17 C++ standard to get non-standard symbols from netdb.h
|
|
(and fix a bug in the Makefile when using that). Patching configure
|
|
instead of configure.ac avoids the need for autoconf.
|
|
|
|
Define __BSD_VISIBLE for feenableexcept and fedisableexcept.
|
|
|
|
Disable the usage of unsupported GLUT functions.
|
|
|
|
Change a hard-coded -fPIE to -fPIC.
|
|
|
|
diff --git a/LspCpp/CMakeLists.txt b/LspCpp/CMakeLists.txt
|
|
index 6b12b04..8e7ebe6 100644
|
|
--- a/LspCpp/CMakeLists.txt
|
|
+++ b/LspCpp/CMakeLists.txt
|
|
@@ -162,7 +162,7 @@ function(lspcpp_set_target_options target)
|
|
set_property(TARGET ${target} PROPERTY CXX_STANDARD 14)
|
|
endif()
|
|
|
|
- set_property(TARGET ${target} PROPERTY CXX_EXTENSIONS OFF)
|
|
+ set_property(TARGET ${target} PROPERTY CXX_EXTENSIONS ON)
|
|
|
|
if (CMAKE_GENERATOR MATCHES "Visual Studio.*")
|
|
lspcpp_set_target_options_with_nuget_pkg(${target} boost 1.76.0.0)
|
|
diff --git a/Makefile.in b/Makefile.in
|
|
index 346ce10..b6b88ca 100644
|
|
--- a/Makefile.in
|
|
+++ b/Makefile.in
|
|
@@ -170,7 +170,7 @@ asymptote.so: $(COREFILES:=.pic.o) glew.o
|
|
|
|
$(LSP_ROOT)/liblspcpp.a:
|
|
$(CMAKE) -B$(LSP_ROOT) -S$(LSP_ROOT) -DCMAKE_CXX_FLAGS=\
|
|
- "-fPIE @OPTIONS@ @LSP_CXX_BUILD_FLAGS@" \
|
|
+ "-fPIC @OPTIONS@ @LSP_CXX_BUILD_FLAGS@" \
|
|
@LSP_CMAKE_OPTIONS@
|
|
$(MAKE) -C $(LSP_ROOT)
|
|
|
|
@@ -209,7 +209,7 @@ GEN_PREPROCESSED_DEPFILE_BASE_ARGS = \
|
|
$(PYTHON) gen_preprocessed_depfile.py \
|
|
--cxx-compiler="$(CXX)" \
|
|
--additional-raw-arguments="$(OPTS)" \
|
|
- --cxx-standard=$(subst gnu,,$(subst c++,,$(CXX_STANDARD)))
|
|
+ --cxx-standard=$(subst gnu++,,$(subst c++,,$(CXX_STANDARD)))
|
|
|
|
$(SYMBOL_FILES:=.raw.i): %.raw.i: %.cc gen_preprocessed_depfile.py
|
|
@echo Generating $@ from $<
|
|
diff --git a/configure b/configure
|
|
index dd93b00..938a245 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -3325,7 +3325,7 @@ then :
|
|
enableval=$enable_lsp;
|
|
fi
|
|
|
|
-cxxstd="c++17"
|
|
+cxxstd="gnu++17"
|
|
|
|
CXXFLAGS=$CXXFLAGS" -std=$cxxstd"
|
|
|
|
diff --git a/fpu.h b/fpu.h
|
|
index 7ca8df0..183db6d 100644
|
|
--- a/fpu.h
|
|
+++ b/fpu.h
|
|
@@ -6,6 +6,8 @@
|
|
#define __GNU_VISIBLE 1
|
|
#endif
|
|
|
|
+#define __BSD_VISIBLE 1
|
|
+
|
|
#include "common.h"
|
|
|
|
#ifdef HAVE_FEENABLEEXCEPT
|
|
diff --git a/glrender.cc b/glrender.cc
|
|
index d6da531..6ad366e 100644
|
|
--- a/glrender.cc
|
|
+++ b/glrender.cc
|
|
@@ -1843,7 +1843,7 @@ void init()
|
|
char **argv=args(cmd,true);
|
|
int argc=cmd.size();
|
|
|
|
-#ifndef __APPLE__
|
|
+#if !defined(__APPLE__) && !defined(__HAIKU__)
|
|
glutInitContextVersion(4,0);
|
|
glutInitContextProfile(GLUT_CORE_PROFILE);
|
|
#endif
|
|
--
|
|
2.48.1
|
|
|
|
|
|
From 7b4a3e0e61bdb276f8f34810c521a708c44f5ad1 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
|
|
Date: Sun, 20 Apr 2025 20:05:42 +0200
|
|
Subject: Settings fixes
|
|
|
|
Put settings into ~/config/settings/asy instead of ~/.asy.
|
|
|
|
Use `open` by default to open external files.
|
|
|
|
diff --git a/GUI/xasyOptions.py b/GUI/xasyOptions.py
|
|
index c8ecc85..2b079fb 100644
|
|
--- a/GUI/xasyOptions.py
|
|
+++ b/GUI/xasyOptions.py
|
|
@@ -40,7 +40,7 @@ class xasyOptions:
|
|
|
|
|
|
def settingsFileLocation(self):
|
|
- folder = os.path.expanduser("~/.asy/")
|
|
+ folder = os.path.expanduser("~/config/settings/asy/")
|
|
|
|
searchOrder = ['.cson', '']
|
|
|
|
@@ -115,7 +115,7 @@ class xasyOptions:
|
|
if sys.platform[:3] == 'win': # for windows, wince, win32, etc
|
|
# setAsyPathFromWindowsRegistry()
|
|
pass
|
|
- folder = os.path.expanduser("~/.asy/")
|
|
+ folder = os.path.expanduser("~/config/settings/asy/")
|
|
defaultPath = os.path.join(folder, self.configName + '.cson')
|
|
shutil.copy2(self._defaultOptLocation, defaultPath)
|
|
|
|
@@ -148,7 +148,7 @@ class xasyOpenRecent:
|
|
f.close()
|
|
|
|
def settingsFileLocation(self):
|
|
- folder = os.path.expanduser("~/.asy/")
|
|
+ folder = os.path.expanduser("~/config/settings/asy/")
|
|
|
|
currentFile = os.path.join(folder, self.configName + '.txt')
|
|
return os.path.normcase(currentFile)
|
|
diff --git a/doc/asy.1 b/doc/asy.1
|
|
index 74f427b..b68fb7d 100644
|
|
--- a/doc/asy.1
|
|
+++ b/doc/asy.1
|
|
@@ -22,8 +22,8 @@ can be negated by prepending
|
|
to the option name.
|
|
Default values for most options may also be entered in the
|
|
file
|
|
-.B .asy/config.asy
|
|
-in the user's home directory using the long form:
|
|
+.B asy/config.asy
|
|
+in the user's settings directory using the long form:
|
|
.PP
|
|
import settings;
|
|
batchView=true;
|
|
diff --git a/doc/asy.1.begin b/doc/asy.1.begin
|
|
index 1a22329..e8a662b 100644
|
|
--- a/doc/asy.1.begin
|
|
+++ b/doc/asy.1.begin
|
|
@@ -22,8 +22,8 @@ can be negated by prepending
|
|
to the option name.
|
|
Default values for most options may also be entered in the
|
|
file
|
|
-.B .asy/config.asy
|
|
-in the user's home directory using the long form:
|
|
+.B asy/config.asy
|
|
+in the user's settings directory using the long form:
|
|
.PP
|
|
import settings;
|
|
batchView=true;
|
|
diff --git a/settings.cc b/settings.cc
|
|
index 027cc05..ba59e7b 100644
|
|
--- a/settings.cc
|
|
+++ b/settings.cc
|
|
@@ -24,6 +24,11 @@
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#include <Path.h>
|
|
+#endif
|
|
+
|
|
#include "common.h"
|
|
|
|
#if HAVE_GNU_GETOPT_H
|
|
@@ -114,7 +119,7 @@ bool msdos=false;
|
|
string HOME="HOME";
|
|
string docdir=ASYMPTOTE_DOCDIR;
|
|
const char pathSeparator=':';
|
|
-#ifdef __APPLE__
|
|
+#if defined(__APPLE__) || defined(__HAIKU__)
|
|
string defaultPSViewer="open";
|
|
string defaultPDFViewer="open";
|
|
string defaultHTMLViewer="open";
|
|
@@ -1701,7 +1706,16 @@ void initDir() {
|
|
initdir=Getenv("ASYMPTOTE_HOME",msdos);
|
|
|
|
if(initdir.empty())
|
|
+#ifdef __HAIKU__
|
|
+ {
|
|
+ BPath path;
|
|
+ status_t status=find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
|
+ if(status == B_OK)
|
|
+ initdir=path.Path()+dirsep+suffix;
|
|
+ }
|
|
+#else
|
|
initdir=Getenv(HOME.c_str(),msdos)+dirsep+"."+suffix;
|
|
+#endif
|
|
|
|
#if defined(_WIN32)
|
|
DWORD dirAttrib = GetFileAttributesA(initdir.c_str());
|
|
--
|
|
2.48.1
|
|
|