--- openhackware-0.4.1.orig/debian/patches/series +++ openhackware-0.4.1/debian/patches/series @@ -0,0 +1,2 @@ +001_build.patch +002_gcc-4.patch --- openhackware-0.4.1.orig/debian/patches/002_gcc-4.patch +++ openhackware-0.4.1/debian/patches/002_gcc-4.patch @@ -0,0 +1,13 @@ +Index: b/src/main.ld +=================================================================== +--- a/src/main.ld 2005-03-31 10:23:33.000000000 +0300 ++++ b/src/main.ld 2007-12-12 08:37:04.000000000 +0200 +@@ -49,7 +49,7 @@ SECTIONS + _sdata_end = . ; + . = ALIGN(4) ; + _ro_start = . ; +- .rodata : { *(.rodata) } > bios ++ .rodata : { *(.rodata .rodata.*) } > bios + _ro_end = . ; + . = ALIGN(4) ; + _RTAS_start = .; --- openhackware-0.4.1.orig/debian/patches/001_build.patch +++ openhackware-0.4.1/debian/patches/001_build.patch @@ -0,0 +1,137 @@ +Index: b/Makefile +=================================================================== +--- a/Makefile 2005-03-31 10:23:33.000000000 +0300 ++++ b/Makefile 2007-12-12 08:36:58.000000000 +0200 +@@ -44,12 +44,14 @@ DISTDIR:= . + SRCDIR:= src + + CC_BASE:= $(shell $(CC) -print-search-dirs | grep install | sed -e 's/.*\ //') +-CFLAGS= -Wall -W -Werror -O2 -g -fno-builtin -fno-common -nostdinc -mregnames +-CFLAGS+= -DBUILD_DATE=$(BUILD_DATE) -DBUILD_TIME=$(BUILD_TIME) +-CFLAGS+= -I$(SRCDIR)/ -I$(SRCDIR)/libc/include -I$(CC_BASE)/include +-CFLAGS+= -I$(SRCDIR)/dev -I$(SRCDIR)/dev/block -I$(SRCDIR)/dev/char +-CFLAGS+= -I$(SRCDIR)/dev/bus +-LDFLAGS= -O2 -g -nostdlib ++CFLAGS= -Wall -W -Werror -O2 -g ++DEF_CFLAGS= $(CFLAGS) -fno-builtin -fno-common -nostdinc -mregnames ++DEF_CFLAGS+= -DBUILD_DATE=$(BUILD_DATE) -DBUILD_TIME=$(BUILD_TIME) ++DEF_CFLAGS+= -I$(SRCDIR)/ -I$(SRCDIR)/libc/include -I$(CC_BASE)/include ++DEF_CFLAGS+= -I$(SRCDIR)/dev -I$(SRCDIR)/dev/block -I$(SRCDIR)/dev/char ++DEF_CFLAGS+= -I$(SRCDIR)/dev/bus ++LDFLAGS= -O2 -g ++DEF_LDFLAGS= $(LDFLAGS) -nostdlib + + BIOS_IMAGE_BITS:= 19 + BIOS_IMAGE_SIZE:= $(shell echo $$(( 1 << $(BIOS_IMAGE_BITS) )) ) +@@ -113,8 +115,8 @@ dev_OBJS+= $(addprefix char_, $(chardev_ + main.out_OBJS+= $(addprefix $(OBJDIR)/dev_, $(dev_OBJS)) + + CUR= $(notdir $@) +-CFLAGS+= $($(CUR)_CFLAGS) +-LDFLAGS+= $($(CUR)_LDFLAGS) ++DEF_CFLAGS+= $($(CUR)_CFLAGS) ++DEF_LDFLAGS+= $($(CUR)_LDFLAGS) + + BIN_TARGETS:= $(OBJDIR)/vectors.bin $(OBJDIR)/main.bin $(OBJDIR)/boot.bin + TARGET:= ppc_rom.bin +@@ -156,79 +158,81 @@ $(OBJDIR)/%.bin: $(OBJDIR)/%.out + $(OBJCOPY) -O binary $($(notdir $@)_OPTIONS) $< $@ + + $(OBJDIR)/%.out: $(OBJDIR)/%.o $(SRCDIR)/%.ld +- $(LD) $(LDFLAGS) -o $@ $< ++ $(LD) $(DEF_LDFLAGS) -o $@ $< + + $(OBJDIR)/main.out: $(main.out_OBJS) $(SRCDIR)/main.ld +- $(LD) $(LDFLAGS) -o $@ $(main.out_OBJS) ++ $(LD) $(DEF_LDFLAGS) -o $@ $($(notdir $@)_OBJS) + + $(OBJDIR)/%.o: $(SRCDIR)/%.c $(SRCDIR)/bios.h + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + $(OBJDIR)/%.o: $(SRCDIR)/%.S $(SRCDIR)/bios.h + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -Wa,-mregnames -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -Wa,-mregnames -o $@ $< + +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + # Pseudo libc objects + $(OBJDIR)/%.o: $(SRCDIR)/libc/src/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + $(OBJDIR)/mem%.o: $(SRCDIR)/libc/src/mem.c +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/rawmemchr.o: $(SRCDIR)/libc/src/mem.c +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/str%.o: $(SRCDIR)/libc/src/str.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/stp%.o: $(SRCDIR)/libc/src/str.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/basename.o: $(SRCDIR)/libc/src/str.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/dirname.o: $(SRCDIR)/libc/src/str.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + $(OBJDIR)/%rintf.o: $(SRCDIR)/libc/src/format.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) $(CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< ++ $(CC) $(DEF_CFLAGS) -D__USE_$(subst .o,,$(@F))__ -c -o $@ $< + + # libexec objects + $(OBJDIR)/exec_%.o: $(SRCDIR)/libexec/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + # libfs objects + $(OBJDIR)/fs_%.o: $(SRCDIR)/libfs/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + # libpart objects + $(OBJDIR)/part_%.o: $(SRCDIR)/libpart/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + # Devices drivers + $(OBJDIR)/dev_%.o: $(SRCDIR)/dev/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< ++ + # Char devices drivers + $(OBJDIR)/dev_char_%.o: $(SRCDIR)/dev/char/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< ++ + # Bloc devices drivers + $(OBJDIR)/dev_bloc_%.o: $(SRCDIR)/dev/bloc/%.c + @$(DEBUG) "CFLAGS = $(CFLAGS)" +- $(CC) -c $(CFLAGS) -o $@ $< ++ $(CC) -c $(DEF_CFLAGS) -o $@ $< + + # Other targets + tarball: $(CURDIR)/Timestamp --- openhackware-0.4.1.orig/debian/control +++ openhackware-0.4.1/debian/control @@ -0,0 +1,19 @@ +Source: openhackware +Section: misc +Priority: optional +Maintainer: Guillem Jover +Homepage: http://perso.magic.fr/l_indien/OpenHackWare/ +Vcs-Browser: http://git.debian.org/?p=users/guillem/pkg-openhackware.git +Vcs-Git: git://git.debian.org/~guillem/pkg-openhackware.git +Build-Depends: quilt (>= 0.40), debhelper (>= 5.0.0) +Standards-Version: 3.7.3 + +Package: openhackware +Architecture: all +Description: OpenFirmware emulator for PowerPC + OpenHackWare is an OpenFirmware emulator intended to be used on PowerPC + machines. It is not a real OpenFirmware as it knows nothing about Forth. + It emulates the OpenFirmware boot time interface as well as the RTAS + interface. It also emulates some known "interpret" strings, to make it + able to launch known OSes. + --- openhackware-0.4.1.orig/debian/changelog +++ openhackware-0.4.1/debian/changelog @@ -0,0 +1,41 @@ +openhackware (0.4.1-3) unstable; urgency=low + + * Fix typo in package description. (Closes: #390236) + Thanks to Simon Waters . + * Now using Standards-Version 3.7.3 (no changes needed). + * Error out if the toolchain used to build is not powerpc-linux-gnu. + (Closes: #322300, #339870) + * Support cross-compiling by passing a cross prefix to make when not + building natively. + * Remove commented debhelper commands. + * Do not ignore make errors on 'debian/rules clean'. + * Switch to quilt: + - Remove now unused debian/patch.mk. + - Replace include of patch.mk with quilt.make in debian/rules. + - Add Build-Depends on 'quilt (>= 0.40)'. + * Move debhelper from Build-Depends-Indep to Build-Depends, needed by clean. + * Add Homepage field. + * Add Vcs-Browser and Vcs-Git fields. + + -- Guillem Jover Wed, 12 Dec 2007 08:57:39 +0200 + +openhackware (0.4.1-2) unstable; urgency=low + + * Stop Build-Depending on gcc-2.95, by adding the new missing .rodata.* + sections into the main.ld scripts thus fixing build with latest gcc:s. + - debian/patches/002_gcc-4.patch: New file. + * Pass an empty CROSS_COMPILE on clean. + * Switch to debhelper compat level 5. + * Now using Standards-Version 3.6.2 (no changes needed). + * Fix FSF's address. + * Rename clean target from debian/patch.mk to unpatch. + * Switch patch and unpatch to single colon rules and make them PHONY. + + -- Guillem Jover Tue, 21 Mar 2006 23:27:39 +0200 + +openhackware (0.4.1-1) unstable; urgency=low + + * Initial Release. (Closes: #303488) + + -- Guillem Jover Mon, 23 May 2005 23:35:19 +0300 + --- openhackware-0.4.1.orig/debian/docs +++ openhackware-0.4.1/debian/docs @@ -0,0 +1,2 @@ +README +TODO --- openhackware-0.4.1.orig/debian/copyright +++ openhackware-0.4.1/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Guillem Jover on +Mon, 4 Apr 2005 01:57:20 +0300. + +It was downloaded from: + + + +Copyright Holder: + + Jocelyn Mayer + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- openhackware-0.4.1.orig/debian/watch +++ openhackware-0.4.1/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://perso.magic.fr/l_indien/OpenHackWare/ .*/OpenHackWare-([0-9a-z.]*)\.tar\.bz2 + --- openhackware-0.4.1.orig/debian/compat +++ openhackware-0.4.1/debian/compat @@ -0,0 +1 @@ +5 --- openhackware-0.4.1.orig/debian/dirs +++ openhackware-0.4.1/debian/dirs @@ -0,0 +1 @@ +usr/share/openhackware --- openhackware-0.4.1.orig/debian/install +++ openhackware-0.4.1/debian/install @@ -0,0 +1 @@ +ppc_rom.bin usr/share/openhackware --- openhackware-0.4.1.orig/debian/rules +++ openhackware-0.4.1/debian/rules @@ -0,0 +1,69 @@ +#!/usr/bin/make -f +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifneq ($(DEB_BUILD_GNU_TYPE), powerpc-linux-gnu) + $(error "this package needs to be built with a powerpc-linux-gnu toolchain") +endif + +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + CROSS_PREFIX := "" +else + CROSS_PREFIX := "$(DEB_BUILD_GNU_TYPE)-" +endif + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +include /usr/share/quilt/quilt.make + +build: patch + dh_testdir + + $(MAKE) CROSS_COMPILE="$(CROSS_PREFIX)" CFLAGS="$(CFLAGS)" + +clean: unpatch + dh_testdir + dh_testroot + + $(MAKE) clean CROSS_COMPILE="$(CROSS_PREFIX)" + $(RM) ppc_rom.bin + + dh_clean + +binary-arch: build +# Nothing to do + +binary-indep: build + dh_testdir + dh_testroot + dh_installchangelogs Changelog + dh_installdocs + dh_install + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary install +