]> git.mdlowis.com Git - proto/aardvark-linux.git/commitdiff
Added patch to sbase that allows the removal of gnu tar as a dependency. GNU grep...
authorMike Lowis <mike.lowis@gentex.com>
Thu, 28 Jan 2016 19:23:23 +0000 (19:23 +0000)
committerMike Lowis <mike.lowis@gentex.com>
Thu, 28 Jan 2016 19:23:23 +0000 (19:23 +0000)
build.sh
patches/sbase.diff [new file with mode: 0644]

index 2cfcfa834e91a488e80bb35f3b7c80f5dfe1a4e8..86cd0e5160bff46bd1365752a29551853156eca4 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -56,18 +56,16 @@ gitclone http://git.suckless.org/sbase "$AL_SOURCES/sbase"
 if [ ! -f "$AL_ROOT/bin/ls" ]; then
     cd "$AL_SOURCES/sbase"
     git checkout .
-    git apply ../../patches/sbase-touch-f.diff
+    git apply ../../patches/sbase.diff
     make $MAKEFLAGS CC="$CC" LD="$LD" LDFLAGS="$LDFLAGS"
     make $MAKEFLAGS PREFIX=$AL_ROOT install
-    rm -f "$AL_ROOT/bin/grep"
-    rm -f "$AL_ROOT/bin/tar"
+    #rm -f "$AL_ROOT/bin/grep"
     cd $AL
 fi
 
 # Install ubase
 gitclone http://git.suckless.org/ubase "$AL_SOURCES/ubase"
 if [ ! -f "$AL_ROOT/bin/clear" ]; then
-    echo ubase
     cd "$AL_SOURCES/ubase"
     make $MAKEFLAGS CC="$CC" LD="$LD" LDFLAGS="$LDFLAGS"
     make $MAKEFLAGS PREFIX=$AL_ROOT install
@@ -116,20 +114,6 @@ fi
 #------------------------------------------------------------------------------
 # These packages should be replaced with non-gnu versions when possible
 
-# Install GNU grep
-fetch grep-2.9.tar.xz http://ftp.gnu.org/gnu/grep/ "$AL_SOURCES/grep"
-if [ ! -f "$AL_ROOT/bin/grep" ]; then
-    cd "$AL_SOURCES/grep"
-    ./configure             \
-        LDFLAGS="--static"  \
-        --prefix="$AL_ROOT" \
-        --disable-threads   \
-        --disable-rpath     \
-        --disable-nls
-    make $MAKEFLAGS install
-    cd $AL
-fi
-
 # Install GNU awk
 fetch gawk-4.1.3.tar.xz http://ftp.gnu.org/gnu/gawk/ "$AL_SOURCES/gawk"
 if [ ! -f "$AL_ROOT/bin/gawk" ]; then
@@ -147,16 +131,6 @@ if [ ! -f "$AL_ROOT/bin/gawk" ]; then
     cd $AL
 fi
 
-# Install GNU tar
-fetch tar-1.28.tar.xz http://ftp.gnu.org/gnu/tar/ "$AL_SOURCES/tar"
-if [ ! -f "$AL_ROOT/bin/tar" ]; then
-    cd "$AL_SOURCES/tar"
-    ./configure \
-        --prefix="$AL_ROOT"
-    make $MAKEFLAGS install
-    cd $AL
-fi
-
 # Install GNU diffutils
 fetch diffutils-3.3.tar.xz http://ftp.gnu.org/gnu/diffutils/ "$AL_SOURCES/diffutils"
 if [ ! -f "$AL_ROOT/bin/diff" ]; then
@@ -167,6 +141,29 @@ if [ ! -f "$AL_ROOT/bin/diff" ]; then
     cd $AL
 fi
 
+## Install GNU grep
+#fetch grep-2.9.tar.xz http://ftp.gnu.org/gnu/grep/ "$AL_SOURCES/grep"
+#if [ ! -f "$AL_ROOT/bin/grep" ]; then
+#    cd "$AL_SOURCES/grep"
+#    ./configure             \
+#        LDFLAGS="--static"  \
+#        --prefix="$AL_ROOT" \
+#        --disable-threads   \
+#        --disable-rpath     \
+#        --disable-nls
+#    make $MAKEFLAGS install
+#    cd $AL
+#fi
+
+# Install GNU tar
+#fetch tar-1.28.tar.xz http://ftp.gnu.org/gnu/tar/ "$AL_SOURCES/tar"
+#if [ ! -f "$AL_ROOT/bin/tar" ]; then
+#    cd "$AL_SOURCES/tar"
+#    ./configure \
+#        --prefix="$AL_ROOT"
+#    make $MAKEFLAGS install
+#    cd $AL
+#fi
 
 ## Install GNU make
 #fetch make-4.1.tar.gz http://ftp.gnu.org/gnu/make/ "$AL_SOURCES/make"
diff --git a/patches/sbase.diff b/patches/sbase.diff
new file mode 100644 (file)
index 0000000..aa77020
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/tar.c b/tar.c
+index 10b2e30..8fd89a0 100644
+--- a/tar.c
++++ b/tar.c
+@@ -568,7 +568,7 @@ main(int argc, char *argv[])
+       case 't':
+       case 'x':
+               tarfd = 0;
+-              if (file) {
++              if (file && 0 != strcmp("-",file)) {
+                       tarfd = open(file, O_RDONLY);
+                       if (tarfd < 0)
+                               eprintf("open %s:", file);
+diff --git a/touch.c b/touch.c
+index b957fa5..4217dfb 100644
+--- a/touch.c
++++ b/touch.c
+@@ -146,6 +146,8 @@ main(int argc, char *argv[])
+       case 'T':
+               times[0].tv_sec = estrtonum(EARGF(usage()), 0, LLONG_MAX);
+               break;
++      case 'f':
++          break;
+       default:
+               usage();
+       } ARGEND