summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bzip2
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-extended/bzip2
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-extended/bzip2')
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am71
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac14
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest2
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb54
4 files changed, 141 insertions, 0 deletions
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
new file mode 100644
index 0000000000..1d163b6c98
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -0,0 +1,71 @@
1
2lib_LTLIBRARIES = libbz2.la
3
4libbz2_la_SOURCES = blocksort.c \
5 huffman.c \
6 crctable.c \
7 randtable.c \
8 compress.c \
9 decompress.c \
10 bzlib.c
11
12bin_PROGRAMS = bzip2 bzip2recover
13
14bzip2_SOURCES = bzip2.c
15bzip2_LDADD = libbz2.la
16bzip2_DEPENDENCIES = libbz2.la
17
18include_HEADERS = bzlib.h
19
20bzip2recover_SOURCES = bzip2recover.c
21bzip2recover_LDADD = libbz2.la
22bzip2recover_DEPENDENCIES = libbz2.la
23
24bin_SCRIPTS = bzgrep bzmore bzdiff
25
26man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
27EXTRA_DIST = $(man_MANS)
28
29runtest:
30 ./bzip2 -1 < sample1.ref > sample1.rb2
31 ./bzip2 -2 < sample2.ref > sample2.rb2
32 ./bzip2 -3 < sample3.ref > sample3.rb2
33 ./bzip2 -d < sample1.bz2 > sample1.tst
34 ./bzip2 -d < sample2.bz2 > sample2.tst
35 ./bzip2 -ds < sample3.bz2 > sample3.tst
36 @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
37 else echo "FAIL: sample1 compress"; fi
38 @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
39 else echo "FAIL: sample2 compress"; fi
40 @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
41 else echo "FAIL: sample3 compress"; fi
42 @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
43 else echo "FAIL: sample1 decompress"; fi
44 @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
45 else echo "FAIL: sample2 decompress"; fi
46 @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
47 else echo "FAIL: sample3 decompress"; fi
48
49install-ptest:
50 cp $(srcdir)/Makefile $(DESTDIR)/
51 cp $(srcdir)/sample1.ref $(DESTDIR)/
52 cp $(srcdir)/sample2.ref $(DESTDIR)/
53 cp $(srcdir)/sample3.ref $(DESTDIR)/
54 cp $(srcdir)/sample1.bz2 $(DESTDIR)/
55 cp $(srcdir)/sample2.bz2 $(DESTDIR)/
56 cp $(srcdir)/sample3.bz2 $(DESTDIR)/
57 ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2
58
59install-exec-hook:
60 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
61 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
62 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
63 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
64 ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
65 ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
66
67install-data-hook:
68 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
69 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
70 echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
71 echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
new file mode 100644
index 0000000000..47ee576a8e
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -0,0 +1,14 @@
1AC_PREREQ([2.57])
2
3AC_INIT(bzip2, 2.0.5, , libXrender)
4AM_INIT_AUTOMAKE(foreign)
5AM_MAINTAINER_MODE
6
7#AM_CONFIG_HEADER(config.h)
8
9# Check for progs
10AC_PROG_CC
11AC_PROG_LIBTOOL
12
13AC_OUTPUT([Makefile])
14
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
new file mode 100644
index 0000000000..3b20fce1ee
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k runtest
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
new file mode 100644
index 0000000000..9dd9e6a1f9
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -0,0 +1,54 @@
1SUMMARY = "Very high-quality data compression program"
2DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
3Huffman coding. Compression is generally considerably better than that achieved by more conventional \
4LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
5HOMEPAGE = "http://www.bzip.org/"
6SECTION = "console/utils"
7LICENSE = "bzip2"
8LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
9PR = "r5"
10
11SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
12 file://configure.ac \
13 file://run-ptest \
14 file://Makefile.am"
15
16SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
17SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
18
19PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev"
20
21CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
22
23inherit autotools update-alternatives ptest
24
25ALTERNATIVE_PRIORITY = "100"
26ALTERNATIVE_${PN} = "bunzip2 bzcat"
27
28#install binaries to bzip2-native under sysroot for replacement-native
29EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
30do_extraunpack () {
31 cp ${WORKDIR}/configure.ac ${S}/
32 cp ${WORKDIR}/Makefile.am ${S}/
33}
34
35addtask extraunpack after do_unpack before do_patch
36
37do_install_ptest () {
38 cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
39 sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
40}
41
42FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
43
44FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}"
45SECTION_libbz2-dev = "devel"
46RDEPENDS_libbz2-dev = "libbz2 (= ${EXTENDPKGV})"
47
48FILES_libbz2-staticdev = "${libdir}/*.a"
49SECTION_libbz2-staticdev = "devel"
50RDEPENDS_libbz2-staticdev = "libbz2-dev (= ${EXTENDPKGV})"
51
52PROVIDES_append_class-native = " bzip2-replacement-native"
53BBCLASSEXTEND = "native nativesdk"
54