diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-03-03 12:36:12 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-03-03 12:36:12 +0000 |
commit | 3dba0aed77fd7a1c585a023c89cac145344e0950 (patch) | |
tree | 43070a02ca9f4af65e22cd481be4489bacf78230 /media-libs/svgalib | |
parent | Revert header placement (diff) | |
download | historical-3dba0aed77fd7a1c585a023c89cac145344e0950.tar.gz historical-3dba0aed77fd7a1c585a023c89cac145344e0950.tar.bz2 historical-3dba0aed77fd7a1c585a023c89cac145344e0950.zip |
Respect LDFLAGS (bug #339873 by Andrew Savchenko), install svgalib_helper.h (bug #341393 by Andrew Savchenko), fix build with recent kernels (bug #344663 by Rene Hertell), fix segfault (bug #402831 by O.Sezer).
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'media-libs/svgalib')
-rw-r--r-- | media-libs/svgalib/ChangeLog | 14 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-build2.patch | 14 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch | 17 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch | 32 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-segfault.patch | 11 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.25-r2.ebuild | 124 |
6 files changed, 210 insertions, 2 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog index ba8d95c0fff9..714ef54bc5a0 100644 --- a/media-libs/svgalib/ChangeLog +++ b/media-libs/svgalib/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for media-libs/svgalib -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.91 2011/10/03 17:01:40 mr_bones_ Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.92 2012/03/03 12:36:11 pacho Exp $ + +*svgalib-1.9.25-r2 (03 Mar 2012) + + 03 Mar 2012; Pacho Ramos <pacho@gentoo.org> + +files/svgalib-1.9.25-build2.patch, +files/svgalib-1.9.25-build2.patch~, + +files/svgalib-1.9.25-fPIC.patch, +files/svgalib-1.9.25-linux2.6.36-r1.patch, + +files/svgalib-1.9.25-segfault.patch, +svgalib-1.9.25-r2.ebuild: + Respect LDFLAGS (bug #339873 by Andrew Savchenko), install svgalib_helper.h + (bug #341393 by Andrew Savchenko), fix build with recent kernels (bug #344663 + by Rene Hertell), fix segfault (bug #402831 by O.Sezer). 03 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> svgalib-1.9.25-r1.ebuild: diff --git a/media-libs/svgalib/files/svgalib-1.9.25-build2.patch b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch new file mode 100644 index 000000000000..a367363f044a --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.25-build2.patch @@ -0,0 +1,14 @@ +--- svgalib-1.9.21/Makefile.makefiles 2005-03-18 14:49:10.000000000 +0100 ++++ svgalib-1.9.21/Makefile 2005-07-08 21:16:12.000000000 +0200 +@@ -152,8 +126,10 @@ + @echo "savetextmode: Script that saves textmode information used by 'textmode'." + @$(INSTALL_SCRIPT) utils/savetextmode $(bindir) + ifeq ($(LRMI),lrmi) +- @echo "mode3: Restore textmode by setting VESA mode 3." ++ @echo "mode3: Restore textmode by setting VESA mode 3." + @$(INSTALL_PROGRAM) lrmi-0.6m/mode3 $(bindir) ++ @echo "vga_reset: Restore textmode by resetting graphic board." ++ @cp lrmi-0.6m/vga_reset $(bindir) + endif + @echo "Installing keymap utilities in $(bindir):" + @echo "svgakeymap: Perl script that generates scancode conversion maps." diff --git a/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch b/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch new file mode 100644 index 000000000000..ab0e1c9ef7b3 --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.25-fPIC.patch @@ -0,0 +1,17 @@ +#DPATCHLEVEL=1 +--- svgalib-1.4.3.orig/src/Makefile ++++ svgalib-1.4.3/src/Makefile +@@ -471,9 +471,11 @@ + vga.o: vga.c + $(CC) $(CFLAGS) $(VGA_DEFINES) -c -o $@ $< + +-#lrmi must NOT be compiled as -fPIC ++# XXX: Upstream used this so it may break, disabled to close an RC ++# lrmi must NOT be compiled as -fPIC + lrmi.o: lrmi.c +- $(CC) $(CFLAGS:-fPIC=) -c -o $@ $< ++ $(CC) $(CFLAGS) -c -o $@ $< ++# $(CC) $(CFLAGS:-fPIC=) -c -o $@ $< + + $(RAMDAC): %.o: %.c + $(CC) $(CFLAGS) $(RAMDAC_DEFINES) -c -o $@ $< diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch new file mode 100644 index 000000000000..ad8d94cb8702 --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.36-r1.patch @@ -0,0 +1,32 @@ +--- svgalib-1.9.25.orig/kernel/svgalib_helper/main.c ++++ svgalib-1.9.25/kernel/svgalib_helper/main.c +@@ -162,10 +162,16 @@ static void task_startad(void *data) { + get_user(pciv.address, &user_pciv->address); \ + get_user(pciv.val, &user_pciv->val); + #define PUT_PCIV \ +- put_user(pciv.val, &user_pciv->val); ++ put_user(pciv.val, &user_pciv->val); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) + static int svgalib_helper_ioctl( struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) { ++#else ++static int svgalib_helper_ioctl(struct file *filp, ++ unsigned int cmd, unsigned long arg) { ++ struct inode *inode=filp->f_dentry->d_inode; ++#endif + + io_t iov, *user_iov=(io_t *)arg; + pcic_t pciv, *user_pciv=(pcic_t *)arg; + int minor = my_minor(inode->i_rdev); +@@ -595,7 +601,11 @@ struct file_operations svgalib_helper_fo + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0) + .owner = THIS_MODULE, + #endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) + .ioctl = svgalib_helper_ioctl, ++#else ++ .unlocked_ioctl = svgalib_helper_ioctl, ++#endif + .mmap = svgalib_helper_mmap, + .open = svgalib_helper_open, + .release = svgalib_helper_release, diff --git a/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch new file mode 100644 index 000000000000..da7c1c21c646 --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.25-segfault.patch @@ -0,0 +1,11 @@ +--- svgalib-1.9.25/src/vgamodesel.c~ ++++ svgalib-1.9.25/src/vgamodesel.c +@@ -35,7 +35,7 @@ int __svgalib_name2number(char *m) + int vga_getmodenumber(char *m) + { + int i; +- char s[3]; ++ char s[8]; + + __svgalib_getchipset(); /* Do initialisation first */ + i = __svgalib_name2number(m); diff --git a/media-libs/svgalib/svgalib-1.9.25-r2.ebuild b/media-libs/svgalib/svgalib-1.9.25-r2.ebuild new file mode 100644 index 000000000000..53f2d7dcffa3 --- /dev/null +++ b/media-libs/svgalib/svgalib-1.9.25-r2.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.25-r2.ebuild,v 1.1 2012/03/03 12:36:12 pacho Exp $ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs linux-mod + +DESCRIPTION="A library for running svga graphics on the console" +HOMEPAGE="http://www.svgalib.org/" +SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="-* ~x86" +IUSE="build +kernel-helper" + +DEPEND="" +RDEPEND="" + +MODULE_NAMES="svgalib_helper(misc:${S}/kernel/svgalib_helper)" +BUILD_TARGETS="default" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KDIR=${KV_OUT_DIR}" +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.patch + epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698 + epatch "${FILESDIR}"/${PN}-1.9.25-build.patch + epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch + epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305 + epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.36-r1.patch + epatch "${FILESDIR}"/${PN}-1.9.25-segfault.patch + epatch "${FILESDIR}"/${PN}-1.9.25-build2.patch + sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die +} + +src_compile() { + use kernel-helper || export NO_HELPER=y + + export CC=$(tc-getCC) + + # First build static + emake OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!" + # Then build shared ... + emake OPTIMIZE="${CFLAGS}" shared || die "Failed to build shared libraries!" + # Missing in some cases ... + ln -s libvga.so.${PV} sharedlib/libvga.so + # Build lrmi and tools ... + emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \ + textutils lrmi utils \ + || die "Failed to build libraries and utils!" + # Build the gl stuff tpp + emake OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!" + emake OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \ + || die "Failed to build libvgagl.so.${PV}!" + # Missing in some cases ... + ln -s libvgagl.so.${PV} sharedlib/libvgagl.so + emake OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \ + || die "Failed to build libvga.so.${PV}!" + cp -pPR src/libvga.so.${PV} sharedlib/ + # Build threeDKit ... + emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \ + -C threeDKit lib3dkit.a || die "Failed to build threeDKit!" + # Build demo's ... + emake OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS+=" -L../sharedlib" \ + demoprogs || die "Failed to build demoprogs!" + + ! use build && use kernel-helper && linux-mod_src_compile +} + +src_install() { + local x= + + dodir /etc/svgalib /usr/{include,lib,bin,share/man} + + emake \ + TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \ + install || die "Failed to install svgalib!" + ! use build && use kernel-helper && linux-mod_src_install + + insinto /usr/include + doins gl/vgagl.h + dolib.a staticlib/libvga.a || die "dolib.a libvga" + dolib.a gl/libvgagl.a || die "dolib.a libvgagl" + dolib.a threeDKit/lib3dkit.a + dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so" + local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg) + for x in lib3dkit libvga libvgagl ; do + dosym ${x}.so.${PV} /usr/lib/${x}.so + dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver} + done + + insinto /usr/include + doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h + doins src/keyboard/vgakeyboard.h src/svgalib_helper.h + + insinto /etc/udev/rules.d + newins "${FILESDIR}"/svgalib.udev.rules.d.2 30-svgalib.rules + + exeinto /usr/lib/svgalib/demos + for x in "${S}"/demos/* ; do + [[ -x ${x} ]] && doexe ${x} + done + + cd "${S}"/threeDKit + exeinto /usr/lib/svgalib/threeDKit + local THREED_PROGS="plane wrapdemo" + doexe ${THREED_PROGS} + + cd "${S}" + dodoc 0-README + cd "${S}"/doc + dodoc CHANGES DESIGN TODO + docinto txt + dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm +} + +pkg_postinst() { + ! use build && use kernel-helper && linux-mod_pkg_postinst +} |