|
发表于 2010-12-1 20:11:14
|
显示全部楼层
Post by 沙漠之子;2121771
有什么办法同时替换libjpeg6和libjpeg8?
临时搞定(虽然不怎么优雅)
[PHP]pkgname=libjpeg-turbo-svn
pkgver=305
pkgrel=1
pkgdesc="A high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions"
arch=('i686')
url="http://libjpeg-turbo.virtualgl.org/"
license=('BSD' 'custom:wxWindows Library Licence')
groups=('lh')
depends=(glibc)
makedepends=('subversion' 'gcc' 'nasm')
provides=('libjpeg-turbo' 'libjpeg=8.0.2' 'libjpeg6=6b')
conflicts=('libjpeg' 'libjpeg-turbo' 'libjpeg6')
replaces=()
backup=()
options=()
install=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'
_svntrunk=https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo/trunk
_svnmod=libjpeg-turbo
build() {
cd "$srcdir"
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn --config-dir ../ up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_svnmod-build"
cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
cd "$srcdir/$_svnmod-build"
autoreconf -fiv
./configure --prefix=/usr
make || return 1
make DESTDIR="$pkgdir" install
./configure --prefix=/usr --with-jpeg8
make || return 1
make DESTDIR="$pkgdir" install
rm $pkgdir/usr/lib/libjpeg.{a,la,so}
rm $pkgdir/usr/lib/libturbojpeg.{a,la,so}
install -D $srcdir/$_svnmod-build/LICENSE.txt $pkgdir/usr/share/licenses/libjpeg-turbo/LICENSE
}
[/PHP] |
|