* Build splashutils properly.
svn path=/nixpkgs/trunk/; revision=7134
This commit is contained in:
parent
66b646d7e7
commit
88f1d8af8e
28
pkgs/development/libraries/libjpeg-static/builder.sh
Normal file
28
pkgs/development/libraries/libjpeg-static/builder.sh
Normal file
@ -0,0 +1,28 @@
|
||||
source $stdenv/setup
|
||||
|
||||
preConfigure=preConfigure
|
||||
preConfigure() {
|
||||
# Workarounds for the ancient libtool shipped by libjpeg.
|
||||
ln -s $libtool/bin/libtool .
|
||||
cp $libtool/share/libtool/config.guess .
|
||||
cp $libtool/share/libtool/config.sub .
|
||||
}
|
||||
|
||||
preInstall=preInstall
|
||||
preInstall() {
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
mkdir $out/lib
|
||||
mkdir $out/include
|
||||
mkdir $out/man
|
||||
mkdir $out/man/man1
|
||||
}
|
||||
|
||||
patchPhase=patchPhase
|
||||
patchPhase() {
|
||||
for i in $patches; do
|
||||
patch < $i
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
27
pkgs/development/libraries/libjpeg-static/default.nix
Normal file
27
pkgs/development/libraries/libjpeg-static/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{stdenv, fetchurl, libtool, static ? false}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libjpeg-6b";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/jpegsrc.v6b.tar.gz;
|
||||
md5 = "dbd5f3b47ed13132f04c685d608a7547";
|
||||
};
|
||||
inherit libtool;
|
||||
|
||||
configureFlags = "--enable-shared" +
|
||||
(if static then " --enable-static" else "");
|
||||
|
||||
# Required for building of dynamic libraries on Darwin.
|
||||
patches = [
|
||||
(fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/patch-ltconfig;
|
||||
md5 = "e6725fa4a09aa1de4ca75343fd0f61d5";
|
||||
})
|
||||
(fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/patch-ltmain.sh;
|
||||
#md5 = "489986ad8e7a93aef036766b25f321d5";
|
||||
md5 = "092a12aeb0c386dd7dae059109d950ba";
|
||||
})
|
||||
];
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, klibc, zlib, libjpeg}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "splashutils-1.3";
|
||||
@ -6,16 +6,20 @@ stdenv.mkDerivation {
|
||||
url = http://dev.gentoo.org/~spock/projects/splashutils/archive/splashutils-1.3.tar.bz2;
|
||||
md5 = "c7c92b98e34b860511aa57bd29d62f76";
|
||||
};
|
||||
patches = [./no-fbsplash.patch];
|
||||
patches = [./purity.patch ./no-fbsplash.patch];
|
||||
|
||||
buildInputs = [klibc zlib libjpeg];
|
||||
|
||||
inherit klibc;
|
||||
|
||||
dontAddPrefix = 1;
|
||||
configureScript = "sh ./configure";
|
||||
configureFlags = "--without-ttf --without-png --without-fbsplash";
|
||||
|
||||
# Hack hack hack.
|
||||
makeFlags = "KLCC=gcc";
|
||||
NIX_CFLAGS_COMPILE = "-Iobjs/jpeglib -Ilibs/jpeg-6b -Ilibs/freetype-2.1.9/include -Ilibs/libpng-1.2.8 -Ilibs/zlib-1.2.3";
|
||||
NIX_CFLAGS_LINK = "-Lobjs/jpeglib -Lobjs/freetype2/.libs -Llibs/zlib-1.2.3 -Llibs/libpng-1.2.8";
|
||||
makeFlags = "QUIET=false";
|
||||
|
||||
#NIX_CFLAGS_COMPILE = "-Iobjs/jpeglib -Ilibs/jpeg-6b -Ilibs/freetype-2.1.9/include -Ilibs/libpng-1.2.8 -Ilibs/zlib-1.2.3";
|
||||
#NIX_CFLAGS_LINK = "-Lobjs/jpeglib -Lobjs/freetype2/.libs -Llibs/zlib-1.2.3 -Llibs/libpng-1.2.8";
|
||||
|
||||
installPhase = "ensureDir $out/bin; cp objs/splash_helper objs/splash_util objs/splash_util.static $out/bin";
|
||||
}
|
||||
|
@ -1,48 +1,21 @@
|
||||
diff -rc splashutils-1.3-orig/Makefile splashutils-1.3/Makefile
|
||||
*** splashutils-1.3-orig/Makefile 2006-07-15 00:02:22.000000000 +0200
|
||||
--- splashutils-1.3/Makefile 2006-11-25 01:22:03.000000000 +0100
|
||||
***************
|
||||
*** 57,63 ****
|
||||
PNGDEFS = -DPNG_NO_WRITE_TIME -DPNG_NO_FLOATING_POINT_SUPPORTED -DPNG_NO_WRITE_SUPPORTED -DPNG_NO_READ_iTXt \
|
||||
-DPNG_LEGACY_SUPPORTED -DPNG_NO_PROGRESSIVE_READ -DPNG_NO_MNG_FEATURES -DPNG_NO_CONSOLE_IO \
|
||||
-DPNG_NO_ERROR_NUMBERS -DPNG_READ_GRAY_TO_RGB_SUPPORTED -DPNG_READ_16_TO_8_SUPPORTED \
|
||||
! -DPNG_READ_STRIP_ALPHA_SUPPORTED -DPNG_NO_INFO_IMAGE -DPNG_NO_READ_TRANSFORMS -DPNG_NO_READ_ANCILLARY_CHUNKS
|
||||
|
||||
K_LDLIBS = $(OBJDIR)/jpeglib/libjpeg.a
|
||||
K_OBJS = $(KOUT)/kernel.o $(KOUT)/dev.o $(KOUT)/parse.o $(KOUT)/render.o $(KOUT)/image.o \
|
||||
--- 57,63 ----
|
||||
PNGDEFS = -DPNG_NO_WRITE_TIME -DPNG_NO_FLOATING_POINT_SUPPORTED -DPNG_NO_WRITE_SUPPORTED -DPNG_NO_READ_iTXt \
|
||||
-DPNG_LEGACY_SUPPORTED -DPNG_NO_PROGRESSIVE_READ -DPNG_NO_MNG_FEATURES -DPNG_NO_CONSOLE_IO \
|
||||
-DPNG_NO_ERROR_NUMBERS -DPNG_READ_GRAY_TO_RGB_SUPPORTED -DPNG_READ_16_TO_8_SUPPORTED \
|
||||
! -DPNG_READ_STRIP_ALPHA_SUPPORTED -DPNG_NO_INFO_IMAGE -DPNG_NO_READ_ANCILLARY_CHUNKS
|
||||
|
||||
K_LDLIBS = $(OBJDIR)/jpeglib/libjpeg.a
|
||||
K_OBJS = $(KOUT)/kernel.o $(KOUT)/dev.o $(KOUT)/parse.o $(KOUT)/render.o $(KOUT)/image.o \
|
||||
Only in splashutils-1.3/: Makefile~
|
||||
diff -rc splashutils-1.3-orig/splash.h splashutils-1.3/splash.h
|
||||
*** splashutils-1.3-orig/splash.h 2006-07-15 00:02:23.000000000 +0200
|
||||
--- splashutils-1.3/splash.h 2006-11-25 00:42:08.000000000 +0100
|
||||
***************
|
||||
*** 21,30 ****
|
||||
*/
|
||||
#ifdef TARGET_KERNEL
|
||||
#include <linux/fb.h>
|
||||
! #include <linux/console_splash.h>
|
||||
#else
|
||||
! #include <fb.h>
|
||||
! #include <console_splash.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
--- 21,30 ----
|
||||
*/
|
||||
#ifdef TARGET_KERNEL
|
||||
#include <linux/fb.h>
|
||||
! //#include <linux/console_splash.h>
|
||||
#else
|
||||
! #include <linux/fb.h>
|
||||
! //#include <console_splash.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
Only in splashutils-1.3/: splash.h~
|
||||
diff --git a/splash.h b/splash.h
|
||||
index 5dccfe0..eae2939 100644
|
||||
--- a/splash.h
|
||||
+++ b/splash.h
|
||||
@@ -30,10 +30,14 @@ #endif
|
||||
*/
|
||||
#ifdef TARGET_KERNEL
|
||||
#include <linux/fb.h>
|
||||
- #include <linux/console_splash.h>
|
||||
+ #ifdef CONFIG_FBSPLASH
|
||||
+ #include <linux/console_splash.h>
|
||||
+ #endif
|
||||
#else
|
||||
#include <fb.h>
|
||||
- #include <console_splash.h>
|
||||
+ #ifdef CONFIG_FBSPLASH
|
||||
+ #include <console_splash.h>
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
38
pkgs/os-specific/linux/splashutils/purity.patch
Normal file
38
pkgs/os-specific/linux/splashutils/purity.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff -rc splashutils-1.3-orig/Makefile splashutils-1.3/Makefile
|
||||
*** splashutils-1.3-orig/Makefile 2006-07-15 00:02:22.000000000 +0200
|
||||
--- splashutils-1.3/Makefile 2006-11-26 00:25:48.000000000 +0100
|
||||
***************
|
||||
*** 28,34 ****
|
||||
usrbindir = ${prefix}/usr/bin
|
||||
mandir = ${prefix}/usr/share/man
|
||||
|
||||
! INSTALL = /usr/bin/install -c
|
||||
INSTALL_PROG = ${INSTALL}
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROG}
|
||||
--- 28,34 ----
|
||||
usrbindir = ${prefix}/usr/bin
|
||||
mandir = ${prefix}/usr/share/man
|
||||
|
||||
! INSTALL = install -c
|
||||
INSTALL_PROG = ${INSTALL}
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROG}
|
||||
***************
|
||||
*** 71,77 ****
|
||||
|
||||
# Include the klibc header files so that we can compile against fb.h
|
||||
# from a kernel thee patched with fbsplash.
|
||||
! INCLUDES = -I/usr/include/freetype2 -idirafter /usr/lib/klibc/include/linux
|
||||
OBJS = $(OBJDIR)/splash.o $(OBJDIR)/parse.o $(OBJDIR)/render.o $(OBJDIR)/image.o \
|
||||
$(OBJDIR)/cmd.o $(OBJDIR)/common.o $(OBJDIR)/daemon.o $(OBJDIR)/daemon_cmd.o \
|
||||
$(OBJDIR)/list.o $(OBJDIR)/effects.o
|
||||
--- 71,77 ----
|
||||
|
||||
# Include the klibc header files so that we can compile against fb.h
|
||||
# from a kernel thee patched with fbsplash.
|
||||
! INCLUDES = -I${freetype}/include/freetype2 -idirafter ${klibc}/lib/klibc/include/linux
|
||||
OBJS = $(OBJDIR)/splash.o $(OBJDIR)/parse.o $(OBJDIR)/render.o $(OBJDIR)/image.o \
|
||||
$(OBJDIR)/cmd.o $(OBJDIR)/common.o $(OBJDIR)/daemon.o $(OBJDIR)/daemon_cmd.o \
|
||||
$(OBJDIR)/list.o $(OBJDIR)/effects.o
|
||||
Only in splashutils-1.3/: Makefile~
|
@ -985,10 +985,6 @@ rec {
|
||||
|
||||
flex = flex254a;
|
||||
|
||||
#flexWrapper = import ../development/tools/parsing/flex-wrapper {
|
||||
# inherit stdenv flex ;
|
||||
#};
|
||||
|
||||
flex2533 = import ../development/tools/parsing/flex/flex-2.5.33.nix {
|
||||
inherit fetchurl stdenv yacc;
|
||||
m4 = gnum4;
|
||||
@ -1426,6 +1422,11 @@ rec {
|
||||
inherit fetchurl stdenv libtool;
|
||||
};
|
||||
|
||||
libjpegStatic = import ../development/libraries/libjpeg-static {
|
||||
inherit fetchurl stdenv libtool;
|
||||
static = true;
|
||||
};
|
||||
|
||||
libmad = import ../development/libraries/libmad {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
@ -2188,7 +2189,9 @@ rec {
|
||||
};
|
||||
|
||||
splashutils = import ../os-specific/linux/splashutils {
|
||||
inherit fetchurl stdenv;
|
||||
inherit fetchurl stdenv klibc;
|
||||
zlib = zlibStatic;
|
||||
libjpeg = libjpegStatic;
|
||||
};
|
||||
|
||||
squashfsTools = import ../os-specific/linux/squashfs {
|
||||
|
Loading…
Reference in New Issue
Block a user