Today I updated my computer and BizHawk's compilation failed again, because when I changed the packages before, I did not do it in a way that would preserve updates. I will see if I can get libgdiplus-5.4 in gentoo, at least, to make this problem go away.
Anyway, if anyone wants to compile this on Linux, I have redone everything in a cleaner way, and the following installation will work on Gentoo, and survive updates. Note: I am not doing this for other distributions, their packages are much harder to maintain, and it takes much more time to update their repos anyway.
Let's go. Create a file named /usr/local/portage/dev-dotnet/libgdiplus-5.4.ebuild:
Language: python
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils
DESCRIPTION="Library for using System.Drawing with mono"
HOMEPAGE="http://www.mono-project.com"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-solaris"
SRC_URI="https://github.com/mono/libgdiplus/archive/5.4.tar.gz"
IUSE="cairo"
RDEPEND=">=dev-libs/glib-2.2.3:2
>=media-libs/freetype-2.3.7
>=media-libs/fontconfig-2.6
>=media-libs/libpng-1.4:0
x11-libs/libXrender
x11-libs/libX11
x11-libs/libXt
>=x11-libs/cairo-1.8.4[X]
media-libs/libexif
>=media-libs/giflib-5.1.2
virtual/jpeg:0
media-libs/tiff:0
!cairo? ( >=x11-libs/pango-1.20 )"
DEPEND="${RDEPEND}"
src_configure() {
./autogen.sh
}
src_install () {
default
dotnet_multilib_comply
local commondoc=( AUTHORS ChangeLog README TODO )
for docfile in "${commondoc[@]}"; do
[[ -e "${docfile}" ]] && dodoc "${docfile}"
done
[[ "${DOCS[@]}" ]] && dodoc "${DOCS[@]}"
prune_libtool_files
}
After that, add the following line to /etc/portage/make.conf:
PORTDIR_OVERLAY="/usr/local/portage"
Generate the build manifest using:
sudo ebuild /usr/local/portage/dev-dotnet/libgdiplus/libgdiplus-5.4.ebuild manifest
Now, update libgdiplus with
sudo emerge -av libgdiplus
This should work correctly, it won't override your version with the buggy one at the main repository, and in case they bump it to a newer version that works, the local ebuild will be ignored.