# Copyright 2021 Paul Mulders # Distributed under the terms of the GNU General Public License v2 require github [ user=3DSGuy project=Project_CTR ] SUMMARY="Updated version of neimod's ctrtool" LICENCES="MIT" SLOT="0" PLATFORMS="~amd64" MYOPTIONS="" DEPENDENCIES=" build+run: dev-libs/tinyxml " WORK="${WORK}/${PN}" src_prepare() { default local target=$(exhost --target) # don't mess up compiler flags for no reason edo sed -i -e "s:CXXFLAGS =.*:CXXFLAGS = ${CXXFLAGS} -I.:" Makefile edo sed -i -e "s:CFLAGS =.*:CFLAGS = ${CFLAGS} -I.:" Makefile # use system compiler and target arch edo sed -i -e '/CC =/d' Makefile edo sed -i -e '/CXX =/d' Makefile edo sed -i -e "s/SYS :=.*/SYS := ${target}/" Makefile # build against system tinyxml edo rm -rf tinyxml edo sed -i -e 's/ tinyxml//' Makefile edo sed -i -e "s:\$(LIBS):\$(LIBS) -L/usr/${target}/lib -ltinyxml:" Makefile edo sed -i -e 's:tinyxml/tinyxml.h:tinyxml.h:' keyset.cpp } src_install() { dobin ctrtool }