diff options
-rw-r--r-- | .SRCINFO | 70 | ||||
-rw-r--r-- | PKGBUILD | 145 | ||||
-rw-r--r-- | use-system-libs.patch | 175 |
3 files changed, 266 insertions, 124 deletions
@@ -1,52 +1,48 @@ pkgbase = libretro-citra-git pkgdesc = Nintendo 3DS core - pkgver = r6961.37192ff3 + pkgver = r9304.d7e1612c1 pkgrel = 1 url = https://github.com/libretro/citra arch = x86_64 - groups = libretro-unstable + groups = libretro license = GPL2 - makedepends = cmake + makedepends = boost + makedepends = ffmpeg makedepends = git + makedepends = zstd + depends = crypto++ + depends = enet depends = gcc-libs depends = glibc depends = libretro-core-info - provides = libretro-citra + provides = libretro-citra=9304.d7e1612c1 conflicts = libretro-citra source = libretro-citra::git+https://github.com/libretro/citra.git - source = citra-boost::git+https://github.com/citra-emu/ext-boost.git - source = git+https://github.com/philsquared/Catch.git - source = git+https://github.com/zeromq/cppzmq.git - source = git+https://github.com/weidai11/cryptopp.git - source = git+https://github.com/kinetiknz/cubeb.git - source = git+https://github.com/discordapp/discord-rpc.git - source = git+https://github.com/MerryMage/dynarmic.git - source = git+https://github.com/lsalzman/enet.git - source = git+https://github.com/fmtlib/fmt.git - source = git+https://github.com/svn2github/inih.git - source = citra-libressl::git+https://github.com/citra-emu/ext-libressl-portable.git - source = git+https://github.com/zeromq/libzmq.git - source = git+https://github.com/neobrain/nihstro.git - source = git+https://github.com/arsenm/sanitizers-cmake.git + source = citra-dynarmic::git+https://github.com/citra-emu/dynarmic.git source = citra-soundtouch::git+https://github.com/citra-emu/ext-soundtouch.git - source = git+https://github.com/herumi/xbyak.git - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP + source = fmt::git+https://github.com/fmtlib/fmt.git + source = libretro-nihstro::git+https://github.com/libretro-fork/nihstro.git + source = lodepng::git+https://github.com/lvandeve/lodepng.git + source = teakra::git+https://github.com/wwylele/teakra.git + source = xbyak::git+https://github.com/herumi/xbyak.git + source = use-system-libs.patch + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = SKIP + b2sums = a998c5a124daa79d2483aa97d0307140243a4184fa7eac523f4119152dda54910c11738fc82330ac192978b80b997b7c1e757213c411ee42c939d09dbb24e5d8 pkgname = libretro-citra-git - + depends = crypto++ + depends = enet + depends = gcc-libs + depends = glibc + depends = libretro-core-info + depends = libavcodec.so + depends = libavutil.so + depends = libboost_serialization.so + depends = libzstd.so @@ -1,102 +1,73 @@ -# Maintainer: Maxime Gauduin <alucryd@archlinux.org> - -pkgname=libretro-citra-git -pkgver=r6961.37192ff3 +# Maintainer: Alexandre Bouvier <contact@amb.tf> +# Contributor: Maxime Gauduin <alucryd@archlinux.org> +_pkgname=libretro-citra +pkgname=$_pkgname-git +pkgver=r9304.d7e1612c1 pkgrel=1 -pkgdesc='Nintendo 3DS core' +pkgdesc="Nintendo 3DS core" arch=('x86_64') -url='https://github.com/libretro/citra' +url="https://github.com/libretro/citra" license=('GPL2') -groups=('libretro-unstable') -depends=('gcc-libs' 'glibc' 'libretro-core-info') -makedepends=('cmake' 'git') -provides=('libretro-citra') -conflicts=('libretro-citra') -source=('libretro-citra::git+https://github.com/libretro/citra.git' - 'citra-boost::git+https://github.com/citra-emu/ext-boost.git' - 'git+https://github.com/philsquared/Catch.git' - 'git+https://github.com/zeromq/cppzmq.git' - 'git+https://github.com/weidai11/cryptopp.git' - 'git+https://github.com/kinetiknz/cubeb.git' - 'git+https://github.com/discordapp/discord-rpc.git' - 'git+https://github.com/MerryMage/dynarmic.git' - 'git+https://github.com/lsalzman/enet.git' - 'git+https://github.com/fmtlib/fmt.git' - 'git+https://github.com/svn2github/inih.git' - 'citra-libressl::git+https://github.com/citra-emu/ext-libressl-portable.git' - 'git+https://github.com/zeromq/libzmq.git' - 'git+https://github.com/neobrain/nihstro.git' - 'git+https://github.com/arsenm/sanitizers-cmake.git' - 'citra-soundtouch::git+https://github.com/citra-emu/ext-soundtouch.git' - 'git+https://github.com/herumi/xbyak.git') -sha256sums=('SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP') +groups=('libretro') +depends=('crypto++' 'enet' 'gcc-libs' 'glibc' 'libretro-core-info') +makedepends=('boost' 'ffmpeg' 'git' 'zstd') +provides=("$_pkgname=${pkgver#r}") +conflicts=("$_pkgname") +source=( + "$_pkgname::git+$url.git" + 'citra-dynarmic::git+https://github.com/citra-emu/dynarmic.git' + 'citra-soundtouch::git+https://github.com/citra-emu/ext-soundtouch.git' + 'fmt::git+https://github.com/fmtlib/fmt.git' + 'libretro-nihstro::git+https://github.com/libretro-fork/nihstro.git' + 'lodepng::git+https://github.com/lvandeve/lodepng.git' + 'teakra::git+https://github.com/wwylele/teakra.git' + 'xbyak::git+https://github.com/herumi/xbyak.git' + 'use-system-libs.patch' +) +b2sums=( + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'a998c5a124daa79d2483aa97d0307140243a4184fa7eac523f4119152dda54910c11738fc82330ac192978b80b997b7c1e757213c411ee42c939d09dbb24e5d8' +) pkgver() { - cd libretro-citra - - echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" + cd $_pkgname + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd libretro-citra - - if [[ -d build ]]; then - rm -rf build - fi - mkdir build - - for submodule in externals/{catch,cppzmq,cryptopp/cryptopp,cubeb,discord-rpc,dynarmic,enet,fmt,inih/inih,libressl,libzmq,nihstro,xbyak}; do - git submodule init ${submodule} - git config submodule.${submodule}.url ../${submodule##*/} - git submodule update - done - for submodule in externals/{boost,soundtouch}; do - git submodule init ${submodule} - git config submodule.${submodule}.url ../citra-${submodule##*/} - git submodule update - done - - cd externals/cubeb - - for submodule in cmake/sanitizers-cmake; do - git submodule init ${submodule} - git config submodule.${submodule}.url ../../../${submodule##*/} - git submodule update - done + cd $_pkgname + git config submodule.dynarmic.url ../citra-dynarmic + git config submodule.fmt.url ../fmt + git config submodule.lodepng.url ../lodepng + git config submodule.nihstro.url ../libretro-nihstro + git config submodule.soundtouch.url ../citra-soundtouch + git config submodule.teakra.url ../teakra + git config submodule.xbyak.url ../xbyak + git -c protocol.file.allow=always submodule update + patch -Np1 < ../use-system-libs.patch + sed -i 's/-O[0123s]//;s/-Ofast//' Makefile + sed -i '/include <array>/i #include <algorithm>' src/common/logging/log.h + sed -i '/include <vector>/a #include <string>' src/core/frontend/mic.h } build() { - cd libretro-citra/build - - cmake .. \ - -DCMAKE_BUILD_TYPE='Release' \ - -DENABLE_LIBRETRO='ON' \ - -DENABLE_QT='OFF' \ - -DENABLE_SDL2='OFF' \ - -DENABLE_WEB_SERVICE='OFF' - make + make -C $_pkgname BUILD_DATE= HAVE_FFMPEG_STATIC=0 } package() { - cd libretro-citra/build - - install -Dm 644 src/citra_libretro/citra_libretro.so -t "${pkgdir}"/usr/lib/libretro/ + depends+=( + 'libavcodec.so' + 'libavutil.so' + 'libboost_serialization.so' + 'libzstd.so' + ) + # shellcheck disable=SC2154 + install -D -t "$pkgdir"/usr/lib/libretro $_pkgname/citra_libretro.so } - -# vim: ts=2 sw=2 et: diff --git a/use-system-libs.patch b/use-system-libs.patch new file mode 100644 index 000000000000..65208c7a2fe4 --- /dev/null +++ b/use-system-libs.patch @@ -0,0 +1,175 @@ +diff --git a/Makefile.common b/Makefile.common +index 5c04d28..d60382e 100644 +--- a/Makefile.common ++++ b/Makefile.common +@@ -1,3 +1,4 @@ ++LIBS += -lboost_serialization $(shell pkg-config --libs libcryptopp libenet libzstd) + INCFLAGS := -I$(SRC_DIR) \ + -I$(SRC_DIR)/video_core \ + -I$(EXTERNALS_DIR) \ +@@ -17,113 +18,6 @@ INCFLAGS := -I$(SRC_DIR) \ + SOURCES_C := + SOURCES_CXX := + +-# Begone boost linking +-CXXFLAGS += -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_LIB -DBOOST_DATE_TIME_NO_LIB -DBOOST_REGEX_NO_LIB \ +- -DNULL_POINTER_TAG=BOOST_SERIALIZATION_NULL_POINTER_TAG # Stupid workaround for boost serialization +- +-SOURCES_CXX += $(EXTERNALS_DIR)/boost/libs/serialization/src/archive_exception.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_pointer_oserializer.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/extended_type_info_no_rtti.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_text_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/stl_port.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_archive_exception.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_archive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_serializer_map.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/binary_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/extended_type_info_typeid.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_text_wiarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/text_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_grammar.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_text_iprimitive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/binary_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_binary_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_text_woarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/text_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_iserializer.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_text_oprimitive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/binary_wiarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_binary_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_xml_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/text_wiarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_text_wiprimitive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/binary_woarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_xml_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/text_woarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_wgrammar.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_oserializer.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_text_woprimitive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/codecvt_null.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_oarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_xml_wiarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/utf8_codecvt_facet.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_wiarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_pointer_iserializer.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/basic_xml_archive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/extended_type_info.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_text_iarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/polymorphic_xml_woarchive.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/void_cast.cpp \ +- $(EXTERNALS_DIR)/boost/libs/serialization/src/xml_woarchive.cpp +- +-ifeq ($(platform), libnx) +-INCFLAGS += -isystem$(EXTERNALS_DIR)/switch-compat/include +-SOURCES_C += $(EXTERNALS_DIR)/switch-compat/src/switch-compat.c +-endif +- +-# Externals - CryptoPP +-SOURCES_CXX += $(EXTERNALS_DIR)/cryptopp/cryptopp/allocate.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/cryptlib.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/cpu.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/integer.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/algparam.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/asn.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/authenc.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/base64.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/basecode.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/ccm.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/crc_simd.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/des.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/dessp.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/dll.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/ec2n.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/ecp.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/filters.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/fips140.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/gcm_simd.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/gf2n.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/gfpcrypt.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/hex.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/hmac.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/hrtimer.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/iterhash.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/md5.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/misc.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/modes.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/mqueue.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/nbtheory.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/neon_simd.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/oaep.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/osrng.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/pubkey.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/queue.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/randpool.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/rdtables.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/rijndael_simd.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/rijndael.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/rng.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/sha_simd.cpp \ +- $(EXTERNALS_DIR)/cryptopp/cryptopp/sha.cpp +- +-ifeq ($(HAVE_SSE), 1) +-SOURCES_CXX += $(EXTERNALS_DIR)/cryptopp/cryptopp/sse_simd.cpp +-endif +- +-CXXFLAGS += -DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_SSE4 + + # Externals - Dynarmic + ifeq ($(HAVE_DYNARMIC), 1) +@@ -265,18 +159,6 @@ DYNARMICSOURCES_CXX += $(EXTERNALS_DIR)/dynarmic/src/common/assert.cpp \ + endif + endif + +-# Externals - Enet +-SOURCES_C += $(EXTERNALS_DIR)/enet/callbacks.c \ +- $(EXTERNALS_DIR)/enet/compress.c \ +- $(EXTERNALS_DIR)/enet/host.c \ +- $(EXTERNALS_DIR)/enet/list.c \ +- $(EXTERNALS_DIR)/enet/packet.c \ +- $(EXTERNALS_DIR)/enet/peer.c \ +- $(EXTERNALS_DIR)/enet/protocol.c \ +- $(EXTERNALS_DIR)/enet/unix.c \ +- $(EXTERNALS_DIR)/enet/win32.c +- +-CFLAGS += -DHAS_SOCKLEN_T + + ## Externals - FFMPEG (static) + ifeq ($(HAVE_FFMPEG_STATIC), 1) +@@ -336,32 +218,6 @@ SOURCES_CXX += $(EXTERNALS_DIR)/teakra/src/ahbm.cpp \ + $(EXTERNALS_DIR)/teakra/src/teakra.cpp \ + $(EXTERNALS_DIR)/teakra/src/test_generator.cpp + +-# Externals - Zstd +-SOURCES_C += $(EXTERNALS_DIR)/zstd/lib/common/debug.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/entropy_common.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/error_private.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/fse_decompress.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/pool.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/threading.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/xxhash.c \ +- $(EXTERNALS_DIR)/zstd/lib/common/zstd_common.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/fse_compress.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/hist.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/huf_compress.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_compress_literals.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_compress_sequences.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_compress_superblock.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_compress.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_double_fast.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_fast.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_lazy.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_ldm.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstd_opt.c \ +- $(EXTERNALS_DIR)/zstd/lib/compress/zstdmt_compress.c \ +- $(EXTERNALS_DIR)/zstd/lib/decompress/huf_decompress.c \ +- $(EXTERNALS_DIR)/zstd/lib/decompress/zstd_ddict.c \ +- $(EXTERNALS_DIR)/zstd/lib/decompress/zstd_decompress_block.c \ +- $(EXTERNALS_DIR)/zstd/lib/decompress/zstd_decompress.c + + # Externals - libretro-common/rglgen + ifeq ($(HAVE_RGLGEN), 1) |