Skip to content

Commit e9886f2

Browse files
committed
[yosys-git] fix build
1 parent d76352f commit e9886f2

2 files changed

Lines changed: 58 additions & 58 deletions

File tree

alarmcn/yosys-git/PKGBUILD

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
# Contributor: Darren Wu <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
66

77
pkgname=yosys-git
8-
pkgrel=1
9-
pkgver=0.64+213.r17122.84605d89b
8+
pkgrel=0
9+
pkgver=0.67.r17605.468ba27d9
1010
pkgdesc='A framework for RTL synthesis'
1111
arch=('armv7h' 'aarch64' 'x86_64' 'i686')
1212
url='https://yosyshq.net/yosys/'
1313
license=('custom:ISC')
1414
provides=("yosys=$pkgver")
1515
conflicts=("yosys")
1616
depends=('bash' 'tcl' 'libffi' 'protobuf') # boost-libs python (added in package())
17-
makedepends=('git' 'boost' 'clang' 'python' 'pybind11' 'python-cxxheaderparser' 'uv')
17+
makedepends=('git' 'boost' 'cmake' 'clang' 'python'
18+
'pybind11' 'python-cxxheaderparser')
1819
optdepends=('graphviz: Schematics display support'
1920
'xdot: Display netlists'
2021
'yices: default solver for yosys-smtbmc'
@@ -27,7 +28,14 @@ sha512sums=('SKIP')
2728

2829
pkgver() {
2930
cd yosys
30-
printf "%s.r%s.%s" "$(make echo-yosys-ver)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
31+
_yosys_ver=$(
32+
cmake -DCMAKE_MODULE_PATH=${PWD}/cmake -P /dev/stdin 2>&1 <<EOF
33+
include(YosysVersionData)
34+
message("\${YOSYS_VERSION_MAJOR}.\${YOSYS_VERSION_MINOR}")
35+
EOF
36+
)
37+
38+
printf "%s.r%s.%s" "${_yosys_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
3139
}
3240

3341
prepare() {
@@ -37,39 +45,31 @@ prepare() {
3745
git submodule update
3846
}
3947

40-
_make() {
41-
make \
42-
PREFIX="/usr" \
43-
CONFIG=gcc \
44-
ENABLE_TCL=1 \
45-
ENABLE_ABC=1 \
46-
ENABLE_GLOB=1 \
47-
ENABLE_PLUGINS=1 \
48-
ENABLE_LIBYOSYS=1 \
49-
ENABLE_PROTOBUF=1 \
50-
ENABLE_ZLIB=1 \
51-
ENABLE_PYOSYS=1 \
52-
ABCPULL=0 \
53-
ABCREV=default \
54-
BOOST_PYTHON_LIB="-lpython3 -lboost_python3" $@
55-
}
56-
5748
build() {
5849
cd yosys
5950

60-
_make
61-
}
51+
cmake . -B build -DCMAKE_BUILD_TYPE=None \
52+
-DCMAKE_INSTALL_PREFIX='/usr' \
53+
-DBUILD_TESTING=Off \
54+
-Wno-author \
55+
-DYOSYS_INSTALL_DRIVER=ON \
56+
-DYOSYS_INSTALL_LIBRARY=ON \
57+
-DYOSYS_INSTALL_PYTHON=ON \
58+
-DYOSYS_WITH_PYTHON=ON \
59+
-DYOSYS_ENABLE_TCL=On \
60+
-DYOSYS_ENABLE_ABC=On \
61+
-DYOSYS_ENABLE_GLOB=On \
62+
-DYOSYS_ENABLE_PLUGINS=On \
63+
-DYOSYS_ENABLE_ZLIB=On \
64+
-DYOSYS_ENABLE_PYTHON=On
6265

63-
# check() {
64-
# cd yosys
65-
# _make test
66-
# }
66+
make -C build
67+
}
6768

6869
package() {
6970
cd yosys
7071

71-
# disable stripping in the makefile - duplicated effort and makes debug packages impossible
72-
_make STRIP=':' PREFIX="/usr" PYTHON_PREFIX="${pkgdir}/usr" DESTDIR="${pkgdir}" install
72+
make install DESTDIR="${pkgdir}"
7373

7474
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
7575

archlinuxcn/yosys-git/PKGBUILD

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
# Contributor: Darren Wu <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
66

77
pkgname=yosys-git
8-
pkgrel=1
9-
pkgver=0.64+215.r17124.54866d154
8+
pkgrel=0
9+
pkgver=0.67.r17605.468ba27d9
1010
pkgdesc='A framework for RTL synthesis'
1111
arch=('armv7h' 'aarch64' 'x86_64' 'i686')
1212
url='https://yosyshq.net/yosys/'
1313
license=('custom:ISC')
1414
provides=("yosys=$pkgver")
1515
conflicts=("yosys")
1616
depends=('bash' 'tcl' 'libffi' 'protobuf') # boost-libs python (added in package())
17-
makedepends=('git' 'boost' 'clang' 'python' 'pybind11' 'python-cxxheaderparser' 'uv')
17+
makedepends=('git' 'boost' 'cmake' 'clang' 'python'
18+
'pybind11' 'python-cxxheaderparser')
1819
optdepends=('graphviz: Schematics display support'
1920
'xdot: Display netlists'
2021
'yices: default solver for yosys-smtbmc'
@@ -27,7 +28,14 @@ sha512sums=('SKIP')
2728

2829
pkgver() {
2930
cd yosys
30-
printf "%s.r%s.%s" "$(make echo-yosys-ver)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
31+
_yosys_ver=$(
32+
cmake -DCMAKE_MODULE_PATH=${PWD}/cmake -P /dev/stdin 2>&1 <<EOF
33+
include(YosysVersionData)
34+
message("\${YOSYS_VERSION_MAJOR}.\${YOSYS_VERSION_MINOR}")
35+
EOF
36+
)
37+
38+
printf "%s.r%s.%s" "${_yosys_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
3139
}
3240

3341
prepare() {
@@ -37,39 +45,31 @@ prepare() {
3745
git submodule update
3846
}
3947

40-
_make() {
41-
make \
42-
PREFIX="/usr" \
43-
CONFIG=gcc \
44-
ENABLE_TCL=1 \
45-
ENABLE_ABC=1 \
46-
ENABLE_GLOB=1 \
47-
ENABLE_PLUGINS=1 \
48-
ENABLE_LIBYOSYS=1 \
49-
ENABLE_PROTOBUF=1 \
50-
ENABLE_ZLIB=1 \
51-
ENABLE_PYOSYS=1 \
52-
ABCPULL=0 \
53-
ABCREV=default \
54-
BOOST_PYTHON_LIB="-lpython3 -lboost_python3" $@
55-
}
56-
5748
build() {
5849
cd yosys
5950

60-
_make
61-
}
51+
cmake . -B build -DCMAKE_BUILD_TYPE=None \
52+
-DCMAKE_INSTALL_PREFIX='/usr' \
53+
-DBUILD_TESTING=Off \
54+
-Wno-author \
55+
-DYOSYS_INSTALL_DRIVER=ON \
56+
-DYOSYS_INSTALL_LIBRARY=ON \
57+
-DYOSYS_INSTALL_PYTHON=ON \
58+
-DYOSYS_WITH_PYTHON=ON \
59+
-DYOSYS_ENABLE_TCL=On \
60+
-DYOSYS_ENABLE_ABC=On \
61+
-DYOSYS_ENABLE_GLOB=On \
62+
-DYOSYS_ENABLE_PLUGINS=On \
63+
-DYOSYS_ENABLE_ZLIB=On \
64+
-DYOSYS_ENABLE_PYTHON=On
6265

63-
# check() {
64-
# cd yosys
65-
# _make test
66-
# }
66+
make -C build
67+
}
6768

6869
package() {
6970
cd yosys
7071

71-
# disable stripping in the makefile - duplicated effort and makes debug packages impossible
72-
_make STRIP=':' PREFIX="/usr" PYTHON_PREFIX="${pkgdir}/usr" DESTDIR="${pkgdir}" install
72+
make install DESTDIR="${pkgdir}"
7373

7474
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
7575

0 commit comments

Comments
 (0)