summaryrefslogtreecommitdiff
path: root/games-util/makeobj
diff options
context:
space:
mode:
authoreroen2014-12-26 13:08:21 +0100
committereroen2014-12-26 19:01:50 +0100
commitec9a099db4960ae7390871e863e875a4cd62df67 (patch)
tree4f1228a0edea19e7fbe0f0d520530a238df2aa0c /games-util/makeobj
parentaa11b3d3e64623fbf8c8f43e18a6028f86279dc8 (diff)
downloaderoen-overlay-ec9a099db4960ae7390871e863e875a4cd62df67.tar.gz
eroen-overlay-ec9a099db4960ae7390871e863e875a4cd62df67.tar.bz2
eroen-overlay-ec9a099db4960ae7390871e863e875a4cd62df67.tar.xz
makeobj - split from simutrans
Diffstat (limited to 'games-util/makeobj')
-rw-r--r--games-util/makeobj/Manifest1
-rw-r--r--games-util/makeobj/files/makeobj-0.120.0.1-Makefile-2.patch22
-rw-r--r--games-util/makeobj/files/makeobj-0.120.0.1-Makefile.patch46
-rw-r--r--games-util/makeobj/files/simutrans-0.120.0.1-Makefile.patch111
-rw-r--r--games-util/makeobj/makeobj-0.120.0.1.ebuild74
-rw-r--r--games-util/makeobj/metadata.xml4
6 files changed, 258 insertions, 0 deletions
diff --git a/games-util/makeobj/Manifest b/games-util/makeobj/Manifest
new file mode 100644
index 00000000..0274e7dc
--- /dev/null
+++ b/games-util/makeobj/Manifest
@@ -0,0 +1 @@
+DIST simutrans-src-120-0-1.zip 3909005 SHA256 010a6e3765891e1821364e54f6bcdfb2911b627ffca3acae8350e06e53113683 SHA512 6f32b6f1c12f45125de8a12c4a034387a784e21fd8cdedcf7b1daefd9174d9a94825e8f68effa2ff1436cce2e2bc8cb5707161f3fa004185ae158400840dc450 WHIRLPOOL 36155184f5806a9cfab742f26e3fc78d5d7d928f99cddabbaf36c7c90d065dab02bb174c07d9633958f8b891b0db8cc5c94e45fd4f22d917b9a037c51a99b69a
diff --git a/games-util/makeobj/files/makeobj-0.120.0.1-Makefile-2.patch b/games-util/makeobj/files/makeobj-0.120.0.1-Makefile-2.patch
new file mode 100644
index 00000000..22bfa8fe
--- /dev/null
+++ b/games-util/makeobj/files/makeobj-0.120.0.1-Makefile-2.patch
@@ -0,0 +1,22 @@
+From aeaa1b5c2f42c62b8ccfad28e490ddee5380767e Mon Sep 17 00:00:00 2001
+From: eroen <eroen@occam.eroen.eu>
+Date: Fri, 26 Dec 2014 12:27:40 +0100
+Subject: [PATCH 3/3] makeobj - use make variables
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a68f4a5..0531a45 100644
+--- a/Makefile
++++ b/Makefile
+@@ -610,4 +610,4 @@ endif
+ .PHONY: makeobj
+
+ makeobj:
+- $(Q)$(MAKE) -e -C makeobj FLAGS="$(FLAGS)"
++ $(Q)$(MAKE) -C makeobj FLAGS="$(FLAGS)"
+--
+2.1.2
+
diff --git a/games-util/makeobj/files/makeobj-0.120.0.1-Makefile.patch b/games-util/makeobj/files/makeobj-0.120.0.1-Makefile.patch
new file mode 100644
index 00000000..cc280566
--- /dev/null
+++ b/games-util/makeobj/files/makeobj-0.120.0.1-Makefile.patch
@@ -0,0 +1,46 @@
+From 88bcaa8210453d142cb2974b82869b5fb75c084b Mon Sep 17 00:00:00 2001
+From: eroen <eroen@occam.eroen.eu>
+Date: Tue, 23 Dec 2014 19:46:21 +0100
+Subject: [PATCH 2/3] fix makeobj Makefile
+
+---
+ makeobj/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/makeobj/Makefile b/makeobj/Makefile
+index 10dd957..3e654a8 100644
+--- a/makeobj/Makefile
++++ b/makeobj/Makefile
+@@ -15,7 +15,9 @@ ifneq ($(PNG_CONFIG),)
+ endif
+
+ CFLAGS += $(PNG_CFLAGS)
++CXXFLAGS += $(PNG_CFLAGS)
+ LDFLAGS += $(PNG_LDFLAGS)
++LIBS += $(PNG_LDFLAGS)
+
+ # Absolutely essential
+ CFLAGS += -DMAKEOBJ
+@@ -48,9 +50,6 @@ ifneq ($(OPTIMISE),)
+ ifneq ($(OSTYPE),mac)
+ CFLAGS += -minline-all-stringops
+ endif
+-else
+- CFLAGS += -O
+- CXXFLAGS += -O
+ endif
+
+ ifdef DEBUG
+@@ -134,7 +133,8 @@ ifeq ($(origin MAKEOBJ_PROGDIR), undefined)
+ endif
+
+ BUILDDIR := ../$(BUILDDIR)
++PROGDIR ?= $(BUILDDIR)
+
+ TOOL_PROGDIR = $(MAKEOBJ_PROGDIR)
+
+-include ../uncommon.mk
++include ../common.mk
+--
+2.1.2
+
diff --git a/games-util/makeobj/files/simutrans-0.120.0.1-Makefile.patch b/games-util/makeobj/files/simutrans-0.120.0.1-Makefile.patch
new file mode 100644
index 00000000..24eb535b
--- /dev/null
+++ b/games-util/makeobj/files/simutrans-0.120.0.1-Makefile.patch
@@ -0,0 +1,111 @@
+From cadb789929d234b2c1ee91166c205be0911ccdef Mon Sep 17 00:00:00 2001
+From: eroen <eroen@occam.eroen.eu>
+Date: Fri, 26 Dec 2014 12:48:23 +0100
+Subject: [PATCH 1/3] Gentoo Makefile patch
+
+---
+ Makefile | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 974627e..a68f4a5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,8 +81,6 @@ ifneq ($(OPTIMISE),)
+ ifeq ($(findstring $(OSTYPE), amiga haiku mac),)
+ CFLAGS += -minline-all-stringops
+ endif
+-else
+- CFLAGS += -O
+ endif
+
+ ifdef DEBUG
+@@ -101,6 +99,7 @@ ifdef DEBUG
+ endif
+ else
+ CFLAGS += -DNDEBUG
++ CXXFLAGS += -DNDEBUG
+ endif
+
+ ifneq ($(PROFILE),)
+@@ -114,6 +113,7 @@ endif
+ ifneq ($(MULTI_THREAD),)
+ ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1)
+ CFLAGS += -DMULTI_THREAD
++ CXXFLAGS += -DMULTI_THREAD
+ ifeq ($(OSTYPE),mingw)
+ #use lpthreadGC2d for debug alternatively
+ LDFLAGS += -lpthreadGC2
+@@ -132,11 +132,13 @@ ifneq ($(WITH_REVISION),)
+ endif
+ ifneq ($(REV),)
+ CFLAGS += -DREVISION="$(REV)"
++ CXXFLAGS += -DREVISION="$(REV)"
+ endif
+ endif
+ endif
+
+ CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
++CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
+ CCFLAGS += -Wstrict-prototypes
+
+
+@@ -455,6 +457,7 @@ ifeq ($(BACKEND),allegro)
+ ALLEGRO_LDFLAGS := $(shell $(ALLEGRO_CONFIG) --libs)
+ endif
+ CFLAGS += $(ALLEGRO_CFLAGS) -DUSE_SOFTPOINTER
++ CXXFLAGS += $(ALLEGRO_CFLAGS) -DUSE_SOFTPOINTER
+ LIBS += $(ALLEGRO_LDFLAGS)
+ endif
+
+@@ -492,6 +495,7 @@ ifeq ($(BACKEND),sdl)
+ SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS)
+ endif
+
+@@ -523,6 +527,7 @@ ifeq ($(BACKEND),sdl2)
+ SDL_LDFLAGS := $(shell $(SDL2_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS)
+ endif
+
+@@ -538,6 +543,7 @@ ifeq ($(BACKEND),mixer_sdl)
+ SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS) -lSDL_mixer
+ endif
+
+@@ -564,6 +570,7 @@ ifeq ($(BACKEND),opengl)
+ SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS) -lglew32
+ ifeq ($(OSTYPE),mingw)
+ LIBS += -lopengl32
+@@ -579,6 +586,7 @@ ifeq ($(BACKEND),posix)
+ endif
+
+ CFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
++CXXFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
+
+ ifneq ($(findstring $(OSTYPE), cygwin mingw),)
+ SOURCES += simres.rc
+@@ -586,7 +594,6 @@ ifneq ($(findstring $(OSTYPE), cygwin mingw),)
+ endif
+
+ CCFLAGS += $(CFLAGS)
+-CXXFLAGS += $(CFLAGS)
+
+ BUILDDIR ?= build/$(CFG)
+ PROGDIR ?= $(BUILDDIR)
+--
+2.1.2
+
diff --git a/games-util/makeobj/makeobj-0.120.0.1.ebuild b/games-util/makeobj/makeobj-0.120.0.1.ebuild
new file mode 100644
index 00000000..358ab9a9
--- /dev/null
+++ b/games-util/makeobj/makeobj-0.120.0.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit eutils games
+
+MY_PV=${PV##0.}
+MY_PV=${MY_PV//./-}
+DESCRIPTION="Tool for creating Simutrans paksets."
+# This is separate from simutrans due to different compile-time -Defines and
+# a non-functional wish-it-were out-of-source build system.
+HOMEPAGE="http://www.simutrans.com/"
+SRC_URI="mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip"
+
+LICENSE="Artistic MIT"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ app-arch/bzip2
+ media-libs/libpng:0
+ sys-libs/zlib
+ "
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ # make it look in the install location for the data
+ sed -i \
+ -e "s:argv\[0\]:\"${GAMES_DATADIR}/${PN}/\":" \
+ simmain.cc || die
+
+ edos2unix Makefile makeobj/Makefile
+ epatch \
+ "${FILESDIR}"/simutrans-${PV}-Makefile.patch \
+ "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-Makefile-2.patch
+}
+
+src_configure() {
+ sh configure.sh || die
+
+ local backend
+ #if use sdl2; then
+ # backend=sdl2
+ #elif use sound; then
+ # backend=mixer_sdl
+ #else
+ # backend=sdl
+ #fi
+ backend=posix
+ sed -e '/^BACKEND/s/=.*$/= '"${backend}"'/' \
+ -i config.default || die
+
+ sed -e '/^DEBUG/d' \
+ -e '/^OPTIMISE/d' \
+ -i config.default || die
+ echo 'VERBOSE = 1' >> config.default
+}
+
+src_compile() {
+ emake makeobj
+}
+
+src_install() {
+ # This must be available for use by package manager.
+ dobin makeobj/makeobj
+
+ prepgamesdirs
+}
diff --git a/games-util/makeobj/metadata.xml b/games-util/makeobj/metadata.xml
new file mode 100644
index 00000000..097975e3
--- /dev/null
+++ b/games-util/makeobj/metadata.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+</pkgmetadata>