summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-xPKGBUILD115
1 files changed, 78 insertions, 37 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1a57f8ebf6eb..bcb104f00583 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}