Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abd25f4
commit 4a9fb06
Showing
2 changed files
with
269 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
From 6f70b64dd68c4ebeae674b8c1b190e1ea3fd951c Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com> | ||
Date: Fri, 24 Mar 2017 18:46:52 +0100 | ||
Subject: [PATCH] Updated Haiku patchset | ||
|
||
--- | ||
configure | 14 +++++++------- | ||
modules/Makefile.in | 2 +- | ||
slsh/Makefile.in | 2 +- | ||
slsh/slsh.c | 20 ++++++++++++++++++-- | ||
src/Makefile.in | 2 +- | ||
src/slstd.c | 3 +++ | ||
6 files changed, 31 insertions(+), 12 deletions(-) | ||
|
||
diff --git a/configure b/configure | ||
index a37a389..a9bf4f0 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -6927,8 +6927,8 @@ _ACEOF | ||
|
||
|
||
|
||
-# Extract the first word of "ncurses5-config", so it can be a program name with args. | ||
-set dummy ncurses5-config; ac_word=$2 | ||
+# Extract the first word of "ncurses6-config", so it can be a program name with args. | ||
+set dummy ncurses6-config; ac_word=$2 | ||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
$as_echo_n "checking for $ac_word... " >&6; } | ||
if ${ac_cv_path_nc5config+:} false; then : | ||
@@ -7014,9 +7014,9 @@ fi | ||
fi | ||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for terminfo" >&5 | ||
$as_echo_n "checking for terminfo... " >&6; } | ||
-if test "$nc5config" != "no" | ||
+if test "$nc6config" != "no" | ||
then | ||
- MISC_TERMINFO_DIRS=`$nc5config --terminfo` | ||
+ MISC_TERMINFO_DIRS=`$nc6config --terminfo` | ||
else | ||
MISC_TERMINFO_DIRS="" | ||
fi | ||
@@ -7025,20 +7025,20 @@ JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \ | ||
/usr/share/terminfo \ | ||
/usr/share/lib/terminfo \ | ||
/usr/local/lib/terminfo" | ||
-TERMCAP=-ltermcap | ||
+TERMCAP=-lncurses | ||
|
||
for terminfo_dir in $JD_Terminfo_Dirs | ||
do | ||
if test -d $terminfo_dir | ||
then | ||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&6 | ||
$as_echo "yes" >&6; } | ||
TERMCAP="" | ||
break | ||
fi | ||
done | ||
if test "$TERMCAP"; then | ||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&6 | ||
$as_echo "no" >&6; } | ||
|
||
$as_echo "#define USE_TERMCAP 1" >>confdefs.h | ||
diff --git a/modules/Makefile.in b/modules/Makefile.in | ||
index e30d1d0..59ef54a 100644 | ||
--- a/modules/Makefile.in | ||
+++ b/modules/Makefile.in | ||
@@ -73,7 +73,7 @@ INSTALL = @INSTALL@ | ||
INSTALL_DATA = @INSTALL_DATA@ | ||
INSTALL_MODULE = @INSTALL_MODULE@ | ||
MKINSDIR = $(CONFIG_DIR)/autoconf/mkinsdir.sh | ||
-SLSH_DIR = $(prefix)/share/slsh | ||
+SLSH_DIR = @datarootdir@/slsh | ||
CMAPS_DIR = $(SLSH_DIR)/cmaps | ||
HELP_DIR = $(SLSH_DIR)/help | ||
# --------------------------------------------------------------------------- | ||
diff --git a/slsh/Makefile.in b/slsh/Makefile.in | ||
index cba9d81..82982df 100644 | ||
--- a/slsh/Makefile.in | ||
+++ b/slsh/Makefile.in | ||
@@ -34,7 +34,7 @@ MKINSDIR = $(CONFIG_DIR)/autoconf/mkinsdir.sh | ||
SLSH_CONF_DIR = @sysconfdir@ | ||
SLSH_LIB_DIR = $(datarootdir)/slsh | ||
SLSH_HELP_DIR = $(SLSH_LIB_DIR)/help | ||
-SLSH_DOC_DIR = $(datarootdir)/doc/slsh | ||
+SLSH_DOC_DIR = @docdir@/slsh | ||
SLSH_LOCALLIB_DIR = $(SLSH_LIB_DIR)/local-packages | ||
SLSH_SCRIPT_DIR = $(SLSH_LIB_DIR)/scripts | ||
SCRIPTS = jpegsize lsrpm sldb svnsh slprof slstkchk | ||
diff --git a/slsh/slsh.c b/slsh/slsh.c | ||
index b51d85b..ebdf647 100644 | ||
--- a/slsh/slsh.c | ||
+++ b/slsh/slsh.c | ||
@@ -26,6 +26,10 @@ USA. | ||
# include <windows.h> | ||
# include <io.h> | ||
#endif | ||
+#ifdef __HAIKU__ | ||
+#include <FindDirectory.h> | ||
+#include <fs_info.h> | ||
+#endif | ||
|
||
#include <sys/stat.h> | ||
|
||
@@ -56,7 +60,11 @@ static SLFUTURE_CONST char *Slsh_Version = "0.9.4-0"; | ||
# define SLSH_LIB_DIR_ENV "SLSH_LIB_DIR" | ||
#endif | ||
|
||
-#if defined(REAL_UNIX_SYSTEM) || defined(__APPLE__) | ||
+#if defined(__HAIKU__) | ||
+/* # define DEFAULT_LIBRARY_PATH "/usr/local/share/slsh:/usr/local/lib/slsh:/usr/share/slsh:/usr/lib/slsh"; */ | ||
+# define DEFAULT_CONF_PATH "/boot/system/settings:/boot/home/config/settings"; | ||
+# define USER_SLSHRC "slsh.rc" | ||
+#elif defined(REAL_UNIX_SYSTEM) || defined(__APPLE__) | ||
/* # define DEFAULT_LIBRARY_PATH "/usr/local/share/slsh:/usr/local/lib/slsh:/usr/share/slsh:/usr/lib/slsh"; */ | ||
/* # define DEFAULT_CONF_PATH "/usr/local/etc:/usr/local/etc/slsh:/etc:/etc/slsh"; */ | ||
# define DEFAULT_CONF_PATH NULL | ||
@@ -536,6 +544,9 @@ int main (int argc, char **argv) | ||
int test_mode = 0; | ||
char *exec_string = NULL; | ||
int quiet = 0; | ||
+#if defined(__HAIKU__) | ||
+ char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH]; | ||
+#endif | ||
|
||
#ifdef SLSYSWRAP | ||
(void) SLsyswrap_set_syscall_failure (0); | ||
@@ -565,8 +576,13 @@ int main (int argc, char **argv) | ||
#endif | ||
|
||
/* FIXME for other systems */ | ||
-#ifdef __WIN32__ | ||
+#if defined(__WIN32__) | ||
init_file_dir = getenv ("USERPROFILE"); | ||
+#elif defined(__HAIKU__) | ||
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, buffer, sizeof(buffer)) != B_OK) | ||
+ sprintf(buffer, "/boot/home/config/settings"); | ||
+ | ||
+ init_file_dir = &buffer; | ||
#else | ||
init_file_dir = getenv ("HOME"); | ||
#endif | ||
diff --git a/src/Makefile.in b/src/Makefile.in | ||
index 7fe4dc2..6c0e2d6 100644 | ||
--- a/src/Makefile.in | ||
+++ b/src/Makefile.in | ||
@@ -47,7 +47,7 @@ exec_prefix = @exec_prefix@ | ||
install_lib_dir = @libdir@ | ||
install_bin_dir = @bindir@ | ||
install_include_dir = @includedir@ | ||
-install_doc_dir = $(prefix)/share/doc/slang/v@slang_major_version@ | ||
+install_doc_dir = @docdir@/slang/v@slang_major_version@ | ||
DOC_FILES = ../changes.txt ../COPY* ../doc/slangdoc.html ../doc/text/*.txt | ||
MODULE_INSTALL_DIR = @libdir@/slang/v@slang_major_version@/modules | ||
#--------------------------------------------------------------------------- | ||
diff --git a/src/slstd.c b/src/slstd.c | ||
index e4dda06..c5a8cf1 100644 | ||
--- a/src/slstd.c | ||
+++ b/src/slstd.c | ||
@@ -1340,6 +1340,9 @@ int SLang_init_slang (void) /*{{{*/ | ||
#ifdef REAL_UNIX_SYSTEM | ||
"UNIX", | ||
#endif | ||
+#if defined(__HAIKU__) | ||
+ "HAIKU", | ||
+#endif | ||
#if SLANG_HAS_FLOAT | ||
"SLANG_DOUBLE_TYPE", | ||
#endif | ||
-- | ||
2.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
SUMMARY="A library to help create robust multi-platform software" | ||
DESCRIPTION="S-Lang is a multi-platform library designed to allow a developer \ | ||
to create robust multi-platform software. It provides facilities required by \ | ||
interactive applications such as display/screen management, keyboard input, \ | ||
keymaps, and so on. | ||
The most exciting feature of the library is the slang interpreter that may \ | ||
be easily embedded into a program to make it extensible. | ||
While the emphasis has always been on the embedded nature of the interpreter, \ | ||
it may also be used in a stand-alone fashion through the use of slsh, which is \ | ||
part of the S-Lang distribution." | ||
HOMEPAGE="http://www.jedsoft.org/slang/" | ||
COPYRIGHT="2004-2016 John E. Davis" | ||
LICENSE="GNU GPL v2" | ||
REVISION="1" | ||
SOURCE_URI="http://www.jedsoft.org/releases/slang/slang-$portVersion.tar.bz2" | ||
CHECKSUM_SHA256="54f0c3007fde918039c058965dffdfd6c5aec0bad0f4227192cc486021f08c36" | ||
PATCHES="slang-${portVersion}.patchset" | ||
|
||
ARCHITECTURES="!x86_gcc2 x86 x86_64" | ||
SECONDARY_ARCHITECTURES="x86" | ||
|
||
PROVIDES=" | ||
slang$secondaryArchSuffix = $portVersion compat >= 2.3 | ||
lib:libslang$secondaryArchSuffix = $portVersion compat >= 2.3 | ||
cmd:slsh$secondaryArchSuffix = $portVersion compat >= 2.3 | ||
" | ||
REQUIRES=" | ||
haiku$secondaryArchSuffix | ||
lib:libncurses$secondaryArchSuffix | ||
lib:libpcre$secondaryArchSuffix | ||
lib:libiconv$secondaryArchSuffix | ||
lib:libpng16$secondaryArchSuffix | ||
lib:libz$secondaryArchSuffix | ||
" | ||
|
||
PROVIDES_devel=" | ||
slang${secondaryArchSuffix}_devel = $portVersion compat >= 2.3 | ||
devel:libslang$secondaryArchSuffix = $portVersion compat >= 2.3 | ||
" | ||
REQUIRES_devel=" | ||
slang$secondaryArchSuffix == $portVersion | ||
" | ||
|
||
BUILD_REQUIRES=" | ||
haiku${secondaryArchSuffix}_devel | ||
devel:libncurses$secondaryArchSuffix | ||
devel:libpcre$secondaryArchSuffix | ||
devel:libiconv$secondaryArchSuffix | ||
devel:libpng16$secondaryArchSuffix | ||
devel:libz$secondaryArchSuffix | ||
" | ||
BUILD_PREREQUIRES=" | ||
cmd:autoconf | ||
cmd:gcc$secondaryArchSuffix | ||
cmd:ld$secondaryArchSuffix | ||
cmd:make | ||
" | ||
|
||
GLOBAL_WRITABLE_FILES=" | ||
settings/slsh.rc keep-old | ||
" | ||
|
||
BUILD() | ||
{ | ||
# RUSAGE makes just problems... | ||
# HACK, FIXME! | ||
sed -i "s,HAVE_GETRUSAGE,DOESNT_HAVE_GETRUSAGE," src/config.hin | ||
|
||
export LDFLAGS="-lnetwork -lbsd" | ||
|
||
runConfigure ./configure \ | ||
--with-pnglib=$libDir \ | ||
--with-pnginc=$includeDir \ | ||
--with-zlib=$libDir \ | ||
--with-zinc=$includeDir \ | ||
--with-iconvlib=$libDir \ | ||
--with-iconvinc=$includeDir \ | ||
--with-pcrelib=$libDir \ | ||
--with-pcreinc=$includeDir | ||
#--with-oniglib=$libDir \ | ||
#--with-oniginc=$includeDir | ||
|
||
make | ||
} | ||
|
||
INSTALL() | ||
{ | ||
make install | ||
|
||
fixPkgconfig | ||
|
||
prepareInstalledDevelLibs libslang | ||
|
||
packageEntries devel $developDir | ||
} |