From b261842052beb06498affb71a7d74a76e6a8f048 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 15 Dec 2014 16:11:37 -0500 Subject: [PATCH] TrackerGrep: v5.2. --- .../patches/trackergrep-5.1.patchset | 49 ----------------- haiku-apps/trackergrep/trackergrep-5.1.recipe | 55 ------------------- haiku-apps/trackergrep/trackergrep-5.2.recipe | 50 +++++++++++++++++ 3 files changed, 50 insertions(+), 104 deletions(-) delete mode 100644 haiku-apps/trackergrep/patches/trackergrep-5.1.patchset delete mode 100644 haiku-apps/trackergrep/trackergrep-5.1.recipe create mode 100644 haiku-apps/trackergrep/trackergrep-5.2.recipe diff --git a/haiku-apps/trackergrep/patches/trackergrep-5.1.patchset b/haiku-apps/trackergrep/patches/trackergrep-5.1.patchset deleted file mode 100644 index 01fd9988e..000000000 --- a/haiku-apps/trackergrep/patches/trackergrep-5.1.patchset +++ /dev/null @@ -1,49 +0,0 @@ -From c02a072f11683914ce9dbe77adf0b478f613885e Mon Sep 17 00:00:00 2001 -From: Chris Roberts -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 - #include - #include -+#include - #include - - #define PREFS_FILE "TrackerGrepSettings" --- -1.8.3.4 - diff --git a/haiku-apps/trackergrep/trackergrep-5.1.recipe b/haiku-apps/trackergrep/trackergrep-5.1.recipe deleted file mode 100644 index f026386dd..000000000 --- a/haiku-apps/trackergrep/trackergrep-5.1.recipe +++ /dev/null @@ -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 -} diff --git a/haiku-apps/trackergrep/trackergrep-5.2.recipe b/haiku-apps/trackergrep/trackergrep-5.2.recipe new file mode 100644 index 000000000..9dfa4334c --- /dev/null +++ b/haiku-apps/trackergrep/trackergrep-5.2.recipe @@ -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/ +}