| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | |
|---|
| 5 | name bzip2 |
|---|
| 6 | version 1.0.5 |
|---|
| 7 | revision 2 |
|---|
| 8 | platforms darwin freebsd linux sunos |
|---|
| 9 | categories archivers sysutils |
|---|
| 10 | maintainers ryandesign openmaintainer |
|---|
| 11 | use_configure no |
|---|
| 12 | use_parallel_build yes |
|---|
| 13 | homepage http://www.bzip.org/ |
|---|
| 14 | master_sites ${homepage}${version} |
|---|
| 15 | |
|---|
| 16 | description \ |
|---|
| 17 | compression library and tools |
|---|
| 18 | |
|---|
| 19 | long_description \ |
|---|
| 20 | ${name} is a freely available, patent free, high-quality data \ |
|---|
| 21 | compressor. |
|---|
| 22 | |
|---|
| 23 | checksums \ |
|---|
| 24 | md5 3c15a0c8d1d3ee1c46a1634d00617b1a \ |
|---|
| 25 | sha1 8b02713ea0c8eb501cc8bdac4432d7f29700f767 \ |
|---|
| 26 | rmd160 2b31a22138e3914d82a656fee28e2bf029cbc3d4 |
|---|
| 27 | |
|---|
| 28 | patchfiles \ |
|---|
| 29 | patch-Makefile-man.diff \ |
|---|
| 30 | patch-Makefile-links.diff |
|---|
| 31 | |
|---|
| 32 | platform darwin { |
|---|
| 33 | patchfiles-append patch-Makefile-dylib.diff |
|---|
| 34 | |
|---|
| 35 | post-patch { |
|---|
| 36 | reinplace "s|__MacPorts_Version__|${version}|g" \ |
|---|
| 37 | ${worksrcpath}/Makefile |
|---|
| 38 | reinplace "s|__MacPorts_Compatibility_Version__|[join [lrange [split ${version} .] 0 1] .]|g" \ |
|---|
| 39 | ${worksrcpath}/Makefile |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | post-destroot { |
|---|
| 43 | ln -s libbz2.${version}.dylib ${destroot}${prefix}/lib/libbz2.[join [lrange [split ${version} .] 0 1] .].dylib |
|---|
| 44 | ln -s libbz2.${version}.dylib ${destroot}${prefix}/lib/libbz2.[join [lrange [split ${version} .] 0 0] .].dylib |
|---|
| 45 | ln -s libbz2.${version}.dylib ${destroot}${prefix}/lib/libbz2.dylib |
|---|
| 46 | } |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | platform freebsd { |
|---|
| 50 | patchfiles-append patch-Makefile-so.diff |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | platform linux { |
|---|
| 54 | patchfiles-append patch-Makefile-so.diff |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | platform sunos { |
|---|
| 58 | patchfiles-append patch-Makefile-so.diff |
|---|
| 59 | } |
|---|
| 60 | |
|---|
| 61 | platform darwin 7 { |
|---|
| 62 | build.env DYLD_LIBRARY_PATH="${worksrcpath}" |
|---|
| 63 | } |
|---|
| 64 | |
|---|
| 65 | post-configure { |
|---|
| 66 | reinplace "s|^CC=gcc|CC=${configure.cc}|" ${worksrcpath}/Makefile |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | build.args PREFIX="${prefix}" |
|---|
| 70 | destroot.destdir PREFIX="${destroot}${prefix}" |
|---|
| 71 | |
|---|
| 72 | variant universal { |
|---|
| 73 | post-configure { |
|---|
| 74 | reinplace "s|^CC=\\(.*\\)|CC=\\1 ${configure.universal_cflags}|" ${worksrcpath}/Makefile |
|---|
| 75 | } |
|---|
| 76 | } |
|---|