From 492d64e168224ac7b4019e506a8801ee13ee68ef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Aug 2010 22:27:28 +0000 Subject: [PATCH] * Syslinux updated to 4.02. svn path=/nixpkgs/trunk/; revision=23017 --- pkgs/os-specific/linux/syslinux/default.nix | 31 ++++--- .../linux/syslinux/perl-deps.patch | 81 +++++++++++++++++++ 2 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 pkgs/os-specific/linux/syslinux/perl-deps.patch diff --git a/pkgs/os-specific/linux/syslinux/default.nix b/pkgs/os-specific/linux/syslinux/default.nix index 42e6f0b8c296..ae9ed8bf539b 100644 --- a/pkgs/os-specific/linux/syslinux/default.nix +++ b/pkgs/os-specific/linux/syslinux/default.nix @@ -1,23 +1,20 @@ -{stdenv, fetchurl, nasm, perl}: +{ stdenv, fetchurl, nasm, perl }: -stdenv.mkDerivation { - name = "syslinux-3.35"; +stdenv.mkDerivation rec { + name = "syslinux-4.02"; + src = fetchurl { - url = mirror://kernel/linux/utils/boot/syslinux/Old/syslinux-3.35.tar.bz2; - sha256 = "16kf2zhd0c4m3ai9xcls2y0ggvajhmzk1g6mv6jrv8nskkg6w0l6"; + url = "mirror://kernel/linux/utils/boot/syslinux/4.xx/${name}.tar.bz2"; + sha256 = "0zrk6magnrfa7nmdk2rll7xaym9rapwqqgy0wdh3cfscjmcw9kwm"; }; - buildInputs = [nasm perl]; - preBuild = " - makeFlagsArray=(BINDIR=$out/bin SBINDIR=$out/sbin LIBDIR=$out/lib INCDIR=$out/include) + patches = [ ./perl-deps.patch ]; + + buildInputs = [ nasm perl ]; - # Really dirty hack to get syslinux to build without needing a GCC - # with 32-bit libraries and headers. - if test \"$system\" = x86_64-linux; then - substituteInPlace memdisk/Makefile \\ - --replace 'all: memdisk e820test' 'all: memdisk' - mkdir gnu - touch gnu/stubs-32.h - fi - "; + preBuild = + '' + substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo) + makeFlagsArray=(BINDIR=$out/bin SBINDIR=$out/sbin LIBDIR=$out/lib INCDIR=$out/include DATADIR=$out/share MANDIR=$out/share/man PERL=perl) + ''; } diff --git a/pkgs/os-specific/linux/syslinux/perl-deps.patch b/pkgs/os-specific/linux/syslinux/perl-deps.patch new file mode 100644 index 000000000000..82c9820809e1 --- /dev/null +++ b/pkgs/os-specific/linux/syslinux/perl-deps.patch @@ -0,0 +1,81 @@ +http://git.ipxe.org/ipxe.git/commitdiff/719b498 + +diff -ru -x '*~' -x '*.orig' -x '*.rej' syslinux-4.02-orig/gpxe/src/arch/i386/Makefile.pcbios syslinux-4.02/gpxe/src/arch/i386/Makefile.pcbios +--- syslinux-4.02-orig/gpxe/src/arch/i386/Makefile.pcbios 2010-07-21 21:33:13.000000000 +0200 ++++ syslinux-4.02/gpxe/src/arch/i386/Makefile.pcbios 2010-08-06 23:32:57.000000000 +0200 +@@ -24,11 +24,11 @@ + + # Padding rules + # +-PAD_rom = $(PADIMG) --blksize=512 --byte=0xff $@ ++PAD_rom = $(PERL) $(PADIMG) --blksize=512 --byte=0xff $@ + PAD_hrom = $(PAD_rom) + PAD_xrom = $(PAD_rom) +-PAD_dsk = $(PADIMG) --blksize=512 $@ +-PAD_hd = $(PADIMG) --blksize=32768 $@ ++PAD_dsk = $(PERL) $(PADIMG) --blksize=512 $@ ++PAD_hd = $(PERL) $(PADIMG) --blksize=32768 $@ + + # rule to make a non-emulation ISO boot image + NON_AUTO_MEDIA += iso +diff -ru -x '*~' -x '*.orig' -x '*.rej' syslinux-4.02-orig/gpxe/src/Makefile syslinux-4.02/gpxe/src/Makefile +--- syslinux-4.02-orig/gpxe/src/Makefile 2010-07-21 21:33:13.000000000 +0200 ++++ syslinux-4.02/gpxe/src/Makefile 2010-08-06 23:31:15.000000000 +0200 +@@ -31,12 +31,12 @@ + OBJCOPY := $(CROSS_COMPILE)objcopy + NM := $(CROSS_COMPILE)nm + OBJDUMP := $(CROSS_COMPILE)objdump +-PARSEROM := $(PERL) ./util/parserom.pl +-MAKEROM := $(PERL) ./util/makerom.pl +-SYMCHECK := $(PERL) ./util/symcheck.pl +-SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl +-PADIMG := $(PERL) ./util/padimg.pl +-LICENCE := $(PERL) ./util/licence.pl ++PARSEROM := ./util/parserom.pl ++MAKEROM := ./util/makerom.pl ++SYMCHECK := ./util/symcheck.pl ++SORTOBJDUMP := ./util/sortobjdump.pl ++PADIMG := ./util/padimg.pl ++LICENCE := ./util/licence.pl + NRV2B := ./util/nrv2b + ZBIN := ./util/zbin + ELF2EFI32 := ./util/elf2efi32 +diff -ru -x '*~' -x '*.orig' -x '*.rej' syslinux-4.02-orig/gpxe/src/Makefile.housekeeping syslinux-4.02/gpxe/src/Makefile.housekeeping +--- syslinux-4.02-orig/gpxe/src/Makefile.housekeeping 2010-07-21 21:33:13.000000000 +0200 ++++ syslinux-4.02/gpxe/src/Makefile.housekeeping 2010-08-06 23:31:49.000000000 +0200 +@@ -456,7 +456,7 @@ + '\n$(2) : $$($(4)_DEPS)\n' \ + '\nTAGS : $$($(4)_DEPS)\n' \ + >> $(2) +- @$(PARSEROM) $(1) >> $(2) ++ @$(PERL) $(PARSEROM) $(1) >> $(2) + + endef + +@@ -657,7 +657,7 @@ + $(QM)$(ECHO) " [LD] $@" + $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \ + -Map $(BIN)/$*.tmp.map +- $(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map ++ $(Q)$(OBJDUMP) -ht $@ | $(PERL) $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map + + # Keep intermediate object file (useful for debugging) + .PRECIOUS : $(BIN)/%.tmp +@@ -714,7 +714,7 @@ + echo "files are missing a licence declaration:" ;\ + echo $(call unlicensed_deps_list,$<);\ + exit 1,\ +- $(LICENCE) $(call licence_list,$<)) ++ $(PERL) $(LICENCE) $(call licence_list,$<)) + + # Extract compression information from intermediate object file + # +@@ -941,7 +941,7 @@ + CLEANUP += $(BIN)/symtab + + symcheck : $(SYMTAB) +- $(SYMCHECK) $< ++ $(PERL) $(SYMCHECK) $< + + endif # defined(BIN) +