ngspice: update to 34

This commit is contained in:
umarcor
2021-02-01 10:28:44 +01:00
parent f0c088fd28
commit 396fd34d2b

View File

@@ -1,4 +1,5 @@
# Maintainer: Maciej Suminski <maciej.suminski@cern.ch>
# Contributor: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
#
# Based on Arch ngspice PKGBUILD:
# https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ngspice
@@ -10,21 +11,30 @@
_realname=ngspice
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=33
pkgrel=2
pkgver=34
pkgrel=1
pkgdesc="Mixed-level/Mixed-signal circuit simulator based on Spice3f5, Cider1b1, and Xspice (mingw-w64)"
url='https://ngspice.sourceforge.io/'
license=('BSD')
arch=('any')
groups=("${MINGW_PACKAGE_PREFIX}-eda")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
conflicts=(${MINGW_PACKAGE_PREFIX}-${_realname}-git)
replaces=(${MINGW_PACKAGE_PREFIX}-${_realname}-git)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-${pkgver}.tar.gz"
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-doc-${pkgver}.tar.gz")
sha256sums=('b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1'
'1f90d3bdad11eee66079b086e8fd54db5bac7b7eb183a9afbb573ec351cedfb0')
depends=(
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
)
source=(
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-${pkgver}.tar.gz"
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-doc-${pkgver}.tar.gz"
)
sha256sums=(
'2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5'
'cbe7a42c4e3730ce86f2bdcc5c2eb95192e7daadf99e1c039b02dceaf7a12743'
)
build() {
[[ -d "${srcdir}/build-shared-${CARCH}" ]] && rm -rf "${srcdir}/build-shared-${CARCH}"
@@ -34,13 +44,14 @@ build() {
# shared lib sets flags and modifies headers, needs dedicated pass
# adding --with-readline disables libngspice-0.dll
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-openmp \
--enable-xspice \
--enable-cider \
--with-ngshared
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--disable-debug \
--enable-openmp \
--enable-xspice \
--enable-cider \
--with-ngshared
make
cd "${srcdir}/${_realname}-${pkgver}"
@@ -48,26 +59,32 @@ build() {
mkdir -p "${srcdir}/build-static-${CARCH}" && cd "${srcdir}/build-static-${CARCH}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-xspice \
--enable-cider \
--enable-openmp
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--disable-debug \
--enable-xspice \
--enable-cider \
--enable-openmp \
--with-wingui
make
}
package() {
cd "${srcdir}/build-static-${CARCH}"
make install DESTDIR="${pkgdir}"
install -D -m644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
# FIX: config.h should not be installed. This should be upstreamed/patched in the makefiles.
rm "${pkgdir}${MINGW_PREFIX}"/include/config.h
# pkg-conf file has to be copied manually. Generated pkg-config file is the same for
# static and shared builds.
install -D -m644 "${srcdir}/build-shared-${CARCH}/ngspice.pc" "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ngspice.pc"
# library files have to be copied manually
# additional files from the shared build have to be copied manually
cd "${srcdir}/build-shared-${CARCH}"
install -D -m755 src/.libs/libngspice-0.dll "${pkgdir}${MINGW_PREFIX}/bin"
install -D -m755 src/.libs/libngspice.dll.a "${pkgdir}${MINGW_PREFIX}/lib"
install -Dm755 src/.libs/libngspice-0.dll "${pkgdir}${MINGW_PREFIX}/bin"
install -Dm755 src/.libs/libngspice.dll.a "${pkgdir}${MINGW_PREFIX}/lib"
install -Dm644 "${srcdir}/${_realname}-${pkgver}"/src/include/ngspice/sharedspice.h "${pkgdir}${MINGW_PREFIX}"/include/ngspice/sharedspice.h
}