summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/svgalib')
-rw-r--r--media-libs/svgalib/ChangeLog8
-rw-r--r--media-libs/svgalib/Manifest10
-rw-r--r--media-libs/svgalib/files/digest-svgalib-1.9.243
-rw-r--r--media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch89
-rw-r--r--media-libs/svgalib/svgalib-1.9.24.ebuild152
5 files changed, 261 insertions, 1 deletions
diff --git a/media-libs/svgalib/ChangeLog b/media-libs/svgalib/ChangeLog
index ab0983ce4fa7..4d8eddb5efed 100644
--- a/media-libs/svgalib/ChangeLog
+++ b/media-libs/svgalib/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/svgalib
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.64 2006/01/04 01:49:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/ChangeLog,v 1.65 2006/02/07 03:01:43 vapier Exp $
+
+*svgalib-1.9.24 (07 Feb 2006)
+
+ 07 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/svgalib-1.9.24-linux2.6.patch, +svgalib-1.9.24.ebuild:
+ Version bump.
04 Jan 2006; Mike Frysinger <vapier@gentoo.org>
files/svgalib-1.9.21-linux2.6.patch:
diff --git a/media-libs/svgalib/Manifest b/media-libs/svgalib/Manifest
index d14246a0bfd7..ae8449ca8341 100644
--- a/media-libs/svgalib/Manifest
+++ b/media-libs/svgalib/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 2f2cf2d1cc5e8ce32037818f9653c8b1 ChangeLog 11657
RMD160 a574fe87c3f883ba713745467b7c20bc15f331cd ChangeLog 11657
SHA256 f11ba7bb26f31314977a5ec54077a1aea4adbe62eed8eed4eddd7af54e33467d ChangeLog 11657
@@ -73,3 +76,10 @@ SHA256 e033ee559947598e0b11002d48c03c9947d42392a083bb87d3dc56885f811229 svgalib-
MD5 c73881598199cd74ff8907fdaff562ec svgalib-1.9.24.ebuild 4510
RMD160 45270ecb88ee2e785f36cc2b39d5cb7c749a3a0c svgalib-1.9.24.ebuild 4510
SHA256 7b75efee74520484acf4657e389d32aeca8ccd6f6b94046317e4c7785983c694 svgalib-1.9.24.ebuild 4510
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFD6A2w2+ySkm8kpY0RAigIAJ9QwgIgVdNsLjp4azD8ghyIIpd+tgCfc9kh
+UPhgMIUQiosOmrWqV4u/2rM=
+=kzfw
+-----END PGP SIGNATURE-----
diff --git a/media-libs/svgalib/files/digest-svgalib-1.9.24 b/media-libs/svgalib/files/digest-svgalib-1.9.24
new file mode 100644
index 000000000000..88169866373e
--- /dev/null
+++ b/media-libs/svgalib/files/digest-svgalib-1.9.24
@@ -0,0 +1,3 @@
+MD5 3be376c08462caf88cfc150239481110 svgalib-1.9.24.tar.gz 986612
+RMD160 5ecab1a6945b8b3747850a0fa283fb2bf558e24d svgalib-1.9.24.tar.gz 986612
+SHA256 12f74fd44c13991ece0fb4bb0d4d95366ba1de2758c7eec10b59290bc6237ca1 svgalib-1.9.24.tar.gz 986612
diff --git a/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch
new file mode 100644
index 000000000000..a7e18d82580d
--- /dev/null
+++ b/media-libs/svgalib/files/svgalib-1.9.24-linux2.6.patch
@@ -0,0 +1,89 @@
+ - touch up the Makefile to let the ebuild handle the module details
+ - fix support with io remap stuff in newer kernels
+
+--- svgalib/kernel/svgalib_helper/Makefile.alt
++++ svgalib/kernel/svgalib_helper/Makefile.alt
+@@ -37,7 +37,7 @@
+ CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR)
+
+ ifeq (1,$(findstring 1,$(MODVER)))
+- CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h
++ CFLAGS += -DMODVERSIONS -DCONFIG_MODVERSIONS=1
+ endif
+
+ TARGET = svgalib_helper
+@@ -50,7 +50,8 @@
+ endif
+ endif
+
+-all: .depend $(OBJS)
++modules: $(OBJS)
++all: .depend modules
+
+ $(TARGET).o: $(SRC:.c=.o)
+ $(LD) -r $^ -o $@
+@@ -61,8 +62,8 @@
+ install: device modules_install
+
+ modules_install: $(OBJS)
+- mkdir -p /lib/modules/$(VER)/kernel/misc
+- install -m 0644 -c $(OBJS) /lib/modules/$(VER)/kernel/misc
++ mkdir -p $(TOPDIR)/lib/modules/$(VER)/kernel/misc
++ install -m 0644 -c $(OBJS) $(TOPDIR)/lib/modules/$(VER)/kernel/misc
+
+ device:
+ rm -f /dev/svgalib_helper* /dev/svga_helper* /dev/svga /dev/svga?
+--- svgalib/kernel/svgalib_helper/kernel26compat.h
++++ svgalib/kernel/svgalib_helper/kernel26compat.h
+@@ -10,7 +10,7 @@
+ # define PCI_GET_CLASS pci_find_class
+ # define PCI_GET_DEVICE pci_find_device
+
+-# if defined (PG_chainlock)
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
+ # define my_io_remap_page_range(vma, start, ofs, len, prot) \
+ io_remap_page_range(vma,start,ofs,len,prot)
+ # else
+@@ -84,6 +84,21 @@
+ # define SLH_SYSFS_REGISTER \
+ svgalib_helper_class = class_create(THIS_MODULE, "svgalib_helper");
+
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++
++# define SLH_SYSFS_ADD_CONTROL \
++ class_device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ NULL, "svga");
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ class_device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ &sh_pci_devs[_minor]->dev->dev, _name);
++#else
++
++
+ # define SLH_SYSFS_ADD_CONTROL \
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -93,6 +108,8 @@
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
++#endif
++
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \
+ class_destroy(svgalib_helper_class);
+@@ -148,6 +148,11 @@
+ # define SLH_SYSFS_UNREGISTER
+ #endif
+
++/* gregkh was so kind as to remove a ton of PCI defines in linux-2.6.15 */
++#if !defined(PCI_VENDOR_ID_RENDITION)
++# define PCI_VENDOR_ID_RENDITION 0x1163
++#endif
++
+ #if (defined MINOR)
+ # define my_minor(x) MINOR(x)
+ #else
diff --git a/media-libs/svgalib/svgalib-1.9.24.ebuild b/media-libs/svgalib/svgalib-1.9.24.ebuild
new file mode 100644
index 000000000000..8bb8140c51bd
--- /dev/null
+++ b/media-libs/svgalib/svgalib-1.9.24.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.24.ebuild,v 1.1 2006/02/07 03:01:43 vapier Exp $
+
+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 no-helper"
+
+DEPEND=""
+
+MODULE_NAMES="svgalib_helper(misc:${S}/kernel/svgalib_helper)"
+BUILD_TARGETS="default"
+MODULESD_SVGALIB_HELPER_ADDITIONS="probeall /dev/svga svgalib_helper"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KDIR=${KV_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Misc makefile clean ups
+ epatch "${FILESDIR}"/${PN}-1.9.23-gentoo.patch
+
+ # Get it to work with kernel 2.6
+ epatch "${FILESDIR}"/${PN}-1.9.24-linux2.6.patch
+
+ # -fPIC does work for lrmi, see bug #51698
+ epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch
+
+ # Don't let the ebuild screw around with ld.so.conf #64829
+ epatch "${FILESDIR}"/${PN}-1.9.19-dont-touch-ld.conf.patch
+
+ use no-helper && sed -i '/^# NO_HELPER/s:# ::' Makefile.cfg
+
+ # Don't strip stuff, let portage do it
+ sed -i '/^INSTALL_PROGRAM/s: -s : :' Makefile.cfg
+}
+
+src_compile() {
+ export CC=$(tc-getCC)
+
+ # First build static
+ make OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
+ # Have to remove for shared to build ...
+ rm -f src/svgalib_helper.h
+ # Then build shared ...
+ make 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 ...
+ make OPTIMIZE="${CFLAGS}" LDFLAGS="-L../sharedlib" \
+ textutils lrmi utils \
+ || die "Failed to build libraries and utils!"
+ # Build the gl stuff tpp
+ make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
+ make 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
+ rm -f src/svgalib_helper.h
+ make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
+ || die "Failed to build libvga.so.${PV}!"
+ cp -pPR src/libvga.so.${PV} sharedlib/
+ # Build threeDKit ...
+ make OPTIMIZE="${CFLAGS}" LDFLAGS='-L../sharedlib' \
+ -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
+ # Build demo's ...
+ make OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS='-L../sharedlib' \
+ demoprogs || die "Failed to build demoprogs!"
+
+ ! use build && ! use no-helper && linux-mod_src_compile
+}
+
+src_install() {
+ local x=
+
+ dodir /etc/svgalib /usr/{include,lib,bin,share/man}
+
+ make \
+ TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
+ install || die "Failed to install svgalib!"
+ ! use build && ! use no-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
+
+ if best_version '>=sys-fs/udev-045' ; then
+ insinto /etc/udev/rules.d
+ newins "${FILESDIR}"/svgalib.udev.rules.d 30-svgalib.rules
+ elif best_version sys-fs/udev ; then
+ insinto /etc/udev/permissions.d
+ newins "${FILESDIR}"/svgalib.udev.perms.d 30-svgalib.permissions
+ elif best_version sys-fs/devfsd ; then
+ insinto /etc/devfs.d
+ newins "${FILESDIR}"/svgalib.devfs svgalib
+ fi
+
+ 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 no-helper && linux-mod_pkg_postinst
+ [[ ${ROOT} != "/" ]] && return 0
+
+ if [[ -e /dev/.devfsd ]] ; then
+ ebegin "Restarting devfsd to reread devfs rules"
+ killall -HUP devfsd
+ eend $?
+ elif [[ -e /dev/.udev ]] ; then
+ ebegin "Restarting udev to reread udev rules"
+ udevstart
+ eend $?
+ fi
+}