diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-08-06 20:24:00 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-08-06 20:24:00 +0000 |
commit | 2820d12b80418d80c713a06ee080b0b93bb53a65 (patch) | |
tree | cc2c3f5f43ba1c8a90468d44968a77f58c9a2993 | |
parent | Get modversions.h include right if we have CONFIG_MODVERSIONS set. (diff) | |
download | historical-2820d12b80418d80c713a06ee080b0b93bb53a65.tar.gz historical-2820d12b80418d80c713a06ee080b0b93bb53a65.tar.bz2 historical-2820d12b80418d80c713a06ee080b0b93bb53a65.zip |
Get modversions.h include right if we have CONFIG_MODVERSIONS set.
Should really fix bugs #21340 and #25968.
-rw-r--r-- | media-libs/svgalib/Manifest | 6 | ||||
-rw-r--r-- | media-libs/svgalib/files/digest-svgalib-1.9.17-r3 | 1 | ||||
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.17-modversions_h.patch | 84 | ||||
-rw-r--r-- | media-libs/svgalib/svgalib-1.9.17-r3.ebuild | 111 |
4 files changed, 199 insertions, 3 deletions
diff --git a/media-libs/svgalib/Manifest b/media-libs/svgalib/Manifest index 4c2539960a41..72617101d9be 100644 --- a/media-libs/svgalib/Manifest +++ b/media-libs/svgalib/Manifest @@ -1,10 +1,10 @@ -MD5 e21c783dcb613243234462183d70dc53 ChangeLog 2737 -MD5 f883ffe34d1fb7513117fa3807593af5 svgalib-1.9.17-r3.ebuild 2821 +MD5 30cd5b59cf686f1acf1bcd62987c7572 ChangeLog 3007 +MD5 c360c51a05fa4199a5ee014976eb1b6b svgalib-1.9.17-r3.ebuild 2821 MD5 36f034f0cd418b0a084cef2e4804fdfd svgalib-1.4.3-r4.ebuild 2344 MD5 44300c1c75e22669d7ea5028d4a73edb svgalib-1.9.17-r2.ebuild 2705 MD5 e4ead3e3192f5a945ff177331122d7ae files/digest-svgalib-1.9.17-r3 66 MD5 c2977469108170b5851b7706829ad646 files/svgalib-1.9.17-gentoo.patch 11536 -MD5 deeaa437f4dab49bb463370f7924a4ec files/svgalib-1.9.17-modversions_h.patch 2786 +MD5 9e8f47b421194ae42b3ff7e3a8ba8aed files/svgalib-1.9.17-modversions_h.patch 2414 MD5 19b74fedfd6953bd3537a803abecc4d3 files/svgalib-1.4.3-gentoo.diff 10364 MD5 e4ead3e3192f5a945ff177331122d7ae files/digest-svgalib-1.9.17-r2 66 MD5 939b8bf99fcf4fccef7d92377df90dc2 files/digest-svgalib-1.4.3-r4 115 diff --git a/media-libs/svgalib/files/digest-svgalib-1.9.17-r3 b/media-libs/svgalib/files/digest-svgalib-1.9.17-r3 new file mode 100644 index 000000000000..c9f9b62846dc --- /dev/null +++ b/media-libs/svgalib/files/digest-svgalib-1.9.17-r3 @@ -0,0 +1 @@ +MD5 e1599bb3222899d39ce1a2af36670a98 svgalib-1.9.17.tar.gz 921750 diff --git a/media-libs/svgalib/files/svgalib-1.9.17-modversions_h.patch b/media-libs/svgalib/files/svgalib-1.9.17-modversions_h.patch new file mode 100644 index 000000000000..8c8a3584b77e --- /dev/null +++ b/media-libs/svgalib/files/svgalib-1.9.17-modversions_h.patch @@ -0,0 +1,84 @@ +--- svgalib-1.9.17/kernel/svgalib_helper/Makefile.orig 2003-08-06 22:05:18.173676000 +0200 ++++ svgalib-1.9.17/kernel/svgalib_helper/Makefile 2003-08-06 22:05:30.355824032 +0200 +@@ -1,14 +1,13 @@ + include ../../Makefile.cfg + + ifndef INCLUDEDIR +-INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include ++ INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include + endif + + MODVER = $(shell grep CONFIG_MODVERSIONS $(INCLUDEDIR)/linux/autoconf.h 2>/dev/null) + + ifeq ($(MODVER),) +- @echo INCLUDEDIR is not set up correctly +- exit 1 ++ $(error INCLUDEDIR is not set up correctly) + endif + + # Extract version number from headers. +@@ -16,11 +15,12 @@ + + # Use version of current running kernel + ifeq ($(VER),) +- VER = $(shell uname -r) ++ VER = $(shell uname -r) + endif + + VER_MAJOR = $(shell echo $(VER) | cut -d. -f1) + VER_MINOR = $(shell echo $(VER) | cut -d. -f2) ++#VER_MICRO = $(shell echo $(VER) | cut -d. -f3 | sed -e 's:[^0-9].*::') + + INCLUDES += -I$(INCLUDEDIR) + INCLUDES += -I$(INCLUDEDIR)/asm/mach-default +@@ -28,23 +28,36 @@ + #CFLAGS = -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS) + CFLAGS = -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE $(DEBFLAGS) -nostdinc -iwithprefix include + ifeq (2,$(VER_MAJOR)) +- ifeq (6,$(VER_MINOR)) +- CFLAGS += -DKBUILD_MODNAME="svgalib_helper" +- endif ++ ifeq (6,$(VER_MINOR)) ++ CFLAGS += -DKBUILD_MODNAME="svgalib_helper" ++ endif + endif + CFLAGS += $(INCLUDES) + CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR) + + ifeq (1,$(findstring 1,$(MODVER))) +- CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h ++ MODHEADER1 = $(shell ls -1 $(INCLUDEDIR)/linux/modversions.h 2>/dev/null) ++ MODHEADER2 = $(shell ls -1 $(INCLUDEDIR)/config/modversions.h 2>/dev/null) ++ ++ ifneq ($(MODHEADER1),) ++ MODHEADER = $(MODHEADER1) ++ else ++ ifneq ($(MODHEADER2),) ++ MODHEADER = $(MODHEADER2) ++ else ++ $(error Cannot find modversions.h!) ++ endif ++ endif ++ ++ CFLAGS += -DMODVERSIONS -include $(MODHEADER) + endif + + TARGET = svgalib_helper + OBJS = $(TARGET).o + ifeq (2,$(VER_MAJOR)) +- ifeq (6,$(VER_MINOR)) +- OBJS = $(TARGET).ko +- endif ++ ifeq (6,$(VER_MINOR)) ++ OBJS = $(TARGET).ko ++ endif + endif + SRC = main.c interrupt.c i810.c + +@@ -78,5 +91,5 @@ + + + ifeq (.depend,$(wildcard .depend)) +-include .depend ++ include .depend + endif diff --git a/media-libs/svgalib/svgalib-1.9.17-r3.ebuild b/media-libs/svgalib/svgalib-1.9.17-r3.ebuild new file mode 100644 index 000000000000..1d8bb31a230f --- /dev/null +++ b/media-libs/svgalib/svgalib-1.9.17-r3.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.17-r3.ebuild,v 1.1 2003/08/06 20:22:49 azarah Exp $ + +IUSE="" + +inherit eutils + +S="${WORKDIR}/${P}" +DESCRIPTION="A library for running svga graphics on the console" +SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz" +HOMEPAGE="http://www.svgalib.org/" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~x86 -ppc -sparc -alpha" + +DEPEND="virtual/glibc" + +pkg_setup() { + + check_KV +} + +src_unpack() { + + unpack ${A} + + cd ${S}; + epatch ${FILESDIR}/${P}-gentoo.patch + + # Get it to work with kernel 2.6 + epatch ${FILESDIR}/${P}-linux2.6.patch + + # Get modversions.h include right if we have CONFIG_MODVERSIONS set. + epatch ${FILESDIR}/${P}-modversions_h.patch +} + +src_compile() { + + make OPTIMIZE="${CFLAGS}" static shared 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}!" + rm -f src/svgalib_helper.h + make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} || \ + die "Failed to build libvga.so.${PV}!" + cp -a src/libvga.so.${PV} sharedlib/ + make OPTIMIZE="${CFLAFS}" LDFLAGS='-L ../sharedlib' \ + -C threeDKit lib3dkit.a || die "Failed to build threeDKit!" + + make INCLUDEDIR="/usr/src/linux/include" -C kernel/svgalib_helper \ + clean all || die "Failed to build kernel module!" + + make OPTIMIZE="${CFLAGS}" LDFLAGS='-L ../sharedlib' demoprogs || \ + die "Failed to build demoprogs!" + + cp Makefile Makefile.orig + sed -e 's/\(install: $(INSTALLAOUTLIB) \)installheaders \(.*\)/\1\2/g' \ + Makefile.orig > Makefile +} + +src_install() { + + local x= + + dodir /etc/svgalib /usr/{include,lib,bin,share/man} + + make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \ + INCLUDEDIR="/usr/src/linux/include" install || \ + die "Failed to install svgalib!" + + insinto /usr/include + doins gl/vgagl.h + dolib.a gl/libvgagl.a + dolib.a threeDKit/lib3dkit.a + dolib.so gl/libvgagl.so.${PV} + dosym libvgagl.so.${PV} /usr/lib/libvgagl.so + preplib + + insinto /usr/include + doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h + doins src/keyboard/vgakeyboard.h + + dodir /etc/modules.d + echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib + + exeinto /usr/lib/svgalib/demos + for x in ${S}/demos/* + do + [ -x "${x}" ] && doexe ${x} + done + + cd ${S}/threeDKit + exeinto /usr/lib/svgalib/theeDKit + local THREED_PROGS="plane wrapdemo" + doexe ${THREED_PROGS} + + cd ${S}/doc + dodoc CHANGES DESIGN TODO + docinto txt + dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm +} + +pkg_postinst() { + + [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null +} + |