diff options
author | ElMastro | 2020-10-05 15:39:29 +0200 |
---|---|---|
committer | ElMastro | 2020-10-05 15:39:29 +0200 |
commit | 0a614be56940cec0fb3e4c410a882d3faae273f1 (patch) | |
tree | 95afb87aa25deaffd4477fd8d8a8315810c9c698 | |
parent | fe502e2e76fdc08ddd96c5f9c20d2ffc2cc94488 (diff) | |
download | aur-0a614be56940cec0fb3e4c410a882d3faae273f1.tar.gz |
PKGBUILD from archlinux forum
-rwxr-xr-x | .SRCINFO | 53 | ||||
-rwxr-xr-x | PKGBUILD | 115 |
2 files changed, 110 insertions, 58 deletions
@@ -1,41 +1,52 @@ pkgbase = openmodelica-git pkgdesc = The Open Source Modelica Suite - pkgver = 1.16.0.dev.r267.g0c0d97d31 - pkgrel = 3 + pkgver = 1.16.0.dev.r590.g8f5710f752 + pkgrel = 1 url = https://openmodelica.org arch = i686 arch = x86_64 license = OSMC-PL - makedepends = autoconf - makedepends = automake - makedepends = libtool - makedepends = gcc - makedepends = gcc-fortran-multilib + makedepends = git + makedepends = gcc9-fortran makedepends = boost makedepends = clang makedepends = cmake makedepends = jre7-openjdk - makedepends = antlr2 - makedepends = subversion - makedepends = lib32-expat - makedepends = lib32-ncurses - makedepends = lib32-readline + makedepends = antlr4-runtime + makedepends = expat + makedepends = ncurses + makedepends = readline depends = java-environment - depends = python - depends = ruby - depends = suitesparse + depends = lapack + depends = boost-libs depends = qt5-webkit depends = qt5-xmlpatterns - depends = qwt - depends = coin-or-ipopt - depends = python2 - depends = lib32-gcc-libs - depends = lib32-zlib + depends = qt5-svg + depends = qt5-tools provides = openmodelica conflicts = openmodelica conflicts = openmodelica-svn conflicts = openmodelica-dev - options = !buildflags + source = openmodelica-git::git+https://github.com/OpenModelica/OpenModelica + source = git+https://github.com/OpenModelica/OMOptim.git + source = git+https://github.com/OpenModelica/OpenModelica-common.git + source = git+https://github.com/OpenModelica/OMLibraries.git + source = git+https://github.com/OpenModelica/OMSimulator.git + source = git+https://github.com/OpenModelica/OMFMISimulator-3rdParty.git + source = git+https://github.com/OpenModelica/OMTLMSimulator.git + source = git+https://github.com/OpenModelica/OMCompiler-3rdParty + source = git+https://github.com/OpenModelica/OMSens.git + source = git+https://github.com/OpenModelica/OMSens_Qt.git + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP pkgname = openmodelica-git @@ -2,57 +2,98 @@ # Contributor: Xwang <xwaang1976@gmail.com> pkgname=openmodelica-git -pkgver=1.16.0.dev.r267.g0c0d97d31 -pkgrel=3 +pkgver=1.16.0.dev.r590.g8f5710f752 +pkgrel=1 pkgdesc="The Open Source Modelica Suite" arch=('i686' 'x86_64') url="https://openmodelica.org" license=('OSMC-PL') -depends=('java-environment' 'python' 'ruby' 'suitesparse' 'qt5-webkit' 'qt5-xmlpatterns' 'qwt' 'coin-or-ipopt' 'python2' 'lib32-gcc-libs' 'lib32-zlib') -makedepends=('autoconf' 'automake' 'libtool' 'gcc' 'gcc-fortran-multilib' 'boost' 'clang' 'cmake' 'jre7-openjdk' 'antlr2' 'subversion' 'lib32-expat' 'lib32-ncurses' 'lib32-readline') +source=("$pkgname::git+https://github.com/OpenModelica/OpenModelica" + git+https://github.com/OpenModelica/OMOptim.git + git+https://github.com/OpenModelica/OpenModelica-common.git + git+https://github.com/OpenModelica/OMLibraries.git + git+https://github.com/OpenModelica/OMSimulator.git + git+https://github.com/OpenModelica/OMFMISimulator-3rdParty.git + git+https://github.com/OpenModelica/OMTLMSimulator.git + git+https://github.com/OpenModelica/OMCompiler-3rdParty + git+https://github.com/OpenModelica/OMSens.git + git+https://github.com/OpenModelica/OMSens_Qt.git) +md5sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') +depends=('java-environment' 'lapack' #'lpsolve' 'openscenegraph' 'python' 'ruby' 'suitesparse' + 'boost-libs' 'qt5-webkit' 'qt5-xmlpatterns' 'qt5-svg' 'qt5-tools' # 'fmilib' + ) +makedepends=('git' 'gcc9-fortran' 'boost' 'clang' 'cmake' 'jre7-openjdk' 'antlr4-runtime' 'expat' 'ncurses' 'readline') provides=('openmodelica') conflicts=('openmodelica' 'openmodelica-svn' 'openmodelica-dev') -options=('!buildflags') #needed to avoid the qwt_plot.f file not found error -#source=('git+https://github.com/ppenguin/OpenModelica.git') -#md5sums=('SKIP') prepare() { - # clone all submodules - #place for openmodelica-git.sh - #./openmodelica-git.sh - - mkdir -p "$srcdir/$pkgname" - if [ ! -d "$srcdir/$pkgname/.git" ]; then - MY_FORK=MyGitHubUserName ; git clone https://github.com/ppenguin/OpenModelica --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`') - echo "***** CLONING COMPLETED!!!!! ****" - fi + mkdir bin + ln -s /usr/bin/gfortran-9 bin/gfortran + export PATH="$PWD/bin:$PATH" + cd $pkgname + git submodule init + git config submodule.OMOptim.url "$srcdir"/OMOptim + git config submodule.libraries.url "$srcdir"/OMLibraries + git config submodule.OMSimulator.url "$srcdir"/OMSimulator + git config submodule.OMCompiler-3rdParty.url "$srcdir"/OMCompiler-3rdParty + git config submodule.OMSens.url "$srcdir"/OMSens + git config submodule.OMSens_Qt.url "$srcdir"/OMSens_Qt + git submodule update + cd OMOptim + git submodule init + git config submodule.common.url "$srcdir"/OpenModelica-common + git submodule update + cd .. + cd OMSimulator + git config submodule.3rdParty.url "$srcdir"/OMFMISimulator-3rdParty + git config submodule.OMTLMSimulator.url "$srcdir"/OMTLMSimulator + git submodule update + cd .. + cd OMSens_Qt + git submodule init + git config submodule.common.url "$srcdir"/OpenModelica-common + git submodule update + cd .. + sed -i '18 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_painter_command.h + sed -i '16 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_null_paintdevice.h + sed -i '30 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_painter.cpp + sed -i '14 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_widget_overlay.cpp + sed -i '14 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_compass_rose.cpp + sed -i '16 i #include <qpainterpath.h>' OMPlot/qwt/src/qwt_dial_needle.cpp } -#pkgver() { - #cd "$pkgname" - #git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' -#} +pkgver() { + cd $pkgname + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} build() { -cd "$srcdir/OpenModelica" -./build.sh -make + cd $pkgname + autoconf + export CPPFLAGS="$CPPFLAGS -DH5_USE_18_API" + ./configure --prefix=/usr/ CC=clang CXX=clang++ --with-UMFPACK + make } package() { - cd "$srcdir/OpenModelica" - make install DESTDIR=${pkgdir} - - install -D -m644 "OMEdit/OMEditLIB/Resources/icons/omedit.ico" "${pkgdir}/opt/OpenModelica/share/icons/omedit.ico" - install -D -m644 "OMNotebook/OMNotebook/OMNotebookGUI/Resources/OMNotebook_icon.ico" "${pkgdir}/opt/OpenModelica/share/icons/omnotebook.ico" -# install -D -m644 "OMOptim/OMOptim/GUI/Resources/omoptim.ico" "${pkgdir}/opt/OpenModelica/share/icons/omoptim.ico" - install -D -m644 "OMShell/OMShell/OMShellGUI/Resources/omshell.ico" "${pkgdir}/opt/OpenModelica/share/icons/omshell.ico" - install -D -m644 "OMPlot/OMPlot/OMPlotGUI/Resources/icons/omplot.ico" "${pkgdir}/opt/OpenModelica/share/icons/omplot.ico" + cd $pkgname + make install DESTDIR="$pkgdir" + + install -D -m644 "OMEdit/OMEditLIB/Resources/icons/omedit.ico" "${pkgdir}/usr/share/openmodelica/icons/omedit.ico" + install -D -m644 "OMNotebook/OMNotebook/OMNotebookGUI/Resources/OMNotebook_icon.ico" "${pkgdir}/usr/share/openmodelica/icons/omnotebook.ico" +# install -D -m644 "OMOptim/OMOptim/GUI/Resources/omoptim.ico" "${pkgdir}/usr/share/openmodelica/icons/omoptim.ico" + install -D -m644 "OMShell/OMShell/OMShellGUI/Resources/omshell.ico" "${pkgdir}/usr/share/openmodelica/icons/omshell.ico" + install -D -m644 "OMPlot/OMPlot/OMPlotGUI/Resources/icons/omplot.ico" "${pkgdir}/usr/share/openmodelica/icons/omplot.ico" install -D -m644 "OMCompiler/COPYING" "${pkgdir}/usr/share/licenses/openmodelica/LICENSE" -# mkdir ${pkgdir}/usr/OMSens/ - cp -r "OMSens" "${pkgdir}/opt/OpenModelica" #Copy OMSens' modules in the working directory -#This MANUALLY solves the issues about the folders; otherwise a patch will be needed -# rmdir usr/OMSens -# mv "${pkgdir}/usr/share/openmodelica/icons/" "${pkgdir}/opt/OpenModelica/share/icons/" - echo "OMSens is now in /opt/OpenModelica" + mkdir "$pkgdir"/usr/OMSens/ + cp -r "OMSens" "$pkgdir/usr/" #Copy OMSens' modules in the working directory } |