# Maintainer: jc_gargma # Maintainer (Arch): Kyle Keen # # I maintain this because: # Arch version lacks additional optimization and hardening flags # Arch version has non-functional desktop file # Arch version lacks the MSX++UnDeadPeopleEdition Legacy tileset # Arch version lacks the @ soundpack # Arch version lacks the CO.AG musicpack pkgbase=cataclysm-dda pkgname=(cataclysm-dda cataclysm-dda-tiles) pkgname=cataclysm-dda pkgver=0.E.3 _pkgver=0.E-3 pkgrel=1.23 pkgdesc="A post-apocalyptic roguelike." #url="http://cataclysmrl.blogspot.com/" #url="http://www.cataclysm.glyphgryph.com/" #url="http://en.cataclysmdda.com/" url="https://cataclysmdda.org/" arch=('x86_64' 'aarch64') license=("CCPL:by-sa") depends=('ncurses' 'lua' 'hicolor-icon-theme' 'gettext') makedepends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer' 'freetype2' 'astyle') source=("$pkgname-$_pkgver.tar.gz::https://github.com/CleverRaven/Cataclysm-DDA/archive/$_pkgver.tar.gz" "cataclysm-dda.desktop" "cataclysm-dda-tiles.desktop" "0.F_backport-vehicle-heater-cooler-intensity-reduced.patch" "0.F_backport-tacoma-barn-door-position.patch" "0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch" "0001-quiverfull-house-correct-stairs.patch" "0002-ankle-ammo-pouch-is-not-a-backpack.patch" "0003-inconsistent-ammo-names.patch" "0004-tacoma-clinic-add-missing-floor.patch" "0005-lumbermill-gasoline-not-spilled.patch" "0006-community-garden-fertilizer-not-spilled.patch" "0007-oxyacetylene-from-oxygen.patch" "0008-npc-can-use-more-bionics.patch" "0009-22-casings-can-stack.patch" "0010-4570-ammo-can-be-dismantled.patch" "0011-add-missing-mre.patch" "jc_ammo-loudness-ap-times-2.patch" "jc_allow-bio-firestarter-on-smoker.patch" "jc_npcs-eat-when-hungry.patch" "jc_stop-non-faction-npc-sleep-depirvation.patch" "jc_stop-sleeping-on-tables.patch" "custom.patch" "cataclysm-dda-tileset_undeadpeople-legacy.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-tileset_undeadpeople-legacy.git/snapshot/cataclysm-dda-tileset_undeadpeople-legacy-master.tar.xz" "cataclysm-dda-soundpack_jcsoundpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-soundpack_jcsoundpack.git/snapshot/cataclysm-dda-soundpack_jcsoundpack-master.tar.xz" "cataclysm-dda-musicpack_coag-musicpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-musicpack_coag-musicpack.git/snapshot/cataclysm-dda-musicpack_coag-musicpack-master.tar.xz" ) b2sums=('7a825d8ce8827ccb45afb6005d4f33c6810e33e2fa375f2f7d1c878565fd61e00362e0dd45e3d81a46b908b08e07b58a11a42ece4dd306f3e282805da121299f' '8cff87d80bf30b86f995f77a97cc1ddb7b809148d100f3c0d74e706fe59eac52de55710fb7aed1abd59836c05f2474c7d68455736aac4f229d1cdf806d7240a1' '8ffff827ed464af678497da5129eb69d3d1a4c6994bbcc00ef7f7b240cd04e7961c3c0ac52d6940252241406c04e647fac19c9327847afced33988eb15973ba8' '3659d59eec3167bdb647cb622f15fe899516980ac92972393589574db23a580368b449812ec75ec74cfb86082a1c12896fc9f26b7c16c36ed9ad8506d41eac67' 'ce0dd5121e814e0fcd79d68362c80a83bfe70f970be9d5d6f6fe5f6a56ed3f041be4d560aaf02225c3ce7c457dc63bc3adf0709d4b89a81c18184ff5341eb5d3' '2cdcf9ab03eb92f384caf1a2d90f82c75f880cb6286811e83217c883e421c116e7844ca193a010dc35e12eec46ede3663171a2f45f660ef5a8be95c474f61bfc' '8232c6a10fd1f608304982ae7f03eb8afc663be76cdc00aee46ecb58de838e21fdc8673841266ccd00153263f7b15b59dcd1fc6ece86834509d7ccb2cacf08fa' 'af47a9372ba990bc97d17362c8d89847177e6cbefaa241c23bcdc670ef29d82bf150983f4c730753cabaa77a01f8e966307831cdc192a92237d5f3e8e6599d2b' 'd6b6e3572edb886eb721c50bd0e00ba110c7b226c94948189be63d5fa765cfa0785f2c5f8ffd9ce8b68f327ae20e9a1d419ad2857f5af7c069c4b8ba3ef99ac0' 'b8a64accada87ee5be989c5307805610c9b5c0327bc107aab237ac3225dd9e4c51b6c79a2a7de15fe187d3c32d7cbe1c462f9b0e9fb5d5a55a74236c7061e96e' '85aeb5920ee5879848be4057324153a077fe907bed527ed8f9b80a3c5ee1ef64786f63ee2999f5ba74e80a43e99ded3280ce27759c1f7b73259a6e2b5e584aa8' '58a94409205f7b670ab5745b8cbc234a38efd6a6217cef4efb7e397f091092e3e0c7790706b0a42accaa83d7509b8e244a98b9f0ba78349ee85f3164745c3501' 'd34d673fe04d4317ef3c1ac3f088b6614f7c20414cfe44aa0ff71bdc932c517c4e6295492f158ced84232af8f54d1672ae56078b156593d58bf8fe7ffc3d475d' '23a13fccf6514caa6ca23476fe2ce6df180720038c4bb2caa971ef42b31f214b07ed95650d2cb3df173590c8bec02986aced516a6b266cff557b5dcfb7d8ce48' 'dd36b2b64e4999c0f188c837dae1f9c76d537a08b1c5996827a4d3028b688fe023be3711380189ed5c05316b17d6ab3e59669114ec699a3a0ee32808394ad12c' 'c0d32a5edb420de5b2d95d1fed8753e9a6f45ab406aa2861dd5f038409c762ab40acdeec64b51713b71aa1453c0489a62af76534652a5c4d9634ac7e0eb431b4' '417cd957f188b2b06e41d5413bea5f13481c6d5bfa8f184157379d5ac2afa9ba6f7ebc966856f50603f89b9173b6fbfdb3ccf4e3cc0b1bedb53f935591e4a35c' '92cde696eec00e6758b58e73e8bc60ad1a73bb2a18d4fdfd24a19b5be715305a047943a02d94a9703c101ca0c769dbeb816f1f28809345bae0fec42fbc27bb34' 'c2ff7458d4f71a3c328a49795804b89c75ac6c4f4ec193c899501346afdba9673b8624bf60ffa3aea5256412248ff304e8731914971b074aee644b2c465ac483' 'b256081baa22b6c0f2a56c4151393146451fe119cd724fc4d883331643e420348e6e6c54c4f32e34d287090e917f9223cac23b6275677e4c3d23cf4b38229904' 'ce82294e480ad42f0001c799fd8131b60024b6097653f3c57564c75e54596616e376f0d7f1cf4e54d8c302a61ef164b4323f795bfa19b2c13ab9e927d37f1600' 'd723fcc6cce65aa296bc519a07a5d003122ad698a73a3d046dac3780ea5a00fef28f78da251bb46f80f2e0577baa26a6ae13cabf525f22a7a742435e95716dae' 'fc03723f95c83016594930e76dd585487033075d6a677dc9ee52c9ea0d280cfdc238f43179cd5a313aaab119c40e3a9fc167767b15b27ec8a87e88b1194a0284' 'b6a6c9c1791bc625b773aa1d0b90f98f0821aa06807353f1c179cbbb9090391e9ab7fe8d567a029bcf94dddf31c40d3e525d1033d2de81520726c0e69021f278' 'f54bb10b6c5920b22942b1e312c315280afb720d3a897dce9333563cae3343668460d24b7d01bf36768974c729d92177e886f5ee0d22d746b19454a2ab6208fb' 'b9309da09b165fb57e83f84e3584d2479bd3336ed86e181e5df2d27daa92bd55d03d7f3fc226f03696af5f0f32d8e0e7ecd26ae7e50eed0200d0b0feaad07efb') prepare() { cd "Cataclysm-DDA-$_pkgver" sed -i 's/-Werror//' Makefile sed -i 's/ncursesw5-config/ncursesw6-config/' Makefile #sed -i 's|"\(l.*h\)"|"lua5.1/\1"|' src/catalua.{h,cpp} sed -i 's/shell git/shell false/' Makefile sed -i 's/-Os/-O3/' Makefile # Backports from 0.F # Fix Vehicle Heater and Cooler to be less severe patch -Np1 -i "$srcdir"/0.F_backport-vehicle-heater-cooler-intensity-reduced.patch # Fix tacoma barn doors being placed in the same spot twice patch -Np1 -i "$srcdir"/0.F_backport-tacoma-barn-door-position.patch # Fix npcs unable to drink from firestation and shelter basecamps wells patch -Np1 -i "$srcdir"/0.F_backport-make-firestation-shelter-wells-npc-drinkable.patch # Various other fixes for bugs I came across # Fix Quiverfull house to have the correct stairs that modify json patch -Np1 -i "$srcdir"/0001-quiverfull-house-correct-stairs.patch # Fix Ankle Ammo Pouch to not look like a backpack patch -Np1 -i "$srcdir"/0002-ankle-ammo-pouch-is-not-a-backpack.patch # Fix mulitple inconsistent ammuntion names and handloaded status patch -Np1 -i "$srcdir"/0003-inconsistent-ammo-names.patch # Fix missing floor in tacoma clinic patch -Np1 -i "$srcdir"/0004-tacoma-clinic-add-missing-floor.patch # Fix lumbermill gasoline being spilled instead of being inside the gas pump patch -Np1 -i "$srcdir"/0005-lumbermill-gasoline-not-spilled.patch # Fix community garden liquid fertilizer being in a pit instead of in the storage tanks patch -Np1 -i "$srcdir"/0006-community-garden-fertilizer-not-spilled.patch # Fix oxyacetylene to be craftable from oxygen tanks patch -Np1 -i "$srcdir"/0007-oxyacetylene-from-oxygen.patch # Fix npc not being able to install some additional CBMs: # ie, soporific inducer, gasoline fuel cell, enhanced hearing, surgical scalpels patch -Np1 -i "$srcdir"/0008-npc-can-use-more-bionics.patch # Fix .22 casings not stacking when every other casing stacks patch -Np1 -i "$srcdir"/0009-22-casings-can-stack.patch # Fix reloaded 45-70 rounds not allowing dismantling when every other non-caseless does patch -Np1 -i "$srcdir"/0010-4570-ammo-can-be-dismantled.patch # Fix the pepperjack beef and burrito bowl MREs never dropping patch -Np1 -i "$srcdir"/0011-add-missing-mre.patch # Various other fixes for bugs I came across that modify src # Fix ammo loudness mulitplying by six instead of two patch -Np1 -i "$srcdir"/jc_ammo-loudness-ap-times-2.patch # Fix smoker racks not accepting bionic firestarter patch -Np1 -i "$srcdir"/jc_allow-bio-firestarter-on-smoker.patch # Fix NPCs not eating until they drop below normal weight and not becoming full from eating the basecamp stockpile patch -Np1 -i "$srcdir"/jc_npcs-eat-when-hungry.patch # Fix Non-Player facton NPCs from becoming sleep deprived patch -Np1 -i "$srcdir"/jc_stop-non-faction-npc-sleep-depirvation.patch # Fix NPCs preferring tables to cots or woodstoves to the floor patch -Np1 -i "$srcdir"/jc_stop-sleeping-on-tables.patch # Some personal quirks that simply lack a means short of patching the source patch -Np1 -i "$srcdir"/custom.patch } build() { cd "Cataclysm-DDA-$_pkgver" #export CFLAGS="$CFLAGS -fPIE" export CXXFLAGS="$CXXFLAGS -fPIE" export LDFLAGS="$LDFLAGS,-pie" # tests "ifdef TILES" so "TILES=0" will enable tiles! # DYNAMIC_LINKING appears to be a windows flag? make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 LTO=1 make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 LTO=1 TILES=1 SOUND=1 #LUA_BINARY="/usr/bin/lua5.1" } package_cataclysm-dda() { cd "Cataclysm-DDA-$_pkgver" make DESTDIR="$pkgdir" PREFIX="/usr" RELEASE=1 USE_HOME_DIR=1 install # Docs install -d "$pkgdir/usr/share/doc/cataclysm-dda" cp --reflink -r doc/* "$pkgdir/usr/share/doc/cataclysm-dda" # undo symlink rm "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md" cp --reflink 'data/json/LOADING_ORDER.md' "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md" # License install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" # install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" } package_cataclysm-dda-tiles() { pkgdesc="A graphical post-apocalyptic roguelike." depends=('cataclysm-dda' 'sdl2_image' 'sdl2_ttf' 'freetype2' 'sdl2_mixer') cd "Cataclysm-DDA-$_pkgver" make DESTDIR="$pkgdir" PREFIX="/usr" RELEASE=1 TILES=1 SOUND=1 install # Icon install -D 'data/osx/AppIcon.iconset/icon_128x128.png' "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png" install -D 'data/osx/AppIcon.iconset/icon_128x128.png' "$pkgdir/usr/share/pixmaps/$pkgname.png" install -Dm644 "${srcdir}/$pkgname.desktop" "${pkgdir}/usr/share/applications/$pkgname.desktop" install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" # Mods mv "$srcdir/cataclysm-dda-tileset_undeadpeople-legacy-master" "$srcdir/undeadpeople-legacy" cp --reflink -r "$srcdir/undeadpeople-legacy" "$pkgdir/usr/share/cataclysm-dda/gfx" mv "$srcdir/cataclysm-dda-soundpack_jcsoundpack-master" "$srcdir/jcsoundpack" cp --reflink -r "$srcdir/jcsoundpack" "$pkgdir/usr/share/cataclysm-dda/sound" mv "$srcdir/cataclysm-dda-musicpack_coag-musicpack-master" "$srcdir/coag-musicpack" install -Dm644 "$srcdir/coag-musicpack/musicset.json" "$pkgdir/usr/share/cataclysm-dda/sound/jcsoundpack/musicset.json" cp --reflink -r "$srcdir/coag-musicpack/music" "$pkgdir/usr/share/cataclysm-dda/sound/jcsoundpack" # hack: remove overlapping files cd "$pkgdir/../cataclysm-dda" find . -type f -exec rm -f "$pkgdir"/{} \; cd "$pkgdir" find . -type d -empty -delete }