mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Merged haikuports/haikuports into master
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ SRC_URI="ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2"
|
||||
CHECKSUM_SHA256="d0f5a6d2c439f02d97fa21bd9121f4c5abb1f6cd8b5a79d3ca82867495734ade"
|
||||
COPYRIGHT="Bram Moleenar et al."
|
||||
LICENSE="Vim"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
@@ -50,11 +50,13 @@ BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:gcc
|
||||
cmd:find
|
||||
cmd:grep
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
SOURCE_DIR="vim74"
|
||||
PATCHES="
|
||||
vim-7.4.patch
|
||||
vim-7.4.patchset
|
||||
"
|
||||
|
||||
BUILD()
|
||||
|
||||
47
haiku-apps/artpaint/artpaint-2.1.0git.recipe
Normal file
47
haiku-apps/artpaint/artpaint-2.1.0git.recipe
Normal file
@@ -0,0 +1,47 @@
|
||||
SUMMARY="An award winning painting and image-processing program"
|
||||
DESCRIPTION="The main features of ArtPaint include a comprehensive set of \
|
||||
painting-tools and real-time preview for many image-manipulating operations. \
|
||||
The key design principle has been to let the user see what they are doing \
|
||||
instead of just forcing them to type in some numbers and then hoping that \
|
||||
the result will not be too far from the expected."
|
||||
HOMEPAGE="https://github.com/HaikuArchives/ArtPaint"
|
||||
SRC_URI="https://github.com/HaikuArchives/ArtPaint/archive/3e4be5a29e2966b390d668b7e96ef3f7901fa001.tar.gz"
|
||||
CHECKSUM_SHA256="2990682bb932f4fbd8f156511171ae09d61038eddfa88fc7646af715f6fc83d8"
|
||||
SOURCE_DIR="ArtPaint-3e4be5a29e2966b390d668b7e96ef3f7901fa001"
|
||||
COPYRIGHT="2003 Heikki Suhonen
|
||||
2009 Karsten Heimrich"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
artpaint = $portVersion
|
||||
app:ArtPaint = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
makefile_engine
|
||||
cmd:mkdepend
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd artpaint
|
||||
make $jobArgs OBJ_DIR=objects
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd artpaint
|
||||
mkdir -p $appsDir
|
||||
cp objects/ArtPaint $appsDir
|
||||
addAppDeskbarSymlink $appsDir/ArtPaint
|
||||
}
|
||||
@@ -5,8 +5,8 @@ A backup application for Haiku.
|
||||
COPYRIGHT="2013 Alexander von Gluck IV"
|
||||
LICENSE="MIT"
|
||||
HOMEPAGE="https://github.com/kallisti5/backup"
|
||||
SRC_URI="git+https://github.com/kallisti5/backup#34e156f64d"
|
||||
REVISION="2"
|
||||
SRC_URI="git+https://github.com/kallisti5/backup#4c01c5b6f0"
|
||||
REVISION="3"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
|
||||
@@ -25,8 +25,6 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:mkdepend
|
||||
"
|
||||
|
||||
PATCHES="backup-0.0.1.patch"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur backup/BackupView.cpp backup-fix/BackupView.cpp
|
||||
--- backup/BackupView.cpp 2013-11-18 21:15:38.949223424 +0000
|
||||
+++ backup-fix/BackupView.cpp 2013-11-18 21:15:33.142344192 +0000
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
// Refresh System Directory
|
||||
BPath sysSettingsDirectory;
|
||||
- find_directory(B_COMMON_SETTINGS_DIRECTORY, &sysSettingsDirectory);
|
||||
+ find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &sysSettingsDirectory);
|
||||
fSysSettingBytes = DirectorySize(&sysSettingsDirectory);
|
||||
size_to_string(fSysSettingBytes, sizeText, 512);
|
||||
fSysSettingSizeText->SetText(sizeText);
|
||||
@@ -10,7 +10,7 @@ COPYRIGHT="2012 Jim Saxton, Fat Elk Software"
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
digiclock = $portVersion"
|
||||
digiclock = $portVersion
|
||||
app:digiclock = $portVersion"
|
||||
|
||||
REVISION="1"
|
||||
|
||||
@@ -1,27 +1,45 @@
|
||||
DESCRIPTION="Globe Web Editor"
|
||||
HOMEPAGE="http://globe.beos.hu/index_en.html"
|
||||
SUMMARY="Globe Web Editor"
|
||||
DESCRIPTION="
|
||||
Globe is an editor with support for HTML and PHP. It offers syntax \
|
||||
highlighting and basic project management.
|
||||
"
|
||||
HOMEPAGE="http://globe.beos.hu/index_en.html"
|
||||
SRC_URI="http://ports-space.haiku-files.org/source/globe-0.4.zip"
|
||||
CHECKSUM_MD5="61601576e59b0dc5ab6364f684a47236"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
CHECKSUM_SHA256="1ed42fa741a7b7923cd9accb759395b6ddaa5287695f7dfceeaa5112ebe3c765"
|
||||
SOURCE_DIR="globe0.4"
|
||||
REVISION="2"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
makefile_engine
|
||||
cmd:gcc
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
globe = $portVersion
|
||||
app:Globe = $portVersion
|
||||
"
|
||||
|
||||
PATCHES="globe-0.4.patch"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd globe0.4
|
||||
make
|
||||
make $jobArgs OBJ_DIR=objects
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd globe0.4
|
||||
TARGET_DIR=${DESTDIR}`finddir B_APPS_DIRECTORY`/Globe
|
||||
mkdir -p $TARGET_DIR
|
||||
cp Globe $TARGET_DIR
|
||||
cp GlobeBUGList.txt $TARGET_DIR
|
||||
cp globe* $TARGET_DIR
|
||||
cp LICENSE.txt $TARGET_DIR
|
||||
cp NewFeatures.txt $TARGET_DIR
|
||||
cp objects.*/Globe* $TARGET_DIR
|
||||
mkdir -p $appsDir
|
||||
cp objects/Globe $appsDir/Globe
|
||||
addAppDeskbarSymlink $appsDir/Globe
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2004 Gergely Rózsahegyi"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
diff -Naur globe0.4/Makefile globe0.4-haiku/Makefile
|
||||
--- globe0.4/Makefile 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ globe0.4-haiku/Makefile 2012-12-30 19:40:59.058720256 +0000
|
||||
diff -x .git -Naur ../globe0.4/Makefile ./Makefile
|
||||
--- ../globe0.4/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./Makefile 2014-12-02 19:15:53.759918816 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+NAME= Globe
|
||||
+TYPE= APP
|
||||
+SRCS= RHTML_app.cpp RHTML_win.cpp RHTML_numview.cpp RHTML_savewin.cpp RHTML_aboutwin.cpp RHTML_prefwin.cpp RHTML_fmenu.cpp RHTML_buttonmenu.cpp RHTML_bmenu.cpp RHTML_parammenu.cpp RHTML_colorwin.cpp RHTML_amenu.cpp RHTML_textview.cpp RHTML_tabbutton.cpp RHTML_tagmenu.cpp RHTML_filetypes.cpp RHTML_options.cpp ToolTip/TToolTip.cpp Timer/RTimer.cpp URLView/URLView.cpp Tool/RadioBar.cpp Tool/ToolBar.cpp Tool/ToolItem.cpp Tool/ToolView.cpp
|
||||
+RSRCS= Globe.rsrc
|
||||
+LIBS= /boot/system/lib/libbe.so /boot/system/lib/libtextencoding.so /boot/system/lib/libtracker.so /boot/system/lib/libroot.so /boot/system/lib/libtranslation.so /boot/system/lib/libgame.so /boot/system/lib/libstdc++.r4.so
|
||||
+LIBS= /boot/system/lib/libbe.so /boot/system/lib/libtextencoding.so /boot/system/lib/libtracker.so /boot/system/lib/libroot.so /boot/system/lib/libtranslation.so /boot/system/lib/libgame.so /boot/system/lib/libstdc++.so
|
||||
+LIBPATHS=
|
||||
+SYSTEM_INCLUDE_PATHS= /boot/develop/headers/be /boot/develop/headers/cpp /boot/develop/headers/posix /boot/develop/lib /boot/beos/system/lib
|
||||
+SYSTEM_INCLUDE_PATHS= /boot/system/develop/headers/be /boot/system/develop/headers/cpp /boot/system/develop/headers/posix /boot/system/develop/headers/os/storage /boot/system/develop/lib /boot/system/beos/system/lib
|
||||
+LOCAL_INCLUDE_PATHS= ./../../../config/lib ./Genesis ToolTip Timer URLView Tool
|
||||
+OPTIMIZE=FULL
|
||||
+# specify any preprocessor symbols to be defined. The symbols will not
|
||||
@@ -28,10 +28,97 @@ diff -Naur globe0.4/Makefile globe0.4-haiku/Makefile
|
||||
+LINKER_FLAGS=
|
||||
+
|
||||
+## include the makefile-engine
|
||||
+include $(BUILDHOME)/etc/makefile-engine
|
||||
diff -Naur globe0.4/RHTML_win.cpp globe0.4-haiku/RHTML_win.cpp
|
||||
--- globe0.4/RHTML_win.cpp 2004-10-21 14:16:28.000000000 +0000
|
||||
+++ globe0.4-haiku/RHTML_win.cpp 2012-12-30 18:28:09.000000000 +0000
|
||||
+include /boot/system/develop/etc/makefile-engine
|
||||
diff -x .git -Naur ../globe0.4/RHTML_filetypes.cpp ./RHTML_filetypes.cpp
|
||||
--- ../globe0.4/RHTML_filetypes.cpp 2004-10-21 16:18:44.000000000 +0200
|
||||
+++ ./RHTML_filetypes.cpp 2014-12-02 18:56:43.069920922 +0100
|
||||
@@ -39,7 +39,7 @@
|
||||
// - End - RHTML_File_Types - RHTMLFileTypes -----------------------------------------------------------------
|
||||
|
||||
// ---------------------------------------------------------------------- RHTML_File_Types - SetFontAndColor -
|
||||
-void RHTMLFileTypes::SetFontAndColor(BString *oldtext,BString *currenttext,int mode=0,int offset1=-1,int offset2=-1)
|
||||
+void RHTMLFileTypes::SetFontAndColor(BString *oldtext,BString *currenttext,int mode,int offset1,int offset2)
|
||||
{
|
||||
if (fOptions->FileTypes[FileType]->Name->ICompare("HTML")==0)
|
||||
{
|
||||
diff -x .git -Naur ../globe0.4/RHTML_options.cpp ./RHTML_options.cpp
|
||||
--- ../globe0.4/RHTML_options.cpp 2004-10-21 16:18:57.000000000 +0200
|
||||
+++ ./RHTML_options.cpp 2014-12-02 19:07:34.499919730 +0100
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <Directory.h>
|
||||
#include <fstream>
|
||||
|
||||
+using std::ifstream;
|
||||
+
|
||||
RHTMLOptions *fOptions;
|
||||
|
||||
// ---------------------------------------------------------------------------- RHTML_Options - RHTMLOptions -
|
||||
@@ -554,7 +556,7 @@
|
||||
tmp.CopyInto(val1,tmp.FindFirst('=')+1,tmp.Length()-tmp.FindFirst('=')-1);
|
||||
val1=rgetstring(val1);
|
||||
font_style fstyle;
|
||||
- get_font_style((font_family) val1.String(), 0, &fstyle);
|
||||
+ get_font_style((char *) val1.String(), 0, &fstyle);
|
||||
DefaultFont->SetFamilyAndStyle(val1.String(),fstyle);
|
||||
} else
|
||||
if (name.ICompare("Default_Font_Style")==0) // - Default_Font_Style
|
||||
diff -x .git -Naur ../globe0.4/RHTML_options.h ./RHTML_options.h
|
||||
--- ../globe0.4/RHTML_options.h 2004-10-21 16:19:01.000000000 +0200
|
||||
+++ ./RHTML_options.h 2014-12-02 18:31:28.159923695 +0100
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <String.h>
|
||||
#include <View.h>
|
||||
#include <stdlib.h>
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
|
||||
class RHTMLOptions;
|
||||
|
||||
diff -x .git -Naur ../globe0.4/RHTML_parammenu.cpp ./RHTML_parammenu.cpp
|
||||
--- ../globe0.4/RHTML_parammenu.cpp 2004-10-21 16:17:48.000000000 +0200
|
||||
+++ ./RHTML_parammenu.cpp 2014-12-02 18:53:29.809921276 +0100
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <Clipboard.h>
|
||||
#include <StringView.h>
|
||||
#include <stdio.h>
|
||||
-#include <ostream.h>
|
||||
+#include <ostream>
|
||||
#include <math.h>
|
||||
|
||||
// ------------------------------------------------------------------------ RHTML_parammenu - RHTMLparammenu -
|
||||
@@ -602,7 +602,7 @@
|
||||
void RHTMLptextview::Paste(BClipboard *clipboard)
|
||||
{
|
||||
const char *text;
|
||||
- int32 textlen;
|
||||
+ ssize_t textlen;
|
||||
BMessage *clip = (BMessage *) NULL;
|
||||
|
||||
if (clipboard->Lock())
|
||||
diff -x .git -Naur ../globe0.4/RHTML_prefwin.cpp ./RHTML_prefwin.cpp
|
||||
--- ../globe0.4/RHTML_prefwin.cpp 2004-10-21 16:17:14.000000000 +0200
|
||||
+++ ./RHTML_prefwin.cpp 2014-12-02 18:49:57.739921664 +0100
|
||||
@@ -386,7 +386,7 @@
|
||||
// - End - RHTML_Preferences_Win - FTCreateKitList -----------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------- RHTML_Preferences_Win - FTSetFont -
|
||||
-void RHTMLPreferencesWin::FTSetFont(const char *font,const char *style ="")
|
||||
+void RHTMLPreferencesWin::FTSetFont(const char *font,const char *style)
|
||||
{
|
||||
fFTFontsBox->RemoveChild(fFTDFStyle);
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
msg->FindString("font_family",&family);
|
||||
FTSetFont(family);
|
||||
font_style fStyle;
|
||||
- get_font_style((font_family) family, 0, &fStyle);
|
||||
+ get_font_style((char *) family, 0, &fStyle);
|
||||
fOptions->DefaultFont->SetFamilyAndStyle(family,fStyle);
|
||||
fOptions->Save();
|
||||
}
|
||||
diff -x .git -Naur ../globe0.4/RHTML_win.cpp ./RHTML_win.cpp
|
||||
--- ../globe0.4/RHTML_win.cpp 2004-10-21 16:16:28.000000000 +0200
|
||||
+++ ./RHTML_win.cpp 2014-12-02 18:30:50.089923764 +0100
|
||||
@@ -288,7 +288,9 @@
|
||||
if (textdb>0)
|
||||
{
|
||||
@@ -72,9 +159,39 @@ diff -Naur globe0.4/RHTML_win.cpp globe0.4-haiku/RHTML_win.cpp
|
||||
}
|
||||
break;
|
||||
case 'ABWQ':
|
||||
diff -Naur globe0.4/URLView/URLView.cpp globe0.4-haiku/URLView/URLView.cpp
|
||||
--- globe0.4/URLView/URLView.cpp 2002-03-10 00:38:20.000000000 +0000
|
||||
+++ globe0.4-haiku/URLView/URLView.cpp 2012-12-29 14:17:53.000000000 +0000
|
||||
diff -x .git -Naur ../globe0.4/Timer/RTimer.cpp ./Timer/RTimer.cpp
|
||||
--- ../globe0.4/Timer/RTimer.cpp 2004-10-21 16:22:13.000000000 +0200
|
||||
+++ ./Timer/RTimer.cpp 2014-12-02 19:09:02.649919568 +0100
|
||||
@@ -28,7 +28,7 @@
|
||||
// - Includes
|
||||
#include "RTimer.h"
|
||||
#include <Autolock.h>
|
||||
-#include <ostream.h>
|
||||
+#include <ostream>
|
||||
|
||||
#define SLEEP_TIME 1000
|
||||
// ---------------------------------------------------------------------------------------- R_Timer - RTimer -
|
||||
diff -x .git -Naur ../globe0.4/Tool/ToolItem.cpp ./Tool/ToolItem.cpp
|
||||
--- ../globe0.4/Tool/ToolItem.cpp 2004-10-21 16:23:12.000000000 +0200
|
||||
+++ ./Tool/ToolItem.cpp 2014-12-02 19:13:26.509919086 +0100
|
||||
@@ -31,10 +31,13 @@
|
||||
#include <TranslationUtils.h>
|
||||
#include <Window.h>
|
||||
#include <stdio.h>
|
||||
-#include <ostream.h>
|
||||
+#include <iostream>
|
||||
+#include <ostream>
|
||||
|
||||
#include "ToolItem.h"
|
||||
|
||||
+using namespace std;
|
||||
+
|
||||
const uint32 B_UPDATE_SIZE_MSG = 'BUSM';
|
||||
const uint32 B_MOUSE_DOWN_MSG = 'BMDM';
|
||||
const uint32 B_MOUSE_UP_MSG = 'BMUM';
|
||||
diff -x .git -Naur ../globe0.4/URLView/URLView.cpp ./URLView/URLView.cpp
|
||||
--- ../globe0.4/URLView/URLView.cpp 2002-03-10 01:38:20.000000000 +0100
|
||||
+++ ./URLView/URLView.cpp 2014-12-02 18:30:50.089923764 +0100
|
||||
@@ -30,9 +30,13 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
42
haiku-apps/microbe/microbe-20130728.recipe
Normal file
42
haiku-apps/microbe/microbe-20130728.recipe
Normal file
@@ -0,0 +1,42 @@
|
||||
SUMMARY="Source code editor"
|
||||
DESCRIPTION="
|
||||
Microbe is a minimalistic programmers text and source code editor.
|
||||
"
|
||||
HOMEPAGE="https://github.com/aldeck/microbe"
|
||||
SRC_URI="git://github.com/aldeck/microbe#41f6ce8a5d96c96af9fb17eda1b466a5e9e0bfb1"
|
||||
REVISION="1"
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="2011 Alexandre Deckner"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
microbe = $portVersion
|
||||
app:Microbe = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
makefile_engine
|
||||
cmd:mkdepend
|
||||
cmd:make
|
||||
cmd:g++
|
||||
"
|
||||
|
||||
PATCHES="microbe-20130728.patch"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs OBJ_DIR=objects
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir
|
||||
cp objects/Microbe $appsDir/Microbe
|
||||
addAppDeskbarSymlink $appsDir/Microbe
|
||||
}
|
||||
75
haiku-apps/microbe/patches/microbe-20130728.patch
Normal file
75
haiku-apps/microbe/patches/microbe-20130728.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
diff --git a/MainView.cpp b/MainView.cpp
|
||||
index 098027d..dc122bf 100644
|
||||
--- a/MainView.cpp
|
||||
+++ b/MainView.cpp
|
||||
@@ -18,8 +18,7 @@ MainView::MainView(BRect frame)
|
||||
:
|
||||
//BTextView("MainView")
|
||||
BTextView(frame, "textview", frame,
|
||||
- B_FOLLOW_ALL, B_FRAME_EVENTS | B_WILL_DRAW),
|
||||
- fPythonPlugin(this, "klong")
|
||||
+ B_FOLLOW_ALL, B_FRAME_EVENTS | B_WILL_DRAW)
|
||||
{
|
||||
fHighlighter = new Highlighter(this);
|
||||
SetStylable(true);
|
||||
@@ -100,7 +99,6 @@ void
|
||||
MainView::DeleteText(int32 start, int32 finish)
|
||||
{
|
||||
BTextView::DeleteText(start, finish);
|
||||
- fPythonPlugin.Func1(Text()/*text*/);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +111,5 @@ MainView::InsertText(const char *text, int32 length, int32 offset,
|
||||
|
||||
BTextView::InsertText(text, length, offset, runs);
|
||||
bigtime_t start = system_time();
|
||||
- fPythonPlugin.Func1(Text()/*text*/);
|
||||
printf("script time: %lims\n", (system_time() - start) / 1000);
|
||||
}
|
||||
diff --git a/MainView.h b/MainView.h
|
||||
index f1c456f..e705a27 100644
|
||||
--- a/MainView.h
|
||||
+++ b/MainView.h
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <TextView.h>
|
||||
|
||||
-#include "PythonPlugin.h"
|
||||
-
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -40,7 +38,6 @@ public:
|
||||
|
||||
private:
|
||||
Highlighter* fHighlighter;
|
||||
- PythonPlugin fPythonPlugin;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/makefile b/makefile
|
||||
index e2f41a7..1ac7063 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -2,17 +2,16 @@ TYPE = APP
|
||||
|
||||
NAME = Microbe
|
||||
|
||||
-SYSTEM_INCLUDE_PATHS = /boot/common/include/python2.6
|
||||
+SYSTEM_INCLUDE_PATHS = /boot/system/develop/headers/python2.7
|
||||
|
||||
SRCS = App.cpp
|
||||
SRCS += Highlighter.cpp
|
||||
SRCS += MainWindow.cpp
|
||||
SRCS += MainView.cpp
|
||||
-SRCS += PythonPlugin.cpp
|
||||
SRCS += TextRange.cpp
|
||||
-LIBS = be python2.6 tracker #stdc++
|
||||
+LIBS = be tracker stdc++
|
||||
|
||||
RDEFS = Microbe.rdef
|
||||
|
||||
# include the makefile-engine
|
||||
-include $(BUILDHOME)/etc/makefile-engine
|
||||
+include /boot/system/develop/etc/makefile-engine
|
||||
@@ -6,9 +6,9 @@ standalone app that minimizes the whole app, and a replicant for your Deskbar. \
|
||||
Both do the same: Minimize all your apps!
|
||||
"
|
||||
HOMEPAGE="https://github.com/HaikuArchives/MinimizeAll/"
|
||||
SRC_URI="git://github.com/HaikuArchives/MinimizeAll.git#12fefdf26131375f695693a680bf01edb35d57a9"
|
||||
SRC_URI="git://github.com/HaikuArchives/MinimizeAll.git#5f61ffe08a0e832d6f5308c9fecccbbb573972f8"
|
||||
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
|
||||
COPYRIGHT="
|
||||
2001-2008 Werner Freytag
|
||||
@@ -17,7 +17,7 @@ COPYRIGHT="
|
||||
|
||||
LICENSE="MIT"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
minimizeall = $portVersion
|
||||
@@ -36,14 +36,22 @@ BUILD_PREREQUIRES="
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
"
|
||||
|
||||
PATCHES="minimizeall-1.0.0.patch"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd trunk
|
||||
mkdir -p bin
|
||||
|
||||
if [ "$effectiveTargetArchitecture" = "x86_gcc2" ]; then
|
||||
STDLIB="stdc++.r4"
|
||||
else
|
||||
STDLIB="stdc++"
|
||||
fi
|
||||
|
||||
# Step 1 - Building the app
|
||||
cd app
|
||||
gcc -o ../bin/MinimizeAll -lbe main.cpp ../minimize.cpp
|
||||
gcc -o ../bin/MinimizeAll -lbe -l$STDLIB main.cpp ../minimize.cpp
|
||||
rc -o ../bin/MinimizeAll.rsrc Application.rdef
|
||||
xres -o ../bin/MinimizeAll ../bin/MinimizeAll.rsrc
|
||||
mimeset -f ../bin/MinimizeAll
|
||||
@@ -51,19 +59,18 @@ BUILD()
|
||||
|
||||
# Step 2 - The DeskBar AddOn!
|
||||
cd "deskbar add-on"
|
||||
gcc -o ../bin/DeskbarAddOn -lbe DeskbarView.cpp ../minimize.cpp
|
||||
gcc -o ../bin/DeskbarAddOn -lbe -l$STDLIB DeskbarView.cpp ../minimize.cpp
|
||||
rc -o ../bin/DeskbarAddOn.rsrc DeskbarAddOn.rdef
|
||||
xres -o ../bin/DeskbarAddOn ../bin/DeskbarAddOn.rsrc
|
||||
mimeset -f ../bin/DeskbarAddOn
|
||||
cd ..
|
||||
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/MinimizeAll
|
||||
cp trunk/bin/MinimizeAll $appsDir/MinimizeAll/MinimizeAll
|
||||
cp trunk/bin/DeskbarAddOn $appsDir/MinimizeAll/DeskbarAddOn
|
||||
cp bin/MinimizeAll $appsDir/MinimizeAll/MinimizeAll
|
||||
cp bin/DeskbarAddOn $appsDir/MinimizeAll/DeskbarAddOn
|
||||
addAppDeskbarSymlink $appsDir/MinimizeAll/MinimizeAll
|
||||
mkdir -p "$dataDir/deskbar/menu/Desktop applets"
|
||||
symlinkRelative -s "$appsDir/MinimizeAll/DeskbarAddOn" \
|
||||
|
||||
13
haiku-apps/minimizeall/patches/minimizeall-1.0.0.patch
Normal file
13
haiku-apps/minimizeall/patches/minimizeall-1.0.0.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/minimize.cpp b/minimize.cpp
|
||||
index cf3d1e1..c263d01 100644
|
||||
--- a/minimize.cpp
|
||||
+++ b/minimize.cpp
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
+using std::vector;
|
||||
+
|
||||
// wird irgendwo vom BeOS definiert (stammt aus Tracker source)
|
||||
void do_minimize_team(BRect zoomRect, team_id team, bool zoom);
|
||||
void do_bring_to_front_team(BRect zoomRect, team_id app, bool zoom);
|
||||
@@ -1,63 +0,0 @@
|
||||
From 6b3517facc71d33974bfd81a78a7567704a94554 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Mon, 2 Dec 2013 19:41:16 -0700
|
||||
Subject: applying patch runprogram-1.0rc1.patch
|
||||
|
||||
|
||||
diff --git a/src/ExeBox.cpp b/src/ExeBox.cpp
|
||||
index b4ee544..b3c3bb2 100644
|
||||
--- a/src/ExeBox.cpp
|
||||
+++ b/src/ExeBox.cpp
|
||||
@@ -212,7 +212,7 @@ ExeBox::InitializeAutocompletion(void)
|
||||
sPathData->AddItem(new entry_ref(ref));
|
||||
}
|
||||
|
||||
- find_directory(B_COMMON_BIN_DIRECTORY,&path);
|
||||
+ find_directory(B_SYSTEM_BIN_DIRECTORY,&path);
|
||||
dir.SetTo(path.Path());
|
||||
dir.Rewind();
|
||||
while (dir.GetNextRef(&ref) == B_OK)
|
||||
@@ -271,7 +271,7 @@ ExeBox::QueryThread(void *data)
|
||||
{
|
||||
if ( ref.directory == B_USER_ADDONS_DIRECTORY
|
||||
|| ref.directory == B_BEOS_ADDONS_DIRECTORY
|
||||
- || ref.directory == B_COMMON_ADDONS_DIRECTORY)
|
||||
+ || ref.directory == B_SYSTEM_ADDONS_DIRECTORY)
|
||||
continue;
|
||||
|
||||
if (ref.directory == -1)
|
||||
@@ -341,7 +341,7 @@ ExeBox::UpdateThread(void *data)
|
||||
queryList.AddItem(new entry_ref(ref));
|
||||
}
|
||||
|
||||
- find_directory(B_COMMON_BIN_DIRECTORY,&path);
|
||||
+ find_directory(B_SYSTEM_BIN_DIRECTORY,&path);
|
||||
dir.SetTo(path.Path());
|
||||
dir.Rewind();
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 522d633b7593a3009fbccf0da8efd3943cceb31b Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Mon, 2 Dec 2013 19:46:25 -0700
|
||||
Subject: Fix includes for building with gcc4
|
||||
|
||||
|
||||
diff --git a/src/ExeBox.cpp b/src/ExeBox.cpp
|
||||
index b3c3bb2..4d154bb 100644
|
||||
--- a/src/ExeBox.cpp
|
||||
+++ b/src/ExeBox.cpp
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <VolumeRoster.h>
|
||||
#include <Query.h>
|
||||
|
||||
+#include <stdio.h>
|
||||
+
|
||||
static BObjectList<entry_ref> *sPathData = NULL;
|
||||
BLocker sPathDataLock;
|
||||
thread_id sThreadID = -1;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -30,8 +30,6 @@ BUILD_PREREQUIRES="
|
||||
cmd:xres
|
||||
"
|
||||
|
||||
PATCHES="runprogram-1.0rc1.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd src
|
||||
|
||||
@@ -1,46 +1,12 @@
|
||||
DESCRIPTION="
|
||||
LibWalter is a supplementary collection of class and controls not present in \
|
||||
the standard Haiku API.
|
||||
"
|
||||
HOMEPAGE="http://dev.osdrawer.net/projects/libwalter"
|
||||
SRC_URI="svn+http://svn.osdrawer.net/libwalter#97"
|
||||
SUMMARY="LibWalter"
|
||||
DESCRIPTION="LibWalter is a supplementary collection of class and controls not present in \
|
||||
the standard Haiku API."
|
||||
HOMEPAGE="https://github.com/HaikuArchives/LibWalter/"
|
||||
SRC_URI="https://github.com/HaikuArchives/LibWalter/archive/59fdad559ee3dbcc58675cb27502ececce795bbc.tar.gz"
|
||||
CHECKSUM_SHA256="f418e14a1f8e1aa803385dc17cd178d9e85e7efd3bc4386ec12416eeeb7a1fec"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
#CHECKSUM_MD5=""
|
||||
BUILD()
|
||||
{
|
||||
cd libwalter-97
|
||||
configure
|
||||
jam
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd libwalter-97
|
||||
mkdir -p ${DESTDIR}/`finddir B_COMMON_LIB_DIRECTORY`
|
||||
mkdir -p ${DESTDIR}/`finddir B_COMMON_DIRECTORY`/include/libwalter
|
||||
cp libwalter.a ${DESTDIR}/`finddir B_COMMON_LIB_DIRECTORY`/libwalter.a
|
||||
cp -a include/. ${DESTDIR}/`finddir B_COMMON_DIRECTORY`/include/libwalter
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd tests
|
||||
ColorWellTest
|
||||
ComboBoxTest
|
||||
CursorTest
|
||||
DialogPaneBarberTest
|
||||
InputRequestTest
|
||||
PaneSwitchTest
|
||||
PictureButtonTest
|
||||
ShrinkViewTest
|
||||
SplitPanelTest
|
||||
ToolbarTest
|
||||
}
|
||||
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT=" 1991-2000, Be Incorporated. All rights reserved.
|
||||
COPYRIGHT="1991-2000, Be Incorporated. All rights reserved.
|
||||
1998 dirk116
|
||||
2001 Atsushi Takamatsu
|
||||
2003 Michael Pfeiffer
|
||||
@@ -48,4 +14,54 @@ COPYRIGHT=" 1991-2000, Be Incorporated. All rights reserved.
|
||||
2007 Matthias Lindner
|
||||
2007 Oliver Ruiz Dorantes
|
||||
2007-2008 DarkWyrm"
|
||||
|
||||
|
||||
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
libwalter$secondaryArchSuffix = $portVersion
|
||||
lib:libwalter$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:mkdepend
|
||||
cmd:jam
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
"
|
||||
SOURCE_DIR="LibWalter-59fdad559ee3dbcc58675cb27502ececce795bbc"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
configure
|
||||
jam
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd tests
|
||||
ColorWellTest
|
||||
ComboBoxTest
|
||||
CursorTest
|
||||
DialogPaneBarberTest
|
||||
InputRequestTest
|
||||
PaneSwitchTest
|
||||
PictureButtonTest
|
||||
ShrinkViewTest
|
||||
SplitPanelTest
|
||||
ToolbarTest
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $libDir
|
||||
mkdir -p $includeDir/libwalter
|
||||
cp libwalter.a $libDir/libwalter.a
|
||||
cp -a include/. $includeDir/libwalter
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
DESCRIPTION="Celestia - The free space simulation"
|
||||
HOMEPAGE="http://www.shatters.net/celestia/"
|
||||
SRC_URI="http://sourceforge.net/projects/celestia/files/Celestia-source/1.6.0/celestia-1.6.0.tar.gz/download"
|
||||
CHECKSUM_MD5="9b96a8e7666ab5a26f032b9d605e023d"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="unstable"
|
||||
DEPEND="dev-lang/lua >= 5.1.4
|
||||
sys-devel/gettext >= 0.17"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd celestia-1.6.0
|
||||
libtoolize --force --copy --install
|
||||
autoreconf -i
|
||||
./configure --prefix=/boot/apps/celestia --with-glut
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd celestia-1.6.0
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2008 Celestia Development Team"
|
||||
76
sci-astronomy/celestia/celestia-1.6.1.recipe
Normal file
76
sci-astronomy/celestia/celestia-1.6.1.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="The free space simulation that lets you explore our universe in three dimensions"
|
||||
DESCRIPTION="Unlike most planetarium software, Celestia doesn't confine you to \
|
||||
the surface of the Earth. You can travel throughout the solar system, to any of \
|
||||
over 100,000 stars, or even beyond the galaxy.
|
||||
|
||||
All movement in Celestia is seamless; the exponential zoom feature lets you \
|
||||
explore space across a huge range of scales, from galaxy clusters down to \
|
||||
spacecraft only a few meters across. A 'point-and-goto' interface makes it \
|
||||
simple to navigate through the universe to the object you want to visit.
|
||||
|
||||
Celestia is expandable. Celestia comes with a large catalog of stars, galaxies, \
|
||||
planets, moons, asteroids, comets, and spacecraft. If that's not enough, you \
|
||||
can download dozens of easy to install add-ons with more objects."
|
||||
HOMEPAGE="http://celestia.sourceforge.net"
|
||||
SRC_URI="http://fossies.org/linux/misc/celestia-1.6.1.tar.gz"
|
||||
CHECKSUM_SHA256="d35570ccb9440fc0bd3e73eb9b4c3e8a4c25f3ae444a13d1175053fa16dc34c4"
|
||||
SOURCE_DIR="celestia-$portVersion"
|
||||
REVISION="1"
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2011 Celestia Development Team"
|
||||
|
||||
ARCHITECTURES="x86 ?x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
else
|
||||
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
celestia$secondaryArchSuffix = $portVersion
|
||||
app:celestia$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lua$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libgl$secondaryArchSuffix
|
||||
lib:libglu$secondaryArchSuffix
|
||||
lib:libglut$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
lua${secondaryArchSuffix}_devel
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libglut$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:gettext
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize -fci
|
||||
runConfigure ./configure --with-glut
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
71
sys-apps/grep/grep-2.21.recipe
Normal file
71
sys-apps/grep/grep-2.21.recipe
Normal file
@@ -0,0 +1,71 @@
|
||||
SUMMARY="GNU regular expression matcher"
|
||||
DESCRIPTION="
|
||||
The grep command searches one or more input files for lines containing a match \
|
||||
to a specified pattern. By default, grep prints the matching lines.
|
||||
"
|
||||
HOMEPAGE="http://www.gnu.org/software/grep/"
|
||||
LICENSE="GNU GPL v3"
|
||||
COPYRIGHT="1992-2014 Free Software Foundation, Inc."
|
||||
SRC_URI="http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz"
|
||||
CHECKSUM_SHA256="5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
|
||||
|
||||
PATCHES="grep-2.21.patchset"
|
||||
|
||||
PROVIDES="
|
||||
grep = $portVersion compat >= 2
|
||||
cmd:egrep = $portVersion compat >= 2
|
||||
cmd:fgrep = $portVersion compat >= 2
|
||||
cmd:grep = $portVersion compat >= 2
|
||||
"
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
lib:libiconv
|
||||
lib:libintl
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
devel:libiconv
|
||||
devel:libintl
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc
|
||||
cmd:gettext
|
||||
cmd:grep
|
||||
cmd:ld
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage grep \
|
||||
$binDir/grep
|
||||
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
runConfigure ./configure \
|
||||
--disable-perl-regexp --disable-gcc-warnings
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/charset.alias
|
||||
rmdir $libDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
471
sys-apps/grep/patches/grep-2.21.patchset
Normal file
471
sys-apps/grep/patches/grep-2.21.patchset
Normal file
@@ -0,0 +1,471 @@
|
||||
From d2e48169bd6f0f4ff6f1bceb951061dfd98b2e62 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 4 Jun 2014 19:20:57 +0000
|
||||
Subject: [PATCH] gcc2 patch
|
||||
|
||||
[cdesai: update for v2.21]
|
||||
---
|
||||
src/dfasearch.c | 21 ++++++++++++++-------
|
||||
src/dosbuf.c | 10 +++++-----
|
||||
src/grep.c | 37 ++++++++++++++++++++++++-------------
|
||||
src/kwsearch.c | 8 +++++---
|
||||
src/kwset.c | 37 ++++++++++++++++++++++---------------
|
||||
src/searchutils.c | 3 ++-
|
||||
6 files changed, 72 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/src/dfasearch.c b/src/dfasearch.c
|
||||
index 77b4e3ecaf..076f49ca18 100644
|
||||
--- a/src/dfasearch.c
|
||||
+++ b/src/dfasearch.c
|
||||
@@ -95,13 +95,17 @@ kwsmusts (void)
|
||||
of the matching string that it chooses. */
|
||||
for (; dm; dm = dm->next)
|
||||
{
|
||||
+ char *must;
|
||||
+ char *mp;
|
||||
+ size_t old_len;
|
||||
+ size_t new_len;
|
||||
if (!dm->exact)
|
||||
continue;
|
||||
++kwset_exact_matches;
|
||||
- size_t old_len = strlen (dm->must);
|
||||
- size_t new_len = old_len + dm->begline + dm->endline;
|
||||
- char *must = xmalloc (new_len);
|
||||
- char *mp = must;
|
||||
+ old_len = strlen (dm->must);
|
||||
+ new_len = old_len + dm->begline + dm->endline;
|
||||
+ must = xmalloc (new_len);
|
||||
+ mp = must;
|
||||
*mp = eolbyte;
|
||||
mp += dm->begline;
|
||||
begline |= dm->begline;
|
||||
@@ -126,6 +130,7 @@ kwsmusts (void)
|
||||
void
|
||||
GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
|
||||
{
|
||||
+ char const *p;
|
||||
size_t total = size;
|
||||
char *motif;
|
||||
|
||||
@@ -138,9 +143,10 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
|
||||
"[\nallo\n]\n", where the patterns are "[", "allo" and "]", and
|
||||
this should be a syntax error. The same for backref, where the
|
||||
backref should be local to each pattern. */
|
||||
- char const *p = pattern;
|
||||
+ p = pattern;
|
||||
do
|
||||
{
|
||||
+ char const *err;
|
||||
size_t len;
|
||||
char const *sep = memchr (p, '\n', total);
|
||||
if (sep)
|
||||
@@ -158,7 +164,7 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
|
||||
patterns = xnrealloc (patterns, pcount + 1, sizeof *patterns);
|
||||
patterns[pcount] = patterns0;
|
||||
|
||||
- char const *err = re_compile_pattern (p, len,
|
||||
+ err = re_compile_pattern (p, len,
|
||||
&(patterns[pcount].regexbuf));
|
||||
if (err)
|
||||
error (EXIT_TROUBLE, 0, "%s", err);
|
||||
@@ -218,6 +224,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
|
||||
size_t i;
|
||||
struct dfa *superset = dfasuperset (dfa);
|
||||
bool dfafast = dfaisfast (dfa);
|
||||
+ size_t off;
|
||||
|
||||
mb_start = buf;
|
||||
buflim = buf + size;
|
||||
@@ -448,7 +455,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
|
||||
success:
|
||||
len = end - beg;
|
||||
success_in_len:;
|
||||
- size_t off = beg - buf;
|
||||
+ off = beg - buf;
|
||||
*match_size = len;
|
||||
return off;
|
||||
}
|
||||
diff --git a/src/dosbuf.c b/src/dosbuf.c
|
||||
index 3b4052ac4a..f9f26a7685 100644
|
||||
--- a/src/dosbuf.c
|
||||
+++ b/src/dosbuf.c
|
||||
@@ -95,11 +95,11 @@ guess_type (char *buf, size_t buflen)
|
||||
static size_t
|
||||
undossify_input (char *buf, size_t buflen)
|
||||
{
|
||||
+ size_t bytes_left = 0;
|
||||
+
|
||||
if (! O_BINARY)
|
||||
return buflen;
|
||||
|
||||
- size_t bytes_left = 0;
|
||||
-
|
||||
if (totalcc == 0)
|
||||
{
|
||||
/* New file: forget everything we knew about character
|
||||
@@ -186,12 +186,12 @@ undossify_input (char *buf, size_t buflen)
|
||||
static off_t
|
||||
dossified_pos (off_t byteno)
|
||||
{
|
||||
- if (! O_BINARY)
|
||||
- return byteno;
|
||||
-
|
||||
off_t pos_lo;
|
||||
off_t pos_hi;
|
||||
|
||||
+ if (! O_BINARY)
|
||||
+ return byteno;
|
||||
+
|
||||
if (dos_file_type != DOS_TEXT || dos_report_unix_offset)
|
||||
return byteno;
|
||||
|
||||
diff --git a/src/grep.c b/src/grep.c
|
||||
index 8dbf86ec94..52dbcf8f54 100644
|
||||
--- a/src/grep.c
|
||||
+++ b/src/grep.c
|
||||
@@ -463,8 +463,9 @@ static bool easy_encoding;
|
||||
static void
|
||||
init_easy_encoding (void)
|
||||
{
|
||||
+ int i;
|
||||
easy_encoding = true;
|
||||
- for (int i = 0; i < HIBYTE; i++)
|
||||
+ for (i = 0; i < HIBYTE; i++)
|
||||
easy_encoding &= mbclen_cache[i] == 1;
|
||||
}
|
||||
|
||||
@@ -493,20 +494,23 @@ typedef uintmax_t uword;
|
||||
static char const * _GL_ATTRIBUTE_PURE
|
||||
skip_easy_bytes (char const *buf)
|
||||
{
|
||||
+ uword uword_max;
|
||||
+ uword hibyte_mask;
|
||||
+ char const *p;
|
||||
+ uword const *s;
|
||||
+
|
||||
if (!easy_encoding)
|
||||
return buf;
|
||||
|
||||
- uword uword_max = -1;
|
||||
+ uword_max = -1;
|
||||
|
||||
/* 0x8080..., extended to be wide enough for uword. */
|
||||
- uword hibyte_mask = uword_max / UCHAR_MAX * HIBYTE;
|
||||
+ hibyte_mask = uword_max / UCHAR_MAX * HIBYTE;
|
||||
|
||||
/* Search a byte at a time until the pointer is aligned, then a
|
||||
uword at a time until a match is found, then a byte at a time to
|
||||
identify the exact byte. The uword search may go slightly past
|
||||
the buffer end, but that's benign. */
|
||||
- char const *p;
|
||||
- uword const *s;
|
||||
for (p = buf; (uintptr_t) p % sizeof (uword) != 0; p++)
|
||||
if (*p & HIBYTE)
|
||||
return p;
|
||||
@@ -563,6 +567,7 @@ file_textbin (char *buf, size_t size, int fd, struct stat const *st)
|
||||
/* If the file has holes, it must contain a null byte somewhere. */
|
||||
if (SEEK_HOLE != SEEK_SET && eolbyte)
|
||||
{
|
||||
+ off_t hole_start;
|
||||
off_t cur = size;
|
||||
if (O_BINARY || fd == STDIN_FILENO)
|
||||
{
|
||||
@@ -572,7 +577,7 @@ file_textbin (char *buf, size_t size, int fd, struct stat const *st)
|
||||
}
|
||||
|
||||
/* Look for a hole after the current location. */
|
||||
- off_t hole_start = lseek (fd, cur, SEEK_HOLE);
|
||||
+ hole_start = lseek (fd, cur, SEEK_HOLE);
|
||||
if (0 <= hole_start)
|
||||
{
|
||||
if (lseek (fd, cur, SEEK_SET) < 0)
|
||||
@@ -663,7 +668,8 @@ add_count (uintmax_t a, uintmax_t b)
|
||||
static bool
|
||||
all_zeros (char const *buf, size_t size)
|
||||
{
|
||||
- for (char const *p = buf; p < buf + size; p++)
|
||||
+ char const *p;
|
||||
+ for (p = buf; p < buf + size; p++)
|
||||
if (*p)
|
||||
return false;
|
||||
return true;
|
||||
@@ -1130,11 +1136,13 @@ prtext (char const *beg, char const *lim)
|
||||
{
|
||||
static bool used; /* Avoid printing SEP_STR_GROUP before any output. */
|
||||
char eol = eolbyte;
|
||||
+ char const *p;
|
||||
+ intmax_t n;
|
||||
|
||||
if (!out_quiet && pending > 0)
|
||||
prpending (beg);
|
||||
|
||||
- char const *p = beg;
|
||||
+ p = beg;
|
||||
|
||||
if (!out_quiet)
|
||||
{
|
||||
@@ -1167,7 +1175,6 @@ prtext (char const *beg, char const *lim)
|
||||
}
|
||||
}
|
||||
|
||||
- intmax_t n;
|
||||
if (out_invert)
|
||||
{
|
||||
/* One or more lines are output. */
|
||||
@@ -1228,6 +1235,7 @@ grepbuf (char const *beg, char const *lim)
|
||||
|
||||
for (p = beg; p < lim; p = endp)
|
||||
{
|
||||
+ char const *b;
|
||||
size_t match_size;
|
||||
size_t match_offset = execute (p, lim - p, &match_size, NULL);
|
||||
if (match_offset == (size_t) -1)
|
||||
@@ -1237,7 +1245,7 @@ grepbuf (char const *beg, char const *lim)
|
||||
match_offset = lim - p;
|
||||
match_size = 0;
|
||||
}
|
||||
- char const *b = p + match_offset;
|
||||
+ b = p + match_offset;
|
||||
endp = b + match_size;
|
||||
/* Avoid matching the empty line at the end of the buffer. */
|
||||
if (!out_invert && b == lim)
|
||||
@@ -2118,6 +2126,9 @@ main (int argc, char **argv)
|
||||
int fread_errno;
|
||||
intmax_t default_context;
|
||||
FILE *fp;
|
||||
+ struct stat tmp_stat;
|
||||
+ char eolbytes[3];
|
||||
+ size_t match_size;
|
||||
exit_failure = EXIT_TROUBLE;
|
||||
initialize_main (&argc, &argv);
|
||||
set_program_name (argv[0]);
|
||||
@@ -2478,7 +2489,6 @@ main (int argc, char **argv)
|
||||
if (show_help)
|
||||
usage (EXIT_SUCCESS);
|
||||
|
||||
- struct stat tmp_stat;
|
||||
if (fstat (STDOUT_FILENO, &tmp_stat) == 0 && S_ISREG (tmp_stat.st_mode))
|
||||
out_stat = tmp_stat;
|
||||
|
||||
@@ -2526,8 +2536,9 @@ main (int argc, char **argv)
|
||||
compile (keys, keycc);
|
||||
free (keys);
|
||||
/* We need one byte prior and one after. */
|
||||
- char eolbytes[3] = { 0, eolbyte, 0 };
|
||||
- size_t match_size;
|
||||
+ eolbytes[0] = 0;
|
||||
+ eolbytes[1] = eolbyte;
|
||||
+ eolbytes[2] = 0;
|
||||
skip_empty_lines = ((execute (eolbytes + 1, 1, &match_size, NULL) == 0)
|
||||
== out_invert);
|
||||
|
||||
diff --git a/src/kwsearch.c b/src/kwsearch.c
|
||||
index 1335a269cc..eddb01b520 100644
|
||||
--- a/src/kwsearch.c
|
||||
+++ b/src/kwsearch.c
|
||||
@@ -38,16 +38,18 @@ Fcompile (char const *pattern, size_t size)
|
||||
{
|
||||
size_t total = size;
|
||||
mb_len_map_t *map = NULL;
|
||||
+ char const *p;
|
||||
char const *pat = (match_icase && MB_CUR_MAX > 1
|
||||
? mbtoupper (pattern, &total, &map)
|
||||
: pattern);
|
||||
|
||||
kwsinit (&kwset);
|
||||
|
||||
- char const *p = pat;
|
||||
+ p = pat;
|
||||
do
|
||||
{
|
||||
size_t len;
|
||||
+ char *buf = NULL;
|
||||
char const *sep = memchr (p, '\n', total);
|
||||
if (sep)
|
||||
{
|
||||
@@ -61,7 +63,6 @@ Fcompile (char const *pattern, size_t size)
|
||||
total = 0;
|
||||
}
|
||||
|
||||
- char *buf = NULL;
|
||||
if (match_lines)
|
||||
{
|
||||
buf = xmalloc (len + 2);
|
||||
@@ -110,6 +111,7 @@ Fexecute (char const *buf, size_t size, size_t *match_size,
|
||||
char eol = eolbyte;
|
||||
struct kwsmatch kwsmatch;
|
||||
size_t ret_val;
|
||||
+ size_t off;
|
||||
mb_len_map_t *map = NULL;
|
||||
|
||||
if (MB_CUR_MAX > 1)
|
||||
@@ -193,7 +195,7 @@ Fexecute (char const *buf, size_t size, size_t *match_size,
|
||||
--beg;
|
||||
len = end - beg;
|
||||
success_in_beg_and_len:;
|
||||
- size_t off = beg - buf;
|
||||
+ off = beg - buf;
|
||||
mb_case_map_apply (map, &off, &len);
|
||||
|
||||
*match_size = len;
|
||||
diff --git a/src/kwset.c b/src/kwset.c
|
||||
index 6d218938e7..8df7cd4fe2 100644
|
||||
--- a/src/kwset.c
|
||||
+++ b/src/kwset.c
|
||||
@@ -162,6 +162,7 @@ kwsincr (kwset_t kwset, char const *text, size_t len)
|
||||
installing new nodes when necessary. */
|
||||
while (len--)
|
||||
{
|
||||
+ int depth = 1;
|
||||
unsigned char uc = *--text;
|
||||
unsigned char label = trans ? trans[uc] : uc;
|
||||
|
||||
@@ -173,8 +174,7 @@ kwsincr (kwset_t kwset, char const *text, size_t len)
|
||||
enum { L, R } dirs[DEPTH_SIZE];
|
||||
links[0] = (struct tree *) &trie->links;
|
||||
dirs[0] = L;
|
||||
- int depth = 1;
|
||||
-
|
||||
+
|
||||
while (link && label != link->label)
|
||||
{
|
||||
links[depth] = link;
|
||||
@@ -392,10 +392,13 @@ treenext (struct tree const *tree, struct trie *next[])
|
||||
void
|
||||
kwsprep (kwset_t kwset)
|
||||
{
|
||||
+ struct trie *curr, *last;
|
||||
char const *trans = kwset->trans;
|
||||
int i;
|
||||
unsigned char deltabuf[NCHAR];
|
||||
unsigned char *delta = trans ? deltabuf : kwset->delta;
|
||||
+ struct trie *nextbuf[NCHAR];
|
||||
+ struct trie **next;
|
||||
|
||||
/* Initial values for the delta table; will be changed later. The
|
||||
delta entry for a given character is the smallest depth of any
|
||||
@@ -404,9 +407,10 @@ kwsprep (kwset_t kwset)
|
||||
|
||||
/* Traverse the nodes of the trie in level order, simultaneously
|
||||
computing the delta table, failure function, and shift function. */
|
||||
- struct trie *curr, *last;
|
||||
for (curr = last = kwset->trie; curr; curr = curr->next)
|
||||
{
|
||||
+ struct trie *fail;
|
||||
+
|
||||
/* Enqueue the immediate descendants in the level order queue. */
|
||||
enqueue (curr->links, &last);
|
||||
|
||||
@@ -421,7 +425,6 @@ kwsprep (kwset_t kwset)
|
||||
|
||||
/* Update the shifts at each node in the current node's chain
|
||||
of fails back to the root. */
|
||||
- struct trie *fail;
|
||||
for (fail = curr->fail; fail; fail = fail->fail)
|
||||
{
|
||||
/* If the current node has some outgoing edge that the fail
|
||||
@@ -451,8 +454,7 @@ kwsprep (kwset_t kwset)
|
||||
|
||||
/* Create a vector, indexed by character code, of the outgoing links
|
||||
from the root node. */
|
||||
- struct trie *nextbuf[NCHAR];
|
||||
- struct trie **next = trans ? nextbuf : kwset->next;
|
||||
+ next = trans ? nextbuf : kwset->next;
|
||||
memset (next, 0, sizeof nextbuf);
|
||||
treenext (kwset->trie->links, next);
|
||||
if (trans)
|
||||
@@ -463,6 +465,8 @@ kwsprep (kwset_t kwset)
|
||||
of the hairy commentz-walter algorithm. */
|
||||
if (kwset->words == 1)
|
||||
{
|
||||
+ char gc1;
|
||||
+ int gc1help = -1;
|
||||
/* Looking for just one string. Extract it from the trie. */
|
||||
kwset->target = obstack_alloc (&kwset->obstack, kwset->mind);
|
||||
for (i = kwset->mind - 1, curr = kwset->trie; i >= 0; --i)
|
||||
@@ -484,11 +488,10 @@ kwsprep (kwset_t kwset)
|
||||
}
|
||||
}
|
||||
|
||||
- char gc1 = tr (trans, kwset->target[kwset->mind - 1]);
|
||||
+ gc1 = tr (trans, kwset->target[kwset->mind - 1]);
|
||||
|
||||
/* Set GC1HELP according to whether exactly one, exactly two, or
|
||||
three-or-more characters match GC1. */
|
||||
- int gc1help = -1;
|
||||
if (trans)
|
||||
{
|
||||
char const *equiv1 = memchr (trans, gc1, NCHAR);
|
||||
@@ -570,13 +573,16 @@ bm_delta2_search (char const **tpp, char const *ep, char const *sp, int len,
|
||||
static char const *
|
||||
memchr_kwset (char const *s, size_t n, kwset_t kwset)
|
||||
{
|
||||
+ int small_heuristic = 2;
|
||||
+ int small;
|
||||
+ size_t ntrans;
|
||||
+ char const *slim;
|
||||
if (kwset->gc1help < 0)
|
||||
return memchr (s, kwset->gc1, n);
|
||||
- int small_heuristic = 2;
|
||||
- int small = (- (uintptr_t) s % sizeof (long)
|
||||
+ small = (- (uintptr_t) s % sizeof (long)
|
||||
+ small_heuristic * sizeof (long));
|
||||
- size_t ntrans = kwset->gc1help < NCHAR && small < n ? small : n;
|
||||
- char const *slim = s + ntrans;
|
||||
+ ntrans = kwset->gc1help < NCHAR && small < n ? small : n;
|
||||
+ slim = s + ntrans;
|
||||
for (; s < slim; s++)
|
||||
if (kwset->trans[U(*s)] == kwset->gc1)
|
||||
return s;
|
||||
@@ -593,6 +599,7 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
|
||||
int d;
|
||||
int len = kwset->mind;
|
||||
char const *trans = kwset->trans;
|
||||
+ char gc1, gc2;
|
||||
|
||||
if (len == 0)
|
||||
return 0;
|
||||
@@ -607,8 +614,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
|
||||
d1 = kwset->delta;
|
||||
sp = kwset->target + len;
|
||||
tp = text + len;
|
||||
- char gc1 = kwset->gc1;
|
||||
- char gc2 = kwset->gc2;
|
||||
+ gc1 = kwset->gc1;
|
||||
+ gc2 = kwset->gc2;
|
||||
|
||||
/* Significance of 12: 1 (initial offset) + 10 (skip loop) + 1 (md2). */
|
||||
if (size > 12 * len)
|
||||
@@ -630,12 +637,12 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
|
||||
d = d1[U(tp[-1])], tp += d;
|
||||
if (d != 0)
|
||||
{
|
||||
+ int advance_heuristic = 16 * sizeof (long);
|
||||
d = d1[U(tp[-1])], tp += d;
|
||||
d = d1[U(tp[-1])], tp += d;
|
||||
|
||||
/* As a heuristic, prefer memchr to seeking by
|
||||
delta1 when the latter doesn't advance much. */
|
||||
- int advance_heuristic = 16 * sizeof (long);
|
||||
if (advance_heuristic <= tp - tp0)
|
||||
goto big_advance;
|
||||
tp--;
|
||||
diff --git a/src/searchutils.c b/src/searchutils.c
|
||||
index 9edc7855cd..bdb006386c 100644
|
||||
--- a/src/searchutils.c
|
||||
+++ b/src/searchutils.c
|
||||
@@ -272,9 +272,10 @@ mb_goback (char const **mb_start, char const *cur, char const *end)
|
||||
wint_t
|
||||
mb_prev_wc (char const *buf, char const *cur, char const *end)
|
||||
{
|
||||
+ char const *p;
|
||||
if (cur == buf)
|
||||
return WEOF;
|
||||
- char const *p = buf;
|
||||
+ p = buf;
|
||||
cur--;
|
||||
cur -= mb_goback (&p, cur, end);
|
||||
return mb_next_wc (cur, end);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user