summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2010-04-08 07:46:38 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2010-04-08 07:46:38 +0000
commitba6cc2a9f7d945371c375fc43a96c2c2da853dd0 (patch)
tree822e1eba72dbcdadccafaf1df8f7de7b18aa8c10 /games-util/grfcodec
parentstable x86, bug 307847 (diff)
downloadgentoo-2-ba6cc2a9f7d945371c375fc43a96c2c2da853dd0.tar.gz
gentoo-2-ba6cc2a9f7d945371c375fc43a96c2c2da853dd0.tar.bz2
gentoo-2-ba6cc2a9f7d945371c375fc43a96c2c2da853dd0.zip
initial commit - ebuild and patch submitted by Locke 'Wizzleby' Shinseiko via bug #300328
(Portage version: 2.1.7.17/cvs/Linux i686)
Diffstat (limited to 'games-util/grfcodec')
-rw-r--r--games-util/grfcodec/ChangeLog12
-rw-r--r--games-util/grfcodec/files/grfcodec-0_pre2306-build.patch144
-rw-r--r--games-util/grfcodec/grfcodec-0_pre2306.ebuild41
-rw-r--r--games-util/grfcodec/metadata.xml5
4 files changed, 202 insertions, 0 deletions
diff --git a/games-util/grfcodec/ChangeLog b/games-util/grfcodec/ChangeLog
new file mode 100644
index 000000000000..55f8861856fc
--- /dev/null
+++ b/games-util/grfcodec/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for games-util/grfcodec
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-util/grfcodec/ChangeLog,v 1.1 2010/04/08 07:46:37 mr_bones_ Exp $
+
+*grfcodec-0_pre2306 (08 Apr 2010)
+
+ 08 Apr 2010; Michael Sterrett <mr_bones_@gentoo.org>
+ +grfcodec-0_pre2306.ebuild, +files/grfcodec-0_pre2306-build.patch,
+ +metadata.xml:
+ initial commit - ebuild and patch submitted by Locke 'Wizzleby' Shinseiko
+ via bug #300328
+
diff --git a/games-util/grfcodec/files/grfcodec-0_pre2306-build.patch b/games-util/grfcodec/files/grfcodec-0_pre2306-build.patch
new file mode 100644
index 000000000000..3cde281527c8
--- /dev/null
+++ b/games-util/grfcodec/files/grfcodec-0_pre2306-build.patch
@@ -0,0 +1,144 @@
+diff --git a/Makefile b/Makefile
+index 50e420c..c0e877b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,29 +62,32 @@ endif
+ else
+ INSTALLPATH=$(INSTALLPATH_MSYS_MINGW)
+ endif
+-else
++else
+ INSTALLPATH=$(INSTALLPATH_LINUX)
+ endif
+ endif
+
+ # use 386 instructions but optimize for pentium II/III
+-CFLAGS = -g -D$(TYPESIZE) -O3 -I. -O1 -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized $(CFLAGAPP)
++CFLAGS += -D$(TYPESIZE) -I. -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
++CXXFLAGS += -D$(TYPESIZE) -I. -idirafter$(BOOST_INCLUDE) -Wall -Wno-uninitialized
+
+ ifeq ($(DEBUG),1)
+ CFLAGS += -DDEBUG
++CXXFLAGS += -DDEBUG
+ endif
+
+ ifeq ($(MACHINE),mingw32)
+ CFLAGS += -DMINGW
++CXXFLAGS += -DMINGW
+ endif
+
+ ifeq ($(ISCYGWIN),1)
+ ifeq ($(NOCYGWIN),1)
+ CFLAGS += -DMINGW -mno-cygwin
++CXXFLAGS += -DMINGW -mno-cygwin
+ endif
+ endif
+
+-CXXFLAGS = $(CFLAGS)
+
+
+ # Somewhat automatic detection of the correct boost include folder
+@@ -171,7 +174,7 @@ endif
+ PAL_FILES = pals/$(subst &,.bcp pals/,$(PALORDER)).bcp
+
+ # deafult targets
+-all: $(GRFCODEC) $(GRFDIFF) $(GRFMERGE)
++all: version.h $(GRFCODEC) $(GRFDIFF) $(GRFMERGE)
+ remake: clean all
+
+ ${MAKEFILELOCAL}:
+@@ -181,15 +184,15 @@ ${MAKEFILELOCAL}:
+
+ $(GRFCODEC): $(GRFCODECSRC:%.c=%.o)
+ $(_E) [LD] $@
+- $(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
++ $(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
+
+ $(GRFDIFF): $(GRFDIFFSRC:%.c=%.o) grfmrg.o
+ $(_E) [LD] $@
+- $(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
++ $(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
+
+ $(GRFMERGE): $(GRFMERGESRC:%.c=%.o)
+ $(_E) [LD] $@
+- $(_C)$(CXX) -o $@ $(CFLAGS) $^ $(LDOPT)
++ $(_C)$(CXX) -o $@ $(CXXFLAGS) $^ $(LDOPT)
+
+
+ clean:
+@@ -219,9 +222,7 @@ FORCE:
+ $(_E) [REBUILD] $(@:%_r=%)
+ $(_C)rm -f $(@:%_r=%)
+ $(_C)$(MAKE) ${_S} $(@:%_r=%)
+- $(_E) [STRIP/UPX] $(@:%_r=%)
+ $(_C)$(STRIP) $(@:%_r=%)
+- $(_C)upx $(_Q) --best $(@:%_r=%)
+
+ release: $(GRFCODEC)_r $(GRFDIFF)_r $(GRFMERGE)_r
+
+@@ -230,9 +231,7 @@ grfmrgc.bin: grfmerge.os $(GRFMERGESRC:%.c=%.os)
+ $(_C)rm -f $@
+ $(_E) [LD] $@
+ $(_C)$(CC) -o $@ $(CFLAGS) -Os $^
+- $(_E) [STRIP/UPX] $@
+ $(_C)$(STRIP) $@
+- $(_C)upx $(_Q) --best $@
+
+ grfmrg.c: grfmrgc.bin grfmrgc.pl
+ $(_E) [PERL] $@
+@@ -291,15 +290,18 @@ ttdpal.h: $(PAL_FILES) pal2c.pl
+
+ %.o.d:
+ $(_E) [CPP DEP] $@
+- $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG $*.c* -MF $@
++ $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG error.c getopt.c grfcomm.c grfmerge.c path.c -MF $@
++ $(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc -MF $@
+
+ %.os.d:
+ $(_E) [CPP DEP] $@
+- $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ $*.c*
++ $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ error.c getopt.c grfcomm.c grfmerge.c path.c
++ $(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc
+
+-%.obj.d: $(wildcard %.c*)
++%.obj.d:
+ $(_E) [CPP DEP] $@
+- $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ $*.c*
++ $(_C)$(CC) $(CFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ error.c getopt.c grfcomm.c grfmerge.c path.c
++ $(_C)$(CXX) $(CXXFLAGS) -DMAKEDEP -MM -MG -MT ${subst .d,,$@} -MF $@ file.cc grfcodec.cc grfdiff.cc info.cc pcxfile.cc pcxsprit.cc readinfo.cc sprites.cc
+
+ ifndef NO_MAKEFILE_DEP
+ -include $(GRFCODECSRC:%.c=%.o.d)
+diff --git a/Makefile.common b/Makefile.common
+index c559c0a..fe99591 100644
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -5,9 +5,7 @@ FORCE:
+ $(_E) [REBUILD] $(@:%_r=%)
+ $(_C)rm -f $(@:%_r=%)$(EXE)
+ $(_C)make -f $(MAKEFILE) $(_S) $(@:%_r=%)
+- $(_E) [STRIP/UPX] $(@:%_r=%)
+ $(_C)strip $(@:%_r=%)$(REL_EXE)
+- $(_C)upx $(_Q) --best $(@:%_r=%)$(REL_EXE)
+
+ release: grfcodec_r grfdiff_r grfmerge_r
+
+@@ -16,9 +14,7 @@ grfmrgc.bin: grfmerge.os $(GRFMERGESRC:%.c=%.os)
+ $(_C)rm -f $@
+ $(_E) [LD] $@
+ $(_C)$(CC) -o $@ $(CFLAGS) -Os $^
+- $(_E) [STRIP/UPX] $@
+ $(_C)strip $@
+- $(_C)upx $(_Q) --best $@
+
+ grfmrg.c: grfmrgc.bin grfmrgc.pl
+ $(_E) [PERL] $@
+@@ -32,7 +28,7 @@ ttdpal.h: $(PAL_FILES) pal2c.pl
+
+ readinfo.o: readinfo.cc
+ $(_E) [CPP] $@
+- $(BOOST_WARN)
++ $(BOOST_WARN)
+ $(_C)$(CXX) -c -o $@ -MMD -MG -MF $@.d $(CXXFLAGS) $<
+
+ %.o : %.c
diff --git a/games-util/grfcodec/grfcodec-0_pre2306.ebuild b/games-util/grfcodec/grfcodec-0_pre2306.ebuild
new file mode 100644
index 000000000000..37dfbed13fe1
--- /dev/null
+++ b/games-util/grfcodec/grfcodec-0_pre2306.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-util/grfcodec/grfcodec-0_pre2306.ebuild,v 1.1 2010/04/08 07:46:37 mr_bones_ Exp $
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+MY_PV=${PV/0_pre/r}
+DESCRIPTION="A suite of programs to modify openttd/Transport Tycoon Deluxe's GRF files"
+HOMEPAGE="http://binaries.openttd.org/extra/grfcodec/"
+SRC_URI="http://binaries.openttd.org/extra/grfcodec/${MY_PV}/${PN}-${MY_PV}-source.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+DEPEND="dev-lang/perl
+ dev-libs/boost"
+RDEPEND=""
+
+src_prepare() {
+ cat > Makefile.local <<-__EOF__
+ CC = $(tc-getCC)
+ CXX = $(tc-getCXX)
+ CFLAGS = ${CFLAGS}
+ CXXFLAGS = ${CXXFLAGS}
+ LDOPTS = ${LDFLAGS}
+ STRIP = :
+ V = 1
+ __EOF__
+
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_install() {
+ dobin ${PN} grf{diff,merge} || die
+ dodoc *.txt Changelog || die
+}
diff --git a/games-util/grfcodec/metadata.xml b/games-util/grfcodec/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/games-util/grfcodec/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>