logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: e3e225ab43a067a13c464397ed0d56b20b99ef5e
parent d2e009c92d8f7e3cbde8b6832da03031324b43fe
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  9 Apr 2022 03:32:42 +0200

dev-libs/libbulletml: dlang fixes

Diffstat:

Adev-libs/libbulletml/Manifest2++
Adev-libs/libbulletml/files/libbulletml-0.0.6-Makefile.patch119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-libs/libbulletml/files/libbulletml-0.0.6-gcc43.patch31+++++++++++++++++++++++++++++++
Adev-libs/libbulletml/libbulletml-0.0.6.ebuild62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-libs/libbulletml/metadata.xml8++++++++
5 files changed, 222 insertions(+), 0 deletions(-)

diff --git a/dev-libs/libbulletml/Manifest b/dev-libs/libbulletml/Manifest @@ -0,0 +1,2 @@ +DIST bulletml_0.0.6-7.debian.tar.xz 17172 BLAKE2B 5ad2c0a052888e3c4dfbc890447b936d113fdcb6f4099a80c2f819c699cbbf9b8212542bd034a5fa4ef8925d932445969a157181e8b5a741b1c8f08517f3dfa4 SHA512 843158d73989df2bd0d2e8c6921c0e53572aea9f66118e1e80e587587b035cf4a2d0efe4556117be9f7c654bef4721b9593f9871d6482a73b35b25634afdade9 +DIST libbulletml-0.0.6.tar.bz2 94529 BLAKE2B 7ec9a69c4385adacc476cacb3f88219a5a7b506a36ece6d430a1a5c470ffddfd20f8f355ac5391c542850b98edf0d40e9dea6061b6ad5da7afcc66b14656311b SHA512 4428d8088eefd2a1336eb963e8c65188b67a82d875cdcb51bad9ca7aa3c864b3453464daf1e6691d52120332fe3a078b9827136d214d9ca87fdd0cb81bb60150 diff --git a/dev-libs/libbulletml/files/libbulletml-0.0.6-Makefile.patch b/dev-libs/libbulletml/files/libbulletml-0.0.6-Makefile.patch @@ -0,0 +1,119 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,5 @@ +-CC = g++ + INCLUDES = -I. + LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o +-#CXXFLAGS = -g -W -Wall -ansi -pedantic +-#CXXFLAGS = -pg -g -W -Wall -ansi -pedantic +-CXXFLAGS = -O2 -W -Wall -ansi -pedantic +-CFLAGS = -O2 + OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o + + all: libbulletml.a +@@ -21,7 +16,7 @@ + bison -y calc.yy && mv y.tab.c calc.cpp + + $(OBJS): %.o: %.cpp +- $(CC) -c $(CXXFLAGS) $(INCLUDES) $< ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@ + + doxy: + doxygen +--- a/tinyxml/Makefile ++++ b/tinyxml/Makefile +@@ -14,41 +14,6 @@ + PROFILE := NO + + #**************************************************************************** +- +-CC := gcc +-CXX := g++ +-LD := g++ +-AR := ar rc +-RANLIB := ranlib +- +-DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG +-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O2 +- +-LIBS := +- +-DEBUG_CXXFLAGS := ${DEBUG_CFLAGS} +-RELEASE_CXXFLAGS := ${RELEASE_CFLAGS} +- +-DEBUG_LDFLAGS := -g +-RELEASE_LDFLAGS := +- +-ifeq (YES, ${DEBUG}) +- CFLAGS += ${DEBUG_CFLAGS} +- CXXFLAGS += ${DEBUG_CXXFLAGS} +- LDFLAGS += ${DEBUG_LDFLAGS} +-else +- CFLAGS += ${RELEASE_CFLAGS} +- CXXFLAGS += ${RELEASE_CXXFLAGS} +- LDFLAGS += ${RELEASE_LDFLAGS} +-endif +- +-ifeq (YES, ${PROFILE}) +- CFLAGS := ${CFLAGS} -pg +- CXXFLAGS := ${CXXFLAGS} -pg +- LDFLAGS := ${LDFLAGS} -pg +-endif +- +-#**************************************************************************** + # Preprocessor directives + #**************************************************************************** + +@@ -70,8 +35,8 @@ + # Makefile code common to all platforms + #**************************************************************************** + +-CFLAGS := ${CFLAGS} ${DEFS} +-CXXFLAGS := ${CXXFLAGS} ${DEFS} ++CFLAGS += ${DEFS} ++CXXFLAGS += ${DEFS} + + #**************************************************************************** + # Targets of the build +@@ -98,7 +63,7 @@ + #**************************************************************************** + + ${OUTPUT}: ${OBJS} +- ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} ++ ${CXX} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} ${EXTRA_LIBS} + + #**************************************************************************** + # common rules +@@ -106,10 +71,10 @@ + + # Rules for compiling source files to object files + %.o : %.cpp +- ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@ ++ ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@ + + %.o : %.c +- ${CC} -c ${CFLAGS} ${INCS} $< -o $@ ++ ${CC} ${CFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@ + + clean: + -rm -f core ${OBJS} ${OUTPUT} +--- a/ygg/Makefile ++++ b/ygg/Makefile +@@ -2,8 +2,6 @@ + LIBS = + #CXXFLAGS = -g -W -Wall + #CXXFLAGS = -pg -g -W -Wall +-CXXFLAGS = -O2 -W -Wall +-CFLAGS = -O2 + OBJS = ygg.o + + all: $(OBJS) +@@ -12,7 +10,7 @@ + rm -f *.o *.a + + $(OBJS): %.o: %.cpp +- $(CXX) -c $(CXXFLAGS) $(INCLUDES) $< ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@ + + distdir: + diff --git a/dev-libs/libbulletml/files/libbulletml-0.0.6-gcc43.patch b/dev-libs/libbulletml/files/libbulletml-0.0.6-gcc43.patch @@ -0,0 +1,31 @@ +--- a/calc.yy ++++ b/calc.yy +@@ -8,6 +8,7 @@ + + #include <cmath> + #include <cctype> ++#include <cstring> + + #include <vector> + #include <sstream> +--- a/tinyxml/tinyxml.h ++++ b/tinyxml/tinyxml.h +@@ -28,6 +28,8 @@ + #include <string> + #include <stdio.h> + #include <assert.h> ++#include <cstring> ++#include <cstdlib> + + class TiXmlDocument; + class TiXmlElement; +--- a/tinyxml/tinyxmlparser.cpp ++++ b/tinyxml/tinyxmlparser.cpp +@@ -24,6 +24,7 @@ + + #include "tinyxml.h" + #include <ctype.h> ++#include <cstring> + + const char* TiXmlBase::SkipWhiteSpace( const char* p ) + { diff --git a/dev-libs/libbulletml/libbulletml-0.0.6.ebuild b/dev-libs/libbulletml/libbulletml-0.0.6.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A Library of Bullet Markup Language" +HOMEPAGE="https://shinh.skr.jp/libbulletml/index_en.html" +SRC_URI=" + https://shinh.skr.jp/libbulletml/${P}.tar.bz2 + https://deb.debian.org/debian/pool/main/b/bulletml/bulletml_0.0.6-7.debian.tar.xz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="" +RDEPEND=${DEPEND} + +# debian/patches/includes.patch is equivalent to ${P}-gcc43.patch +PATCHES=( + "${FILESDIR}"/${P}-gcc43.patch + "${FILESDIR}"/${P}-Makefile.patch +) + +DEB_PATCHES=( + "${WORKDIR}/debian/patches/fixes.patch" + "${WORKDIR}/debian/patches/bulletml_d.patch" + "${WORKDIR}/debian/patches/includes.patch" + "${WORKDIR}/debian/patches/get-rid-of-boost.patch" +) + +S="${WORKDIR}"/${PN#lib}/src + +src_prepare() { + default + + rm -r boost || die + + eapply -p2 "${DEB_PATCHES[@]}" +} + +src_configure() { + tc-export AR CXX +} + +src_install() { + dolib.a libbulletml.a + + insinto /usr/include/bulletml + doins *.h + + insinto /usr/include/bulletml/tinyxml + doins tinyxml/tinyxml.h + + insinto /usr/include/bulletml/ygg + doins ygg/ygg.h + + dodoc ../README* +} diff --git a/dev-libs/libbulletml/metadata.xml b/dev-libs/libbulletml/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> +</pkgmetadata>