app-id: org.openmfda.kicad.KiCad
runtime: org.kde.Platform
runtime-version: 5.15-23.08
sdk: org.kde.Sdk
command: kicad-startup
finish-args:
- --device=dri
- --env=SPNAV_SOCKET=/run/spnav.sock
- --filesystem=home
- --filesystem=host
- --filesystem=/run/spnav.sock:ro
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=wayland
- --socket=x11
cleanup:
- /lib/cmake
- /lib/pkgconfig
- /lib/wx
- /lib64
- /share/aclocal
- /share/bakefile
- '*.la'
- '*.a'
- /include
- /lib/cmake
- /lib/pkgconfig
- /share/man
- '*.a'
modules:
- shared-modules/glu/glu-9.json
- shared-modules/glew/glew.json
- shared-modules/libsecret/libsecret.json
- name: glm
buildsystem: simple
build-commands:
- cp -r glm /app/include
cleanup:
- /include
sources:
- type: git
url: https://github.com/g-truc/glm
tag: 1.0.1
commit: 0af55ccecd98d4e5a8d1fad7de25ba429d60e863
x-checker-data:
type: git
tag-pattern: ^([\d\.]+)$
- name: libXmu
cleanup:
- /include
- /share/doc
sources:
- type: git
url: https://gitlab.freedesktop.org/xorg/lib/libxmu.git
tag: libXmu-1.2.1
commit: 792f80402ee06ce69bca3a8f2a84295999c3a170
x-checker-data:
type: git
tag-pattern: ^libXmu-([\d\.]+)$
- name: OCCT
buildsystem: cmake-ninja
cleanup:
- /bin
- /include
- /share/doc
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_LIBRARY_TYPE=Shared
- -DBUILD_Inspector=OFF
- -DBUILD_DOC_Overview=OFF
- -DBUILD_MODULE_ApplicationFramework=ON
- -DBUILD_MODULE_DataExchange=ON
- -DBUILD_MODULE_Draw=OFF
- -DBUILD_MODULE_FoundationClasses=ON
- -DBUILD_MODULE_ModelingAlgorithms=ON
- -DBUILD_MODULE_ModelingData=ON
- -DBUILD_MODULE_Visualization=ON
- -DUSE_VTK=OFF
- -DUSE_TBB=OFF
- -DINSTALL_FREETYPE=OFF
- -DINSTALL_SAMPLES=OFF
- -DINSTALL_TEST_CASES=OFF
sources:
- type: git
commit: cec1ecd0c9f3b3d2572c47035d11949e8dfa85e2
url: https://github.com/Open-Cascade-SAS/OCCT
tag: V7_7_2
x-checker-data:
type: git
tag-pattern: ^V([\d_]+)$
versions:
<: '7_8_0'
- name: boost
buildsystem: simple
build-commands:
- ./bootstrap.sh --prefix=/app --with-libraries=context,date_time,filesystem,iostreams,locale,program_options,regex,system,thread,test,serialization
- ./b2 -j $FLATPAK_BUILDER_N_JOBS install --prefix=/app
sources:
- type: archive
url: https://archives.boost.io/release/1.82.0/source/boost_1_82_0.tar.gz
sha256: 66a469b6e608a51f8347236f4912e27dc5c60c60d7d53ae9bfe4683316c6f04c
- name: wxWidgets
cleanup:
- /bin
- /include
config-opts:
- --with-opengl
- --disable-glcanvasegl
sources:
- type: git
commit: 573e56d432cc2c4b19a27aa5cad3e6045bfc542b
tag: v3.2.5
url: https://github.com/wxWidgets/wxWidgets
x-checker-data:
is-important: true
type: git
tag-pattern: ^v([\d\.]+)$
- python3-wxPython.yml
- python3-requests.yml
- tcl.yml
- name: swig
buildsystem: autotools
cleanup:
- /bin
- /share
sources:
- type: archive
url: https://sourceforge.net/projects/swig/files/swig/swig-4.2.1/swig-4.2.1.tar.gz
sha256: fa045354e2d048b2cddc69579e4256245d4676894858fcf0bab2290ecf59b7d8
x-checker-data:
type: html
url: https://www.swig.org/download.html
version-pattern: The latest release is swig-([\d\.]+)
url-template: https://sourceforge.net/projects/swig/files/swig/swig-$version/swig-$version.tar.gz
- name: ngspice
cleanup:
- /bin
- /include
- /share/man
config-opts:
- --enable-osdi
- --disable-silent-rules
- --enable-xspice
- --enable-cider
- --enable-openmp
- --with-ngshared
rm-configure: true
sources:
- type: archive
url: https://sourceforge.net/projects/ngspice/files/ng-spice-rework/old-releases/42/ngspice-42.tar.gz
sha256: 737fe3846ab2333a250dfadf1ed6ebe1860af1d8a5ff5e7803c772cc4256e50a
x-checker-data:
is-important: true
type: html
url: https://ngspice.sourceforge.io/download.html
url-template: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/$version/ngspice-$version.tar.gz
version-pattern: ngspice-([\d]+)
- type: script
commands:
- cp -p /usr/share/automake-*/config.{sub,guess} .
- autoconf -f -B build/autoconf_prepend-include
- name: unixodbc
cleanup:
- /share/man
sources:
- type: git
url: https://github.com/lurcher/unixODBC.git
tag: 2.3.12
commit: c335dbf3fa25b524e935e98cf26b96a2e13f5c81
x-checker-data:
type: git
tag-pattern: ^([\d\.]+)$
- type: script
commands:
- autoreconf -fi
- name: libgit2
buildsystem: cmake-ninja
cleanup:
- /bin
- /include
- /lib/pkgconfig
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
sources:
- type: git
commit: a418d9d4ab87bae16b87d8f37143a4687ae0e4b2
tag: v1.7.2
url: https://github.com/libgit2/libgit2
x-checker-data:
type: git
tag-pattern: ^(v[\d\.]+)$
versions:
<: v1.8.0
- python3-pytest.yml
- name: kicad
builddir: true
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DCMAKE_CTEST_ARGUMENTS="--output-on-failure"
- -DGLEW_INCLUDE_DIR=/app/include/GL
- -DOCC_INCLUDE_DIR=/app/include/opencascade
- -DOPENGL_glu_LIBRARY=/app/lib/libGLU.so
- -DKICAD_BUILD_FLATPAK=ON
- -DKICAD_BUILD_I18N=ON
- -DKICAD_USE_EGL=OFF
- -DKICAD_LIBRARY_DATA=/app/extensions/Library
post-install:
- install ../../flatpak-extra/kicad-startup /app/bin/kicad-startup
- install ../../flatpak-extra/eeschema-startup /app/bin/eeschema-startup
- install ../../flatpak-extra/pcbnew-startup /app/bin/pcbnew-startup
- install ../../flatpak-extra/python /app/bin/python
- install ../../flatpak-extra/pip3 /app/bin/pip3.10
- ln -s /app/bin/pip3.10 /app/bin/pip3
- ln -s /app/bin/pip3 /app/bin/pip
- install -d /app/extensions/ODBCDriver
# Alter the desktop files for kicad, eeschema, and pcbnew to use the
# wrapper scripts installing/uninstalling the ODBC drivers before
# launching the apps.
- >
for f in $FLATPAK_DEST/share/applications/*.desktop; do
desktop_name="$(basename $f)";
if [ "$desktop_name" =~ \.KiCad\.desktop$ ]; then
desktop-file-edit \
--set-key=Exec \
--set-value="kicad-startup %f" \
"$f";
else
if [[ "$desktop_name" =~ \.KiCad\.(eeschema|pcbnew)\.desktop$
]]; then
desktop-file-edit \
--set-key=Exec \
--set-value="${BASH_REMATCH[1]}-startup %f" \
"$f";
fi;
fi;
done;
unset desktop_name
# TODO (post-install script): Re-add tag to metainfo.xml for UserDocs.
run-tests: false
subdir: kicad-git
sources:
- type: git
dest: kicad-git
url: https://gitlab.com/kicad/code/kicad.git
commit: c2a41bad09ec6d0346adc710744665eb5b936b08
tag: 8.0.3
x-checker-data:
is-main-source: true
type: git
tag-pattern: ^([\d\.]+)$
versions:
<: 8.99.0
- type: script
dest: flatpak-extra
dest-filename: pip3
commands:
- export PYTHONUSERBASE="$XDG_DATA_HOME/python"
- export PATH="$XDG_DATA_HOME/python/bin":$PATH
- exec /usr/bin/pip3 "$@"
- type: script
dest: flatpak-extra
dest-filename: python
commands:
- export PYTHONUSERBASE="$XDG_DATA_HOME/python"
- export PATH="$XDG_DATA_HOME/python/bin":$PATH
- exec /usr/bin/python "$@"
- type: script
dest: flatpak-extra
dest-filename: kicad-startup
commands:
- mkdir -p ${XDG_CONFIG_HOME}/unixodbc
- export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc
# Remove config file, and recreate it from all available templates.
# This handles uninstallation of ODBCDriver extensions.
- rm -f ${ODBCSYSINI}/odbcinst.ini
# Install available ODBC drivers
- >
for template in /app/extensions/ODBCDriver/template/*.ini; do
test -f "$template" || continue;
odbcinst -i -d -f "$template" >/dev/null;
done
- exec /app/bin/kicad "$@"
- type: script
dest: flatpak-extra
dest-filename: eeschema-startup
commands:
- mkdir -p ${XDG_CONFIG_HOME}/unixodbc
- export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc
# Remove config file, and recreate it from all available templates.
# This handles uninstallation of ODBCDriver extensions.
- rm -f ${ODBCSYSINI}/odbcinst.ini
# Install available ODBC drivers
- >
for template in /app/extensions/ODBCDriver/template/*.ini; do
test -f "$template" || continue;
odbcinst -i -d -f "$template" >/dev/null;
done
- exec /app/bin/eeschema "$@"
- type: script
dest: flatpak-extra
dest-filename: pcbnew-startup
commands:
- mkdir -p ${XDG_CONFIG_HOME}/unixodbc
- export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc
# Remove config file, and recreate it from all available templates.
# This handles uninstallation of ODBCDriver extensions.
- rm -f ${ODBCSYSINI}/odbcinst.ini
# Install available ODBC drivers
- >
for template in /app/extensions/ODBCDriver/template/*.ini; do
test -f "$template" || continue;
odbcinst -i -d -f "$template" >/dev/null;
done
- exec /app/bin/pcbnew "$@"
- type: patch
use-git: true
dest: kicad-git
paths:
- kicad-branding.patch
- kicad-doc.yml
- yosys.yml
- openscad.yml
- openroad.yml
- de.klayout.KLayout.yaml
- python3-opendbpy.yml
- python3-solid.yml
- openmfda.yml