summaryrefslogtreecommitdiff
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 /sys-apps/tomoyo-tools
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
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 'sys-apps/tomoyo-tools')
-rw-r--r--sys-apps/tomoyo-tools/Manifest1
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-gentoo.patch14
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-ldflags.patch17
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20110929-gentoo.patch16
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20120414-flags-parallel.patch82
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.4.0_p20110929-flags-parallel.patch87
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20120414-flags-parallel.patch87
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-flags-parallel.patch87
-rw-r--r--sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch22
-rw-r--r--sys-apps/tomoyo-tools/metadata.xml10
-rw-r--r--sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild68
11 files changed, 491 insertions, 0 deletions
diff --git a/sys-apps/tomoyo-tools/Manifest b/sys-apps/tomoyo-tools/Manifest
new file mode 100644
index 000000000000..ef34726748c4
--- /dev/null
+++ b/sys-apps/tomoyo-tools/Manifest
@@ -0,0 +1 @@
+DIST tomoyo-tools-2.5.0-20130214.tar.gz 210892 SHA256 78344506be3108804c76108e2eb193d4eb556983649c8f11f76ad69eda69b1ee SHA512 1ba6f6b3a3d4e644e6ee742beb64b09c6d527f130b1fe6d09a2e19760ced26f540ac8cc1e6f83fddacc3ef8844c3c23425191e4e0098c8b72b5ba3086adc9dc4 WHIRLPOOL edb912dbcfc784d2845cf8c9f81499e6089e67e98e1478b7dd096406cf2d1abfd314f15caf4248fc388fc667f14fa25f6d694652d156a45a6a9d337fc50fed80
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-gentoo.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-gentoo.patch
new file mode 100644
index 000000000000..33c73bc10dc8
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-gentoo.patch
@@ -0,0 +1,14 @@
+diff -Naur tomoyo-tools.orig/tomoyo_init_policy.c tomoyo-tools/tomoyo_init_policy.c
+--- tomoyo-tools.orig/tomoyo_init_policy.c 2009-07-27 15:00:00.000000000 +0900
++++ tomoyo-tools/tomoyo_init_policy.c 2009-07-29 01:56:32.000000000 +0900
+@@ -1238,6 +1259,10 @@
+ echo("file_pattern /etc/gshadow.\\$");
+ echo("file_pattern /etc/passwd.\\$");
+ echo("file_pattern /etc/shadow.\\$");
++ echo("file_pattern /etc/group.edit");
++ echo("file_pattern /etc/gshadow.edit");
++ echo("file_pattern /etc/passwd.edit");
++ echo("file_pattern /etc/shadow.edit");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/\\*");
+ echo("file_pattern /var/tmp/sqlite_\\*");
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-ldflags.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-ldflags.patch
new file mode 100644
index 000000000000..d0ea10af002a
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.2.0_p20120414-ldflags.patch
@@ -0,0 +1,17 @@
+diff --git a/Makefile b/Makefile
+index d84a02b..e1cb36b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -39,10 +39,10 @@ CFLAGS=-Wall -O2 -pipe -fomit-frame-pointer -march=core2 -mcx16 -msahf -maes -mp
+ sleep 10
+
+ tomoyotools: tomoyotools.src/*.c tomoyotools.src/*.h /usr/include/curses.h
+- $(CC) $(CFLAGS) -o tomoyotools tomoyotools.src/*.c -lncurses -DCOLOR_ON
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyotools tomoyotools.src/*.c -lncurses -DCOLOR_ON
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f $(MAIN_FILES) $(MISC_FILES)
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20110929-gentoo.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20110929-gentoo.patch
new file mode 100644
index 000000000000..7e005702e6a0
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20110929-gentoo.patch
@@ -0,0 +1,16 @@
+This is tomoyo-tools-2.2.0_p20090727-gentoo.patch blindly ported to 2.3.0.
+Every other change is included by now.
+
+--- usr_lib_tomoyo/init_policy.c 2011-01-17 22:50:05.241899861 +0100
++++ usr_lib_tomoyo/init_policy.c 2011-01-17 22:51:00.172806713 +0100
+@@ -1106,6 +1106,10 @@
+ echo("file_pattern /etc/gshadow.\\$");
+ echo("file_pattern /etc/passwd.\\$");
+ echo("file_pattern /etc/shadow.\\$");
++ echo("file_pattern /etc/group.edit");
++ echo("file_pattern /etc/gshadow.edit");
++ echo("file_pattern /etc/passwd.edit");
++ echo("file_pattern /etc/shadow.edit");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/");
+ echo("file_pattern /var/cache/logwatch/logwatch.\\*/\\*");
+ echo("file_pattern /var/tmp/sqlite_\\*");
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20120414-flags-parallel.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20120414-flags-parallel.patch
new file mode 100644
index 000000000000..54c7963a9a60
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.3.0_p20120414-flags-parallel.patch
@@ -0,0 +1,82 @@
+--- a/Include.make
++++ b/Include.make
+@@ -1,4 +1,4 @@
+ USRSBINDIR := /usr/sbin
+ USRLIBDIR := /usr/lib
+ MAN8 := /usr/share/man/man8
+-CFLAGS := -Wall -O2 ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
++CFLAGS := -Wall ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -3,20 +3,18 @@ ALL_FILES = tomoyo_filesystem_test tomoyo_file_test tomoyo_rewrite_test newns to
+ all: $(ALL_FILES)
+ chmod 755 testall.sh
+
+-CC=gcc
+-
+-CFLAGS=-Wall -O2 ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
++CFLAGS += -Wall ${shell $(CC) -Wno-pointer-sign -S -o /dev/null -x c - < /dev/null > /dev/null 2>&1 && echo "-Wno-pointer-sign"}
+
+ #
+ # Tools for kernel testing.
+ #
+
+ tomoyo_new_test: tomoyo_new_test.c include.h
+- $(CC) $(CFLAGS) -o tomoyo_new_test tomoyo_new_test.c -lutil
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo_new_test tomoyo_new_test.c -lutil
+ chmod 700 tomoyo_new_test
+
+ .c: include.h
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ chmod 700 $@
+
+ #
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -9,7 +9,7 @@ install: all
+ cp -af --remove-destination $(BUILD_FILES) $(INSTALLDIR)/sbin/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+--- a/usr_lib_tomoyo/Makefile
++++ b/usr_lib_tomoyo/Makefile
+@@ -9,7 +9,7 @@ install: all
+ cp -af --remove-destination $(BUILD_FILES) tomoyotools.conf ../README.tomoyo ../COPYING.tomoyo $(INSTALLDIR)/usr/lib/tomoyo/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_sbin/Makefile b/usr_sbin/Makefile
+index cdaf507..2b7c4f0 100644
+--- a/usr_sbin/Makefile
++++ b/usr_sbin/Makefile
+@@ -14,17 +14,17 @@ $(BUILD_FILES): libtomoyotools.so
+ sleep 10
+
+ libtomoyotools.so: tomoyotools.c tomoyotools.h
+- $(CC) $(CFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.1 -o libtomoyotools.so.1.0.1
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.1 -o libtomoyotools.so.1.0.1
+ ln -sf libtomoyotools.so.1.0.1 libtomoyotools.so
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $< -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -ltomoyotools -L.
+
+ tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
+
+ tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
+
+ install: all
+ mkdir -p $(INSTALLDIR)/usr/sbin $(INSTALLDIR)/usr/lib
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.4.0_p20110929-flags-parallel.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.4.0_p20110929-flags-parallel.patch
new file mode 100644
index 000000000000..a2f084ae15e5
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.4.0_p20110929-flags-parallel.patch
@@ -0,0 +1,87 @@
+diff --git a/Include.make b/Include.make
+index 3f85e61..c34ba28 100644
+--- a/Include.make
++++ b/Include.make
+@@ -1,7 +1,5 @@
+-CC := gcc
+ INSTALL := install
+ SBINDIR := /sbin
+ USRSBINDIR := /usr/sbin
+ USRLIBDIR := /usr/lib
+ MAN8 := /usr/share/man/man8
+-CFLAGS := -Wall -O2
+diff --git a/kernel_test/Makefile b/kernel_test/Makefile
+index 2559b4b..ef599a2 100644
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -10,16 +10,14 @@ all: $(ALL_FILES)
+
+ $(ALL_FILES): include.h
+
+-CC=gcc
+-
+-CFLAGS=-Wall -O2
++CFLAGS += -Wall -O2
+
+ #
+ # Tools for kernel testing.
+ #
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ #
+ # Delete all test programs.
+diff --git a/sbin/Makefile b/sbin/Makefile
+index 0f53bc6..0e8e42e 100644
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -9,7 +9,7 @@ install: all
+ $(INSTALL) -m 0700 $(BUILD_FILES) $(INSTALLDIR)$(SBINDIR)
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_lib_tomoyo/Makefile b/usr_lib_tomoyo/Makefile
+index 94020ee..f20ae40 100644
+--- a/usr_lib_tomoyo/Makefile
++++ b/usr_lib_tomoyo/Makefile
+@@ -11,7 +11,7 @@ install: all
+ $(INSTALL) -m 0644 ../README.tomoyo ../COPYING.tomoyo $(INSTALLDIR)/$(USRLIBDIR)/tomoyo/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_sbin/Makefile b/usr_sbin/Makefile
+index fa715b0..5b991db 100644
+--- a/usr_sbin/Makefile
++++ b/usr_sbin/Makefile
+@@ -15,17 +15,17 @@ $(BUILD_FILES): libtomoyotools.so
+ sleep 10
+
+ libtomoyotools.so: tomoyotools.c tomoyotools.h
+- $(CC) $(CFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.2 -o libtomoyotools.so.2.0.2
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.2 -o libtomoyotools.so.2.0.2
+ ln -sf libtomoyotools.so.2.0.2 libtomoyotools.so
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $< -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -ltomoyotools -L.
+
+ tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
+
+ tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
+
+ install: all
+ mkdir -p -m 0755 $(INSTALLDIR)$(USRLIBDIR)
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20120414-flags-parallel.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20120414-flags-parallel.patch
new file mode 100644
index 000000000000..55583e1ddc58
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20120414-flags-parallel.patch
@@ -0,0 +1,87 @@
+diff --git a/Include.make b/Include.make
+index 3f85e61..c34ba28 100644
+--- a/Include.make
++++ b/Include.make
+@@ -1,7 +1,5 @@
+-CC := gcc
+ INSTALL := install
+ SBINDIR := /sbin
+ USRSBINDIR := /usr/sbin
+ USRLIBDIR := /usr/lib
+ MAN8 := /usr/share/man/man8
+-CFLAGS := -Wall -O2
+diff --git a/kernel_test/Makefile b/kernel_test/Makefile
+index 2559b4b..ef599a2 100644
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -10,16 +10,14 @@ all: $(ALL_FILES)
+
+ $(ALL_FILES): include.h
+
+-CC=gcc
+-
+-CFLAGS=-Wall -O2
++CFLAGS += -Wall -O2
+
+ #
+ # Tools for kernel testing.
+ #
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ #
+ # Delete all test programs.
+diff --git a/sbin/Makefile b/sbin/Makefile
+index 0f53bc6..0e8e42e 100644
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -9,7 +9,7 @@ install: all
+ $(INSTALL) -m 0700 $(BUILD_FILES) $(INSTALLDIR)$(SBINDIR)
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_lib_tomoyo/Makefile b/usr_lib_tomoyo/Makefile
+index 94020ee..f20ae40 100644
+--- a/usr_lib_tomoyo/Makefile
++++ b/usr_lib_tomoyo/Makefile
+@@ -11,7 +11,7 @@ install: all
+ $(INSTALL) -m 0644 ../README.tomoyo ../COPYING.tomoyo $(INSTALLDIR)/$(USRLIBDIR)/tomoyo/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_sbin/Makefile b/usr_sbin/Makefile
+index fa715b0..5b991db 100644
+--- a/usr_sbin/Makefile
++++ b/usr_sbin/Makefile
+@@ -15,17 +15,17 @@ $(BUILD_FILES): libtomoyotools.so
+ sleep 10
+
+ libtomoyotools.so: tomoyotools.c tomoyotools.h
+- $(CC) $(CFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.3 -o libtomoyotools.so.3.0.1
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.3 -o libtomoyotools.so.3.0.1
+ ln -sf libtomoyotools.so.3.0.1 libtomoyotools.so
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $< -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -ltomoyotools -L.
+
+ tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
+
+ tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
+
+ install: all
+ mkdir -p -m 0755 $(INSTALLDIR)$(USRLIBDIR)
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-flags-parallel.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-flags-parallel.patch
new file mode 100644
index 000000000000..55583e1ddc58
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-flags-parallel.patch
@@ -0,0 +1,87 @@
+diff --git a/Include.make b/Include.make
+index 3f85e61..c34ba28 100644
+--- a/Include.make
++++ b/Include.make
+@@ -1,7 +1,5 @@
+-CC := gcc
+ INSTALL := install
+ SBINDIR := /sbin
+ USRSBINDIR := /usr/sbin
+ USRLIBDIR := /usr/lib
+ MAN8 := /usr/share/man/man8
+-CFLAGS := -Wall -O2
+diff --git a/kernel_test/Makefile b/kernel_test/Makefile
+index 2559b4b..ef599a2 100644
+--- a/kernel_test/Makefile
++++ b/kernel_test/Makefile
+@@ -10,16 +10,14 @@ all: $(ALL_FILES)
+
+ $(ALL_FILES): include.h
+
+-CC=gcc
+-
+-CFLAGS=-Wall -O2
++CFLAGS += -Wall -O2
+
+ #
+ # Tools for kernel testing.
+ #
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ #
+ # Delete all test programs.
+diff --git a/sbin/Makefile b/sbin/Makefile
+index 0f53bc6..0e8e42e 100644
+--- a/sbin/Makefile
++++ b/sbin/Makefile
+@@ -9,7 +9,7 @@ install: all
+ $(INSTALL) -m 0700 $(BUILD_FILES) $(INSTALLDIR)$(SBINDIR)
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_lib_tomoyo/Makefile b/usr_lib_tomoyo/Makefile
+index 94020ee..f20ae40 100644
+--- a/usr_lib_tomoyo/Makefile
++++ b/usr_lib_tomoyo/Makefile
+@@ -11,7 +11,7 @@ install: all
+ $(INSTALL) -m 0644 ../README.tomoyo ../COPYING.tomoyo $(INSTALLDIR)/$(USRLIBDIR)/tomoyo/
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ clean:
+ rm -f -- $(BUILD_FILES)
+diff --git a/usr_sbin/Makefile b/usr_sbin/Makefile
+index fa715b0..5b991db 100644
+--- a/usr_sbin/Makefile
++++ b/usr_sbin/Makefile
+@@ -15,17 +15,17 @@ $(BUILD_FILES): libtomoyotools.so
+ sleep 10
+
+ libtomoyotools.so: tomoyotools.c tomoyotools.h
+- $(CC) $(CFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.3 -o libtomoyotools.so.3.0.1
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC tomoyotools.c -shared -Wl,-soname,libtomoyotools.so.3 -o libtomoyotools.so.3.0.1
+ ln -sf libtomoyotools.so.3.0.1 libtomoyotools.so
+
+ .c:
+- $(CC) $(CFLAGS) -o $@ $< -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -ltomoyotools -L.
+
+ tomoyo-editpolicy: tomoyotools.h editpolicy*.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-editpolicy editpolicy*.c -lncurses -ltomoyotools -L. -DCOLOR_ON
+
+ tomoyo-queryd: tomoyotools.h tomoyo-queryd.c readline.h /usr/include/curses.h libtomoyotools.so
+- $(CC) $(CFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
++ $(CC) $(CFLAGS) $(LDFLAGS) -o tomoyo-queryd tomoyo-queryd.c -lncurses -ltomoyotools -L.
+
+ install: all
+ mkdir -p -m 0755 $(INSTALLDIR)$(USRLIBDIR)
diff --git a/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch
new file mode 100644
index 000000000000..8201093bbecb
--- /dev/null
+++ b/sys-apps/tomoyo-tools/files/tomoyo-tools-2.5.0_p20130214-warnings.patch
@@ -0,0 +1,22 @@
+diff --git a/usr_sbin/editpolicy_offline.c b/usr_sbin/editpolicy_offline.c
+index dbbd11e..e699cf4 100644
+--- a/usr_sbin/editpolicy_offline.c
++++ b/usr_sbin/editpolicy_offline.c
+@@ -2882,7 +2882,7 @@ static bool ccs_parse_ipaddr_union(struct ccs_acl_param *param,
+ struct ccs_ipaddr_union *ptr)
+ {
+ struct ccs_ip_address_entry e;
+- memset(ptr, 0, sizeof(ptr));
++ memset(ptr, 0, sizeof(*ptr));
+ if (ccs_parse_ip(ccs_read_token(param), &e) == 0) {
+ memmove(&ptr->ip[0], e.min, sizeof(ptr->ip[0]));
+ memmove(&ptr->ip[1], e.max, sizeof(ptr->ip[1]));
+@@ -4745,7 +4745,7 @@ static void ccs_write_control(char *buffer, const size_t buffer_len)
+ *
+ * Returns nothing.
+ */
+-static void ccs_editpolicy_offline_init(coid)
++static void ccs_editpolicy_offline_init(void)
+ {
+ static _Bool first = true;
+ int i;
diff --git a/sys-apps/tomoyo-tools/metadata.xml b/sys-apps/tomoyo-tools/metadata.xml
new file mode 100644
index 000000000000..7ac93924f73b
--- /dev/null
+++ b/sys-apps/tomoyo-tools/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge-jp">tomoyo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild
new file mode 100644
index 000000000000..3180cef1d5a5
--- /dev/null
+++ b/sys-apps/tomoyo-tools/tomoyo-tools-2.5.0_p20130214.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${P/_p/-}"
+DESCRIPTION="TOMOYO Linux tools"
+HOMEPAGE="http://tomoyo.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/tomoyo/53357/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEPEND="sys-libs/ncurses"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ !sys-apps/ccs-tools"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-warnings.patch
+
+ # Fix libdir
+ sed -i \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ Include.make || die
+
+ # tinfo
+ sed -i \
+ -e 's|-lncurses|$(shell ${PKG_CONFIG} --libs ncurses)|g' \
+ usr_sbin/Makefile || die
+
+ echo "CONFIG_PROTECT=\"/usr/$(get_libdir)/tomoyo/conf\"" > "${T}/50${PN}"
+
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ dodir /usr/"$(get_libdir)"
+
+ emake INSTALLDIR="${D}" install
+
+ doenvd "${T}/50${PN}"
+
+ # Fix out-of-place readme and license
+ rm "${D}"/usr/$(get_libdir)/tomoyo/{COPYING.tomoyo,README.tomoyo} || die
+ dodoc README.tomoyo || die
+}
+
+pkg_postinst() {
+ elog "Execute the following command to setup the initial policy configuration:"
+ elog
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog
+ elog "For more information, please visit the following."
+ elog
+ elog "http://tomoyo.sourceforge.jp/"
+}
+
+pkg_config() {
+ /usr/$(get_libdir)/tomoyo/init_policy
+}