/[gentoo-x86]/media-libs/svgalib/svgalib-1.9.25-r4.ebuild
Gentoo

Contents of /media-libs/svgalib/svgalib-1.9.25-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jul 22 08:57:14 2012 UTC (7 years, 2 months ago) by jdhore
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
marked x86 per bug 427542

(Portage version: 2.2.0_alpha120/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.25-r4.ebuild,v 1.2 2012/06/30 11:14:14 pacho Exp $
4
5 EAPI="4"
6
7 inherit eutils flag-o-matic toolchain-funcs linux-mod
8
9 DESCRIPTION="A library for running svga graphics on the console"
10 HOMEPAGE="http://www.svgalib.org/"
11 SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="-* x86"
16 IUSE="build +kernel-helper"
17
18 DEPEND=""
19 RDEPEND=""
20
21 MODULE_NAMES="svgalib_helper(misc:${S}/kernel/svgalib_helper)"
22 BUILD_TARGETS="default"
23
24 pkg_setup() {
25 linux-mod_pkg_setup
26 BUILD_PARAMS="KDIR=${KV_OUT_DIR}"
27 }
28
29 src_prepare() {
30 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.patch
31 epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698
32 epatch "${FILESDIR}"/${PN}-1.9.25-build.patch
33 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch
34 epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305
35 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.36-r1.patch
36 epatch "${FILESDIR}"/${PN}-1.9.25-segfault.patch
37 epatch "${FILESDIR}"/${PN}-1.9.25-build2.patch
38 epatch "${FILESDIR}"/${PN}-1.9.25-qa.patch
39 epatch "${FILESDIR}"/${PN}-1.9.25-kernel3.4.patch
40 sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die
41 }
42
43 src_compile() {
44 use kernel-helper || export NO_HELPER=y
45
46 export CC=$(tc-getCC)
47
48 # First build static
49 emake OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
50 # Then build shared ...
51 emake OPTIMIZE="${CFLAGS}" shared || die "Failed to build shared libraries!"
52 # Missing in some cases ...
53 ln -s libvga.so.${PV} sharedlib/libvga.so
54 # Build lrmi and tools ...
55 emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
56 textutils lrmi utils \
57 || die "Failed to build libraries and utils!"
58 # Build the gl stuff tpp
59 emake OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
60 emake OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
61 || die "Failed to build libvgagl.so.${PV}!"
62 # Missing in some cases ...
63 ln -s libvgagl.so.${PV} sharedlib/libvgagl.so
64 emake OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
65 || die "Failed to build libvga.so.${PV}!"
66 cp -pPR src/libvga.so.${PV} sharedlib/
67 # Build threeDKit ...
68 emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
69 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
70 # Build demo's ...
71 emake OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS+=" -L../sharedlib" \
72 demoprogs || die "Failed to build demoprogs!"
73
74 ! use build && use kernel-helper && linux-mod_src_compile
75 }
76
77 src_install() {
78 local x=
79
80 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
81
82 emake \
83 TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
84 install || die "Failed to install svgalib!"
85 ! use build && use kernel-helper && linux-mod_src_install
86
87 insinto /usr/include
88 doins gl/vgagl.h
89 dolib.a staticlib/libvga.a || die "dolib.a libvga"
90 dolib.a gl/libvgagl.a || die "dolib.a libvgagl"
91 dolib.a threeDKit/lib3dkit.a
92 dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so"
93 local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg)
94 for x in lib3dkit libvga libvgagl ; do
95 dosym ${x}.so.${PV} /usr/lib/${x}.so
96 dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver}
97 done
98
99 insinto /usr/include
100 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
101 doins src/keyboard/vgakeyboard.h kernel/svgalib_helper/svgalib_helper.h
102
103 insinto /lib/udev/rules.d
104 newins "${FILESDIR}"/svgalib.udev.rules.d.2 30-svgalib.rules
105
106 exeinto /usr/lib/svgalib/demos
107 for x in "${S}"/demos/* ; do
108 [[ -x ${x} ]] && doexe ${x}
109 done
110
111 cd "${S}"/threeDKit
112 exeinto /usr/lib/svgalib/threeDKit
113 local THREED_PROGS="plane wrapdemo"
114 doexe ${THREED_PROGS}
115
116 cd "${S}"
117 dodoc 0-README
118 cd "${S}"/doc
119 dodoc CHANGES DESIGN TODO
120 docinto txt
121 dodoc Driver-programming-HOWTO add_driver svgalib.lsm \
122 README.{joystick,keymap,multi-monitor,patching,vesa}
123 # avoid installation of a broken symlink
124 newdoc ../lrmi-0.6m/README README.lrmi
125 }
126
127 pkg_postinst() {
128 ! use build && use kernel-helper && linux-mod_pkg_postinst
129 }

  ViewVC Help
Powered by ViewVC 1.1.20