Ticket #12325: sleuthkit.patch

File sleuthkit.patch, 6.6 KB (added by ecronin (Eric Cronin), 17 years ago)
  • sleuthkit/Portfile

    diff -wubrN /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/sleuthkit/Portfile sleuthkit/Portfile
    old new  
    33PortSystem 1.0
    44
    55name            sleuthkit
    6 version         2.04
     6version         2.09
    77categories      sysutils
    88maintainers     md@hudora.de
    99platforms       darwin
     
    2121        extract them so that they can be analyzed with file system analysis tools.
    2222master_sites    sourceforge
    2323homepage        http://www.sleuthkit.org/sleuthkit/
    24 checksums       sha1 852c8d9ac1755f22d121e1e830f2bff3520a64da\
    25                 md5 abb1511e2ec53c6d34d745a348c94b33
     24checksums       sha1 9d2db6868026d887a83b0becb4d95a69527df457 \
     25                md5 7a7b50e089c1807956146a50621b7441
    2626use_configure   no
     27depends_build   port:file port:perl5.8
     28depends_lib     port:openssl port:p5-datemanip port:zlib
     29patchfiles      patch-Makefile patch-check-install patch-src_timeline_config-perl
     30
     31post-patch {
     32        reinplace "s|/usr/local/bin/ /usr/bin/ /usr/ccs/bin/ /bin/ /usr/ucb/bin/ /sbin/ /usr/sbin/ /usr/local/sbin/ /usr/pkg/bin/|${prefix}/bin/|g" ${worksrcpath}/src/timeline/config-perl
     33        reinplace "s|/usr/local/bin/ /usr/bin/ /usr/ccs/bin/ /bin/ /usr/ucb/bin/ /sbin/ /usr/sbin/ /usr/local/sbin/ /usr/pkg/bin/|${prefix}/bin/|g" ${worksrcpath}/src/sorter/install
     34
     35    foreach srcdir { auxtools disktools fstools hashtools imgtools
     36                     mmtools srchtools } {
     37        # Those are literal tabs after CFLAGS and LIBS, don't retab 'em
     38        reinplace "s|^CFLAGS\[  \]*=|CFLAGS     = -I${prefix}/include |g" \
     39                ${worksrcpath}/src/${srcdir}/Makefile
     40        reinplace "s|^LIBS\[    \]*=|LIBS       = -L${prefix}/lib |g" \
     41                ${worksrcpath}/src/${srcdir}/Makefile
     42    }
     43}
    2744
    2845destroot   {
    29        cd ${worksrcpath}
    30        file rename bin/file bin/file_sk
    31        file rename man/man1/file.1 man/man1/file_sk.1
     46        reinplace "s|\\\$SK_DIR=\"${worksrcpath}/\"|\\\$SK_DIR=\"${prefix}\"|g" ${worksrcpath}/bin/sorter
     47        reinplace "s|\\\$SK_DIR/share/sorter/|\\\$SK_DIR/share/${name}/sorter/|g" ${worksrcpath}/bin/sorter
    3248
    3349        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/tct_docs
     50        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/api_docs
    3451
    35         eval xinstall [glob ${worksrcpath}/docs/*] \
     52        eval xinstall [glob ${worksrcpath}/docs/*.txt] \
    3653                ${destroot}${prefix}/share/doc/${name}
    3754
     55        eval xinstall [glob ${worksrcpath}/docs/api-doc/*] \
     56                ${destroot}${prefix}/share/doc/${name}/api_docs
     57
    3858        xinstall -m 644 -W ${worksrcpath} CHANGES.txt INSTALL.txt README.txt \
    3959                ${destroot}${prefix}/share/doc/${name}
    4060
     
    4565        eval xinstall -m 755 [glob ${worksrcpath}/bin/*] \
    4666                ${destroot}${prefix}/bin
    4767
     68        xinstall -m 755 -d ${destroot}${prefix}/lib
     69        xinstall -m 644 ${worksrcpath}/lib/libtsk.a \
     70                ${destroot}${prefix}/lib
     71
    4872        xinstall -m 755 -d ${destroot}${prefix}/man/man1
    4973        eval xinstall -m 644 [glob ${worksrcpath}/man/man1/*] \
    5074                ${destroot}${prefix}/share/man/man1/
    5175
    52         xinstall -m 755 -d ${destroot}${prefix}/man/man3
    53         eval xinstall -m 644 [glob ${worksrcpath}/man/man3/*] \
    54                 ${destroot}${prefix}/share/man/man3/
    55 
    56         xinstall -m 755 -d ${destroot}${prefix}/man/man4
    57         eval xinstall -m 644 [glob ${worksrcpath}/man/man4/*] \
    58                 ${destroot}${prefix}/share/man/man4/
     76        xinstall -m 755 -d ${destroot}${prefix}/share/${name}/sorter
     77        eval xinstall [glob ${worksrcpath}/share/sorter/*] \
     78                ${destroot}${prefix}/share/${name}/sorter
    5979}
  • sleuthkit/files/patch-Makefile

    diff -wubrN /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/sleuthkit/files/patch-Makefile sleuthkit/files/patch-Makefile
    old new  
     1--- Makefile.orig       2007-07-18 14:52:18.000000000 -0400
     2+++ Makefile    2007-07-18 16:05:23.000000000 -0400
     3@@ -1,6 +1,6 @@
     4 SHELL  = /bin/sh
     5 #CC            = g++
     6-CC             = gcc
     7+CC             = gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
     8 DIRS   = bin
     9 
     10 all:   $(DIRS) compile
     11@@ -10,9 +10,9 @@
     12 $(DIRS):
     13        mkdir -p $@
     14 
     15-compile: no-perl mactime sorter file test
     16+compile: no-perl mactime sorter test
     17 
     18-compile-static: no-perl-static mactime sorter file test
     19+compile-static: no-perl-static mactime sorter test
     20 
     21 no-perl:
     22        $(MAKE) -C src/auxtools
     23@@ -42,9 +42,6 @@
     24 mactime:
     25        $(MAKE) -C src/timeline
     26 
     27-file:
     28-       cd src; sh ./file-install.sh
     29-
     30 indent:
     31        $(MAKE) -C src/auxtools indent
     32        $(MAKE) -C src/imgtools indent
     33@@ -69,7 +66,6 @@
     34        cd src/sorter; sh ./clean
     35        cd src; sh ./afflib-clean.sh
     36        cd src; sh ./libewf-clean.sh
     37-       cd src; sh ./file-clean.sh
     38        rm -f lib/libtsk.a
     39        rm -f bin/*core
     40        rm -f bin/.gdb_history
  • sleuthkit/files/patch-check-install

    diff -wubrN /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/sleuthkit/files/patch-check-install sleuthkit/files/patch-check-install
    old new  
     1--- check-install.orig  2007-07-18 14:51:40.000000000 -0400
     2+++ check-install       2007-07-18 14:52:13.000000000 -0400
     3@@ -51,12 +51,6 @@
     4   echo "ERROR: Missing disk_stat tool";
     5 fi
     6 
     7-if (test -x "bin/file") then
     8-  blah=1;
     9-else
     10-  echo "ERROR: Missing 'file' command";
     11-fi
     12-
     13 if (test -x "bin/mactime") then
     14   blah=1;
     15 else
  • sleuthkit/files/patch-src_timeline_config-perl

    diff -wubrN /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/sleuthkit/files/patch-src_timeline_config-perl sleuthkit/files/patch-src_timeline_config-perl
    old new  
     1--- src/timeline/config-perl.orig       2007-07-18 15:52:47.000000000 -0400
     2+++ src/timeline/config-perl    2007-07-18 15:53:00.000000000 -0400
     3@@ -60,15 +60,6 @@
     4 fi
     5 
     6 
     7-# Print the installed location of the lib directory
     8-# This is not the best fix, but it works
     9-if (test -z "`echo "$PWD" | awk '/\/src\/timeline/ {print $0}'`") then
     10-  echo "use lib '$PWD/$LIB_DIR_NORM';" >> $BIN_DIR$PROG;
     11-else
     12-  echo "use lib '$PWD/$LIB_DIR_BACK';" >> $BIN_DIR$PROG;
     13-fi
     14-
     15-
     16 # Print the current version
     17 echo "\$VER = \"`cat ../../patchlevel`\";" >> $BIN_DIR$PROG;
     18