diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-02-06 21:05:38 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-02-06 21:05:38 +0000 |
commit | ba6014de43c8785c1843123ce538ddd1528bf5c3 (patch) | |
tree | cd3cb59fd69590ce017ceb85a237da70caa3f0df /media-libs/svgalib | |
parent | 1.13 stable on x86 (diff) | |
download | gentoo-2-ba6014de43c8785c1843123ce538ddd1528bf5c3.tar.gz gentoo-2-ba6014de43c8785c1843123ce538ddd1528bf5c3.tar.bz2 gentoo-2-ba6014de43c8785c1843123ce538ddd1528bf5c3.zip |
Add gcc-4 patch by Peter Gordon #80668.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'media-libs/svgalib')
-rw-r--r-- | media-libs/svgalib/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.19-gcc4.patch | 25 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.19-r3.ebuild | 52 |
3 files changed, 56 insertions, 27 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog index 2944fdb4bdca..d36314123b8a 100644 --- a/media-libs/svgalib/ChangeLog +++ b/media-libs/svgalib/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/svgalib # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.54 2005/01/23 14:52:10 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.55 2005/02/06 21:05:38 vapier Exp $ + + 06 Feb 2005; Mike Frysinger <vapier@gentoo.org> + +files/svgalib-1.9.19-gcc4.patch, svgalib-1.9.19-r3.ebuild: + Add gcc-4 patch by Peter Gordon #80668. *svgalib-1.9.19-r3 (23 Jan 2005) diff --git a/media-libs/svgalib/files/svgalib-1.9.19-gcc4.patch b/media-libs/svgalib/files/svgalib-1.9.19-gcc4.patch new file mode 100644 index 000000000000..92330bbee2bf --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.19-gcc4.patch @@ -0,0 +1,25 @@ +Patch by Peter Gordon to fix building with gcc-4. + +http://bugs.gentoo.org/show_bug.cgi?id=80668 + +--- svgalib-1.9.19.orig/src/drivers/apm.c 2005-02-03 17:35:55.235794968 -0800 ++++ svgalib-1.9.19/src/drivers/apm.c 2005-02-03 17:37:49.670398264 -0800 +@@ -148,12 +148,12 @@ static int apm_saveregs(unsigned char re + regs[APMREG_SAVE(15)] = (k >> 8)&0xff; + regs[APMREG_SAVE(16)] = (k >> 16) & 0xff ; + regs[APMREG_SAVE(17)] = ( k >> 24 ) & 0xff ; +- (unsigned long)regs[APMREG_SAVE(18)] = inlXR(0xf0) ; +- (unsigned long)regs[APMREG_SAVE(22)] = inlXR(0xf4) ; +- (unsigned long)regs[APMREG_SAVE(26)] = inlXR(0x140) ; +- (unsigned short)regs[APMREG_SAVE(30)] = inlXR(0x144) ; +- (unsigned long)regs[APMREG_SAVE(32)] = inXR(0x148) ; +- (unsigned short)regs[APMREG_SAVE(36)] = inXR(0x14c) ; ++ regs[APMREG_SAVE(18)] = (unsigned long) inlXR(0xf0) ; ++ regs[APMREG_SAVE(22)] = (unsigned long) inlXR(0xf4) ; ++ regs[APMREG_SAVE(26)] = (unsigned long) inlXR(0x140) ; ++ regs[APMREG_SAVE(30)] = (unsigned short) inlXR(0x144) ; ++ regs[APMREG_SAVE(32)] = (unsigned long) inXR(0x148) ; ++ regs[APMREG_SAVE(36)] = (unsigned short) inXR(0x14c) ; + + return APM_TOTAL_REGS - VGA_TOTAL_REGS; + } diff --git a/media-libs/svgalib/svgalib-1.9.19-r3.ebuild b/media-libs/svgalib/svgalib-1.9.19-r3.ebuild index 22328bead138..1f56dc645137 100644 --- a/media-libs/svgalib/svgalib-1.9.19-r3.ebuild +++ b/media-libs/svgalib/svgalib-1.9.19-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.19-r3.ebuild,v 1.1 2005/01/23 14:52:10 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.19-r3.ebuild,v 1.2 2005/02/06 21:05:38 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs kernel-mod @@ -10,7 +10,7 @@ SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" -KEYWORDS="-* ~x86" +KEYWORDS="-* x86" IUSE="build" DEPEND="virtual/libc" @@ -47,6 +47,9 @@ src_unpack() { # devfs_mk_symlink no longer available #77186 epatch ${FILESDIR}/${P}-devfs.patch + # Fix building with gcc-4 + epatch ${FILESDIR}/${P}-gcc4.patch + # Link like the other packages sed -i 's:$(FLAGS):$(CFLAGS) $(LDFLAGS):' demos/Makefile || die } @@ -84,9 +87,8 @@ src_compile() { make OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS='-L../sharedlib' \ demoprogs || die "Failed to build demoprogs!" - if ! use build && kernel-mod_modules_supported - then - cd ${S}/kernel/svgalib_helper + if ! use build && kernel-mod_modules_supported ; then + cd "${S}"/kernel/svgalib_helper if [[ `KV_to_int ${KV}` -lt `KV_to_int 2.6.6` ]] ; then env -u ARCH \ make -f Makefile.alt INCLUDEDIR="${ROOT}/usr/src/linux/include" \ @@ -94,7 +96,7 @@ src_compile() { else env -u ARCH make || die "Failed to build kernel module!" fi - cd ${S} + cd "${S}" fi cp Makefile Makefile.orig @@ -108,21 +110,20 @@ src_install() { dodir /etc/svgalib /usr/{include,lib,bin,share/man} make \ - TOPDIR=${D} OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \ + TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \ install || die "Failed to install svgalib!" - if ! use build && kernel-mod_modules_supported - then - cd ${S}/kernel/svgalib_helper + if ! use build && kernel-mod_modules_supported ; then + cd "${S}"/kernel/svgalib_helper if [[ `KV_to_int ${KV}` -lt `KV_to_int 2.6.6` ]] ; then env -u ARCH \ - make -f Makefile.alt TOPDIR=${D} \ + make -f Makefile.alt TOPDIR="${D}" \ INCLUDEDIR="${ROOT}/usr/src/linux/include" \ modules_install || die "Failed to install svgalib module!" else insinto /lib/modules/${KV}/kernel/misc doins svgalib_helper.ko fi - cd ${S} + cd "${S}" fi insinto /usr/include @@ -141,48 +142,47 @@ src_install() { dodir /etc/modules.d echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib - if [ -e ${ROOT}/dev/.devfsd ] ; then + if [[ -e ${ROOT}/dev/.devfsd ]] ; then insinto /etc/devfs.d newins ${FILESDIR}/svgalib.devfs svgalib - elif [ -e ${ROOT}/dev/.udev ] ; then + elif [[ -e ${ROOT}/dev/.udev ]] ; then dodir /etc/udev/permissions.d echo "svga*:root:video:0660" > \ - ${D}/etc/udev/permissions.d/30-${PN}.permissions + "${D}"/etc/udev/permissions.d/30-${PN}.permissions fi exeinto /usr/lib/svgalib/demos - for x in ${S}/demos/* - do - [ -x "${x}" ] && doexe ${x} + for x in "${S}"/demos/* ; do + [[ -x ${x} ]] && doexe ${x} done - cd ${S}/threeDKit + cd "${S}"/threeDKit exeinto /usr/lib/svgalib/threeDKit local THREED_PROGS="plane wrapdemo" doexe ${THREED_PROGS} - cd ${S} + cd "${S}" dodoc 0-README - cd ${S}/doc + cd "${S}"/doc dodoc CHANGES DESIGN TODO docinto txt dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm - mv ${D}/usr/man/* ${D}/usr/share/man - rmdir ${D}/usr/man + mv "${D}"/usr/man/* "${D}"/usr/share/man + rmdir "${D}"/usr/man } pkg_postinst() { - if [ -e ${ROOT}/dev/.devfsd ]; then + if [[ -e ${ROOT}/dev/.devfsd ]] ; then ebegin "Restarting devfsd to reread devfs rules" killall -HUP devfsd eend $? - elif [ -e ${ROOT}/dev/.udev ]; then + elif [[ -e ${ROOT}/dev/.udev ]] ; then ebegin "Restarting udev to reread udev rules" udevstart eend $? fi - [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null + [[ ${ROOT} == "/" ]] && /sbin/modules-update &> /dev/null einfo "When upgrading your kernel you'll need to rebuild the kernel module." } |