diff options
author | Jonathan Callen <jcallen@gentoo.org> | 2015-08-27 23:46:46 -0400 |
---|---|---|
committer | Jonathan Callen <jcallen@gentoo.org> | 2015-08-27 23:48:52 -0400 |
commit | 6cd5bf391e8e5a5c1ff028394339107479db8abf (patch) | |
tree | d2f69c3a76ce4c93b25bfda70abe8500f04f9bba /sys-libs | |
parent | app-misc/dnetc: Remove old (diff) | |
download | gentoo-6cd5bf391e8e5a5c1ff028394339107479db8abf.tar.gz gentoo-6cd5bf391e8e5a5c1ff028394339107479db8abf.tar.bz2 gentoo-6cd5bf391e8e5a5c1ff028394339107479db8abf.zip |
sys-libs/libudev-compat: New package
This installs a libudev.so.0 that wraps libudev.so.1 and provides the
few functions that were removed with the SONAME bump. This is only
needed for some older binary-only software, including Steam.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libudev-compat/files/udev_old.c | 37 | ||||
-rw-r--r-- | sys-libs/libudev-compat/libudev-compat-186.ebuild | 48 | ||||
-rw-r--r-- | sys-libs/libudev-compat/metadata.xml | 8 |
3 files changed, 93 insertions, 0 deletions
diff --git a/sys-libs/libudev-compat/files/udev_old.c b/sys-libs/libudev-compat/files/udev_old.c new file mode 100644 index 000000000000..584644ad0064 --- /dev/null +++ b/sys-libs/libudev-compat/files/udev_old.c @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2015 Jonathan Callen <jcallen@gentoo.org> + * Copyright (C) 2008-2010 Kay Sievers <kay.sievers@vrfy.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + */ + +#include <errno.h> +#include <stddef.h> + +void *udev_monitor_new_from_socket(void *udev, const void *path) { + errno = ENOSYS; + return NULL; +} + +void *udev_queue_get_failed_list_entry(void *udev_queue) { + errno = ENOSYS; + return NULL; +} + +const char *udev_get_sys_path(void *udev) { + if (!udev) return NULL; + return "/sys"; +} + +const char *udev_get_dev_path(void *udev) { + if (!udev) return NULL; + return "/dev"; +} + +const char *udev_get_run_path(void *udev) { + if (!udev) return NULL; + return "/run/udev"; +} diff --git a/sys-libs/libudev-compat/libudev-compat-186.ebuild b/sys-libs/libudev-compat/libudev-compat-186.ebuild new file mode 100644 index 000000000000..3a725c6eb3ed --- /dev/null +++ b/sys-libs/libudev-compat/libudev-compat-186.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit multilib multilib-minimal toolchain-funcs + +DESCRIPTION="Wrapper around libudev.so.1 for packages needing the old libudev.so.0" +HOMEPAGE="http://gentoo.org/" +SRC_URI="" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="virtual/libudev:0/1[${MULTILIB_USEDEP}]" +RDEPEND="${DEPEND}" + +src_unpack() { + mkdir "${S}" || die + cp "${FILESDIR}"/udev_old.c "${S}" || die +} + +multilib_src_configure() { :; } + +echo_and_run() { + echo "$@" + "$@" +} + +multilib_src_compile() { + # Note: --no-as-needed is used explictly here to ensure that libudev.so.1 + # is pulled in, even though nothing in udev_old.c otherwise requires it + echo_and_run $(tc-getCC) \ + ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \ + -fpic -shared \ + -Wl,-soname,libudev.so.0 \ + -o libudev.so.0 \ + "${S}"/udev_old.c \ + -Wl,--no-as-needed \ + -ludev || die +} + +multilib_src_install() { + dolib.so libudev.so.0 +} diff --git a/sys-libs/libudev-compat/metadata.xml b/sys-libs/libudev-compat/metadata.xml new file mode 100644 index 000000000000..311eca758a15 --- /dev/null +++ b/sys-libs/libudev-compat/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jcallen@gentoo.org</email> + <name>Jonathan Callen</name> + </maintainer> +</pkgmetadata> |