Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexlarsson/0ec0cd4872622a1360c494bc9b356984 to your computer and use it in GitHub Desktop.
Save alexlarsson/0ec0cd4872622a1360c494bc9b356984 to your computer and use it in GitHub Desktop.
Example Sdk extension
{
"id": "org.freedesktop.Sdk.Extension.gfortran-62",
"branch": "1.6",
"runtime": "org.freedesktop.Sdk",
"build-extension": true,
"sdk": "org.freedesktop.Sdk",
"runtime-version": "1.6",
"sdk-extensions": [],
"separate-locales": false,
"cleanup": [ "/share/info", "/share/man" ],
"build-options" : {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g",
"prefix": "/usr/lib/sdk/gfortran-62",
"env": {
"V": "1"
}
},
"modules": [
{
"name": "gcc",
"cleanup": [ "/bin/c++",
"/bin/g++",
"/bin/cpp",
"/bin/gcc*",
"/bin/gcov*",
"/bin/*-gnu-*",
"/lib/lib*san*",
"/lib/lib*san*",
"/lib/libstdc++*",
"/lib/libsupc++*",
"/lib/libsupc++*",
"/libexec/gcc/*-gnu/6.2.0/cc1*"
],
"config-opts": [
"--enable-languages=fortran",
"--disable-multilib",
"--disable-bootstrap",
"--with-system-zlib",
"--enable-checking=release",
"--disable-stage1-checking",
"--disable-libsanitizer",
"--disable-libssp"
],
"sources": [
{
"type": "archive",
"url": "https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2",
"sha256": "9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5"
},
{
"type": "shell",
"commands": ["sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64"]
}
]
},
{
"name": "scripts",
"sources": [
{
"type": "script",
"commands": [
"mkdir -p /app/lib",
"cp /usr/lib/sdk/gfortran-62/lib/libquadmath.so* /usr/lib/sdk/gfortran-62/lib/libgfortran.so.3* /app/lib/"
],
"dest-filename": "install.sh"
},
{
"type": "script",
"commands": [
"export PATH=$PATH:/usr/lib/sdk/gfortran-62/bin"
],
"dest-filename": "use.sh"
}
],
"buildsystem": "simple",
"build-commands": [
"cp use.sh install.sh /usr/lib/sdk/gfortran-62/"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment