summaryrefslogtreecommitdiff
path: root/media-gfx/splashutils/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/splashutils/files')
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-daemon-exit-signal.patch110
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-fix_rc_var.patch55
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-libjpeg.patch36
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-makefile.patch27
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-nondefault-runlevel.patch24
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-effects.patch55
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-umount-fix.patch29
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.3-splash_geninitramfs.patch13
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2-2.patch43
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch15
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch19
-rw-r--r--media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch74
-rw-r--r--media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch99
13 files changed, 599 insertions, 0 deletions
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-daemon-exit-signal.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-daemon-exit-signal.patch
new file mode 100644
index 00000000..82284f1d
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-daemon-exit-signal.patch
@@ -0,0 +1,110 @@
+diff --git a/core/src/daemon.c b/core/src/daemon.c
+index e3463fc..eae23ec 100644
+--- a/core/src/daemon.c
++++ b/core/src/daemon.c
+@@ -306,6 +306,35 @@ void handler_alarm(int unused)
+ return;
+ }
+
++int process_switch_sig(int sig)
++{
++ /* Switch from silent to verbose. */
++ if (sig == SIGUSR1) {
++ pthread_mutex_lock(&mtx_paint);
++ pthread_mutex_lock(&mtx_tty);
++ ioctl(fd_tty[config.tty_s], VT_RELDISP, 1);
++ pthread_mutex_unlock(&mtx_tty);
++
++ ctty = CTTY_VERBOSE;
++ pthread_mutex_unlock(&mtx_paint);
++ return 1;
++ /* Switch back to silent. */
++ } else if (sig == SIGUSR2) {
++ pthread_mutex_lock(&mtx_paint);
++ pthread_mutex_lock(&mtx_tty);
++ ioctl(fd_tty[config.tty_s], VT_RELDISP, 2);
++ pthread_mutex_unlock(&mtx_tty);
++
++ ctty = CTTY_SILENT;
++ pthread_mutex_unlock(&mtx_paint);
++
++ switch_silent();
++ return 2;
++ }
++
++ return 0;
++}
++
+ /*
+ * Signal handler.
+ *
+@@ -315,7 +344,7 @@ void handler_alarm(int unused)
+ */
+ void* thf_sighandler(void *unusued)
+ {
+- sigset_t sigset;
++ sigset_t sigset, sigset_switch;
+ int sig;
+
+ /* We don't handle SIGALRM. */
+@@ -329,31 +358,39 @@ void* thf_sighandler(void *unusued)
+ sigaddset(&sigset, SIGTERM);
+ sigaddset(&sigset, SIGINT);
+
++ sigemptyset(&sigset_switch);
++ sigaddset(&sigset_switch, SIGUSR1);
++ sigaddset(&sigset_switch, SIGUSR2);
++
+ while (1) {
+ sigwait(&sigset, &sig);
+
+- /* Switch from silent to verbose. */
+- if (sig == SIGUSR1) {
+- pthread_mutex_lock(&mtx_paint);
+- pthread_mutex_lock(&mtx_tty);
+- ioctl(fd_tty[config.tty_s], VT_RELDISP, 1);
+- pthread_mutex_unlock(&mtx_tty);
+-
+- ctty = CTTY_VERBOSE;
+- pthread_mutex_unlock(&mtx_paint);
+- /* Switch back to silent. */
+- } else if (sig == SIGUSR2) {
+- pthread_mutex_lock(&mtx_paint);
+- pthread_mutex_lock(&mtx_tty);
+- ioctl(fd_tty[config.tty_s], VT_RELDISP, 2);
+- pthread_mutex_unlock(&mtx_tty);
+-
+- ctty = CTTY_SILENT;
+- pthread_mutex_unlock(&mtx_paint);
++ process_switch_sig(sig);
++
++ /* Internally generated terminate signal */
++ if (sig == SIGINT) {
++ struct timespec timeout;
++ timeout.tv_sec = 0;
++ timeout.tv_nsec = 0;
++ bool pending = true;
++
++ /*
++ * Process any remaining signals. There are no guarantees as to the
++ * order in which the signals are delivered, so we have to make sure
++ * all pending signals are processed before exiting.
++ */
++ while (pending) {
++ sig = sigtimedwait(&sigset_switch, NULL, &timeout);
++
++ if (sig == -1) {
++ /* No more pending signals. */
++ if (errno == EAGAIN)
++ pending = false;
++ } else {
++ process_switch_sig(sig);
++ }
++ }
+
+- switch_silent();
+- } else if (sig == SIGINT) {
+- /* internally generated terminate signal */
+ do_cleanup();
+ pthread_exit(NULL);
+ } else if (sig == SIGTERM) {
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-fix_rc_var.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-fix_rc_var.patch
new file mode 100644
index 00000000..3b9e06b4
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-fix_rc_var.patch
@@ -0,0 +1,55 @@
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index b6fa774..726315f 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -134,6 +134,19 @@ static void get_list(RC_STRINGLIST *list, const char *file)
+ }
+ }
+
++static void fix_rc_variable(char *s)
++{
++ do {
++ char *t = strstr(s, "\\$");
++
++ if (t) {
++ memmove(t, t+1, strlen(t));
++ } else {
++ break;
++ }
++ } while(1);
++}
++
+ /*
+ * Get splash settings from /etc/conf.d/splash
+ */
+@@ -189,21 +202,27 @@ static int splash_config_gentoo(fbspl_cfg_t *cfg, fbspl_type_t type)
+ switch(type) {
+ case fbspl_reboot:
+ t = rc_config_value(confd, "SPLASH_REBOOT_MESSAGE");
+- if (t)
++ if (t) {
++ fix_rc_variable(t);
+ fbsplash_acc_message_set(t);
++ }
+ break;
+
+ case fbspl_shutdown:
+ t = rc_config_value(confd, "SPLASH_SHUTDOWN_MESSAGE");
+- if (t)
++ if (t) {
++ fix_rc_variable(t);
+ fbsplash_acc_message_set(t);
++ }
+ break;
+
+ case fbspl_bootup:
+ default:
+ t = rc_config_value(confd, "SPLASH_BOOT_MESSAGE");
+- if (t)
++ if (t) {
++ fix_rc_variable(t);
+ fbsplash_acc_message_set(t);
++ }
+ break;
+ }
+
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-libjpeg.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-libjpeg.patch
new file mode 100644
index 00000000..16d7ac20
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-libjpeg.patch
@@ -0,0 +1,36 @@
+diff --git a/core/libs/Makefile.am b/core/libs/Makefile.am
+index d070b29..c0a9258 100644
+--- a/core/libs/Makefile.am
++++ b/core/libs/Makefile.am
+@@ -53,7 +53,7 @@ libfreetype.a: klibc_compat.h
+ if ! $(MAKE) --question $(AM_MAKEFLAGS) CFLAGS="$(K_CFLAGS)" library ; then \
+ $(call infmsg,MAKE,libfreetype.a) ; \
+ fi ; \
+- $(MAKE) $(AM_MAKEFLAGS) CFLAGS="-c $(K_CFLAGS)" CCexe="$(BUILD_CC)" library $(OUTPUT)
++ $(MAKE) $(AM_MAKEFLAGS) CFLAGS="-c $(K_CFLAGS)" CCexe="$(BUILD_CC)" ANSIFLAGS="" library $(OUTPUT)
+ $(Q)$(MKDIR_P) $(@D)
+ $(Q)cp -f libfreetype/.libs/libfreetype.a $@
+
+@@ -62,18 +62,18 @@ libjpeg.a:
+ $(Q)cd libjpeg ; \
+ if test ! -e ./Makefile ; then \
+ $(call infmsg,CONF,libjpeg.a) ; \
+- CC=$(KLCC) CFLAGS="$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg" $(LIBJPEG_SOURCE)/configure \
++ CC=$(KLCC) CFLAGS="$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg -include $(abs_top_srcdir)/libs/klibc_compat.h" $(LIBJPEG_SOURCE)/configure \
+ --host=$(host) --build=$(build_triplet) $(OUTPUT) ; \
+ echo "#define NO_GETENV 1" >> jconfig.h ; \
+ $(SED) -i "s#CFLAGS=.*#CFLAGS=$(K_CFLAGS) -I$(abs_top_builddir)/libs/libjpeg#" Makefile ; \
+ $(SED) -i "s:#define JMESSAGE.*::" $(LIBJPEG_SOURCE)/jerror.c ; \
+ fi ; \
+- if ! $(MAKE) --question $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.a ; then \
++ if ! $(MAKE) --question $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.la ; then \
+ $(call infmsg,MAKE,libjpeg.a) ; \
+ fi ; \
+- $(MAKE) $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.a $(OUTPUT)
++ $(MAKE) $(AM_MAKEFLAGS) CC="$(KLCC)" libjpeg.la $(OUTPUT)
+ $(Q)$(MKDIR_P) $(@D)
+- $(Q)cp -f libjpeg/libjpeg.a $@
++ $(Q)cp -f libjpeg/.libs/libjpeg.a $@
+
+ libpng.a: libz.a
+ $(Q)cd $(LIBPNG_SOURCE) ; \
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-makefile.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-makefile.patch
new file mode 100644
index 00000000..060cc9d2
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-makefile.patch
@@ -0,0 +1,27 @@
+diff --git a/core/src/Makefile.am b/core/src/Makefile.am
+index 20cb03e..fa6919d 100644
+--- a/core/src/Makefile.am
++++ b/core/src/Makefile.am
+@@ -119,7 +119,7 @@ libfbsplashrender_la_SOURCES = \
+ fbsplash.h
+ libfbsplashrender_la_CFLAGS = $(AM_CFLAGS)
+ libfbsplashrender_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplashrender_version)
+-libfbsplashrender_la_LIBADD = -lfbsplash
++libfbsplashrender_la_LIBADD = libfbsplash.la
+
+ libfbsplashrender_la_CFLAGS += $(JPEG_CFLAGS)
+ libfbsplashrender_la_LIBADD += $(JPEG_LIBS)
+@@ -258,10 +258,10 @@ fbcondecor_helper_LDFLAGS += -static
+ endif
+
+ # Override automake's generation of target rules for building fbcondecor_helper.
+-fbcondecor_helper: $(fbcondecor_helper_LDADD) $(fbcondecor_helper_OBJECTS)
++fbcondecor_helper: $(fbcondecor_helper_LDADD) $(fbcondecor_helper_OBJECTS) $(lib_LTLIBRARIES)
+ @$(call infmsg,LD,$@)
+ $(Q)$(MKDIR_P) $(@D)
+- $(Q)$(KLCC) $(fbcondecor_helper_CFLAGS) $(fbcondecor_helper_LDFLAGS) $+ $(fbcondecor_helper_LDADD) -o $@
++ $(Q)$(KLCC) $(fbcondecor_helper_CFLAGS) $(fbcondecor_helper_LDFLAGS) $(fbcondecor_helper_OBJECTS) $(fbcondecor_helper_LDADD) -o $@
+ $(Q)$(STRIP) $@
+
+ # Override automake's generation of target rules for building fbcondecor_helper object files.
+
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-nondefault-runlevel.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-nondefault-runlevel.patch
new file mode 100644
index 00000000..f395eca3
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-nondefault-runlevel.patch
@@ -0,0 +1,24 @@
+commit 6f9aa3a3bc11e539613facf3caba5dcdb43c0117
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Sun Nov 22 20:56:47 2009 +0100
+
+ gentoo: make sure the splash daemon works when boot goes through a named runlevel other than default
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index d831d0c..4b9a5b9 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -777,10 +777,12 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ hook != RC_HOOK_RUNLEVEL_START_OUT)
+ goto exit;
+ } else {
++ int pid;
++
+ /* We're starting/stopping a runlevel. Check whether we're
+ * actually booting/rebooting. */
+ if (rc_runlevel_starting() && strcmp(runlev, bootlevel) &&
+- strcmp(runlev, defaultlevel) && strcmp(runlev, RC_LEVEL_SYSINIT))
++ strcmp(runlev, RC_LEVEL_SYSINIT) && fbsplash_check_daemon(&pid))
+ goto exit;
+
+ if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) &&
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-effects.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-effects.patch
new file mode 100644
index 00000000..ede28b05
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-effects.patch
@@ -0,0 +1,55 @@
+commit 7cf5fd02bbc6422ddbc9af7185cc47657148deb0
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Sun Apr 4 16:19:40 2010 +0200
+
+ gentoo: only enable the effects that are actually selected.
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index 4b9a5b9..5220571 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -660,7 +660,7 @@ static int splash_start(const char *runlevel)
+ (config->type == fbspl_reboot) ? "reboot" : ((config->type == fbspl_shutdown) ? "shutdown" : "bootup"),
+ (config->kdmode == KD_GRAPHICS) ? "--kdgraphics" : "",
+ (config->textbox_visible) ? "--textbox" : "",
+- (config->effects & (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) ? "--effects=fadeout,fadein" :
++ ((config->effects & (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) == (FBSPL_EFF_FADEOUT | FBSPL_EFF_FADEIN)) ? "--effects=fadeout,fadein" :
+ ((config->effects & FBSPL_EFF_FADEOUT) ? "--effects=fadeout" :
+ ((config->effects & FBSPL_EFF_FADEIN) ? "--effects=fadein" : "")));
+
+@@ -716,11 +716,7 @@ static int splash_stop(const char *runlevel)
+
+ /* If we don't get a runlevel argument, then we're being executed
+ * because of a rc-abort event and we don't save any data. */
+- if (runlevel == NULL) {
+- return fbsplash_cache_cleanup(NULL);
+- } else {
+- return fbsplash_cache_cleanup(save);
+- }
++ return fbsplash_cache_cleanup(save);
+ }
+
+ int rc_plugin_hook(RC_HOOK hook, const char *name)
+
+commit d711147fc835cf408a9a4e7432fc565a6b952183
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Sun Apr 4 16:57:23 2010 +0200
+
+ gentoo: add some comments in splash.conf
+
+diff --git a/gentoo/splash.conf b/gentoo/splash.conf
+index 4cf0a32..f056382 100644
+--- a/gentoo/splash.conf
++++ b/gentoo/splash.conf
+@@ -21,7 +21,10 @@ SPLASH_TEXTBOX="no"
+ SPLASH_AUTOVERBOSE="0"
+
+ # Name of the boot service starting X. Useful in cases when X is started
+-# by a custom initscript, other than the usual 'xdm'.
++# by a custom initscript, other than the usual 'xdm'. If you are using a
++# custom X initscript and do not set this variable correctly, do not be
++# surprised if you end up at tty1 at the end of the boot process (instead of
++# in an X session).
+ # SPLASH_XSERVICE="xdm"
+
+ #########################################################################
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-umount-fix.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-umount-fix.patch
new file mode 100644
index 00000000..dcb1ef99
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-openrc-umount-fix.patch
@@ -0,0 +1,29 @@
+commit ae4b5cc9c2d904e18db51876d9bd292504714600
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Mon Apr 6 20:59:48 2009 +0200
+
+ Prevent umounting of theme directories.
+
+ Some themes dynamically modify themselves during boot. In order to be
+ able to do that, they mount a tmpfs in their main directory. Prevent
+ openrc from umounting this directory when rebooting.
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index 048e0ec..d831d0c 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -968,10 +968,10 @@ do_start:
+ if (name && !strcmp(name, "localmount")) {
+ char *umounts = getenv("RC_NO_UMOUNTS");
+
+- if (umounts)
+- fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s:%s", umounts, FBSPLASH_CACHEDIR);
+- else
+- fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s", FBSPLASH_CACHEDIR);
++ if (umounts)
++ fprintf(rc_environ_fd, "RC_NO_UMOUNTS=%s:" FBSPLASH_CACHEDIR ":/etc/splash/%s", umounts, config->theme);
++ else
++ fprintf(rc_environ_fd, "RC_NO_UMOUNTS=" FBSPLASH_CACHEDIR ":/etc/splash/%s", config->theme);
+ }
+ i = splash_svc_handle(name, "svc_stop", false);
+ break;
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.3-splash_geninitramfs.patch b/media-gfx/splashutils/files/splashutils-1.5.4.3-splash_geninitramfs.patch
new file mode 100644
index 00000000..c7e0cd26
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.3-splash_geninitramfs.patch
@@ -0,0 +1,13 @@
+diff --git a/core/scripts/splash_geninitramfs.in b/core/scripts/splash_geninitramfs.in
+index 9d75d21..ff9b75b 100644
+--- a/core/scripts/splash_geninitramfs.in
++++ b/core/scripts/splash_geninitramfs.in
+@@ -149,7 +149,7 @@ if [ "$mode" == "a" ]; then
+ fi
+
+ printv "o Creating directory structure.."
+-mkdir -p ${imgdir}/{dev,dev/fb,dev/misc,dev/vc,$themedir,lib/splash/proc,root,sbin,lib/splash/sys}
++mkdir -p ${imgdir}/{dev,dev/fb,dev/misc,dev/vc,$themedir,@libdir@/splash/proc,root,sbin,@libdir@/splash/sys}
+
+ if [ $EUID == 0 ]; then
+ [[ ! -e "${imgdir}/dev/null" ]] && mknod "${imgdir}/dev/null" c 1 3
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2-2.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2-2.patch
new file mode 100644
index 00000000..e821c16e
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2-2.patch
@@ -0,0 +1,43 @@
+ core/configure.ac | 6 ++++++
+ core/src/Makefile.am | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/core/configure.ac b/core/configure.ac
+index c5fbb84..ae9e235 100644
+--- a/core/configure.ac
++++ b/core/configure.ac
+@@ -616,6 +616,7 @@ AS_IF(
+ AC_SUBST([PNG_CFLAGS])
+ AC_SUBST([PNG_LIBS])
+
++BZ2_LIBS=
+ AS_IF(
+ [test "x${config_ttf}" = "xyes"],
+ [
+@@ -625,8 +626,13 @@ AS_IF(
+ ,
+ [AC_MSG_ERROR([freetype was not found.])]
+ )
++ AC_CHECK_LIB([bz2], [BZ2_bzDecompress],
++ [BZ2_LIBS="${BZ2_LIBS} -lbz2"],
++ [AC_MSG_ERROR(['libbz2' library was not found.])]
++ )
+ ]
+ )
++AC_SUBST([BZ2_LIBS])
+
+ AH_TOP([#ifndef __SPLASH_CONFIG_H
+ #define __SPLASH_CONFIG_H])
+diff --git a/core/src/Makefile.am b/core/src/Makefile.am
+index d6ce315..349b5e7 100644
+--- a/core/src/Makefile.am
++++ b/core/src/Makefile.am
+@@ -190,7 +190,7 @@ fbsplashctl_SOURCES = $(fbsplashd_SOURCES) $(splash_util_SOURCES) fbspla
+ fbsplashctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_STATIC_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS) -DUNIFIED_BUILD
+ fbsplashctl_CPPFLAGS = $(fbsplashd_CPPFLAGS) $(splash_util_CPPFLAGS)
+ fbsplashctl_LDFLAGS = $(AM_LDFLAGS) -all-static
+-fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS)
++fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS) $(BZ2_LIBS)
+
+ if CONFIG_FBCON_DECOR
+ fbsplashctl_SOURCES += $(fbcondecor_ctl_SOURCES)
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch
new file mode 100644
index 00000000..3438fd52
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch
@@ -0,0 +1,15 @@
+=== modified file 'fbtruetype/Makefile'
+--- fbtruetype/Makefile 2011-10-01 14:10:17 +0000
++++ fbtruetype/Makefile 2011-10-01 14:15:02 +0000
+@@ -23,8 +23,8 @@
+ OBJECTS = fbtruetype.o messages.o console.o ttf.o luxisri.o
+
+ LDFLAGS += -L$(LIBDIR)
+-LIBSS = $(LIBDIR)/libfreetype.a $(LIBDIR)/libz.a -lm
+-LIBSD = -lfreetype -lm
++LIBSS = $(shell pkg-config freetype2 --libs --static) -lm
++LIBSD = $(shell pkg-config freetype2 --libs) -lm
+
+ CFLAGS += -I/usr/include/freetype2
+ COMPILE = $(CC) $(CFLAGS)
+
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch
new file mode 100644
index 00000000..4b8d5137
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch
@@ -0,0 +1,19 @@
+commit 74dda8291efae78f00bb781148c8fd4fccaeb764
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Tue Jun 14 23:23:33 2011 +0200
+
+ Fix typo in the Gentoo initscript.
+
+diff --git a/gentoo/init-fbcondecor b/gentoo/init-fbcondecor
+index b66f40a..ce921b6 100755
+--- a/gentoo/init-fbcondecor
++++ b/gentoo/init-fbcondecor
+@@ -12,7 +12,7 @@ start() {
+ splash_setup
+
+ if [ -z "${FBCONDECOR_TTYS}" ]; then
+- FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER}:-12}")
++ FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER:-12}}")
+ fi
+
+ local err=0
diff --git a/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch b/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch
new file mode 100644
index 00000000..bc7b6ee0
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-openrc-0.4-fix.patch
@@ -0,0 +1,74 @@
+commit a58099249acdce1fbdab19f5dfea0704c4c545f2
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Sun Dec 28 13:32:16 2008 +0100
+
+ gentoo: make the splash plugin work with OpenRC 0.4.*
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index 26d0fa4..b6fa774 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -593,7 +593,7 @@ static int splash_start(const char *runlevel)
+
+ /* Get a list of services that we'll have to handle. */
+ /* We're rebooting/shutting down. */
+- if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN) || !strcmp(runlevel, RC_LEVEL_REBOOT)) {
++ if (!strcmp(runlevel, RC_LEVEL_SHUTDOWN)) {
+ if ((err = fbsplash_cache_prep()))
+ return err;
+ splash_svcs_stop(runlevel);
+@@ -690,10 +690,14 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ int retval = 0;
+
+ runlev = rc_runlevel_get();
+- if (!strcmp(runlev, RC_LEVEL_REBOOT))
+- type = fbspl_reboot;
+- else if (!strcmp(runlev, RC_LEVEL_SHUTDOWN))
+- type = fbspl_shutdown;
++ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) {
++ char *t = getenv("RUNLEVEL");
++ if (t && !strcmp(t, "6")) {
++ type = fbspl_reboot;
++ } else {
++ type = fbspl_shutdown;
++ }
++ }
+
+ /* Get boot and default levels from env variables exported by RC.
+ * If unavailable, use the default ones. */
+@@ -716,7 +720,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ list = rc_stringlist_new();
+ get_list_fp(list, fp);
+ TAILQ_FOREACH(s, list, entries)
+- rc_service_mark(s->value, RC_SERVICE_COLDPLUGGED);
++ rc_service_mark(s->value, RC_SERVICE_HOTPLUGGED);
+ pclose(fp);
+ rc_stringlist_free(list);
+ }
+@@ -739,7 +743,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ goto exit;
+
+ if (rc_runlevel_stopping() && strcmp(runlev, bootlevel) &&
+- strcmp(runlev, RC_LEVEL_REBOOT) && strcmp(runlev, RC_LEVEL_SHUTDOWN))
++ strcmp(runlev, RC_LEVEL_SHUTDOWN))
+ goto exit;
+ }
+
+@@ -763,7 +767,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ case RC_HOOK_RUNLEVEL_STOP_IN:
+ /* Start the splash daemon on reboot. The theme hook is called
+ * from splash_start(). */
+- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
++ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ if ((i = splash_start(name))) {
+ fbsplash_set_verbose(0);
+ retval= i;
+@@ -788,7 +792,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+ case RC_HOOK_RUNLEVEL_STOP_OUT:
+ /* Make sure the progress indicator reaches 100%, even if
+ * something went wrong along the way. */
+- if (strcmp(name, RC_LEVEL_REBOOT) == 0 || strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
++ if (strcmp(name, RC_LEVEL_SHUTDOWN) == 0) {
+ config->verbosity = FBSPL_VERB_QUIET;
+ i = fbsplash_check_daemon(&pid_daemon);
+ config->verbosity = FBSPL_VERB_NORMAL;
diff --git a/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch b/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch
new file mode 100644
index 00000000..36d4ef02
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-openrc-0.4.3-runlevel-fix.patch
@@ -0,0 +1,99 @@
+commit 4bb63f7fb23b11591e2984ce87d4f36d80e29d65
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Wed Mar 25 22:26:04 2009 +0100
+
+ gentoo: export the sysvinit RUNLEVEL variable for compatibility reasons
+
+ OpenRC 0.4.3+ no longer exports some sysvinit variables, including
+ RUNLEVEL. In order to avoid breaking themes and scripts which still
+ rely on this variable being present, we compute a suitable RUNLEVEL
+ value using the data available in OpenRC and then export it in
+ splash_call().
+
+diff --git a/gentoo/splash.c b/gentoo/splash.c
+index 726315f..048e0ec 100644
+--- a/gentoo/splash.c
++++ b/gentoo/splash.c
+@@ -41,7 +41,7 @@
+ #define SPLASH_CMD "export SPLASH_XRES='%d'; export SPLASH_YRES='%d';" \
+ "export SOFTLEVEL='%s'; export BOOTLEVEL='%s';" \
+ "export DEFAULTLEVEL='%s'; export svcdir=${RC_SVCDIR};" \
+- ". /sbin/splash-functions.sh; %s %s %s"
++ "export RUNLEVEL='%s'; . /sbin/splash-functions.sh; %s %s %s"
+
+ static char *bootlevel = NULL;
+ static char *defaultlevel = NULL;
+@@ -260,11 +260,32 @@ static int splash_config_gentoo(fbspl_cfg_t *cfg, fbspl_type_t type)
+ return 0;
+ }
+
++static const char *splash_sysvinit_runlevel(const char *runlevel)
++{
++ const char *runlev = runlevel ? runlevel : rc_runlevel_get();
++
++ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) {
++ char *t = getenv("RC_REBOOT");
++ if (t && !strcmp(t, "YES")) {
++ return "6";
++ } else {
++ return "0";
++ }
++ } else if (!strcmp(runlev, RC_LEVEL_SYSINIT)) {
++ return "S";
++ } else if (!strcmp(runlev, RC_LEVEL_SINGLE)) {
++ return "1";
++ } else {
++ return "3";
++ }
++}
++
++
+ /*
+ * Call a function from /sbin/splash-functions.sh.
+ * This is rather slow, so use it only when really necessary.
+ */
+-static int splash_call(const char *cmd, const char *arg1, const char *arg2)
++static int splash_call(const char *cmd, const char *arg1, const char *arg2, const char *runlevel)
+ {
+ char *c;
+ int l;
+@@ -285,7 +306,8 @@ static int splash_call(const char *cmd, const char *arg1, const char *arg2)
+
+ snprintf(c, l, SPLASH_CMD, xres, yres,
+ arg1 ? (strcmp(arg1, RC_LEVEL_SYSINIT) == 0 ? bootlevel : soft) : soft,
+- bootlevel, defaultlevel, cmd, arg1 ? arg1 : "", arg2 ? arg2 : "");
++ bootlevel, defaultlevel, runlevel,
++ cmd, arg1 ? arg1 : "", arg2 ? arg2 : "");
+ l = system(c);
+ free(c);
+ return l;
+@@ -316,15 +338,16 @@ static int splash_theme_hook(const char *name, const char *type, const char *arg
+ }
+
+ if (!strcmp(name, "rc_init") || !strcmp(name, "rc_exit")) {
+- l = splash_call(buf, arg1, getenv("RUNLEVEL"));
++ const char *t = splash_sysvinit_runlevel(arg1);
++ l = splash_call(buf, arg1, t, t);
+ } else if (!strcmp(name, "svc_started") || !strcmp(name, "svc_stopped")) {
+ /*
+ * Set the 2nd parameter to 0 so that we don't break themes using the
+ * legacy interface in which these events contained an error code.
+ */
+- l = splash_call(buf, arg1, "0");
++ l = splash_call(buf, arg1, "0", splash_sysvinit_runlevel(NULL));
+ } else {
+- l = splash_call(buf, arg1, NULL);
++ l = splash_call(buf, arg1, NULL, splash_sysvinit_runlevel(NULL));
+ }
+ free(buf);
+ return l;
+@@ -710,8 +733,7 @@ int rc_plugin_hook(RC_HOOK hook, const char *name)
+
+ runlev = rc_runlevel_get();
+ if (!strcmp(runlev, RC_LEVEL_SHUTDOWN)) {
+- char *t = getenv("RUNLEVEL");
+- if (t && !strcmp(t, "6")) {
++ if (!strcmp(splash_sysvinit_runlevel(NULL), "6")) {
+ type = fbspl_reboot;
+ } else {
+ type = fbspl_shutdown;