Errors with last merge (manual patching)

Misc fixes from Dan McGee <dpmcgee@gmail.com>
This commit is contained in:
Aaron Griffin 2006-12-21 19:11:22 +00:00
parent 77b4d0d013
commit 7dacc70b77
2 changed files with 48 additions and 59 deletions

View File

@ -57,7 +57,7 @@ NOLIBTOOL=0
NOEMPTYDIRS=0 NOEMPTYDIRS=0
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5) INTEGRITY_CHECK=(md5)
+#-- Info and doc directories to be removed #-- Info and doc directories to be removed
DOC_DIRS=(usr/{,share/}{info,doc} opt/gnome/{,share/}{info,doc,gtk-doc}) DOC_DIRS=(usr/{,share/}{info,doc} opt/gnome/{,share/}{info,doc,gtk-doc})

View File

@ -1,24 +1,24 @@
#!/bin/bash #!/bin/bash
# #
# makepkg - make packages compatable for use with pacman # makepkg - make packages compatable for use with pacman
# #
# Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org> # Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
# Copyright (c) 2005 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
# Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org> # Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
# Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu> # Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
# Copyright (c) 2006 by Alex Smith <alex@alex-smith.me.uk> # Copyright (c) 2006 by Alex Smith <alex@alex-smith.me.uk>
# Copyright (c) 2006 by Andras Voroskoi <voroskoi@frugalware.org> # Copyright (c) 2006 by Andras Voroskoi <voroskoi@frugalware.org>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
@ -293,6 +293,7 @@ usage() {
ARGLIST=$@ ARGLIST=$@
#Source user-specific makepkg.conf overrides
if [ -f /etc/makepkg.conf ]; then if [ -f /etc/makepkg.conf ]; then
source /etc/makepkg.conf source /etc/makepkg.conf
else else
@ -328,13 +329,13 @@ while [ "$#" -ne "0" ]; do
--repackage) REPKG=1 ;; --repackage) REPKG=1 ;;
--log) LOGGING=1 ;; --log) LOGGING=1 ;;
--help) --help)
usage usage
exit 0 exit 0
;; ;;
--*) --*)
usage usage
exit 1 exit 1
;; ;;
-*) -*)
while getopts "bBcCdefghij:Lmop:rRsS-" opt; do while getopts "bBcCdefghij:Lmop:rRsS-" opt; do
case $opt in case $opt in
@ -347,9 +348,9 @@ while [ "$#" -ne "0" ]; do
f) FORCE=1 ;; f) FORCE=1 ;;
g) GENINTEG=1 ;; g) GENINTEG=1 ;;
h) h)
usage usage
exit 0 exit 0
;; ;;
i) INSTALL=1 ;; i) INSTALL=1 ;;
j) export MAKEFLAGS="-j$OPTARG" ;; j) export MAKEFLAGS="-j$OPTARG" ;;
L) LOGGING=1 ;; L) LOGGING=1 ;;
@ -361,19 +362,19 @@ while [ "$#" -ne "0" ]; do
s) DEP_BIN=1 ;; s) DEP_BIN=1 ;;
S) DEP_SUDO=1 ;; S) DEP_SUDO=1 ;;
-) -)
OPTIND=0 OPTIND=0
break break
;; ;;
*) *)
usage usage
exit 1 exit 1
;; ;;
esac esac
done done
;; ;;
*) *)
true true
;; ;;
esac esac
shift shift
done done
@ -384,16 +385,6 @@ if [ "$DEP_SUDO" = "1" -a ! "$(type -p sudo)" ]; then
exit 1 exit 1
fi fi
# TODO: is this necessary?
# convert a (possibly) relative path to absolute
cd $PKGDEST 2>/dev/null
if [ $? -ne 0 ]; then
error "Package destination directory does not exist or permission denied."
exit 1
fi
PKGDEST=$(pwd)
cd $OLDPWD
if [ "$CLEANCACHE" = "1" ]; then if [ "$CLEANCACHE" = "1" ]; then
#fix flyspray feature request #5223 #fix flyspray feature request #5223
if [ -n "$SRCDEST" ]; then if [ -n "$SRCDEST" ]; then
@ -450,7 +441,7 @@ if [ $(echo $pkgrel | grep '-') ]; then
error "pkgrel is not allowed to contain hyphens." error "pkgrel is not allowed to contain hyphens."
exit 1 exit 1
fi fi
if [ ! in_array $CARCH ${arch[@]}]; then if [ ! in_array $CARCH ${arch[@]} ]; then
error "$pkgname is not available for the '$CARCH' architecture." error "$pkgname is not available for the '$CARCH' architecture."
plain "Note that many packages may need a line added to their $BUILDSCRIPT" plain "Note that many packages may need a line added to their $BUILDSCRIPT"
plain "such as arch=('$CARCH')." plain "such as arch=('$CARCH')."
@ -503,7 +494,9 @@ msg "Making package: $pkgname $pkgver-$pkgrel ($(date))"
unset deplist makedeplist unset deplist makedeplist
# fix flyspray bug #5973 # fix flyspray bug #5973
if [ $(type -p pacman) -a "$NODEPS" = "0" -a "$GENINTEG" = "0" -a "$NOBUILD" = "0" ]; then if [ "$NODEPS" = "1" -o "$GENINTEG" = "1" -o "$NOBUILD" = "1" ]; then
warning "skipping dependecy checks"
elif [ $(type -p pacman) ]; then
msg "Checking Runtime Dependencies..." msg "Checking Runtime Dependencies..."
deplist=$(checkdeps ${depends[@]}) deplist=$(checkdeps ${depends[@]})
handledeps $deplist handledeps $deplist
@ -522,10 +515,6 @@ if [ $(type -p pacman) -a "$NODEPS" = "0" -a "$GENINTEG" = "0" -a "$NOBUILD" = "
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
exit 1 exit 1
fi fi
elif [ "$GENINTEG" = "1" -o "$NOBUILD" = "1" ]; then
msg "skipping dependency checks."
elif [ "$NODEPS" = "1" ]; then
warning "skipping dependency checks."
else else
warning "pacman was not found in PATH. skipping dependency checks." warning "pacman was not found in PATH. skipping dependency checks."
fi fi
@ -585,7 +574,7 @@ for netfile in ${source[@]}; do
fi fi
done done
if [ "$NOEXTRACT" = "1" -o "$REPKG" ]; then if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
warning "Skipping source integrity checks -- using existing src/ tree" warning "Skipping source integrity checks -- using existing src/ tree"
else else
for integ in ${INTEGRITY_CHECK[@]}; do for integ in ${INTEGRITY_CHECK[@]}; do
@ -704,14 +693,19 @@ else
fi fi
fi fi
done done
fi
if [ "$REPKG" = "0" ]; then
if [ "$EUID" = "0" ]; then if [ "$EUID" = "0" ]; then
# chown all source files to root.root # chown all source files to root.root
chown -R root.root $startdir/src chown -R root.root $startdir/src
fi fi
fi
if [ "$NOBUILD" = "1" ]; then
msg "Sources are ready."
exit 0
elif [ "$REPKG" = "1" ]; then
warning "Skipping build"
else
# check for existing pkg directory # check for existing pkg directory
if [ -d $startdir/pkg ]; then if [ -d $startdir/pkg ]; then
msg "Removing existing pkg/ directory..." msg "Removing existing pkg/ directory..."
@ -719,11 +713,6 @@ if [ "$REPKG" = "0" ]; then
fi fi
mkdir -p $startdir/pkg mkdir -p $startdir/pkg
if [ "$NOBUILD" = "1" ]; then
msg "Sources are ready."
exit 0
fi
# use distcc if requested # use distcc if requested
if [ "$USE_DISTCC" = "y" ]; then if [ "$USE_DISTCC" = "y" ]; then
[ -d /usr/lib/distcc/bin ] && export PATH=/usr/lib/distcc/bin:$PATH [ -d /usr/lib/distcc/bin ] && export PATH=/usr/lib/distcc/bin:$PATH
@ -794,23 +783,23 @@ fi
# compress man pages # compress man pages
msg "Compressing man pages..." msg "Compressing man pages..."
find $startdir/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ; do find $startdir/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ; do
ext="${i##*.}" ext="${i##*.}"
fn="${i##*/}" fn="${i##*/}"
if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then
# update symlinks to this manpage # update symlinks to this manpage
find $startdir/pkg/{usr{,/local},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do find $startdir/pkg/{usr{,/local},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do
rm -f "$ln" rm -f "$ln"
ln -sf "${fn}.gz" "${ln}.gz" ln -sf "${fn}.gz" "${ln}.gz"
done done
# compress the original # compress the original
gzip -9 "$i" gzip -9 "$i"
fi fi
done done
cd $startdir cd $startdir
# strip binaries # strip binaries
if [ ! "$(check_option NOSTRIP)" -a "$NOSTIP" = "0" ]; then if [ ! "$(check_option NOSTRIP)" -a "$NOSTRIP" = "0" ]; then
msg "Stripping debugging symbols from libraries..." msg "Stripping debugging symbols from libraries..."
find pkg/{,usr,usr/local,opt/*}/lib -type f -not -name "*.dll" -not -name "*.exe" \ find pkg/{,usr,usr/local,opt/*}/lib -type f -not -name "*.dll" -not -name "*.exe" \
-exec /usr/bin/strip --strip-debug '{}' \; 2>&1 \ -exec /usr/bin/strip --strip-debug '{}' \; 2>&1 \