# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= the_silver_searcher VERSION= 2.2.0 REVISION= 1 KEYWORDS= textproc VARIANTS= standard SDESC[standard]= Code-searching tool similar to ack, but faster HOMEPAGE= https://geoff.greer.fm/ag/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/ggreer:the_silver_searcher:2.2.0 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USES= autoreconf pkgconfig zlib xz pcre LICENSE= APACHE20:single LICENSE_TERMS= single:{{WRKDIR}}/TERMS LICENSE_FILE= APACHE20:{{WRKSRC}}/LICENSE LICENSE_SCHEME= solo FPC_EQUIVALENT= textproc/the_silver_searcher MUST_CONFIGURE= gnu CONFIGURE_ARGS= LZMA_LIBS=-llzma CPPFLAGS= -fcommon LDFLAGS= -llzma post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d ${MV} ${STAGEDIR}${PREFIX}/share/the_silver_searcher/completions/ag.bashcomp.sh \ ${STAGEDIR}${PREFIX}/etc/bash_completion.d ${RM} -r ${STAGEDIR}${PREFIX}/share/the_silver_searcher # extract license terms ${AWK} '/BuildRoot:/ {exit}; {print}' ${WRKSRC}/the_silver_searcher.spec \ > ${WRKDIR}/TERMS [FILE:1408:descriptions/desc.single] The Silver Searcher A code searching tool similar to ack, with a focus on speed. What's so great about Ag? * It is an order of magnitude faster than ack. * It ignores file patterns from your .gitignore and .hgignore. * If there are files in your source repo you don't want to search, just add their patterns to a .ignore file. (*cough* *.min.js *cough*) * The command name is 33% shorter than ack, and all keys are on home row! Ag is quite stable now. Most changes are new features, minor bug fixes, or performance improvements. It's much faster than Ack in benchmarks: ack test_blah ~/code/ 104.66s user 4.82s system 99% cpu 1:50.03 total ag test_blah ~/code/ 4.67s user 4.58s system 286% cpu 3.227 total Ack and Ag found the same results, but Ag was 34x faster (3.2 seconds vs 110 seconds). My ~/code directory is about 8GB. Thanks to git/hg/ignore, Ag only searched 700MB of that. How is it so fast? * Ag uses Pthreads to take advantage of multiple CPU cores and search files in parallel. * Files are mmap()ed instead of read into a buffer. * Literal string searching uses Boyer-Moore strstr. * Regex searching uses PCRE's JIT compiler (if Ag is built with PCRE >=8.21). * Ag calls pcre_study() before executing the same regex on every file. * Instead of calling fnmatch() on every pattern in your ignore files, non-regex patterns are loaded into arrays and binary searched. [FILE:118:distinfo] 6a0a19ca5e73b2bef9481c29a508d2413ca1a0a9a5a6b1bd9bbd695a7626cbf9 163686 ggreer-the_silver_searcher-2.2.0.tar.gz [FILE:113:manifests/plist.single] bin/ag etc/bash_completion.d/ag.bashcomp.sh share/man/man1/ag.1.gz share/zsh/site-functions/_the_silver_searcher [FILE:610:patches/patch-src_main.c] --- src/main.c.orig 2018-08-07 06:43:51 UTC +++ src/main.c @@ -19,7 +19,7 @@ #include #endif -#if defined(HAVE_PTHREAD_SETAFFINITY_NP) && defined(__FreeBSD__) +#if defined(HAVE_PTHREAD_SETAFFINITY_NP) && (defined(__FreeBSD__) || defined(__DragonFly__)) #include #endif @@ -156,7 +156,7 @@ int main(int argc, char **argv) { if (opts.use_thread_affinity) { #ifdef __linux__ cpu_set_t cpu_set; -#elif __FreeBSD__ +#elif defined(__FreeBSD__) || defined(__DragonFly__) cpuset_t cpu_set; #endif CPU_ZERO(&cpu_set); [FILE:651:patches/patch-src_scandir.c] --- src/scandir.c.orig 2018-08-07 06:43:51 UTC +++ src/scandir.c @@ -40,6 +40,8 @@ int ag_scandir(const char *dirname, #if defined(__MINGW32__) || defined(__CYGWIN__) d = malloc(sizeof(struct dirent)); +#elif defined(__DragonFly__) + d = malloc(_DIRENT_RECLEN(entry->d_namlen)); #else d = malloc(entry->d_reclen); #endif @@ -49,6 +51,8 @@ int ag_scandir(const char *dirname, } #if defined(__MINGW32__) || defined(__CYGWIN__) memcpy(d, entry, sizeof(struct dirent)); +#elif defined (__DragonFly__) + memcpy(d, entry, _DIRENT_RECLEN(entry->d_namlen)); #else memcpy(d, entry, entry->d_reclen); #endif [FILE:204:patches/patch-src_zfile.c] --- src/zfile.c.orig 2018-08-07 06:43:51 UTC +++ src/zfile.c @@ -1,4 +1,4 @@ -#ifdef __FreeBSD__ +#if defined __FreeBSD__ || defined __DragonFly__ #include #endif #include