mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Merged in waddlesplash/haikuports/trackergrep (pull request #350)
TrackerGrep: v5.2.
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
From c02a072f11683914ce9dbe77adf0b478f613885e Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Mon, 2 Dec 2013 20:22:01 -0700
|
||||
Subject: Fix directory and include issues
|
||||
|
||||
|
||||
diff --git a/source/Grepper.cpp b/source/Grepper.cpp
|
||||
index d2e5c58..71befc8 100644
|
||||
--- a/source/Grepper.cpp
|
||||
+++ b/source/Grepper.cpp
|
||||
@@ -139,8 +139,10 @@ int32 Grepper::GrepperThread()
|
||||
char command[B_PATH_NAME_LENGTH + 32];
|
||||
|
||||
BPath tempFile;
|
||||
- sprintf(fileName, "/boot/var/tmp/TrackerGrep%ld", fThreadId);
|
||||
- tempFile.SetTo(fileName);
|
||||
+ if (find_directory(B_SYSTEM_TEMP_DIRECTORY, &tempFile, true) != B_OK)
|
||||
+ return -1;
|
||||
+ sprintf(fileName, "TrackerGrep%ld", fThreadId);
|
||||
+ tempFile.Append(fileName);
|
||||
|
||||
while (!fMustQuit && GetNextName(fileName)) {
|
||||
message.MakeEmpty();
|
||||
@@ -159,8 +161,9 @@ int32 Grepper::GrepperThread()
|
||||
|
||||
EscapeSpecialChars(fileName);
|
||||
|
||||
+ //assume that grep is already in $PATH
|
||||
sprintf(
|
||||
- command, "/boot/beos/bin/grep -hn %s %s \"%s\" > \"%s\"",
|
||||
+ command, "grep -hn %s %s \"%s\" > \"%s\"",
|
||||
fModel->fCaseSensitive ? "" : "-i", fPattern, fileName,
|
||||
tempFile.Path());
|
||||
|
||||
diff --git a/source/Model.h b/source/Model.h
|
||||
index a73d801..8ec1d24 100644
|
||||
--- a/source/Model.h
|
||||
+++ b/source/Model.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <Message.h>
|
||||
#include <Entry.h>
|
||||
#include <FindDirectory.h>
|
||||
+#include <File.h>
|
||||
#include <Rect.h>
|
||||
|
||||
#define PREFS_FILE "TrackerGrepSettings"
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
SUMMARY="A simple Tracker add-on that lets you search through text files."
|
||||
DESCRIPTION="
|
||||
Tracker Grep is a simple Tracker add-on that lets you search through text \
|
||||
files. Haiku already comes with a tool that lets you do that, grep, but you \
|
||||
need to use it from a Terminal window. Gone are those days of command-line \
|
||||
trouble, because from now on Tracker Grep lets you run grep directly from the \
|
||||
Tracker.
|
||||
"
|
||||
HOMEPAGE="https://github.com/HaikuArchives/TrackerGrep/"
|
||||
SRC_URI="git://github.com/HaikuArchives/TrackerGrep.git#001a0b68be"
|
||||
REVISION="2"
|
||||
COPYRIGHT="
|
||||
1998-2006 Matthijs Hollemans
|
||||
2007 Jonas Sundström."
|
||||
LICENSE="MIT"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
trackergrep = $portVersion
|
||||
app:TrackerGrep = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:xres
|
||||
"
|
||||
|
||||
PATCHES="trackergrep-5.1.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd source
|
||||
g++ -o TrackerGrep GrepApp.cpp GrepWindow.cpp Model.cpp \
|
||||
TrackerGrep.cpp Grepper.cpp GrepListView.cpp -fpermissive \
|
||||
-lbe -ltracker -ltextencoding
|
||||
xres -o TrackerGrep TrackerGrep.rsrc
|
||||
mimeset -f TrackerGrep
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd source
|
||||
mkdir -p $addOnsDir/Tracker
|
||||
cp TrackerGrep $addOnsDir/Tracker
|
||||
addAppDeskbarSymlink $appsDir/TrackerGrep
|
||||
}
|
||||
50
haiku-apps/trackergrep/trackergrep-5.2.recipe
Normal file
50
haiku-apps/trackergrep/trackergrep-5.2.recipe
Normal file
@@ -0,0 +1,50 @@
|
||||
SUMMARY="A simple Tracker add-on that lets you search through text files."
|
||||
DESCRIPTION="TrackerGrep is a simple Tracker add-on that lets you search \
|
||||
through text files. Haiku already comes with a tool that lets you do that \
|
||||
(grep) but you need to use it from a Terminal window. Gone are those days \
|
||||
of command-line trouble, because from now on TrackerGrep lets you run grep \
|
||||
directly from Tracker."
|
||||
HOMEPAGE="https://github.com/HaikuArchives/TrackerGrep"
|
||||
SRC_URI="https://github.com/HaikuArchives/TrackerGrep/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7b19601d48ae26bc54345c26914892ea6a8e54f131c5049ee5bb52523a950d81"
|
||||
SOURCE_DIR="TrackerGrep-$portVersion"
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="
|
||||
1998-2006 Matthijs Hollemans
|
||||
2007 Jonas Sundström."
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
trackergrep = $portVersion
|
||||
add_on:TrackerGrep = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:grep
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
makefile_engine
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:make
|
||||
cmd:mkdepend
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd source
|
||||
make $jobArgs OBJ_DIR=objects
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd source
|
||||
mkdir -p $addOnsDir/Tracker/
|
||||
|
||||
cp objects/TrackerGrep-G $addOnsDir/Tracker/
|
||||
}
|
||||
Reference in New Issue
Block a user