summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/ccs-tools')
-rw-r--r--sys-apps/ccs-tools/Manifest2
-rw-r--r--sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild48
-rw-r--r--sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-GNU_SOURCE.patch11
-rw-r--r--sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-ncurses-underlinking.patch108
4 files changed, 149 insertions, 20 deletions
diff --git a/sys-apps/ccs-tools/Manifest b/sys-apps/ccs-tools/Manifest
index 5468277006dd..d17bc6c52e0c 100644
--- a/sys-apps/ccs-tools/Manifest
+++ b/sys-apps/ccs-tools/Manifest
@@ -1 +1 @@
-DIST ccs-tools-1.8.3-20130214.tar.gz 227657 SHA256 56bb03f1977346f4c7dc3a0c5da8df4a0451a79558c26564478cb87fbf3e3ade SHA512 256adf873dd99b811f5cf55e6b74e1ccdc2e54a2399724b694f22825c4d5e3167e7768bddc4952363ef835ec2b8405d5704572a9b9e214f3102bf594374325ba WHIRLPOOL d7f200842a10ca2c83a46a933beb7c70436ea36c8aad3569c33392a11360b88dbf7589ac720994fec9d5c49c46f1e1c9f97ec320d2057680a6bb0edf13c066eb
+DIST ccs-tools-1.8.3-20130214.tar.gz 227657 BLAKE2B 318e3899b85ee322b4391816d642ae855eb7cb03c345725c95e7e01a8e6acb54db900ccdd2f85b6d4ecab5ef40768e80b559979d7b37bf42679a520379d2b56c SHA512 256adf873dd99b811f5cf55e6b74e1ccdc2e54a2399724b694f22825c4d5e3167e7768bddc4952363ef835ec2b8405d5704572a9b9e214f3102bf594374325ba
diff --git a/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild b/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild
index d39fc9d54c65..4e3640cdef0a 100644
--- a/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild
+++ b/sys-apps/ccs-tools/ccs-tools-1.8.3_p20130214.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=3
-inherit eutils multilib toolchain-funcs
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
MY_P="${P/_p/-}"
+
DESCRIPTION="TOMOYO Linux tools"
HOMEPAGE="http://tomoyo.sourceforge.jp/"
SRC_URI="mirror://sourceforge.jp/tomoyo/49693/${MY_P}.tar.gz"
@@ -13,35 +15,43 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-
RESTRICT="test"
-DEPEND="sys-libs/ncurses
- sys-libs/readline"
-RDEPEND="${DEPEND}
+CDEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+RDEPEND="${CDEPEND}
sys-apps/which"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
-S="${WORKDIR}/ccs-tools"
+S="${WORKDIR}/${PN}"
+PATCHES=(
+ "${FILESDIR}"/${P}-warnings.patch
+ "${FILESDIR}"/${P}-ncurses-underlinking.patch
+ "${FILESDIR}"/${P}-GNU_SOURCE.patch
+)
src_prepare() {
- epatch "${FILESDIR}"/${P}-warnings.patch
+ default
sed -i \
- -e "s:gcc:$(tc-getCC):" \
- -e "s/\(CFLAGS.*:=\).*/\1 ${CFLAGS}/" \
-e "s:/usr/lib:/usr/$(get_libdir):g" \
-e "s:= /:= ${EPREFIX}/:g" \
Include.make || die
}
-src_test() {
- cd "${S}/kernel_test"
- emake || die
- ./testall.sh || die
+src_configure() {
+ append-cflags -Wall -Wno-unused-but-set-variable
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags ncurses)"
+ append-libs "$($(tc-getPKG_CONFIG) --libs ncurses)"
+
+ tc-export CC
}
-src_install() {
- emake INSTALLDIR="${D}" install || die
- dodoc README.ccs
+src_test() {
+ cd kernel_test || die
+ emake
+ ./testall.sh || die
}
pkg_postinst() {
@@ -57,5 +67,5 @@ pkg_postinst() {
}
pkg_config() {
- /usr/$(get_libdir)/ccs/init_policy
+ "${EPREFIX}"/usr/$(get_libdir)/ccs/init_policy
}
diff --git a/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-GNU_SOURCE.patch b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-GNU_SOURCE.patch
new file mode 100644
index 000000000000..651bed1b5d08
--- /dev/null
+++ b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-GNU_SOURCE.patch
@@ -0,0 +1,11 @@
+--- a/usr_sbin/ccstools.h
++++ b/usr_sbin/ccstools.h
+@@ -23,7 +23,7 @@
+ #define _FILE_OFFSET_BITS 64
+ #define _LARGEFILE_SOURCE
+ #define _LARGEFILE64_SOURCE
+-#define _GNU_SOURCE
++
+ #include <arpa/inet.h>
+ #include <asm/types.h>
+ #include <dirent.h>
diff --git a/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-ncurses-underlinking.patch b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-ncurses-underlinking.patch
new file mode 100644
index 000000000000..638e6f556712
--- /dev/null
+++ b/sys-apps/ccs-tools/files/ccs-tools-1.8.3_p20130214-ncurses-underlinking.patch
@@ -0,0 +1,108 @@
+--- a/Include.make
++++ b/Include.make
+@@ -3,6 +3,3 @@
+ USRSBINDIR := /usr/sbin
+ USRLIBDIR := /usr/lib
+ MAN8 := /usr/share/man/man8
+-ifndef CFLAGS
+-CFLAGS := -Wall -O2
+-endif
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -20,7 +20,7 @@
+ #
+
+ .c:
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+ #
+ # Delete all test programs.
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -5,11 +5,11 @@
+ all: $(BUILD_FILES)
+
+ install: all
+- mkdir -p -m 0755 $(INSTALLDIR)$(SBINDIR)
+- $(INSTALL) -m 0700 $(BUILD_FILES) $(INSTALLDIR)$(SBINDIR)
++ mkdir -p -m 0755 $(DESTDIR)$(SBINDIR)
++ $(INSTALL) -m 0700 $(BUILD_FILES) $(DESTDIR)$(SBINDIR)
+
+ .c:
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+--- a/usr_lib_ccs/Makefile
++++ b/usr_lib_ccs/Makefile
+@@ -6,12 +6,12 @@
+ all: $(BUILD_FILES)
+
+ install: all
+- mkdir -p -m 0755 $(INSTALLDIR)/$(USRLIBDIR)/ccs
+- $(INSTALL) -m 0755 $(BUILD_FILES) $(INSTALLDIR)/$(USRLIBDIR)/ccs/
+- $(INSTALL) -m 0644 ../README.ccs ../COPYING.ccs $(INSTALLDIR)/$(USRLIBDIR)/ccs/
++ mkdir -p -m 0755 $(DESTDIR)/$(USRLIBDIR)/ccs
++ $(INSTALL) -m 0755 $(BUILD_FILES) $(DESTDIR)/$(USRLIBDIR)/ccs/
++ $(INSTALL) -m 0644 ../README.ccs ../COPYING.ccs $(DESTDIR)/$(USRLIBDIR)/ccs/
+
+ .c:
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+--- a/usr_sbin/Makefile
++++ b/usr_sbin/Makefile
+@@ -19,27 +19,27 @@
+ LDFLAGS_PIC := $(filter-out -pie,$(filter-out -fPIE,$(LDFLAGS)))
+
+ libccstools.so: ccstools.c ccstools.h
+- $(CC) $(CPPFLAGS) $(CFLAGS_PIC) $(LDFLAGS_PIC) -fPIC ccstools.c -shared -Wl,-soname,libccstools.so.3 -o libccstools.so.3.0.2
++ $(CC) $(CPPFLAGS) $(CFLAGS_PIC) $(LDFLAGS_PIC) -fPIC ccstools.c -shared -Wl,-soname,libccstools.so.3 -o libccstools.so.3.0.2 $(LIBS)
+ ln -sf libccstools.so.3.0.2 libccstools.so
+
+ .c:
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -lccstools -L.
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -lccstools -L. $(LIBS)
+
+ ccs-editpolicy: ccstools.h editpolicy*.c readline.h /usr/include/curses.h libccstools.so
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ccs-editpolicy editpolicy*.c -lncurses -lccstools -L. -DCOLOR_ON
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ccs-editpolicy editpolicy*.c -lccstools -L. -DCOLOR_ON $(LIBS)
+
+ ccs-queryd: ccstools.h ccs-queryd.c readline.h /usr/include/curses.h libccstools.so
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ccs-queryd ccs-queryd.c -lncurses -lccstools -L.
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ccs-queryd ccs-queryd.c -lccstools -L. $(LIBS)
+
+ install: all
+- mkdir -p -m 0755 $(INSTALLDIR)$(USRLIBDIR)
+- $(INSTALL) -m 0755 libccstools.so.3.0.2 $(INSTALLDIR)$(USRLIBDIR)
+- ln -sf libccstools.so.3.0.2 $(INSTALLDIR)$(USRLIBDIR)/libccstools.so.3
+-ifeq ($(INSTALLDIR),)
++ mkdir -p -m 0755 $(DESTDIR)$(USRLIBDIR)
++ $(INSTALL) -m 0755 libccstools.so.3.0.2 $(DESTDIR)$(USRLIBDIR)
++ ln -sf libccstools.so.3.0.2 $(DESTDIR)$(USRLIBDIR)/libccstools.so.3
++ifeq ($(DESTDIR),)
+ ldconfig || true
+ endif
+- mkdir -p -m 0755 $(INSTALLDIR)$(USRSBINDIR)
+- $(INSTALL) -m 0755 $(BUILD_FILES) $(INSTALLDIR)$(USRSBINDIR)
++ mkdir -p -m 0755 $(DESTDIR)$(USRSBINDIR)
++ $(INSTALL) -m 0755 $(BUILD_FILES) $(DESTDIR)$(USRSBINDIR)
+
+ clean:
+ rm -f -- $(BUILD_FILES) libccstools.so*
+--- a/usr_share_man/Makefile
++++ b/usr_share_man/Makefile
+@@ -1,7 +1,7 @@
+ include ../Include.make
+
+ install:
+- mkdir -p -m 0755 $(INSTALLDIR)$(MAN8)
+- $(INSTALL) -m 0644 man8/* $(INSTALLDIR)$(MAN8)
++ mkdir -p -m 0755 $(DESTDIR)$(MAN8)
++ $(INSTALL) -m 0644 man8/* $(DESTDIR)$(MAN8)
+
+ .PHONY: install