pe: upstream patchset.

This commit is contained in:
Jerome Duval
2017-07-17 20:41:47 +02:00
parent 701f30d825
commit 69832d7ea6
2 changed files with 29 additions and 502 deletions

View File

@@ -1,497 +1,22 @@
From 49a287197f9161653503f088989184259eb50506 Mon Sep 17 00:00:00 2001
From 9d30974e209c35115d24295622b5480e272a41fd Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 18 Oct 2015 14:30:44 +0000
Subject: build fix
Date: Mon, 17 Jul 2017 20:40:32 +0200
Subject: link JamExt against libstdc++.
diff --git a/Sources/CLanguageInterface.h b/Sources/CLanguageInterface.h
index f044b3a..8cff660 100644
--- a/Sources/CLanguageInterface.h
+++ b/Sources/CLanguageInterface.h
@@ -116,7 +116,7 @@ protected:
mutable KeywordMap fKeywordMap;
// void GenerateKeywordMap(const char *ext);
-static vector<CLanguageInterface*> fInterfaces;
+static std::vector<CLanguageInterface*> fInterfaces;
};
inline const char* CLanguageInterface::LineCommentStart() const
--
2.12.2
From d8b126e80c235ac8a44da7911dd77f925acce71d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 7 Jun 2017 21:51:31 +0200
Subject: Use standard YY_INPUT, revert to int for result.
diff --git a/Languages/Sources/Java_Popup.l b/Languages/Sources/Java_Popup.l
index d540bf5..811b5fb 100644
--- a/Languages/Sources/Java_Popup.l
+++ b/Languages/Sources/Java_Popup.l
@@ -43,14 +43,14 @@ static char *gClassName = NULL;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddFunction(CLanguageProxy& proxy);
static void AddPrototype(CLanguageProxy& proxy);
static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote);
@@ -115,8 +115,9 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
+ int result;
int c = gBuf[gIndx++];
if (inString)
@@ -132,13 +133,13 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
space++;
}
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
gIndx += 2;
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
else if (c == '/' && gBuf[gIndx] == '/')
{
@@ -152,12 +153,12 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
}
while (gIndx < gBufSize && c != '\n');
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
else if (c == '\\' && gBuf[gIndx] == '\n')
{
@@ -165,7 +166,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
c = ' ';
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddFunction(CLanguageProxy& proxy)
diff --git a/Languages/Sources/Lout_Popup.l b/Languages/Sources/Lout_Popup.l
index 541d07d..7bbd365 100644
--- a/Languages/Sources/Lout_Popup.l
+++ b/Languages/Sources/Lout_Popup.l
@@ -68,14 +68,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char* tok, yy_size_t& result, int max);
+static int GetNextChar(char* tok, int max);
static void AddInclude(CLanguageProxy& proxy, const char ext[]);
static void AddSysDataBase(CLanguageProxy& proxy);
static void AddSysInclude(CLanguageProxy& proxy);
@@ -124,13 +124,14 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
-void GetNextChar(char* tok, yy_size_t& result, int max)
+int GetNextChar(char* tok, int max)
{
int c = gBuf[gIndx++];
if (inString)
;
else if (c == '#') {
+ int result;
int space = 0;
do {
@@ -139,15 +140,15 @@ void GetNextChar(char* tok, yy_size_t& result, int max)
}
while (gIndx < gBufSize && c != '\n');
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
}
diff --git a/Languages/Sources/Mathematica_Popup.l b/Languages/Sources/Mathematica_Popup.l
index 88d087a..34a4bd9 100644
--- a/Languages/Sources/Mathematica_Popup.l
+++ b/Languages/Sources/Mathematica_Popup.l
@@ -42,14 +42,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddFunction(CLanguageProxy& proxy, int level);
static void AddPrototype(CLanguageProxy& proxy);
static void AddInclude(CLanguageProxy& proxy);
@@ -105,7 +105,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
int c = gBuf[gIndx++];
@@ -114,6 +114,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
else if (c == '(' && gBuf[gIndx] == '*')
{
int space = 3;
+ int result;
gIndx++;
while (gIndx < gBufSize && !(gBuf[gIndx] == '*' && gBuf[gIndx + 1] == ')'))
@@ -122,16 +123,16 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
space++;
}
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
gIndx += 2;
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddFunction(CLanguageProxy& proxy, int nesting)
diff --git a/Languages/Sources/Oberon_Popup.l b/Languages/Sources/Oberon_Popup.l
index 88d087a..34a4bd9 100644
--- a/Languages/Sources/Oberon_Popup.l
+++ b/Languages/Sources/Oberon_Popup.l
@@ -42,14 +42,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddFunction(CLanguageProxy& proxy, int level);
static void AddPrototype(CLanguageProxy& proxy);
static void AddInclude(CLanguageProxy& proxy);
@@ -105,7 +105,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
int c = gBuf[gIndx++];
@@ -114,6 +114,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
else if (c == '(' && gBuf[gIndx] == '*')
{
int space = 3;
+ int result;
gIndx++;
while (gIndx < gBufSize && !(gBuf[gIndx] == '*' && gBuf[gIndx + 1] == ')'))
@@ -122,16 +123,16 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
space++;
}
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
gIndx += 2;
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddFunction(CLanguageProxy& proxy, int nesting)
diff --git a/Languages/Sources/Perl_Popup.l b/Languages/Sources/Perl_Popup.l
index 2659cca..93c2c4f 100644
--- a/Languages/Sources/Perl_Popup.l
+++ b/Languages/Sources/Perl_Popup.l
@@ -42,14 +42,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddFunction(CLanguageProxy& proxy);
static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote);
%}
@@ -104,7 +104,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
int c = gBuf[gIndx++];
@@ -113,6 +113,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
else if (c == '#')
{
int space = 0;
+ int result;
do
{
@@ -121,15 +122,15 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
}
while (gIndx < gBufSize && c != '\n');
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddFunction(CLanguageProxy& proxy)
diff --git a/Languages/Sources/Python_Popup.l b/Languages/Sources/Python_Popup.l
index 5017a78..22ea99f 100644
--- a/Languages/Sources/Python_Popup.l
+++ b/Languages/Sources/Python_Popup.l
@@ -42,14 +42,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddFunction(CLanguageProxy& proxy);
static void AddInclude(CLanguageProxy& proxy);
static void AddInclude2(CLanguageProxy& proxy);
@@ -104,7 +104,7 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
int c = gBuf[gIndx++];
@@ -113,6 +113,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
else if (c == '#')
{
int space = 0;
+ int result;
do
{
@@ -121,15 +122,15 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
}
while (gIndx < gBufSize && c != '\n');
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddFunction(CLanguageProxy& proxy)
diff --git a/Languages/Sources/Rez_Popup.l b/Languages/Sources/Rez_Popup.l
index 5d84fe4..84d0b19 100644
--- a/Languages/Sources/Rez_Popup.l
+++ b/Languages/Sources/Rez_Popup.l
@@ -42,14 +42,14 @@ static bool inString;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void AddResource(CLanguageProxy& proxy);
static void AddResType(CLanguageProxy& proxy);
static void AddMarker(CLanguageProxy& proxy);
@@ -109,8 +109,9 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int max)
+int GetNextChar(char *tok, int max)
{
+ int result;
int c = gBuf[gIndx++];
if (inString)
@@ -126,13 +127,13 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
space++;
}
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
gIndx += 2;
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
else if (c == '/' && gBuf[gIndx] == '/')
{
@@ -146,12 +147,12 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
}
while (gIndx < gBufSize && c != '\n');
- result = yy_size_t(max = std::min(max, space));
+ result = max = std::min(max, space);
while (max--)
*tok++ = ' ';
- return;
+ return result;
}
else if (c == '\\' && gBuf[gIndx] == '\n')
{
@@ -159,7 +160,7 @@ void GetNextChar(char *tok, yy_size_t& result, int max)
c = ' ';
}
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void AddInclude(CLanguageProxy& proxy, char openingquote, char closingquote)
diff --git a/Languages/Sources/Tex_Popup.l b/Languages/Sources/Tex_Popup.l
index d1c2256..705e489 100644
--- a/Languages/Sources/Tex_Popup.l
+++ b/Languages/Sources/Tex_Popup.l
@@ -44,14 +44,14 @@ static int gBufSize;
#undef YY_DECL
#define YY_DECL static int yylex(CLanguageProxy& proxy)
#undef YY_INPUT
-#define YY_INPUT(tok,result,max) GetNextChar(tok, result, max)
+#define YY_INPUT(tok,result,max) result = GetNextChar(tok, max)
#define YY_SKIP_YYWRAP
#undef yywrap
#define yywrap() 1
#undef ECHO
#define ECHO
-static void GetNextChar(char *tok, yy_size_t& result, int max);
+static int GetNextChar(char *tok, int max);
static void Add(int level, CLanguageProxy& proxy, int hasOptional);
%}
@@ -95,11 +95,11 @@ _EXPORT void ScanForFunctions(CLanguageProxy& proxy)
}
} /* ScanForFunctions */
-void GetNextChar(char *tok, yy_size_t& result, int)
+int GetNextChar(char *tok, int)
{
int c = gBuf[gIndx++];
- result = yy_size_t((gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL);
+ return (gIndx < gBufSize) ? (tok[0] = c, 1) : YY_NULL;
} /* GetNextChar */
static void Add(int level, CLanguageProxy& proxy, int hasOptional)
diff --git a/Languages/Sources/Jamfile b/Languages/Sources/Jamfile
index 943b926..f67076d 100644
--- a/Languages/Sources/Jamfile
+++ b/Languages/Sources/Jamfile
@@ -76,7 +76,7 @@ PeLanguage HtmlCssJsPhpExt
# <pe-src>
PeLanguage JamExt
: Jam_Language.cpp
- : be
+ : be $(STDC++LIB)
: keywords.jam.rsrc
;
# </pe-src>
--
2.12.2

View File

@@ -3,22 +3,23 @@ DESCRIPTION="Pe is a native programmer's editor for Haiku. It features syntax \
highlighting and a structural view for several programming language, as well \
as basic support for Makefile and Jamfile project management."
HOMEPAGE="https://github.com/olta/pe"
LICENSE="
BSD (4-clause)
MIT
"
COPYRIGHT="
1996-2002 Maarteen Hekkelman
2003-2016 Team Pe
"
SOURCE_URI="https://github.com/HaikuArchives/Pe/archive/7f4ca18.tar.gz"
SOURCE_FILENAME="pe-$portVersion.tar.gz"
SOURCE_DIR="Pe-7f4ca18b106c50cfdb3a4b699cb43ec60ea32499"
CHECKSUM_SHA256="6c85968ae73ea6606a7665ec9f73844908327f43405121a7fe5851af4bcb187d"
REVISION="5"
ARCHITECTURES="x86_gcc2 x86 x86_64"
LICENSE="
BSD (4-clause)
MIT
"
REVISION="6"
gitCommit="0a30e0e231bb10defbcc761ca0cb8b39f09a3b68"
SOURCE_URI="https://github.com/HaikuArchives/Pe/archive/$gitCommit.tar.gz"
CHECKSUM_SHA256="a11d2ac54a5f239f935636a3e36077426768abbd755fe58fa45cbea0086734ea"
SOURCE_FILENAME="pe-$gitCommit.tar.gz"
SOURCE_DIR="Pe-$gitCommit"
PATCHSET="pe-$portVersion.patchset"
PATCHES="pe-2.4.5.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
pe = $portVersion
@@ -30,6 +31,7 @@ REQUIRES="
lib:libpcre
lib:libpcreposix
"
BUILD_REQUIRES="
haiku_devel
devel:libpcre