Update to 1.7.0.5 for Solaris 2.6

This commit is contained in:
Tom G. Christensen 2010-04-22 08:29:57 +00:00 committed by Tom G. Christensen
parent c6e6c27c5f
commit 2c7daf629a
3 changed files with 49 additions and 79 deletions

View File

@ -4,73 +4,76 @@
# It can be used nearly unmodified with many packages
#
# build.sh helper functions
. ${BUILDPKG_BASE}/scripts/build.sh.functions
. ${BUILDPKG_SCRIPTS}/build.sh.functions
#
###########################################################
# Check the following 4 variables before running the script
topdir=git
version=1.6.0.2
version=1.7.0.5
pkgver=1
source[0]=$topdir-$version.tar.bz2
source[1]=$topdir-manpages-$version.tar.bz2
# If there are no patches, simply comment this
patch[0]=git-1.6.0.2-symlinks.patch
patch[1]=git-1.5.5.1-socklen_t.patch
patch[2]=git-1.5.5.1-sunos56.patch
patch[0]=git-1.5.5.1-socklen_t.patch
patch[1]=git-1.7.0.5-symlinks.patch
# Source function library
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
# Global settings
# Helper to tweak makefile defines
set_define()
{
${__sed} -e "/Define $1/ s/.*/$1=$2/" Makefile > Makefile.1
mv Makefile.1 Makefile
}
export ICONVDIR=$prefix
export PERL_PATH=$prefix/bin/perl
export SHELL_PATH=$prefix/bin/bash
no_configure=1
make_check_target="test"
__configure="make"
configure_args=""
# HACK: -e must be last or echo will think it's an argument
__make="/usr/tgcware/bin/make -e"
make_build_target="V=1"
make_check_target="test"
reg prep
prep()
{
generic_prep
setdir source
perl -i -pe "s;ginstall;${__install};g" Makefile
perl -i -pe "s;gtar;${__tar};g" Makefile
for def in NO_CURL NO_EXPAT NO_TCLTK; do
set_define $def YesPlease
done
# Set default buildflags
sed -e "/^LDFLAGS/ s;.*;LDFLAGS = -L$prefix/lib -R$prefix/lib;" Makefile > Makefile.1
mv Makefile.1 Makefile
sed -e "/^CFLAGS/ s;\(.*\);\1 -I$prefix/include;" Makefile > Makefile.1
mv Makefile.1 Makefile
sed -e "/^prefix =/ s;.*;prefix = $prefix;" Makefile > Makefile.1
mv Makefile.1 Makefile
# sed -e '/Define V=/ s/.*/V=1/' Makefile > Makefile.1
# mv Makefile.1 Makefile
## sed -e '/Define NO_PERL_MAKEMAKER/ s/.*/NO_PERL_MAKEMAKER=Yes/' Makefile.1 > Makefile
## mv Makefile.1 Makefile
# Solaris 2.6
cat <<EOF> config.mak
NO_CURL=YesPlease
NO_EXPAT=YesPlease
NO_TCLTK=YesPlease
BASIC_CFLAGS += -I/usr/tgcware/include
BASIC_LDFLAGS += -L/usr/tgcware/lib -Wl,-R,/usr/tgcware/lib
NEEDS_LIBICONV = YesPlease
NO_UNSETENV = YesPlease
NO_SETENV = YesPlease
NO_C99_FORMAT = YesPlease
NO_STRTOUMAX = YesPlease
NO_D_TYPE_IN_DIRENT = YesPlease
NO_SOCKADDR_STORAGE = YesPlease
NO_STRCASESTR = YesPlease
NO_STRLCPY = YesPlease
NO_STRTOUMAX = YesPlease
NO_IPV6 = YesPlease
NO_SOCKLEN_T = YesPlease
NO_HSTRERROR = YesPlease
NO_PYTHON = YesPlease
EXTLIBS += -lresolv
TAR = /usr/tgcware/bin/tar
INSTALL = /usr/tgcware/bin/install
prefix=$prefix
EOF
}
reg build
build()
{
generic_build
# setdir source
# ${__make}
# cd perl
# perl Makefile.PL PREFIX="${stagedir}${prefix}" INSTALLDIRS="vendor"
}
reg check
@ -83,6 +86,19 @@ reg install
install()
{
generic_install DESTDIR
setdir ${stagedir}${prefix}/${_mandir}
${__tar} -xjf $(get_source_absfilename "${source[1]}")
doc COPYING Documentation/RelNotes-${version}.txt README
# fix git symlink
${__rm} -f ${stagedir}${prefix}/libexec/git-core/git
${__ln} -s ${prefix}/${_bindir}/git ${stagedir}${prefix}/libexec/git-core/git
# cleanup perl install
${__rm} -rf ${stagedir}${prefix}/${_libdir}/perl5/5.*
${__rm} -rf ${stagedir}${prefix}/${_libdir}/perl5/site_perl/*/*solaris
${__rm} -f ${stagedir}${prefix}/${_libdir}/perl5/site_perl/*/Error.pm
mkdir -p ${stagedir}${prefix}/${_mandir}
setdir ${stagedir}${prefix}/${_mandir}
${__tar} -xvjf ${srcfiles}/${source[1]}

View File

@ -1,24 +0,0 @@
--- git-1.5.5.1/Makefile.sunos56 2008-05-12 17:05:44.916828000 +0200
+++ git-1.5.5.1/Makefile 2008-05-12 17:06:54.787133000 +0200
@@ -573,6 +573,21 @@
NO_MEMMEM = YesPlease
NO_HSTRERROR = YesPlease
NO_MKDTEMP = YesPlease
+ ifeq ($(uname_R),5.6)
+ NEEDS_LIBICONV = YesPlease
+ NO_UNSETENV = YesPlease
+ NO_SETENV = YesPlease
+ NO_C99_FORMAT = YesPlease
+ NO_STRTOUMAX = YesPlease
+ NO_D_TYPE_IN_DIRENT = YesPlease
+ NO_SOCKADDR_STORAGE = YesPlease
+ NO_STRCASESTR = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_STRTOUMAX = YesPlease
+ NO_IPV6 = YesPlease
+ NO_SOCKLEN_T = YesPlease
+ EXTLIBS += -lresolv
+ endif
ifeq ($(uname_R),5.8)
NEEDS_LIBICONV = YesPlease
NO_UNSETENV = YesPlease

View File

@ -1,22 +0,0 @@
--- git-1.6.0.2/Makefile.orig 2008-10-04 20:39:42.864022000 +0200
+++ git-1.6.0.2/Makefile 2008-10-04 20:42:18.194159000 +0200
@@ -1125,7 +1125,6 @@
$(BUILT_INS): git$X
$(QUIET_BUILT_IN)$(RM) $@ && \
- ln git$X $@ 2>/dev/null || \
ln -s git$X $@ 2>/dev/null || \
cp git$X $@
@@ -1387,10 +1386,9 @@
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ $(RM) "$$execdir/git-add$X" && \
- ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
+ ln -s git-add$X "$$execdir/git-add$X" 2>/dev/null || \
cp git-add$X "$$execdir/git-add$X"; } && \
{ $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
- ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"