summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-10-16 11:38:05 +0000
committerMike Frysinger <vapier@gentoo.org>2005-10-16 11:38:05 +0000
commitbebc474a2bf26044a0adb6ff2135588b4882ec37 (patch)
tree1c6e3ac30cd7a4ff609cc9df69669bf6e84454ac /sys-apps/pciutils
parentfix grammar mistake (I think) (diff)
downloadgentoo-2-bebc474a2bf26044a0adb6ff2135588b4882ec37.tar.gz
gentoo-2-bebc474a2bf26044a0adb6ff2135588b4882ec37.tar.bz2
gentoo-2-bebc474a2bf26044a0adb6ff2135588b4882ec37.zip
Build and install a shared library instead of just forcing -fPIC on the static lib.
(Portage version: 2.0.53_rc5)
Diffstat (limited to 'sys-apps/pciutils')
-rw-r--r--sys-apps/pciutils/ChangeLog9
-rw-r--r--sys-apps/pciutils/files/digest-pciutils-2.2.0-r12
-rw-r--r--sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch27
-rw-r--r--sys-apps/pciutils/pciutils-2.2.0-r1.ebuild60
4 files changed, 97 insertions, 1 deletions
diff --git a/sys-apps/pciutils/ChangeLog b/sys-apps/pciutils/ChangeLog
index 98f362f95109..08dded6aef3b 100644
--- a/sys-apps/pciutils/ChangeLog
+++ b/sys-apps/pciutils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/pciutils
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/ChangeLog,v 1.60 2005/10/16 03:17:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/ChangeLog,v 1.61 2005/10/16 11:38:05 vapier Exp $
+
+*pciutils-2.2.0-r1 (16 Oct 2005)
+
+ 16 Oct 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/pciutils-2.2.0-shared-lib.patch, +pciutils-2.2.0-r1.ebuild:
+ Build and install a shared library instead of just forcing -fPIC on the
+ static lib.
*pciutils-2.2.0 (16 Oct 2005)
diff --git a/sys-apps/pciutils/files/digest-pciutils-2.2.0-r1 b/sys-apps/pciutils/files/digest-pciutils-2.2.0-r1
new file mode 100644
index 000000000000..f8f1bd12d8e2
--- /dev/null
+++ b/sys-apps/pciutils/files/digest-pciutils-2.2.0-r1
@@ -0,0 +1,2 @@
+MD5 4b8d2ee3ad78e4d0343a74a9b0fb84a8 pci.ids-20051015.bz2 98776
+MD5 303fc4bb9669549acf65e4a714527c7e pciutils-2.2.0.tar.gz 194290
diff --git a/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch b/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch
new file mode 100644
index 000000000000..d146b536f999
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch
@@ -0,0 +1,27 @@
+--- pciutils/lib/Makefile
++++ pciutils/lib/Makefile
+@@ -7,6 +7,7 @@
+ INCL=internal.h pci.h config.h header.h sysdep.h types.h
+
+ PCILIB=libpci.a
++PCISHLIB=libpci.so
+
+ ifdef PCI_HAVE_PM_LINUX_SYSFS
+ OBJS += sysfs.o
+@@ -45,7 +46,15 @@
+ PCILIB=libpciutils.a
+ endif
+
+-all: $(PCILIB)
++all: $(PCILIB) $(PCISHLIB)
++
++SHOBJS = $(OBJS:.o=.lo)
++
++%.lo: %.c
++ $(CC) $(CFLAGS) -fPIC -c -o $@ $^
++
++$(PCISHLIB): $(SHOBJS)
++ $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ $^ -fPIC
+
+ $(PCILIB): $(OBJS)
+ rm -f $@
diff --git a/sys-apps/pciutils/pciutils-2.2.0-r1.ebuild b/sys-apps/pciutils/pciutils-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..7db00d25b6e2
--- /dev/null
+++ b/sys-apps/pciutils/pciutils-2.2.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/pciutils-2.2.0-r1.ebuild,v 1.1 2005/10/16 11:38:05 vapier Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+STAMP=20051015
+DESCRIPTION="Various utilities dealing with the PCI bus"
+HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html"
+SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${P}.tar.gz
+ mirror://gentoo/pci.ids-${STAMP}.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/pcimodules-${P}.patch
+ epatch "${FILESDIR}"/${P}-shared-lib.patch
+
+ # Set Gentoo paths
+ sed -i \
+ -e '/^PREFIX=/s:=.*:=/usr:' \
+ -e '/^IDSDIR=/s:=.*:=$(PREFIX)/share/misc:' \
+ Makefile || die
+
+ # Make sure we respect $AR / $RANLIB
+ sed -i \
+ -e '/ar rcs/s:ar:$(AR):' \
+ -e 's:ranlib:$(RANLIB):' \
+ lib/Makefile \
+ || die "sed lib/Makefile failed"
+
+ ebegin "Updating pci.ids from the web"
+ if ! ./update-pciids.sh &> /dev/null ; then
+ # if we cant update, use a cached version
+ mv ${WORKDIR}/pci.ids-${STAMP} ${S}/pci.ids
+ fi
+ eend 0
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+ emake OPT="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/share/man
+ make install PREFIX="${D}"/usr || die
+
+ dolib lib/libpci.* || die "libpci failed"
+ insinto /usr/include/pci
+ doins lib/{config,header,pci,types}.h || die "headers failed"
+}