A good bzip2 package which includes a shared library (needed for bzip2

support in PHP).
Needed at small patch to link the DSO since Solaris ld is too braindead
to understand -soname.
This commit is contained in:
Tom G. Christensen 2004-01-09 09:49:01 +00:00 committed by tgc
parent bd03d96c0d
commit daf949f6f4
3 changed files with 140 additions and 0 deletions

118
bzip2/build.sh Executable file
View File

@ -0,0 +1,118 @@
#!/bin/bash
#
# This is a generic build.sh script
# It can be used nearly unmodified with many packages
#
# The concept of "method" registering and the logic that implements it was shamelessly
# stolen from jhlj's Compile.sh script :)
#
# Check the following 4 variables before running the script
topdir=bzip2
version=1.0.2
pkgver=1
source[0]=$topdir-$version.tar.gz
# If there are no patches, simply comment this
patch[0]=bzip2-braindead-solaris-linker.patch
# Source function library
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
# Fill in pkginfo values if necessary
# using pkgname,name,pkgcat,pkgvendor & pkgdesc
name="bzip2"
pkgcat="application"
pkgvendor="http://sources.redhat.com/bzip2/"
pkgdesc="A freely available, high-quality data compressor"
# Define script functions and register them
METHODS=""
reg() {
METHODS="$METHODS $1"
}
reg prep
prep()
{
generic_prep
}
reg build
build()
{
setdir source
$MAKE_PROG -f Makefile-libbz2_so CFLAGS="-O2 -pipe -mcpu=ultrasparc -mtune=ultrasparc -D_FILE_OFFSET_BITS=64 -fpic -fPIC" all
$MAKE_PROG -f Makefile CFLAGS="-O2 -pipe -mcpu=ultrasparc -mtune=ultrasparc -D_FILE_OFFSET_BITS=64" all
}
reg install
install()
{
generic_install PREFIX
setdir source
$MKDIR -p $stagedir/share/doc/$topdir-$version
DOCS="LICENSE CHANGES README README.COMPILATION.PROBLEMS Y2K_INFO"
for i in $DOCS
do
$CP $i $stagedir/share/doc/$topdir-$version
done
$CP libbz2.so* $stagedir/lib
$RM $stagedir/lib/libbz2.a
setdir $stagedir/lib
ln -sf libbz2.so.1.0.2 libbz2.so.1.0
ln -sf libbz2.so.1.0 libbz2.so
}
reg pack
pack()
{
generic_pack shortroot
}
reg distclean
distclean()
{
clean distclean
}
###################################################
# No need to look below here
###################################################
reg all
all()
{
for METHOD in $METHODS
do
case $METHOD in
all*|*clean) ;;
*) $METHOD
;;
esac
done
}
reg
usage() {
echo Usage $0 "{"$(echo $METHODS | tr " " "|")"}"
exit 1
}
OK=0
for METHOD in $*
do
METHOD=" $METHOD *"
if [ "${METHODS%$METHOD}" == "$METHODS" ] ; then
usage
fi
OK=1
done
if [ $OK = 0 ] ; then
usage;
fi
for METHOD in $*
do
( $METHOD )
done

11
bzip2/meta/pkginfo.in Normal file
View File

@ -0,0 +1,11 @@
PKG="%%pkgname%%"
NAME="%%name%%"
ARCH="sparc"
VERSION="%%version%%"
CATEGORY="%%pkgcat%%"
VENDOR="%%pkgvendor%%"
EMAIL="Tom G. Christenen - tgc@statsbiblioteket.dk"
PSTAMP="%%pkgver%%"
BASEDIR="%%topinstalldir%%"
CLASSES="none"
DESC="%%pkgdesc%%"

View File

@ -0,0 +1,11 @@
--- bzip2-1.0.2/Makefile-libbz2_so.orig 2004-01-09 10:17:44.310014000 +0100
+++ bzip2-1.0.2/Makefile-libbz2_so 2004-01-09 10:17:57.600005000 +0100
@@ -20,7 +20,7 @@
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.2 $(OBJS)
+ $(CC) -shared -Wl,-h -Wl,libbz2.so.1.0 -o libbz2.so.1.0.2 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.2
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.2 libbz2.so.1.0