summaryrefslogtreecommitdiff
path: root/dev-libs/libhid
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/libhid
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/libhid')
-rw-r--r--dev-libs/libhid/Manifest1
-rw-r--r--dev-libs/libhid/files/libhid-0.2.16-gentoo.patch21
-rw-r--r--dev-libs/libhid/files/libhid-0.2.16-libusb.patch25
-rw-r--r--dev-libs/libhid/files/libhid-0.2.16-swig.patch45
-rw-r--r--dev-libs/libhid/libhid-0.2.16-r4.ebuild57
-rw-r--r--dev-libs/libhid/metadata.xml14
6 files changed, 163 insertions, 0 deletions
diff --git a/dev-libs/libhid/Manifest b/dev-libs/libhid/Manifest
new file mode 100644
index 00000000000..d51f9e75fe2
--- /dev/null
+++ b/dev-libs/libhid/Manifest
@@ -0,0 +1 @@
+DIST libhid-0.2.16.tar.gz 435245 SHA256 f6809ab3b9c907cbb05ceba9ee6ca23a705f85fd71588518e14b3a7d9f2550e5 SHA512 3c9348f9d63e0e1577e983c65ff8e6acbaee0d5f43ecb29b7004654a7e9d14a94176aa029f259e0b8576fc30e8a9af6d1df34912dd582bfadc2b29f9b87eb52b WHIRLPOOL 76edaf3a22f015d16fe2583102c9ee9a839ff17b8172309d3595f3054a22e3f8b119b3560a621490fac7a47966f2519b9b31824e91958012f767387adaa8871c
diff --git a/dev-libs/libhid/files/libhid-0.2.16-gentoo.patch b/dev-libs/libhid/files/libhid-0.2.16-gentoo.patch
new file mode 100644
index 00000000000..b5960af5d7d
--- /dev/null
+++ b/dev-libs/libhid/files/libhid-0.2.16-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,7 +78,6 @@
+ AC_C_BIGENDIAN
+ AC_C_STRINGIZE
+
+-MD_CONF_DEBUGGING
+ MD_CONF_COMPILER
+ AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "linux")
+ AM_CONDITIONAL(OS_BSD, test "$MD_OS" = "bsd")
+--- a/m4/md_check_gcc3.m4
++++ b/m4/md_check_gcc3.m4
+@@ -1,7 +1,7 @@
+ AC_DEFUN([MD_CHECK_GCC3],
+ [
+ if [[ "$GCC" = "yes" ]]; then
+- ver=$(gcc -dD -E - < /dev/null | sed -ne 's,.*__GNUC__ ,,p')
++ ver=$(${CC} -dD -E - < /dev/null | sed -ne 's,.*__GNUC__ ,,p')
+ case $ver in
+ *[[^[:digit:]]]*)
+ AC_MSG_WARN([Could not determine compiler version. Trying our luck...])
diff --git a/dev-libs/libhid/files/libhid-0.2.16-libusb.patch b/dev-libs/libhid/files/libhid-0.2.16-libusb.patch
new file mode 100644
index 00000000000..aa49205ec75
--- /dev/null
+++ b/dev-libs/libhid/files/libhid-0.2.16-libusb.patch
@@ -0,0 +1,25 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -59,6 +59,8 @@
+ MD_CHECK_OS
+
+ MD_CHECK_LIBUSB018B
++LIBS="$LIBS $LIBUSB_LIBS"
++INCLUDES="$INCLUDES $LIBUSB_CFLAGS"
+
+ AC_PROG_CC
+ MD_CHECK_GCC3
+@@ -97,13 +99,6 @@
+
+ MD_CHECK_DOXYGEN
+
+-MD_CONF_FLAGS(
+- [],
+- [$OS_CFLAGS $LIBUSB_CFLAGS],
+- [],
+- [$OS_LDFLAGS $LIBUSB_LIBS]
+-)
+-
+ MD_CONF_DB2MAN
+
+ ##### OUTPUT #################################################################
diff --git a/dev-libs/libhid/files/libhid-0.2.16-swig.patch b/dev-libs/libhid/files/libhid-0.2.16-swig.patch
new file mode 100644
index 00000000000..ce5dae7481b
--- /dev/null
+++ b/dev-libs/libhid/files/libhid-0.2.16-swig.patch
@@ -0,0 +1,45 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,8 +87,8 @@
+ if test "${ac_cv_enable_swig}" = "no" ; then
+ AM_CONDITIONAL(HAVE_SWIG, false)
+ else
+- AC_PROG_SWIG(1.3)
+- AM_CONDITIONAL(HAVE_SWIG, "$SWIG" -version)
++ AC_CHECK_PROG(SWIG,swig,swig,false)
++ AM_CONDITIONAL(HAVE_SWIG, "$ac_cv_prog_SWIG" -version)
+ if test -z "${HAVE_SWIG_TRUE}" ; then
+ AM_PATH_PYTHON
+ SWIG_PYTHON
+--- a/swig/Makefile.am
++++ b/swig/Makefile.am
+@@ -1,7 +1,7 @@
+ # AM_MAKEFLAGS = @MAKEFLAGS@
+ ACLOCAL_AMFLAGS = -I m4
+
+-AM_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/hidparser -DHID_INTERNAL -DSWIG
++AM_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -iquote$(top_srcdir)/include -I$(top_srcdir)/hidparser -DHID_INTERNAL -DSWIG
+ AM_CFLAGS = -fPIC -fno-strict-aliasing
+ AM_LDFLAGS = -shared ../src/libhid.la -lusb
+
+@@ -29,7 +29,7 @@ __init__.py: hid.py
+
+ %_wrap.c %.py: %.i $(top_srcdir)/include/hid.h
+ $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_INC) -o $@ $<
+- echo '#include <compiler.h>' > tmp.c
++ echo '#include "compiler.h"' > tmp.c
+ sed -e 's/PyObject \*self/& UNUSED/' \
+ -e 's/int flags)/int flags UNUSED)/' < $@ >> tmp.c \
+ && mv tmp.c $@
+--- a/swig/hid.i
++++ b/swig/hid.i
+@@ -1,7 +1,7 @@
+ %module(docstring="libhid is a user-space USB HID access library built on libusb.", "threads"=1) hid
+ %{
+-#include <compiler.h>
+-#include <hid.h>
++#include "compiler.h"
++#include "hid.h"
+ %}
+
+ %feature("autodoc","0");
diff --git a/dev-libs/libhid/libhid-0.2.16-r4.ebuild b/dev-libs/libhid/libhid-0.2.16-r4.ebuild
new file mode 100644
index 00000000000..f73c9372aa0
--- /dev/null
+++ b/dev-libs/libhid/libhid-0.2.16-r4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils python-single-r1
+
+DESCRIPTION="Provides a generic and flexible way to access and interact with USB HID devices"
+HOMEPAGE="http://libhid.alioth.debian.org/"
+SRC_URI="http://beta.magicaltux.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc python static-libs"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ virtual/libusb:0
+"
+DEPEND="
+ ${RDEPEND}
+ doc? ( app-doc/doxygen )
+ python? ( dev-lang/swig )
+"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-swig.patch
+ epatch "${FILESDIR}"/${P}-libusb.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ export OS_LDFLAGS="${LDFLAGS}"
+ use python && export PYTHON_LDFLAGS=$(${EPYTHON}-config --ldflags)
+
+ econf \
+ $(use_enable python swig) \
+ $(use_enable static-libs static) \
+ $(use_with doc doxygen) \
+ --disable-debug \
+ --disable-werror
+}
+
+DOCS=( AUTHORS ChangeLog NEWS README README.licence TODO )
+
+src_install() {
+ default
+
+ use doc && dohtml -r doc/html/*
+
+ prune_libtool_files
+}
diff --git a/dev-libs/libhid/metadata.xml b/dev-libs/libhid/metadata.xml
new file mode 100644
index 00000000000..006ee5dd3d4
--- /dev/null
+++ b/dev-libs/libhid/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+libhid provides a generic and flexible way to access and interact with USB
+HID devices, much like libusb does for plain USB devices. It is based on
+libusb, thus it requires no HID support in the kernel and provides means to
+take control over a device even if the kernel governs it.
+</longdescription>
+</pkgmetadata>
+