parent
48d9c9518d
commit
f73f3cf9ac
@ -1,2 +1,2 @@
|
||||
DIST lxc-0.7.5.tar.gz 265562 RMD160 93407be1ebf31bdcfa617e60672d9f86ba2940d1 SHA1 9712dccdcd2c10a522134fa17384a5b9e38fce0e SHA256 019ec63f250c874bf7625b1f1bf555b1a6e3a947937a4fca73100abddf829b1c
|
||||
DIST lxc-0.8.0-rc1-backports-1.tar.xz 4340 RMD160 e7aaf6df265f4bbd76ff6691ddbcc3363446da37 SHA1 b809c3ab425a51c480a70b0506c86fab8f1021b3 SHA256 201520be455f631a2ffcc21cfeb0bf50005feed48e3533b228ebd93170a912a7
|
||||
DIST lxc-0.8.0-rc1.tar.gz 301029 RMD160 3480209a82f361f11a1476d5e92d747bcf751e8b SHA1 6e9a641b3ca06ad034712ecf437588c4585ff40e SHA256 32bf83902c07387646c55de440d6d12cf61bd54c97417109c2d1ac47d17cb911
|
||||
|
@ -1,165 +0,0 @@
|
||||
From dd411d7ae02f75aa2ffe8cd5e6271b36c113d03f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
|
||||
Date: Fri, 27 Apr 2012 17:01:33 -0700
|
||||
Subject: [PATCH] Workaround requirement to use the realname of the block
|
||||
device.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Instead of checking always the source path, check the source path if
|
||||
mounting a directory, and the mount path if mounting a block device or
|
||||
file.
|
||||
|
||||
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
||||
---
|
||||
src/lxc/conf.c | 38 +++++++++++++++++++++-----------------
|
||||
src/lxc/conf.h | 1 +
|
||||
2 files changed, 22 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
|
||||
index e8088bb..3ba6db6 100644
|
||||
--- a/src/lxc/conf.c
|
||||
+++ b/src/lxc/conf.c
|
||||
@@ -350,9 +350,9 @@ static int mount_unknow_fs(const char *rootfs, const char *target, int mntopt)
|
||||
return -1;
|
||||
}
|
||||
|
||||
-static int mount_rootfs_dir(const char *rootfs, const char *target)
|
||||
+static int mount_rootfs_dir(struct lxc_rootfs *rootfs)
|
||||
{
|
||||
- return mount(rootfs, target, "none", MS_BIND | MS_REC, NULL);
|
||||
+ return mount(rootfs->path, rootfs->mount, "none", MS_BIND | MS_REC, NULL);
|
||||
}
|
||||
|
||||
static int setup_lodev(const char *rootfs, int fd, struct loop_info64 *loinfo)
|
||||
@@ -387,7 +387,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int mount_rootfs_file(const char *rootfs, const char *target)
|
||||
+static int mount_rootfs_file(struct lxc_rootfs *rootfs)
|
||||
{
|
||||
struct dirent dirent, *direntp;
|
||||
struct loop_info64 loinfo;
|
||||
@@ -433,9 +433,9 @@ static int mount_rootfs_file(const char *rootfs, const char *target)
|
||||
|
||||
DEBUG("found '%s' free lodev", path);
|
||||
|
||||
- ret = setup_lodev(rootfs, fd, &loinfo);
|
||||
+ ret = setup_lodev(rootfs->path, fd, &loinfo);
|
||||
if (!ret)
|
||||
- ret = mount_unknow_fs(path, target, 0);
|
||||
+ ret = mount_unknow_fs(path, rootfs->mount, 0);
|
||||
close(fd);
|
||||
|
||||
break;
|
||||
@@ -444,21 +444,23 @@ static int mount_rootfs_file(const char *rootfs, const char *target)
|
||||
if (closedir(dir))
|
||||
WARN("failed to close directory");
|
||||
|
||||
+ rootfs->isblock = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int mount_rootfs_block(const char *rootfs, const char *target)
|
||||
+static int mount_rootfs_block(struct lxc_rootfs *rootfs)
|
||||
{
|
||||
- return mount_unknow_fs(rootfs, target, 0);
|
||||
+ rootfs->isblock = 1;
|
||||
+ return mount_unknow_fs(rootfs->path, rootfs->mount, 0);
|
||||
}
|
||||
|
||||
-static int mount_rootfs(const char *rootfs, const char *target)
|
||||
+static int mount_rootfs(struct lxc_rootfs *rootfs)
|
||||
{
|
||||
char absrootfs[MAXPATHLEN];
|
||||
struct stat s;
|
||||
int i;
|
||||
|
||||
- typedef int (*rootfs_cb)(const char *, const char *);
|
||||
+ typedef int (*rootfs_cb)(struct lxc_rootfs *rootfs);
|
||||
|
||||
struct rootfs_type {
|
||||
int type;
|
||||
@@ -469,8 +471,8 @@ static int mount_rootfs(const char *rootfs, const char *target)
|
||||
{ S_IFREG, mount_rootfs_file },
|
||||
};
|
||||
|
||||
- if (!realpath(rootfs, absrootfs)) {
|
||||
- SYSERROR("failed to get real path for '%s'", rootfs);
|
||||
+ if (!realpath(rootfs->path, absrootfs)) {
|
||||
+ SYSERROR("failed to get real path for '%s'", rootfs->path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -489,7 +491,7 @@ static int mount_rootfs(const char *rootfs, const char *target)
|
||||
if (!__S_ISTYPE(s.st_mode, rtfs_type[i].type))
|
||||
continue;
|
||||
|
||||
- return rtfs_type[i].cb(absrootfs, target);
|
||||
+ return rtfs_type[i].cb(rootfs);
|
||||
}
|
||||
|
||||
ERROR("unsupported rootfs type for '%s'", absrootfs);
|
||||
@@ -756,7 +758,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, const char *pivotdir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int setup_rootfs(const struct lxc_rootfs *rootfs)
|
||||
+static int setup_rootfs(struct lxc_rootfs *rootfs)
|
||||
{
|
||||
if (!rootfs->path)
|
||||
return 0;
|
||||
@@ -767,7 +769,7 @@ static int setup_rootfs(const struct lxc_rootfs *rootfs)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (mount_rootfs(rootfs->path, rootfs->mount)) {
|
||||
+ if (mount_rootfs(rootfs)) {
|
||||
ERROR("failed to mount rootfs");
|
||||
return -1;
|
||||
}
|
||||
@@ -1099,7 +1101,7 @@ static inline int mount_entry_on_systemfs(struct mntent *mntent)
|
||||
static int mount_entry_on_absolute_rootfs(struct mntent *mntent,
|
||||
const struct lxc_rootfs *rootfs)
|
||||
{
|
||||
- char *aux;
|
||||
+ char *aux, *rootfs_path;
|
||||
char path[MAXPATHLEN];
|
||||
unsigned long mntflags;
|
||||
char *mntdata;
|
||||
@@ -1110,14 +1112,16 @@ static int mount_entry_on_absolute_rootfs(struct mntent *mntent,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- aux = strstr(mntent->mnt_dir, rootfs->path);
|
||||
+ rootfs_path = rootfs->isblock ? rootfs->mount : rootfs->path;
|
||||
+
|
||||
+ aux = strstr(mntent->mnt_dir, rootfs_path);
|
||||
if (!aux) {
|
||||
WARN("ignoring mount point '%s'", mntent->mnt_dir);
|
||||
goto out;
|
||||
}
|
||||
|
||||
snprintf(path, MAXPATHLEN, "%s/%s", rootfs->mount,
|
||||
- aux + strlen(rootfs->path));
|
||||
+ aux + strlen(rootfs_path));
|
||||
|
||||
ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
|
||||
mntflags, mntdata);
|
||||
diff --git a/src/lxc/conf.h b/src/lxc/conf.h
|
||||
index 09f55cb..b70e637 100644
|
||||
--- a/src/lxc/conf.h
|
||||
+++ b/src/lxc/conf.h
|
||||
@@ -181,6 +181,7 @@ struct lxc_rootfs {
|
||||
char *path;
|
||||
char *mount;
|
||||
char *pivot;
|
||||
+ int isblock;
|
||||
};
|
||||
|
||||
/*
|
||||
--
|
||||
1.7.8.6
|
||||
|
@ -1,89 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e8f0cb5..8c0864a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -12,11 +12,7 @@ AM_PROG_CC_C_O
|
||||
AC_GNU_SOURCE
|
||||
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
|
||||
|
||||
-AC_ARG_ENABLE([rpath],
|
||||
- [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
|
||||
- [], [enable_rpath=yes])
|
||||
-
|
||||
-AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
|
||||
+LT_INIT
|
||||
|
||||
AC_ARG_ENABLE([doc],
|
||||
[AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
|
||||
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
|
||||
index 3a3816e..4c72dc9 100644
|
||||
--- a/src/lxc/Makefile.am
|
||||
+++ b/src/lxc/Makefile.am
|
||||
@@ -15,11 +15,9 @@ pkginclude_HEADERS = \
|
||||
state.h \
|
||||
attach.h
|
||||
|
||||
-sodir=$(libdir)
|
||||
-# use PROGRAMS to avoid complains from automake
|
||||
-so_PROGRAMS = liblxc.so
|
||||
+lib_LTLIBRARIES = liblxc-@VERSION@.la
|
||||
|
||||
-liblxc_so_SOURCES = \
|
||||
+liblxc_@VERSION@_la_SOURCES = \
|
||||
arguments.c arguments.h \
|
||||
commands.c commands.h \
|
||||
start.c start.h \
|
||||
@@ -60,13 +58,10 @@ AM_CFLAGS=-I$(top_srcdir)/src \
|
||||
-DLXCPATH=\"$(LXCPATH)\" \
|
||||
-DLXCINITDIR=\"$(LXCINITDIR)\"
|
||||
|
||||
-liblxc_so_CFLAGS = -fPIC -DPIC $(AM_CFLAGS)
|
||||
+liblxc_@VERSION@_la_LDFLAGS = \
|
||||
+ -avoid-version
|
||||
|
||||
-liblxc_so_LDFLAGS = \
|
||||
- -shared \
|
||||
- -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
|
||||
-
|
||||
-liblxc_so_LDADD = -lutil $(CAP_LIBS)
|
||||
+liblxc_@VERSION@_la_LIBADD = -lutil $(CAP_LIBS)
|
||||
|
||||
bin_SCRIPTS = \
|
||||
lxc-ps \
|
||||
@@ -100,11 +95,7 @@ bin_PROGRAMS = \
|
||||
pkglibexec_PROGRAMS = \
|
||||
lxc-init
|
||||
|
||||
-AM_LDFLAGS = -Wl,-E
|
||||
-if ENABLE_RPATH
|
||||
-AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
|
||||
-endif
|
||||
-LDADD=liblxc.so @CAP_LIBS@
|
||||
+LDADD=liblxc-@VERSION@.la
|
||||
|
||||
lxc_attach_SOURCES = lxc_attach.c
|
||||
lxc_cgroup_SOURCES = lxc_cgroup.c
|
||||
@@ -114,6 +105,7 @@ lxc_execute_SOURCES = lxc_execute.c
|
||||
lxc_freeze_SOURCES = lxc_freeze.c
|
||||
lxc_info_SOURCES = lxc_info.c
|
||||
lxc_init_SOURCES = lxc_init.c
|
||||
+lxc_init_LDFLAGS = -all-static
|
||||
lxc_monitor_SOURCES = lxc_monitor.c
|
||||
lxc_restart_SOURCES = lxc_restart.c
|
||||
lxc_start_SOURCES = lxc_start.c
|
||||
@@ -123,15 +115,6 @@ lxc_unshare_SOURCES = lxc_unshare.c
|
||||
lxc_wait_SOURCES = lxc_wait.c
|
||||
lxc_kill_SOURCES = lxc_kill.c
|
||||
|
||||
-install-exec-local: install-soPROGRAMS
|
||||
- mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
|
||||
- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
|
||||
- cd $(DESTDIR)$(libdir); \
|
||||
- ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
|
||||
-
|
||||
-uninstall-local:
|
||||
- $(RM) $(DESTDIR)$(libdir)/liblxc.so*
|
||||
-
|
||||
namespace.c: setns.h
|
||||
|
||||
setns.h:
|
@ -1,139 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd,v 1.9 2011/10/19 17:51:48 flameeyes Exp $
|
||||
|
||||
CONTAINER=${SVCNAME#*.}
|
||||
|
||||
lxc_get_configfile() {
|
||||
if [ -f "/etc/lxc/${CONTAINER}.conf" ]; then
|
||||
echo "/etc/lxc/${CONTAINER}.conf"
|
||||
elif [ -f "/etc/lxc/${CONTAINER}/config" ]; then
|
||||
echo "/etc/lxc/${CONTAINER}/config"
|
||||
else
|
||||
eerror "Unable to find a suitable configuration file."
|
||||
eerror "If you set up the contianer in a non-standard"
|
||||
eerror "location, please set the CONFIGFILE variable."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
|
||||
|
||||
lxc_get_var() {
|
||||
awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
|
||||
}
|
||||
|
||||
cgroup_get_mount() {
|
||||
mount | awk '$5 == "cgroup" { print $3; exit }'
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ${CONTAINER} = ${SVCNAME} ]; then
|
||||
eerror "You have to create an init script for each container:"
|
||||
eerror " ln -s lxc /etc/init.d/lxc.container"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# no need to output anything, the function takes care of that.
|
||||
[ -z "${CONFIGFILE}" ] && return 1
|
||||
|
||||
utsname=$(lxc_get_var lxc.utsname)
|
||||
if [ ${CONTAINER} != ${utsname} ]; then
|
||||
eerror "You should use the same name for the service and the"
|
||||
eerror "container. Right now the container is called ${utsname}"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
depend() {
|
||||
# be quiet, since we have to run depend() also for the
|
||||
# non-muxed init script, unfortunately.
|
||||
checkconfig 2>/dev/null || return 0
|
||||
|
||||
config ${CONFIGFILE}
|
||||
need localmount
|
||||
|
||||
# find out which network interface the container is linked to,
|
||||
# and then require that to be enabled, so that the
|
||||
# dependencies are correct.
|
||||
netif=$(lxc_get_var lxc.network.link)
|
||||
[ -n "${netif}" ] && use net.${netif}
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
|
||||
# make sure that cgroup is mounted if it isn't already, this
|
||||
# ensures that we can actually proceed!
|
||||
cgroupmount=$(cgroup_get_mount)
|
||||
if [ -z ${cgroupmount} ]; then
|
||||
mkdir -p /cgroup
|
||||
|
||||
if ! mount -t cgroup cgroup /cgroup; then
|
||||
eerror "Unable to mount cgroup pseudo-filesystem on /cgroup"
|
||||
return 1
|
||||
fi
|
||||
|
||||
cgroupmount=/cgroup
|
||||
fi
|
||||
|
||||
rm /var/log/lxc/${CONTAINER}.log
|
||||
|
||||
rootpath=$(lxc_get_var lxc.rootfs)
|
||||
|
||||
# Check the format of our init and the chroot's init, to see if we
|
||||
# have to use linux32 or linux64...
|
||||
case $(scanelf -BF '%M#f' /sbin/init ${rootpath}/sbin/init | tr '\n' ':') in
|
||||
ELFCLASS64:ELFCLASS64:) setarch=;;
|
||||
ELFCLASS32:ELFCLASS32:) setarch=;;
|
||||
ELFCLASS32:ELFCLASS64:) setarch=linux64;;
|
||||
ELFCLASS64:ELFCLASS32:) setarch=linux32;;
|
||||
esac
|
||||
|
||||
ebegin "Starting ${CONTAINER}"
|
||||
env -i ${setarch} $(type -p lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
|
||||
sleep 0.5
|
||||
|
||||
# lxc-start -d will _always_ report a correct startup, even if it
|
||||
# failed, so rather than trust that, check that the cgroup exists.
|
||||
[ -d ${cgroupmount}/${CONTAINER} ]
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
checkconfig || return 1
|
||||
|
||||
cgroupmount=$(cgroup_get_mount)
|
||||
|
||||
if ! [ -d ${cgroupmount}/${CONTAINER} ]; then
|
||||
ewarn "${CONTAINER} doesn't seem to be started."
|
||||
return 0
|
||||
fi
|
||||
|
||||
init_pid=$(lxc-info -n ${CONTAINER} --pid | cut -d: -f 2)
|
||||
|
||||
if [ "${init_pid}" = "-1" ]; then
|
||||
ewarn "${CONTAINER} doesn't seem to be running."
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Shutting down system in ${CONTAINER}"
|
||||
kill -INT ${init_pid}
|
||||
eend $?
|
||||
|
||||
TIMEOUT=${TIMEOUT:-30}
|
||||
i=0
|
||||
while [ -n "$(pgrep -P ${init_pid})" -a $i -lt ${TIMEOUT} ]; do
|
||||
sleep 1
|
||||
i=$(expr $i + 1)
|
||||
done
|
||||
|
||||
if [ -n "${missingprocs}" ]; then
|
||||
ewarn "Something failed to properly shut down in ${CONTAINER}"
|
||||
fi
|
||||
|
||||
ebegin "Stopping ${CONTAINER}"
|
||||
lxc-stop -n ${CONTAINER}
|
||||
eend $?
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.7.5-r3.ebuild,v 1.2 2012/03/27 19:01:25 flameeyes Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
inherit eutils linux-info versionator flag-o-matic
|
||||
|
||||
DESCRIPTION="LinuX Containers userspace utilities"
|
||||
HOMEPAGE="http://lxc.sourceforge.net/"
|
||||
SRC_URI="http://lxc.sourceforge.net/download/lxc/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
IUSE="examples vanilla"
|
||||
|
||||
RDEPEND="sys-libs/libcap"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/docbook-sgml-utils
|
||||
>=sys-kernel/linux-headers-2.6.29"
|
||||
|
||||
# For init script, so protect with vanilla, they are not strictly
|
||||
# needed.
|
||||
RDEPEND="${RDEPEND}
|
||||
!vanilla? (
|
||||
sys-apps/util-linux
|
||||
app-misc/pax-utils
|
||||
)"
|
||||
|
||||
CONFIG_CHECK="~CGROUPS
|
||||
~CPUSETS ~CGROUP_CPUACCT
|
||||
~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
|
||||
~CGROUP_SCHED
|
||||
|
||||
~NAMESPACES
|
||||
~IPC_NS ~USER_NS ~PID_NS
|
||||
|
||||
~DEVPTS_MULTIPLE_INSTANCES
|
||||
~CGROUP_FREEZER
|
||||
~UTS_NS ~NET_NS
|
||||
~VETH ~MACVLAN"
|
||||
|
||||
ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
|
||||
|
||||
ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
|
||||
|
||||
ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
|
||||
ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
|
||||
|
||||
ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
|
||||
ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
|
||||
|
||||
DOCS=(AUTHORS CONTRIBUTING MAINTAINERS NEWS TODO README doc/FAQ.txt)
|
||||
|
||||
src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
econf \
|
||||
--localstatedir=/var \
|
||||
--bindir=/usr/sbin \
|
||||
--docdir=/usr/share/doc/${PF} \
|
||||
--with-config-path=/etc/lxc \
|
||||
--with-rootfs-path=/usr/lib/lxc/rootfs \
|
||||
--with-linuxdir="${KERNEL_DIR}" \
|
||||
--enable-doc \
|
||||
$(use_enable examples)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
rm -r "${D}"/usr/sbin/lxc-{setcap,ls} \
|
||||
"${D}"/usr/share/man/man1/lxc-ls.1 \
|
||||
|| die "unable to remove extraenous content"
|
||||
|
||||
keepdir /etc/lxc /usr/lib/lxc/rootfs
|
||||
|
||||
find "${D}" -name '*.la' -delete
|
||||
|
||||
use vanilla && return 0
|
||||
|
||||
# Gentoo-specific additions!
|
||||
newinitd "${FILESDIR}/${PN}.initd" ${PN}
|
||||
keepdir /var/log/lxc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use vanilla; then
|
||||
elog "There is an init script provided with the package now; no documentation"
|
||||
elog "is currently available though, so please check out /etc/init.d/lxc ."
|
||||
elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
|
||||
elog "to start the container defined into /etc/lxc/configname.conf ."
|
||||
elog "For further information about LXC development see"
|
||||
elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
|
||||
elog ""
|
||||
fi
|
||||
ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
|
||||
ewarn "and previous versions. This means you'll have to use syntax like the following"
|
||||
ewarn ""
|
||||
ewarn " lxc.rootfs = /container"
|
||||
ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
|
||||
ewarn ""
|
||||
ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
|
||||
ewarn "will need sys-apps/yum or dev-util/debootstrap."
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
DIST glib-1.2.10-r1-as-needed.patch.bz2 9099 RMD160 5b7a21da6dc10112409bd885501a6976a2eb894d SHA1 468a7947b7d1688c2e7d61da80d40ca59422fbec SHA256 3bb8c45706f97b526da851061c89618bc258fa61f9100802c1340548e4bb2731
|
||||
DIST glib-1.2.10.tar.gz 421480 RMD160 f19efe8c87ebeea979a4d36902d8a8209640cd95 SHA1 e5a9361c594608d152d5d9650154c2e3260b87fa SHA256 6e1ce7eedae713b11db82f11434d455d8a1379f783a79812cd2e05fc024a8d9f
|
||||
DIST glib-2.28.8.tar.xz 5223564 RMD160 9f665eee95990ace173676a4ad7aeeb0cc17fef9 SHA1 9b11968fedf4da45bcd10c4a8c50012d41b3af50 SHA256 4d7ca95dbde8e8f60ab428c765b0dbb8a44be9eb9316491803ce5ee7b4748353
|
||||
DIST glib-2.30.2.tar.xz 5818860 RMD160 d8fc7c876bd15ea3a9255d4d0a67d745e3790488 SHA1 bc7be8572122997e4d5fc6691f51602f28cd4e3a SHA256 f0e91e6333321ddb48fa12b5c66f56c3d5f05325748c66dd2e9016c278ff8e82
|
||||
DIST glib-2.30.3.tar.xz 5642448 RMD160 0887b08e2fff75c325ed1fb1123baaf42dc9779b SHA1 ec97dd659862dca05d18093a6ea6c309dcff0cdd SHA256 e6cbb27c71c445993346e785e8609cc75cea2941e32312e544872feba572dd27
|
||||
DIST glib-2.32.0.tar.xz 6090792 RMD160 475941a8193c19dc443012ba8931b456482aaf55 SHA1 c4f9b6feb76b1b2364d6132fc55599d928622f0a SHA256 cde9d9f25ed648069c547e323897ad9379974e1f936b4477fa51bcf1bb261ae4
|
||||
DIST glib-2.32.1.tar.xz 6138200 RMD160 d56ab662502916574e2286f92c2c56dc8aad210d SHA1 3f94733d0e79e5ff10d5ca8735ae5d7f11f2edc0 SHA256 484d5b7fc09f3fa398355adaf74b369768f5859866c299f229c99721990f8398
|
||||
DIST glib-2.32.2.tar.xz 6117764 RMD160 2ec828c54c31f07d9d28d182f1d6e8398e112928 SHA1 5898165e58c8f946c2b1fd05b910fe4476b64164 SHA256 b1764abf00bac96e0e93e29fb9715ce75f3583579acac40648e18771d43d6136
|
||||
DIST pkg-config-0.26.tar.gz 396399 RMD160 face3d16ec338b9b1ab41d56d6e4d1a5624b52d0 SHA1 fd71a70b023b9087c8a7bb76a0dc135a61059652 SHA256 94c1936a797c930fb3e4e5a154165b6268caba22b32d24083dd4c492a533c8af
|
||||
|
@ -1,211 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.28.8.ebuild,v 1.19 2012/03/27 03:16:18 tetromino Exp $
|
||||
|
||||
EAPI="3"
|
||||
GNOME_TARBALL_SUFFIX="xz"
|
||||
PYTHON_DEPEND="2"
|
||||
|
||||
inherit autotools gnome.org libtool eutils multilib flag-o-matic pax-utils python virtualx
|
||||
|
||||
DESCRIPTION="The GLib library of C routines"
|
||||
HOMEPAGE="http://www.gtk.org/"
|
||||
SRC_URI="${SRC_URI}
|
||||
http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf
|
||||
|
||||
LICENSE="LGPL-2"
|
||||
SLOT="2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
|
||||
IUSE="debug doc fam +introspection selinux +static-libs test xattr"
|
||||
|
||||
RDEPEND="virtual/libiconv
|
||||
sys-libs/zlib
|
||||
xattr? ( sys-apps/attr )
|
||||
fam? ( virtual/fam )"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/gettext-0.11
|
||||
>=dev-util/gtk-doc-am-1.13
|
||||
doc? (
|
||||
>=dev-libs/libxslt-1.0
|
||||
>=dev-util/gtk-doc-1.13
|
||||
~app-text/docbook-xml-dtd-4.1.2 )
|
||||
test? ( >=sys-apps/dbus-1.2.14 )
|
||||
!<dev-util/gtk-doc-1.15-r2"
|
||||
PDEPEND="x11-misc/shared-mime-info
|
||||
introspection? ( dev-libs/gobject-introspection )
|
||||
!<gnome-base/gvfs-1.6.4-r990"
|
||||
# shared-mime-info needed for gio/xdgmime, bug #409481
|
||||
# Earlier versions of gvfs do not work with glib
|
||||
|
||||
# XXX: Consider adding test? ( sys-devel/gdb ); assert-msg-test tries to use it
|
||||
|
||||
pkg_setup() {
|
||||
python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
|
||||
|
||||
if use ia64 ; then
|
||||
# Only apply for < 4.1
|
||||
local major=$(gcc-major-version)
|
||||
local minor=$(gcc-minor-version)
|
||||
if (( major < 4 || ( major == 4 && minor == 0 ) )); then
|
||||
epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Don't fail gio tests when ran without userpriv, upstream bug 552912
|
||||
# This is only a temporary workaround, remove as soon as possible
|
||||
epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
|
||||
|
||||
# Fix gmodule issues on fbsd; bug #184301
|
||||
epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
|
||||
|
||||
# Don't check for python, hence removing the build-time python dep.
|
||||
# We remove the gdb python scripts in src_install due to bug 291328
|
||||
epatch "${FILESDIR}/${PN}-2.25-punt-python-check.patch"
|
||||
|
||||
# Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
|
||||
epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
|
||||
|
||||
# Do not try to remove files on live filesystem, upstream bug #619274
|
||||
sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
|
||||
-i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
|
||||
|
||||
# Disable failing tests, upstream bug #???
|
||||
epatch "${FILESDIR}/${PN}-2.26.0-disable-locale-sensitive-test.patch"
|
||||
epatch "${FILESDIR}/${PN}-2.26.0-disable-volumemonitor-broken-test.patch"
|
||||
|
||||
if ! use test; then
|
||||
# don't waste time building tests
|
||||
sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
|
||||
else
|
||||
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
|
||||
if ! has_version dev-util/desktop-file-utils ; then
|
||||
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
|
||||
ewarn "think on installing it to get these tests run."
|
||||
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
|
||||
sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
|
||||
sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
|
||||
sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
|
||||
fi
|
||||
|
||||
# Disable tests requiring dev-python/dbus-python, bug #349236
|
||||
if ! has_version dev-python/dbus-python ; then
|
||||
ewarn "Some tests will be skipped due dev-python/dbus-python not being present on your system,"
|
||||
ewarn "think on installing it to get these tests run."
|
||||
sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
|
||||
sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
|
||||
sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
|
||||
sed -i -e "/gdbus\/bus-watch-name/d" gio/tests/gdbus-names.c || die
|
||||
sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
|
||||
sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
|
||||
sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
|
||||
fi
|
||||
fi
|
||||
|
||||
# Needed for the punt-python-check patch, disabling timeout test
|
||||
# Also needed to prevent croscompile failures, see bug #267603
|
||||
AT_M4DIR="${WORKDIR}" eautoreconf
|
||||
|
||||
[[ ${CHOST} == *-freebsd* ]] && elibtoolize
|
||||
|
||||
epunt_cxx
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Avoid circular depend with dev-util/pkgconfig
|
||||
if ! has_version dev-util/pkgconfig; then
|
||||
export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
|
||||
export DBUS1_LIBS="-ldbus-1"
|
||||
fi
|
||||
|
||||
local myconf
|
||||
|
||||
# Building with --disable-debug highly unrecommended. It will build glib in
|
||||
# an unusable form as it disables some commonly used API. Please do not
|
||||
# convert this to the use_enable form, as it results in a broken build.
|
||||
# -- compnerd (3/27/06)
|
||||
use debug && myconf="--enable-debug"
|
||||
|
||||
# Always use internal libpcre, bug #254659
|
||||
econf ${myconf} \
|
||||
$(use_enable xattr) \
|
||||
$(use_enable doc man) \
|
||||
$(use_enable doc gtk-doc) \
|
||||
$(use_enable fam) \
|
||||
$(use_enable selinux) \
|
||||
$(use_enable static-libs static) \
|
||||
--enable-regex \
|
||||
--with-pcre=internal \
|
||||
--with-threads=posix \
|
||||
--disable-dtrace \
|
||||
--disable-systemtap
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local f
|
||||
emake DESTDIR="${D}" install || die "Installation failed"
|
||||
|
||||
# Do not install charset.alias even if generated, leave it to libiconv
|
||||
rm -f "${ED}/usr/lib/charset.alias"
|
||||
|
||||
# Don't install gdb python macros, bug 291328
|
||||
rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
|
||||
|
||||
dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
|
||||
|
||||
insinto /usr/share/bash-completion
|
||||
for f in gdbus gsettings; do
|
||||
newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f} || die
|
||||
done
|
||||
rm -rf "${ED}/etc"
|
||||
|
||||
# Completely useless with or without USE static-libs, people need to use
|
||||
# pkg-config
|
||||
find "${ED}" -name '*.la' -exec rm -f {} +
|
||||
}
|
||||
|
||||
src_test() {
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
export XDG_CONFIG_DIRS=/etc/xdg
|
||||
export XDG_DATA_DIRS=/usr/local/share:/usr/share
|
||||
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
|
||||
export XDG_DATA_HOME="${T}"
|
||||
unset GSETTINGS_BACKEND # bug 352451
|
||||
|
||||
# Related test is a bit nitpicking
|
||||
mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
|
||||
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
|
||||
|
||||
# Hardened: gdb needs this, bug #338891
|
||||
if host-is-pax ; then
|
||||
pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
|
||||
|| die "Hardened adjustment failed"
|
||||
fi
|
||||
|
||||
# Need X for dbus-launch session X11 initialization
|
||||
Xemake check || die "tests failed"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Only give the introspection message if:
|
||||
# * The user has it enabled
|
||||
# * Has glib already installed
|
||||
# * Previous version was different from new version
|
||||
if use introspection && has_version "${CATEGORY}/${PN}"; then
|
||||
if ! has_version "=${CATEGORY}/${PF}"; then
|
||||
ewarn "You must rebuild gobject-introspection so that the installed"
|
||||
ewarn "typelibs and girs are regenerated for the new APIs in glib"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
|
||||
if has_version dev-libs/dbus-glib; then
|
||||
ewarn "If you experience a breakage after updating dev-libs/glib try"
|
||||
ewarn "rebuilding dev-libs/dbus-glib"
|
||||
fi
|
||||
}
|
@ -1,250 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.30.2-r1.ebuild,v 1.6 2012/03/27 03:16:18 tetromino Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="utils? 2"
|
||||
# Avoid runtime dependency on python when USE=test
|
||||
|
||||
inherit autotools gnome.org libtool eutils flag-o-matic gnome2-utils multilib pax-utils python toolchain-funcs virtualx
|
||||
|
||||
DESCRIPTION="The GLib library of C routines"
|
||||
HOMEPAGE="http://www.gtk.org/"
|
||||
SRC_URI="${SRC_URI}
|
||||
http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf
|
||||
|
||||
LICENSE="LGPL-2"
|
||||
SLOT="2"
|
||||
IUSE="debug doc fam selinux +static-libs systemtap test utils xattr"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
|
||||
|
||||
RDEPEND="virtual/libiconv
|
||||
virtual/libffi
|
||||
sys-libs/zlib
|
||||
xattr? ( sys-apps/attr )
|
||||
fam? ( virtual/fam )
|
||||
utils? ( >=dev-util/gdbus-codegen-${PV} )"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/gettext-0.11
|
||||
>=dev-util/gtk-doc-am-1.15
|
||||
doc? (
|
||||
>=dev-libs/libxslt-1.0
|
||||
>=dev-util/gdbus-codegen-${PV}
|
||||
>=dev-util/gtk-doc-1.15
|
||||
~app-text/docbook-xml-dtd-4.1.2 )
|
||||
systemtap? ( >=dev-util/systemtap-1.3 )
|
||||
test? (
|
||||
sys-devel/gdb
|
||||
=dev-lang/python-2*
|
||||
>=dev-util/gdbus-codegen-${PV}
|
||||
>=sys-apps/dbus-1.2.14 )
|
||||
!<dev-util/gtk-doc-1.15-r2"
|
||||
PDEPEND="x11-misc/shared-mime-info
|
||||
!<gnome-base/gvfs-1.6.4-r990"
|
||||
# shared-mime-info needed for gio/xdgmime, bug #409481
|
||||
# Earlier versions of gvfs do not work with glib
|
||||
|
||||
pkg_setup() {
|
||||
# Needed for gio/tests/gdbus-testserver.py
|
||||
if use test ; then
|
||||
python_set_active_version 2
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
|
||||
|
||||
if use ia64 ; then
|
||||
# Only apply for < 4.1
|
||||
local major=$(gcc-major-version)
|
||||
local minor=$(gcc-minor-version)
|
||||
if (( major < 4 || ( major == 4 && minor == 0 ) )); then
|
||||
epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix from upstream for building with C++ compilers.
|
||||
epatch "${FILESDIR}"/${P}-missing-decls.patch
|
||||
|
||||
# Don't fail gio tests when ran without userpriv, upstream bug 552912
|
||||
# This is only a temporary workaround, remove as soon as possible
|
||||
# epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
|
||||
|
||||
# Fix gmodule issues on fbsd; bug #184301
|
||||
epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
|
||||
|
||||
# Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
|
||||
epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
|
||||
|
||||
# Do not try to remove files on live filesystem, upstream bug #619274
|
||||
sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
|
||||
-i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
|
||||
|
||||
# need to build tests if USE=doc for bug #387385
|
||||
if ! use test && ! use doc; then
|
||||
# don't waste time building tests
|
||||
sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
|
||||
else
|
||||
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
|
||||
if ! has_version dev-util/desktop-file-utils ; then
|
||||
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
|
||||
ewarn "think on installing it to get these tests run."
|
||||
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
|
||||
sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
|
||||
sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
|
||||
sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
|
||||
fi
|
||||
|
||||
# Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
|
||||
if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
|
||||
ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
|
||||
ewarn "not being present on your system, think on installing them to get these tests run."
|
||||
sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
|
||||
sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
|
||||
sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
|
||||
sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
|
||||
sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
|
||||
sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
|
||||
sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
|
||||
# needed to prevent gdbus-threading from asserting
|
||||
ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
|
||||
fi
|
||||
fi
|
||||
|
||||
# gdbus-codegen is a separate package
|
||||
epatch "${FILESDIR}/${PN}-2.30.1-external-gdbus-codegen.patch"
|
||||
|
||||
# Handle the G_HOME environment variable to override the passwd entry, upstream bug #142568
|
||||
epatch "${FILESDIR}/${PN}-2.30.1-homedir-env.patch"
|
||||
|
||||
# Fix hardcoded path to machine-id wrt #390143
|
||||
epatch "${FILESDIR}/${PN}-2.30.2-machine-id.patch"
|
||||
|
||||
# disable pyc compiling
|
||||
echo '#!/bin/sh' > py-compile
|
||||
|
||||
# Needed for the punt-python-check patch, disabling timeout test
|
||||
# Also needed to prevent croscompile failures, see bug #267603
|
||||
# Also needed for the no-gdbus-codegen patch
|
||||
AT_M4DIR="${WORKDIR}" eautoreconf
|
||||
|
||||
[[ ${CHOST} == *-freebsd* ]] && elibtoolize
|
||||
|
||||
epunt_cxx
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Avoid circular depend with dev-util/pkgconfig and
|
||||
# native builds (cross-compiles won't need pkg-config
|
||||
# in the target ROOT to work here)
|
||||
if ! tc-is-cross-compiler && ! has_version dev-util/pkgconfig; then
|
||||
if has_version sys-apps/dbus; then
|
||||
export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
|
||||
export DBUS1_LIBS="-ldbus-1"
|
||||
fi
|
||||
export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
|
||||
export LIBFFI_LIBS="-lffi"
|
||||
fi
|
||||
|
||||
local myconf
|
||||
|
||||
# Building with --disable-debug highly unrecommended. It will build glib in
|
||||
# an unusable form as it disables some commonly used API. Please do not
|
||||
# convert this to the use_enable form, as it results in a broken build.
|
||||
# -- compnerd (3/27/06)
|
||||
use debug && myconf="--enable-debug"
|
||||
|
||||
# Always use internal libpcre, bug #254659
|
||||
econf ${myconf} \
|
||||
$(use_enable xattr) \
|
||||
$(use_enable doc man) \
|
||||
$(use_enable doc gtk-doc) \
|
||||
$(use_enable fam) \
|
||||
$(use_enable selinux) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable systemtap dtrace) \
|
||||
$(use_enable systemtap systemtap) \
|
||||
--enable-regex \
|
||||
--with-pcre=internal \
|
||||
--with-threads=posix
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local f
|
||||
|
||||
# install-exec-hook substitutes ${PYTHON} in glib/gtester-report
|
||||
emake DESTDIR="${D}" PYTHON="${EPREFIX}/usr/bin/python2" install
|
||||
|
||||
if ! use utils; then
|
||||
rm "${ED}usr/bin/gtester-report"
|
||||
fi
|
||||
|
||||
# Do not install charset.alias even if generated, leave it to libiconv
|
||||
rm -f "${ED}/usr/lib/charset.alias"
|
||||
|
||||
# Don't install gdb python macros, bug 291328
|
||||
rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
|
||||
|
||||
dodoc AUTHORS ChangeLog* NEWS* README
|
||||
|
||||
insinto /usr/share/bash-completion
|
||||
for f in gdbus gsettings; do
|
||||
newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f}
|
||||
done
|
||||
rm -rf "${ED}/etc"
|
||||
|
||||
# Completely useless with or without USE static-libs, people need to use
|
||||
# pkg-config
|
||||
find "${D}" -name '*.la' -exec rm -f {} +
|
||||
}
|
||||
|
||||
src_test() {
|
||||
gnome2_environment_reset
|
||||
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
export XDG_CONFIG_DIRS=/etc/xdg
|
||||
export XDG_DATA_DIRS=/usr/local/share:/usr/share
|
||||
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
|
||||
unset GSETTINGS_BACKEND # bug 352451
|
||||
|
||||
# Related test is a bit nitpicking
|
||||
mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
|
||||
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
|
||||
|
||||
# Hardened: gdb needs this, bug #338891
|
||||
if host-is-pax ; then
|
||||
pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
|
||||
|| die "Hardened adjustment failed"
|
||||
fi
|
||||
|
||||
# Need X for dbus-launch session X11 initialization
|
||||
Xemake check
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Only give the introspection message if:
|
||||
# * The user has gobject-introspection
|
||||
# * Has glib already installed
|
||||
# * Previous version was different from new version
|
||||
if has_version "dev-libs/gobject-introspection" && ! has_version "=${CATEGORY}/${PF}"; then
|
||||
ewarn "You must rebuild gobject-introspection so that the installed"
|
||||
ewarn "typelibs and girs are regenerated for the new APIs in glib"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
|
||||
if has_version dev-libs/dbus-glib; then
|
||||
ewarn "If you experience a breakage after updating dev-libs/glib try"
|
||||
ewarn "rebuilding dev-libs/dbus-glib"
|
||||
fi
|
||||
|
||||
if has_version '<x11-libs/gtk+-3.0.12:3'; then
|
||||
# To have a clear upgrade path for gtk+-3.0.x users, have to resort to
|
||||
# a warning instead of a blocker
|
||||
ewarn
|
||||
ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
|
||||
ewarn "You should upgrade to a newer version of gtk+:3 immediately."
|
||||
fi
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
--- a/doc/Doxyfile.in
|
||||
+++ b/doc/Doxyfile.in
|
||||
@@ -590,7 +590,7 @@
|
||||
INPUT = @top_srcdir@/lib \
|
||||
@top_srcdir@/src/lib \
|
||||
@top_srcdir@/include/netlink \
|
||||
- @srcdir@/src
|
||||
+ @top_srcdir@/src
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
-.PHONY: gendoc api_refs asciidoc
|
||||
+.PHONY: gendoc api_ref asciidoc
|
||||
|
||||
ASCIIDOCOPTS=-a pygments -a language=c -a icons \
|
||||
-a toc2 \
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue