mirror of
https://github.com/dguglielmi/sunny-overlay.git
synced 2025-12-06 09:32:37 +01:00
- splashutils: Remove uneended patches and unused ebuild
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
--- initrd.splash 2008-11-13 23:49:00.000000000 +0100
|
||||
+++ initrd.splash.new 2010-07-27 21:35:24.647912782 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
init)
|
||||
if [ -n "$2" ]; then
|
||||
export BOOT_MSG="$2"
|
||||
- elif [ "${CDROOT}" -eq '1' ]; then
|
||||
+ elif [ "${CDROOT}" = '1' ]; then
|
||||
export BOOT_MSG="Preparing the LiveCD environment... Press Alt+F1 for verbose mode."
|
||||
else
|
||||
export BOOT_MSG="Preparing the system for boot... Press Alt+F1 for verbose mode."
|
||||
@@ -1,110 +0,0 @@
|
||||
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) {
|
||||
@@ -1,55 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
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) ; \
|
||||
@@ -1,96 +0,0 @@
|
||||
commit 1b760b583f1faa0d3114440a6746cbefa36dd797
|
||||
Author: AlphatPC <AlphatPC@gmail.com>
|
||||
Date: Sun May 8 17:18:03 2011 +0200
|
||||
|
||||
Use libpng accessor functions (for libpng-1.5 compat).
|
||||
|
||||
diff --git a/core/src/image.c b/core/src/image.c
|
||||
index 6973575..4fb21a9 100644
|
||||
--- a/core/src/image.c
|
||||
+++ b/core/src/image.c
|
||||
@@ -61,27 +61,27 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
|
||||
png_init_io(png_ptr, fp);
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
|
||||
- if (cmap && info_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
|
||||
+ if (cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_PALETTE)
|
||||
return -2;
|
||||
|
||||
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
|
||||
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
|
||||
+ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||
png_set_gray_to_rgb(png_ptr);
|
||||
|
||||
- if (info_ptr->bit_depth == 16)
|
||||
+ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
|
||||
png_set_strip_16(png_ptr);
|
||||
|
||||
- if (!want_alpha && info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
|
||||
+ if (!want_alpha && png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
|
||||
png_set_strip_alpha(png_ptr);
|
||||
|
||||
#ifndef TARGET_KERNEL
|
||||
- if (!(info_ptr->color_type & PNG_COLOR_MASK_ALPHA) & want_alpha) {
|
||||
+ if (!(png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) & want_alpha) {
|
||||
png_set_add_alpha(png_ptr, 0xff, PNG_FILLER_AFTER);
|
||||
}
|
||||
#endif
|
||||
png_read_update_info(png_ptr, info_ptr);
|
||||
|
||||
- if (!cmap && info_ptr->color_type != PNG_COLOR_TYPE_RGB && info_ptr->color_type != PNG_COLOR_TYPE_RGBA)
|
||||
+ if (!cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGB && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGBA)
|
||||
return -3;
|
||||
|
||||
if (cmap) {
|
||||
@@ -93,12 +93,12 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
|
||||
|
||||
rowbytes = png_get_rowbytes(png_ptr, info_ptr);
|
||||
|
||||
- if ((width && *width && info_ptr->width != *width) || (height && *height && info_ptr->height != *height)) {
|
||||
+ if ((width && *width && png_get_image_width(png_ptr, info_ptr) != *width) || (height && *height && png_get_image_height(png_ptr, info_ptr) != *height)) {
|
||||
iprint(MSG_ERROR, "Image size mismatch: %s.\n", filename);
|
||||
return -2;
|
||||
} else {
|
||||
- *width = info_ptr->width;
|
||||
- *height = info_ptr->height;
|
||||
+ *width = png_get_image_width(png_ptr, info_ptr);
|
||||
+ *height = png_get_image_height(png_ptr, info_ptr);
|
||||
}
|
||||
|
||||
*data = malloc(theme->xres * theme->yres * fbd.bytespp);
|
||||
@@ -114,11 +114,11 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
|
||||
return -4;
|
||||
}
|
||||
|
||||
- for (i = 0; i < info_ptr->height; i++) {
|
||||
+ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
|
||||
if (cmap) {
|
||||
- row_pointer = *data + info_ptr->width * i;
|
||||
+ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i;
|
||||
} else if (want_alpha) {
|
||||
- row_pointer = *data + info_ptr->width * i * 4;
|
||||
+ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i * 4;
|
||||
} else {
|
||||
row_pointer = buf;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
|
||||
|
||||
if (cmap) {
|
||||
int h = 256 - cmap->len;
|
||||
- t = *data + info_ptr->width * i;
|
||||
+ t = *data + png_get_image_width(png_ptr, info_ptr) * i;
|
||||
|
||||
if (h) {
|
||||
/* Move the colors up by 'h' offset. This is used because fbcon
|
||||
@@ -139,8 +139,8 @@ static int load_png(stheme_t *theme, char *filename, u8 **data, struct fb_cmap *
|
||||
|
||||
/* We only need to convert the image if the alpha channel is not required */
|
||||
} else if (!want_alpha) {
|
||||
- u8 *tmp = *data + info_ptr->width * bytespp * i;
|
||||
- rgba2fb((rgbacolor*)buf, tmp, tmp, info_ptr->width, i, 0, 0xff);
|
||||
+ u8 *tmp = *data + png_get_image_width(png_ptr, info_ptr) * bytespp * i;
|
||||
+ rgba2fb((rgbacolor*)buf, tmp, tmp, png_get_image_width(png_ptr, info_ptr), i, 0, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
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.
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
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) &&
|
||||
@@ -1,55 +0,0 @@
|
||||
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"
|
||||
|
||||
#########################################################################
|
||||
@@ -1,29 +0,0 @@
|
||||
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;
|
||||
@@ -1,21 +0,0 @@
|
||||
commit 7077483874a842c607d6e877696891ba4d5f1dd7
|
||||
Author: Michał Januszewski <spock@gentoo.org>
|
||||
Date: Sat Oct 9 21:07:37 2010 +0200
|
||||
|
||||
Fix a bug in splash-functions.sh.
|
||||
|
||||
This problem was reported in Gentoo bug #339767.
|
||||
|
||||
diff --git a/core/scripts/splash-functions.sh.in b/core/scripts/splash-functions.sh.in
|
||||
index 1a89486..2c39c6a 100644
|
||||
--- a/core/scripts/splash-functions.sh.in
|
||||
+++ b/core/scripts/splash-functions.sh.in
|
||||
@@ -341,7 +341,7 @@ splash_comm_send() {
|
||||
|
||||
# Returns the current splash mode.
|
||||
splash_get_mode() {
|
||||
- local ctty="${spl_bindir}/fgconsole"
|
||||
+ local ctty="$({spl_bindir}/fgconsole)"
|
||||
local mode="$(${spl_util})"
|
||||
|
||||
if [ "${mode}" = "silent" ]; then
|
||||
@@ -1,13 +0,0 @@
|
||||
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
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naurp splashutils-1.5.4.3-orig//scripts/splash-functions.sh.in splashutils-1.5.4.3/scripts/splash-functions.sh.in
|
||||
--- splashutils-1.5.4.3-orig//scripts/splash-functions.sh.in 2010-10-09 21:44:39.127691474 +0200
|
||||
+++ splashutils-1.5.4.3/scripts/splash-functions.sh.in 2010-10-09 21:44:54.678690080 +0200
|
||||
@@ -26,7 +26,7 @@ export spl_cachedir="@libdir@/splash/cac
|
||||
export spl_tmpdir="@libdir@/splash/tmp"
|
||||
export spl_fifo="${spl_cachedir}/.splash"
|
||||
export spl_pidfile="${spl_cachedir}/daemon.pid"
|
||||
-export spl_util="@bindir@/splash_util.static"
|
||||
+export spl_util="@sbindir@/splash_util.static"
|
||||
export spl_daemon="@sbindir@/fbsplashd.static"
|
||||
export spl_decor="@sbindir@/fbcondecor_ctl.static"
|
||||
export spl_bindir="@libdir@/splash/bin"
|
||||
diff -Naurp splashutils-1.5.4.3-orig//src/Makefile.am splashutils-1.5.4.3/src/Makefile.am
|
||||
--- splashutils-1.5.4.3-orig//src/Makefile.am 2010-10-09 21:44:39.121691920 +0200
|
||||
+++ splashutils-1.5.4.3/src/Makefile.am 2010-10-09 21:45:10.934689775 +0200
|
||||
@@ -166,7 +166,7 @@ if CONFIG_FBCON_DECOR
|
||||
sbin_PROGRAMS += fbcondecor_ctl
|
||||
endif
|
||||
sbin_PROGRAMS += fbsplashd
|
||||
-bin_PROGRAMS += splash_util
|
||||
+sbin_PROGRAMS += fbsplashd splash_util
|
||||
eexecsbin_PROGRAMS += fbsplashctl
|
||||
|
||||
fbcondecor_ctl_SOURCES = fbcon_decor_ctl.c fbcon_decor.h ../include/console_decor.h ../include/fbcondecor.h common.h fbsplash.h
|
||||
@@ -1,74 +0,0 @@
|
||||
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;
|
||||
@@ -1,99 +0,0 @@
|
||||
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;
|
||||
@@ -1,244 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-1.5.4.4-r2.ebuild,v 1.9 2013/10/14 12:52:34 pinkbyte Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit autotools eutils multilib toolchain-funcs
|
||||
|
||||
MISCSPLASH="miscsplashutils-0.1.8"
|
||||
GENTOOSPLASH="splashutils-gentoo-1.0.17"
|
||||
V_JPEG="8a"
|
||||
V_PNG="1.4.3"
|
||||
V_ZLIB="1.2.3"
|
||||
V_FT="2.3.12"
|
||||
|
||||
ZLIBSRC="libs/zlib-${V_ZLIB}"
|
||||
LPNGSRC="libs/libpng-${V_PNG}"
|
||||
JPEGSRC="libs/jpeg-${V_JPEG}"
|
||||
FT2SRC="libs/freetype-${V_FT}"
|
||||
|
||||
RESTRICT="test"
|
||||
IUSE="hardened +png +truetype +mng gpm fbcondecor"
|
||||
|
||||
DESCRIPTION="Framebuffer splash utilities."
|
||||
HOMEPAGE="http://fbsplash.berlios.de"
|
||||
SRC_URI="mirror://berlios/fbsplash/${PN}-lite-${PV}.tar.bz2
|
||||
mirror://berlios/fbsplash/${GENTOOSPLASH}.tar.bz2
|
||||
mirror://gentoo/${MISCSPLASH}.tar.bz2
|
||||
mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
|
||||
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v${V_JPEG}.tar.gz
|
||||
mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
|
||||
http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="gpm? ( sys-libs/gpm[static-libs(+)] )
|
||||
truetype? (
|
||||
>=media-libs/freetype-2[static-libs]
|
||||
app-arch/bzip2[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
png? (
|
||||
>=media-libs/libpng-1.4.3[static-libs]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
mng? (
|
||||
media-libs/lcms:0[static-libs]
|
||||
media-libs/libmng[static-libs(+)]
|
||||
)
|
||||
virtual/jpeg:0[static-libs]
|
||||
>=sys-apps/baselayout-1.9.4-r5
|
||||
app-arch/cpio
|
||||
media-gfx/fbgrab
|
||||
!sys-apps/lcdsplash"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-libs/klibc-1.5
|
||||
virtual/pkgconfig"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
SG="${WORKDIR}/${GENTOOSPLASH}"
|
||||
SM="${WORKDIR}/${MISCSPLASH}"
|
||||
|
||||
pkg_setup() {
|
||||
if use hardened; then
|
||||
ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
|
||||
ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
|
||||
ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
|
||||
ewarn "the splash kernel helper."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
|
||||
# We need to delete the Makefile and let it be rebuilt when splashutils
|
||||
# is being configured. Either that, or we end up with a segfaulting kernel
|
||||
# helper.
|
||||
rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
|
||||
|
||||
cd "${SG}"
|
||||
epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
|
||||
|
||||
if use truetype ; then
|
||||
cd "${SM}"
|
||||
epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
ln -sf "${S}/src" "${WORKDIR}/core"
|
||||
|
||||
epatch "${FILESDIR}/${P}-bzip2.patch"
|
||||
|
||||
if ! tc-is-cross-compiler && \
|
||||
has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
|
||||
ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
|
||||
ewarn "splashutils, you're on your own, as this configuration is not supported."
|
||||
else
|
||||
# This should make splashutils compile on systems with hardened GCC.
|
||||
sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
|
||||
fi
|
||||
|
||||
if ! use truetype ; then
|
||||
sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
|
||||
fi
|
||||
|
||||
# Latest version of klibc defined its own version of ferror, so there is
|
||||
# not need for the hack in klibc_compat.h
|
||||
if has_version ">=dev-libs/klibc-1.5.20"; then
|
||||
echo > "libs/klibc_compat.h"
|
||||
fi
|
||||
|
||||
rm -f m4/*
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
cd "${SM}"
|
||||
emake CC="${CC}" LIB=$(get_libdir) STRIP=true
|
||||
|
||||
cd "${S}"
|
||||
econf \
|
||||
$(use_with png) \
|
||||
$(use_with mng) \
|
||||
$(use_with gpm) \
|
||||
$(use_with truetype ttf) \
|
||||
$(use_with truetype ttf-kernel) \
|
||||
$(use_enable fbcondecor) \
|
||||
--docdir=/usr/share/doc/${PF} \
|
||||
--with-freetype2-src=${FT2SRC} \
|
||||
--with-jpeg-src=${JPEGSRC} \
|
||||
--with-lpng-src=${LPNGSRC} \
|
||||
--with-zlib-src=${ZLIBSRC} \
|
||||
--with-essential-libdir=/$(get_libdir)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="${CC}" STRIP="true"
|
||||
|
||||
if has_version ">=sys-apps/baselayout-1.13.99"; then
|
||||
cd "${SG}"
|
||||
emake LIB=$(get_libdir)
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local LIB=$(get_libdir)
|
||||
|
||||
cd "${SM}"
|
||||
make DESTDIR="${D}" LIB=${LIB} install
|
||||
|
||||
cd "${S}"
|
||||
make DESTDIR="${D}" STRIP="true" install
|
||||
|
||||
mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
|
||||
gen_usr_ldscript libfbsplash.so
|
||||
|
||||
echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
|
||||
doenvd 99splash
|
||||
|
||||
if use fbcondecor ; then
|
||||
newinitd "${SG}"/init-fbcondecor fbcondecor
|
||||
newconfd "${SG}"/fbcondecor.conf fbcondecor
|
||||
fi
|
||||
newconfd "${SG}"/splash.conf splash
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins "${SG}"/initrd.splash
|
||||
|
||||
insinto /etc/splash
|
||||
doins "${SM}"/fbtruetype/luxisri.ttf
|
||||
|
||||
if has_version ">=sys-apps/baselayout-1.13.99"; then
|
||||
cd "${SG}"
|
||||
make DESTDIR="${D}" LIB=${LIB} install
|
||||
else
|
||||
cp "${SG}"/splash-functions-bl1.sh "${D}"/sbin/
|
||||
fi
|
||||
|
||||
sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
|
||||
keepdir /${LIB}/splash/{tmp,cache,bin,sys}
|
||||
dosym /${LIB}/splash/bin/fbres /sbin/fbres
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
has_version "<${CATEGORY}/${PN}-1.0"
|
||||
previous_less_than_1_0=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.5.3"
|
||||
previous_less_than_1_5_3=$?
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version sys-fs/devfsd || ! has_version virtual/udev ; then
|
||||
elog "This package has been designed with udev in mind. Other solutions, such as"
|
||||
elog "devfs or a static /dev tree might work, but are generally discouraged and"
|
||||
elog "not supported. If you decide to switch to udev, you might want to have a"
|
||||
elog "look at 'The Gentoo udev Guide', which can be found at"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if [[ $previous_less_than_1_0 = 0 ]] ; then
|
||||
elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
|
||||
elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
|
||||
elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
|
||||
elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
|
||||
elog "to use fbcondecor, run:"
|
||||
elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
|
||||
elog "and re-emerge splashutils."
|
||||
fi
|
||||
|
||||
if ! test -f /proc/cmdline ||
|
||||
! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
|
||||
elog "It is required that you add 'console=tty1' to your kernel"
|
||||
elog "command line parameters."
|
||||
elog ""
|
||||
elog "After these modifications, the relevant part of the kernel command"
|
||||
elog "line might look like:"
|
||||
elog " splash=silent,fadein,theme:emergence console=tty1"
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if ! has_version 'media-gfx/splash-themes-livecd' &&
|
||||
! has_version 'media-gfx/splash-themes-gentoo'; then
|
||||
elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
|
||||
elog "core splashutils package. To get some themes you might want to emerge:"
|
||||
elog " media-gfx/splash-themes-livecd"
|
||||
elog " media-gfx/splash-themes-gentoo"
|
||||
fi
|
||||
|
||||
elog "Please note that the 'fbsplash' kernel patch has now been renamed to"
|
||||
elog "'fbcondecor'. Accordingly, the old 'splash' initscript is now called"
|
||||
elog "'fbcondecor'. Make sure you update your system. See:"
|
||||
elog " http://dev.gentoo.org/~spock/projects/fbcondecor/#history"
|
||||
elog "for further info about the name changes."
|
||||
elog ""
|
||||
elog "Also note that splash_util has now been split into splash_util, fbsplashd"
|
||||
elog "and fbcondecor_ctl."
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-1.5.4.4-r3.ebuild,v 1.4 2013/10/14 12:52:34 pinkbyte Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils multilib toolchain-funcs
|
||||
|
||||
MISCSPLASH="miscsplashutils-0.1.8"
|
||||
GENTOOSPLASH="splashutils-gentoo-1.0.17"
|
||||
V_JPEG="8a"
|
||||
V_PNG="1.4.3"
|
||||
V_ZLIB="1.2.3"
|
||||
V_FT="2.3.12"
|
||||
|
||||
ZLIBSRC="libs/zlib-${V_ZLIB}"
|
||||
LPNGSRC="libs/libpng-${V_PNG}"
|
||||
JPEGSRC="libs/jpeg-${V_JPEG}"
|
||||
FT2SRC="libs/freetype-${V_FT}"
|
||||
|
||||
RESTRICT="test"
|
||||
IUSE="hardened +png +truetype +mng gpm fbcondecor"
|
||||
|
||||
DESCRIPTION="Framebuffer splash utilities"
|
||||
HOMEPAGE="http://fbsplash.berlios.de"
|
||||
SRC_URI="
|
||||
mirror://berlios/fbsplash/${PN}-lite-${PV}.tar.bz2
|
||||
mirror://berlios/fbsplash/${GENTOOSPLASH}.tar.bz2
|
||||
mirror://gentoo/${MISCSPLASH}.tar.bz2
|
||||
mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
|
||||
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v${V_JPEG}.tar.gz
|
||||
mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
|
||||
http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2
|
||||
"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
gpm? ( sys-libs/gpm[static-libs(+)] )
|
||||
truetype? (
|
||||
>=media-libs/freetype-2[static-libs]
|
||||
app-arch/bzip2[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
png? (
|
||||
>=media-libs/libpng-1.4.3[static-libs]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
mng? (
|
||||
media-libs/lcms:0[static-libs]
|
||||
media-libs/libmng[static-libs(+)]
|
||||
)
|
||||
virtual/jpeg:0[static-libs]
|
||||
>=sys-apps/baselayout-1.9.4-r5
|
||||
app-arch/cpio
|
||||
media-gfx/fbgrab
|
||||
!sys-apps/lcdsplash"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-libs/klibc-1.5
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
SG="${WORKDIR}/${GENTOOSPLASH}"
|
||||
SM="${WORKDIR}/${MISCSPLASH}"
|
||||
|
||||
pkg_setup() {
|
||||
if use hardened; then
|
||||
ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
|
||||
ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
|
||||
ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
|
||||
ewarn "the splash kernel helper."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
|
||||
|
||||
# We need to delete the Makefile and let it be rebuilt when splashutils
|
||||
# is being configured. Either that, or we end up with a segfaulting kernel
|
||||
# helper.
|
||||
rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
|
||||
|
||||
cd "${SG}"
|
||||
epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
|
||||
|
||||
if use truetype ; then
|
||||
cd "${SM}"
|
||||
epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
ln -sf "${S}/src" "${WORKDIR}/core"
|
||||
|
||||
epatch "${FILESDIR}/${P}-bzip2.patch"
|
||||
epatch "${FILESDIR}/${P}-multi-keyboard.patch"
|
||||
|
||||
if ! tc-is-cross-compiler && \
|
||||
has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
|
||||
ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
|
||||
ewarn "splashutils, you're on your own, as this configuration is not supported."
|
||||
else
|
||||
# This should make splashutils compile on systems with hardened GCC.
|
||||
sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
|
||||
fi
|
||||
|
||||
if ! use truetype ; then
|
||||
sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
|
||||
fi
|
||||
|
||||
# Latest version of klibc defined its own version of ferror, so there is
|
||||
# not need for the hack in klibc_compat.h
|
||||
if has_version ">=dev-libs/klibc-1.5.20"; then
|
||||
echo > "libs/klibc_compat.h"
|
||||
fi
|
||||
|
||||
rm -f m4/*
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
cd "${SM}"
|
||||
emake CC="${CC}" LIB=$(get_libdir) STRIP=true
|
||||
|
||||
cd "${S}"
|
||||
econf \
|
||||
$(use_with png) \
|
||||
$(use_with mng) \
|
||||
$(use_with gpm) \
|
||||
$(use_with truetype ttf) \
|
||||
$(use_with truetype ttf-kernel) \
|
||||
$(use_enable fbcondecor) \
|
||||
--docdir=/usr/share/doc/${PF} \
|
||||
--with-freetype2-src=${FT2SRC} \
|
||||
--with-jpeg-src=${JPEGSRC} \
|
||||
--with-lpng-src=${LPNGSRC} \
|
||||
--with-zlib-src=${ZLIBSRC} \
|
||||
--with-essential-libdir=/$(get_libdir)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="${CC}" STRIP="true"
|
||||
|
||||
if has_version ">=sys-apps/baselayout-1.13.99"; then
|
||||
cd "${SG}"
|
||||
emake LIB=$(get_libdir)
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local LIB=$(get_libdir)
|
||||
|
||||
cd "${SM}"
|
||||
emake DESTDIR="${D}" LIB=${LIB} install
|
||||
|
||||
cd "${S}"
|
||||
emake DESTDIR="${D}" STRIP="true" install
|
||||
|
||||
mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
|
||||
gen_usr_ldscript libfbsplash.so
|
||||
|
||||
echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
|
||||
doenvd 99splash
|
||||
|
||||
if use fbcondecor ; then
|
||||
newinitd "${SG}"/init-fbcondecor fbcondecor
|
||||
newconfd "${SG}"/fbcondecor.conf fbcondecor
|
||||
fi
|
||||
newconfd "${SG}"/splash.conf splash
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins "${SG}"/initrd.splash
|
||||
|
||||
insinto /etc/splash
|
||||
doins "${SM}"/fbtruetype/luxisri.ttf
|
||||
|
||||
if has_version ">=sys-apps/baselayout-1.13.99"; then
|
||||
cd "${SG}"
|
||||
make DESTDIR="${D}" LIB=${LIB} install
|
||||
else
|
||||
cp "${SG}"/splash-functions-bl1.sh "${D}"/sbin/
|
||||
fi
|
||||
|
||||
sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
|
||||
keepdir /${LIB}/splash/{tmp,cache,bin,sys}
|
||||
dosym /${LIB}/splash/bin/fbres /sbin/fbres
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
has_version "<${CATEGORY}/${PN}-1.0"
|
||||
previous_less_than_1_0=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.5.3"
|
||||
previous_less_than_1_5_3=$?
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version sys-fs/devfsd || ! has_version virtual/udev ; then
|
||||
elog "This package has been designed with udev in mind. Other solutions, such as"
|
||||
elog "devfs or a static /dev tree might work, but are generally discouraged and"
|
||||
elog "not supported. If you decide to switch to udev, you might want to have a"
|
||||
elog "look at 'The Gentoo udev Guide', which can be found at"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if [[ $previous_less_than_1_0 = 0 ]] ; then
|
||||
elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
|
||||
elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
|
||||
elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
|
||||
elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
|
||||
elog "to use fbcondecor, run:"
|
||||
elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
|
||||
elog "and re-emerge splashutils."
|
||||
fi
|
||||
|
||||
if ! test -f /proc/cmdline ||
|
||||
! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
|
||||
elog "It is required that you add 'console=tty1' to your kernel"
|
||||
elog "command line parameters."
|
||||
elog ""
|
||||
elog "After these modifications, the relevant part of the kernel command"
|
||||
elog "line might look like:"
|
||||
elog " splash=silent,fadein,theme:emergence console=tty1"
|
||||
elog ""
|
||||
fi
|
||||
|
||||
if ! has_version 'media-gfx/splash-themes-livecd' &&
|
||||
! has_version 'media-gfx/splash-themes-gentoo'; then
|
||||
elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
|
||||
elog "core splashutils package. To get some themes you might want to emerge:"
|
||||
elog " media-gfx/splash-themes-livecd"
|
||||
elog " media-gfx/splash-themes-gentoo"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user