create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
libversion = get.srcVERSION()
def build():
autotools.make('CC=%s AR=%s RANLIB=%s CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC"' % (get.CC(), get.AR(), get.RANLIB(), get.CFLAGS()))
autotools.make('CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC" -f Makefile-libbz2_so' % get.CFLAGS())
def check():
autotools.make("check")
def install():
autotools.rawInstall("PREFIX=%s/usr" % get.installDIR())
# No static libs
pisitools.removeDir("/usr/lib")
pisitools.domove("/usr/bin/", "/")
for link in ("/bin/bunzip2", "/bin/bzcat"):
pisitools.remove(link)
pisitools.dosym("/bin/bzip2", link)
pisitools.dolib("libbz2.so.%s" % libversion, "/lib")
pisitools.dosym("libbz2.so.1", "/lib/libbz2.so")
pisitools.dosym("libbz2.so.%s" % libversion, "/lib/libbz2.so.1")
pisitools.dohtml("manual.html")
pisitools.dodoc("README", "CHANGES", "bzip2.txt")
@@ -0,0 +1,175 @@
Ripped from Mandrake.
http://bugs.gentoo.org/show_bug.cgi?id=82192
--- bzip2-1.0.2.org/bzip2.1
+++ bzip2-1.0.2/bzip2.1
@@ -235,6 +235,10 @@
Suppress non-essential warning messages. Messages pertaining to
I/O errors and other critical events will not be suppressed.
.TP
+.B \-p --show-progress
+Show percentage of input-file done and while compressing show the percentage
+of the original file the new file is.
+.TP
.B \-v --verbose
Verbose mode -- show the compression ratio for each file processed.
Further \-v's increase the verbosity level, spewing out lots of
--- bzip2-1.0.2.org/bzip2.c
+++ bzip2-1.0.2/bzip2.c
@@ -145,6 +145,7 @@
#include <signal.h>
#include <math.h>
#include <errno.h>
+#include <time.h>
#include <ctype.h>
#include "bzlib.h"
@@ -301,6 +302,7 @@
Char progNameReally[FILE_NAME_LEN];
FILE *outputHandleJustInCase;
Int32 workFactor;
+Char showProgress;
static void panic ( Char* ) NORETURN;
static void ioError ( void ) NORETURN;
@@ -425,6 +427,12 @@
UInt32 nbytes_in_lo32, nbytes_in_hi32;
UInt32 nbytes_out_lo32, nbytes_out_hi32;
Int32 bzerr, bzerr_dummy, ret;
+ double fileSize = 0; /* initialized to make the compiler stop crying */
+ /* double because big files might otherwhise give
+ * overflows. not long long since not all compilers
+ * support that one
+ */
+ time_t startTime, currentTime;
SET_BINARY_MODE(stream);
SET_BINARY_MODE(zStream);
@@ -432,12 +440,21 @@
if (ferror(stream)) goto errhandler_io;
if (ferror(zStream)) goto errhandler_io;
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ (void)fseek(stream, 0, SEEK_END);
+ fileSize = (double)ftell(stream);
+ rewind(stream);
+ if (verbosity >= 1)
+ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
+ }
+
bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
blockSize100k, verbosity, workFactor );
if (bzerr != BZ_OK) goto errhandler;
if (verbosity >= 2) fprintf ( stderr, "\n" );
+ time(&startTime);
while (True) {
if (myfeof(stream)) break;
@@ -446,13 +463,32 @@
if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
if (bzerr != BZ_OK) goto errhandler;
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True)
+ {
+ time(&currentTime);
+
+ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
+ double curInPos = (double)ftell(stream);
+ double curOutPos = (double)ftell(zStream);
+
+ startTime = currentTime;
+
+ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
+ if (srcMode == SM_F2F)
+ {
+ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
+ }
+
+ fprintf(stderr, " \r");
+ }
+ }
}
BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
&nbytes_in_lo32, &nbytes_in_hi32,
&nbytes_out_lo32, &nbytes_out_hi32 );
if (bzerr != BZ_OK) goto errhandler;
-
+
if (ferror(zStream)) goto errhandler_io;
ret = fflush ( zStream );
if (ret == EOF) goto errhandler_io;
@@ -526,6 +562,8 @@
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
UChar* unusedTmp;
+ double fileSize = 0; /* initialized to make the compiler stop crying */
+ time_t startTime, currentTime;
nUnused = 0;
streamNo = 0;
@@ -533,9 +571,19 @@
SET_BINARY_MODE(stream);
SET_BINARY_MODE(zStream);
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ long dummy = ftell(zStream);
+ (void)fseek(zStream, 0, SEEK_END);
+ fileSize = (double)ftell(zStream);
+ (void)fseek(zStream, dummy, SEEK_SET);
+ if (verbosity >= 1)
+ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
+ }
+
if (ferror(stream)) goto errhandler_io;
if (ferror(zStream)) goto errhandler_io;
+ time(&startTime);
while (True) {
bzf = BZ2_bzReadOpen (
@@ -551,6 +599,17 @@
if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
fwrite ( obuf, sizeof(UChar), nread, stream );
if (ferror(stream)) goto errhandler_io;
+
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ time(&currentTime);
+ if ((currentTime - startTime) >= 2)
+ {
+ double curInPos = (double)ftell(zStream);
+ startTime = currentTime;
+
+ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
+ }
+ }
}
if (bzerr != BZ_STREAM_END) goto errhandler;
@@ -1872,6 +1931,7 @@
deleteOutputOnInterrupt = False;
exitValue = 0;
i = j = 0; /* avoid bogus warning from egcs-1.1.X */
+ showProgress = False;
/*-- Set up signal handlers for mem access errors --*/
signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
@@ -1949,6 +2009,7 @@
case 'k': keepInputFiles = True; break;
case 's': smallMode = True; break;
case 'q': noisy = False; break;
+ case 'p': showProgress = True; break;
case '1': blockSize100k = 1; break;
case '2': blockSize100k = 2; break;
case '3': blockSize100k = 3; break;
@@ -1985,6 +2046,7 @@
if (ISFLAG("--keep")) keepInputFiles = True; else
if (ISFLAG("--small")) smallMode = True; else
if (ISFLAG("--quiet")) noisy = False; else
+ if (ISFLAG("--show-progress")) showProgress = True; else
if (ISFLAG("--version")) license(); else
if (ISFLAG("--license")) license(); else
if (ISFLAG("--exponential")) workFactor = 1; else
@@ -0,0 +1,15 @@
--- bzip2-1.0.4/bzip2recover.c.pom 2007-01-03 03:00:55.000000000 +0100
+++ bzip2-1.0.4/bzip2recover.c 2007-02-05 11:55:17.000000000 +0100
@@ -309,7 +309,8 @@
UInt32 buffHi, buffLo, blockCRC;
Char* p;
- strcpy ( progName, argv[0] );
+ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
+ progName[BZ_MAX_FILENAME]='\0';
inFileName[0] = outFileName[0] = 0;
fprintf ( stderr,
@@ -0,0 +1,12 @@
http://bugs.gentoo.org/172986
--- bzip2-1.0.4/Makefile
+++ bzip2-1.0.4/Makefile
@@ -85,4 +85,7 @@
cp -f bzip2.1 $(PREFIX)/share/man/man1
chmod a+r $(PREFIX)/share/man/man1/bzip2.1
+ ln -s bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1
+ ln -s bzip2.1 $(PREFIX)/share/man/man1/bzcat.1
+ ln -s bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1
cp -f bzlib.h $(PREFIX)/include
chmod a+r $(PREFIX)/include/bzlib.h
@@ -0,0 +1,13 @@
--- Makefile-libbz2_so
+++ Makefile-libbz2_so
@@ -35,8 +35,8 @@
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
+ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.6 libbz2.so.1.0
+51
View File
@@ -0,0 +1,51 @@
diff -Nur bzip2-1.0.6-old/Makefile bzip2-1.0.6/Makefile
--- bzip2-1.0.6-old/Makefile 2010-09-21 17:33:05.076775293 +0300
+++ bzip2-1.0.6/Makefile 2010-09-21 17:33:16.083652510 +0300
@@ -72,8 +72,8 @@
install: bzip2 bzip2recover
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(PREFIX)/share/man ) ; then mkdir -p $(PREFIX)/share/man ; fi
+ if ( test ! -d $(PREFIX)/share/man/man1 ) ; then mkdir -p $(PREFIX)/share/man/man1 ; fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
cp -f bzip2 $(PREFIX)/bin/bunzip2
@@ -83,11 +83,11 @@
chmod a+x $(PREFIX)/bin/bunzip2
chmod a+x $(PREFIX)/bin/bzcat
chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
+ cp -f bzip2.1 $(PREFIX)/share/man/man1
ln -s bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1
ln -s bzip2.1 $(PREFIX)/share/man/man1/bzcat.1
ln -s bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
+ chmod a+r $(PREFIX)/share/man/man1/bzip2.1
cp -f bzlib.h $(PREFIX)/include
chmod a+r $(PREFIX)/include/bzlib.h
cp -f libbz2.a $(PREFIX)/lib
@@ -102,14 +102,14 @@
cp -f bzdiff $(PREFIX)/bin/bzdiff
ln -s bzdiff $(PREFIX)/bin/bzcmp
chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/share/man/man1
+ chmod a+r $(PREFIX)/share/man/man1/bzgrep.1
+ chmod a+r $(PREFIX)/share/man/man1/bzmore.1
+ chmod a+r $(PREFIX)/share/man/man1/bzdiff.1
+ echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzegrep.1
+ echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzfgrep.1
+ echo ".so man1/bzmore.1" > $(PREFIX)/share/man/man1/bzless.1
+ echo ".so man1/bzdiff.1" > $(PREFIX)/share/man/man1/bzcmp.1
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>bzip2</Name>
<Homepage>http://www.bzip.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>BZIP2</License>
<IsA>app:console</IsA>
<Summary>A high-quality data compressor</Summary>
<Description>bzip2 is high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.</Description>
<Archive sha1sum="3f89f861209ce81a6bab1fd1998c0ef311712002" type="targz">http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz</Archive>
<Patches>
<Patch level="1">bzip2-1.0.2-progress.patch</Patch>
<Patch level="1">bzip2-1.0.4-bzip2recover.patch</Patch>
<Patch level="1">bzip2-1.0.4-man-links.patch</Patch>
<Patch>bzip2-1.0.6-saneso.patch</Patch>
<Patch level="1">manpath.patch</Patch>
</Patches>
</Source>
<Package>
<Name>bzip2</Name>
<Files>
<Path fileType="executable">/bin</Path>
<Path fileType="library">/lib</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="header">/usr/include</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-09-30</Date>
<Version>1.0.6</Version>
<Comment>Rebuild,cleanup, enable tests.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-05-11</Date>
<Version>1.0.6</Version>
<Comment>Release bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-08-28</Date>
<Version>1.0.6</Version>
<Comment>Release bump,clean bzip2.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2010-10-11</Date>
<Version>1.0.6</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>bzip2</Name>
<Summary xml:lang="tr">Yüksek kaliteli bir veri sıkıştırma uygulaması</Summary>
<Description xml:lang="tr">bzip2 yüksek kaliteli bir veri sıkıştırma programıdır. Program genellikle dosyaları mümkün olan en iyi teknikler ile (PPM istatistiksel sıkıştırıcı ailesi) %10 - %15'e kadar sıkışıtırabilmektedir. Sıkıştırma işleminde iki kata kadar hızlı iken açma hızında yaklaşık altı kat daha hızlıdır.</Description>
<Description xml:lang="fr">bzip2 est un compresseur de données de très grand qualité. Il compresse typiquement les fichiers à un ratio entre 10 et 15% des meilleurs techniques disponibles (la famille des compresseurs statistiques de famille PPM) tout en étant environ deux fois plus rapide à la compression et six fois plus rapide à la décompression.</Description>
<Description xml:lang="de">bzip2 ist ein hochwertiger Daten-Kompressor. Es komprimiert Dateien üblicherweise auf 10% bis 15% der bestmöglichen Techniken (die PPM Familie der statistischen Kompressoren), während es ungefähr doppelt so schnell komprimiert und sechsfach schneller extrahiert</Description>
</Source>
</PISI>