{
    "app-id": "org.freac.freac",
    "runtime": "org.freedesktop.Platform",
    "runtime-version": "25.08",
    "sdk": "org.freedesktop.Sdk",
    "command": "freac",
    "finish-args": [
        "--device=all",
        "--filesystem=host",
        "--share=ipc",
        "--share=network",
        "--socket=pulseaudio",
        "--socket=x11",
        "--metadata=X-DConf=migrate-path=/org/freac/freac/"
    ],
    "cleanup": [
        "/bin/mac",
        "/include",
        "/lib/pkgconfig",
        "/share/aclocal",
        "/share/info",
        "/share/man",
        "*.a",
        "*.la"
    ],
    "modules": [
        "shared-modules/mac/mac.json",
        {
            "name": "libcdio",
            "config-opts": [
                "--disable-cxx",
                "--disable-example-progs",
                "--without-cd-drive",
                "--without-cd-info",
                "--without-cd-read",
                "--without-cdda-player",
                "--without-iso-info",
                "--without-iso-read"
            ],
            "cleanup": [
                "/bin/mmc-tool",
                "/lib/libiso9660.*",
                "/lib/libudf.*"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/libcdio/libcdio/archive/refs/tags/2.3.0.tar.gz",
                    "sha256": "f5eb6fb2a9141d200b4e5a88bca16f29d1c7b0d9fe7da2d0c4135c2d95f18268",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 1573,
                        "url-template": "https://github.com/libcdio/libcdio/archive/refs/tags/$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "libcdio-paranoia",
            "config-opts": [
                "--disable-cxx",
                "--disable-example-progs"
            ],
            "cleanup": [
                "/bin/cd-paranoia"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/libcdio/libcdio-paranoia/archive/refs/tags/release-10.2+2.0.2.tar.gz",
                    "sha256": "fe35208811f3edfcb79ae7b4ad1984f3188aea42c4c8ba4d009efafb36734a8b",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 21751,
                        "url-template": "https://github.com/libcdio/libcdio-paranoia/archive/refs/tags/release-10.2+$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "libfdk-aac",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/mstorsjo/fdk-aac/archive/v2.0.3.tar.gz",
                    "sha256": "e25671cd96b10bad896aa42ab91a695a9e573395262baed4e4a2ff178d6a3a78",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 16208,
                        "url-template": "https://github.com/mstorsjo/fdk-aac/archive/v$version.tar.gz"
                    }
                }
            ]
        },
        {
            "name": "libmp3lame",
            "//": "Performance-enhancing patch, not part of runtime libmp3lame",
            "config-opts": [
                "--enable-nasm",
                "--disable-frontend"
            ],
            "cleanup": [
                "/share/doc/lame"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz",
                    "sha256": "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 12523,
                        "url-template": "https://sourceforge.net/projects/lame/files/lame/$version/lame-$version.tar.gz"
                    }
                },
                {
                    "only-arches": [ "x86_64" ],
                    "type": "patch",
                    "path": "patches/lame-3.100-sse-20171014.patch",
                    "strip-components": 0
                }
            ]
        },
        {
            "name": "libmp4v2",
            "cleanup": [
                "/bin/mp4*"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/enzo1982/mp4v2/releases/download/v2.1.3/mp4v2-2.1.3.tar.bz2",
                    "sha256": "033185c17bf3c5fdd94020c95f8325be2e5356558e3913c3d6547a85dd61f7f1",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 98413,
                        "url-template": "https://github.com/enzo1982/mp4v2/releases/download/v$version/mp4v2-$version.tar.bz2"
                    }
                }
            ]
        },
        {
            "name": "liburiparser",
            "buildsystem": "cmake-ninja",
            "config-opts": [
                "-DURIPARSER_BUILD_DOCS=OFF",
                "-DURIPARSER_BUILD_TESTS=OFF"
            ],
            "cleanup": [
                "/bin/uriparse"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/uriparser/uriparser/releases/download/uriparser-1.0.0/uriparser-1.0.0.tar.xz",
                    "sha256": "154a3f649d80a78d5095fc461ec032ffb45f5ed3619edec923ac68cff29a088d",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 10160,
                        "url-template": "https://github.com/uriparser/uriparser/releases/download/uriparser-$version/uriparser-$version.tar.xz"
                    }
                }
            ]
        },
        {
            "name": "libvorbis",
            "//": "Performance-enhancing patches, not part of runtime libvorbis",
            "cleanup": [
                "/share/doc/libvorbis*"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz",
                    "sha256": "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 1758,
                        "url-template": "https://downloads.xiph.org/releases/vorbis/libvorbis-$version.tar.xz"
                    }
                },
                {
                    "type": "patch",
                    "path": "patches/libvorbis-1.3.7-aotuv-b6.03.patch"
                },
                {
                    "only-arches": [
                        "x86_64"
                    ],
                    "type": "patch",
                    "path": "patches/libvorbis-1.3.7-aotuv-b6.03-lancer.patch"
                }
            ]
        },
        {
            "name": "musepack",
            "build-options": {
                "cflags": "-Wno-incompatible-pointer-types"
            },
            "config-opts": [
                "--disable-shared"
            ],
            "cleanup": [
                "/bin/mpc2sv8",
                "/bin/mpccut",
                "/bin/wavcmp"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://files.musepack.net/source/musepack_src_r475.tar.gz",
                    "sha256": "a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b",
                    "x-checker-data": {
                        "type": "anitya",
                        "project-id": 21865,
                        "url-template": "https://files.musepack.net/source/musepack_src_r$version.tar.gz"
                    }
                },
                {
                    "type": "patch",
                    "path": "patches/musepack_src_r475-const.patch"
                },
                {
                    "type": "shell",
                    "commands": [
                        "touch include/config.h.in",
                        "head -n 34 configure.in >> configure.ac",
                        "echo \"AM_CONDITIONAL([HAVE_VISIBILITY], [false])\" >> configure.ac",
                        "echo \"AC_CHECK_LIB([m],[cos])\" >> configure.ac",
                        "tail -n 18 configure.in >> configure.ac",
                        "rm configure.in",
                        "autoreconf -i"
                    ]
                }
            ]
        },
        {
            "name": "rnnoise",
            "cleanup": [
                "/share/doc/rnnoise"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/xiph/rnnoise.git",
                    "commit": "9acc1e5a633e0961a5895a73204df24744f199b6"
                }
            ]
        },
        {
            "name": "rubberband",
            "buildsystem": "meson",
            "config-opts": [
                "-Dfft=builtin",
                "-Dresampler=builtin",
                "-Djni=disabled",
                "-Dladspa=disabled",
                "-Dlv2=disabled",
                "-Dvamp=disabled",
                "-Dcmdline=disabled",
                "-Dtests=disabled"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://breakfastquay.com/files/releases/rubberband-4.0.0.tar.bz2",
                    "sha256": "af050313ee63bc18b35b2e064e5dce05b276aaf6d1aa2b8a82ced1fe2f8028e9"
                }
            ]
        },
        {
            "name": "smooth",
            "no-autogen": true,
            "make-install-args": [
                "prefix=/app"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/enzo1982/smooth.git"
                }
            ]
        },
        {
            "name": "BoCA",
            "no-autogen": true,
            "make-install-args": [
                "prefix=/app"
            ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/enzo1982/BoCA.git"
                }
            ]
        },
        {
            "name": "freac",
            "no-autogen": true,
            "make-install-args": [
                "prefix=/app"
            ],
            "build-options": {
                "cxxflags": "-DFREAC_DATE=\\\"$(shell date +\"%Y%m%d\")\\\""
            },
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/enzo1982/freac.git"
                },
                {
                    "type": "patch",
                    "path": "patches/freac-1.1-beta-noudev.patch"
                }
            ]
        }
    ]
}
