summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Matias2020-04-12 11:13:26 -0300
committerPaulo Matias2020-04-12 11:13:26 -0300
commit6fad2972e012afa938ec436161d44c17a5e01831 (patch)
tree3c9ed9621718c0adf23276a20317fab13cef714b
parent44c3b338818ed77de0025c734e8ea90ae5f9d7bc (diff)
downloadaur-6fad2972e012afa938ec436161d44c17a5e01831.tar.gz
Make it build!
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD33
-rw-r--r--archlinux.patch50
3 files changed, 88 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a196dd1b863b..f6f882670b95 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,23 @@
pkgbase = bluespec-git
pkgdesc = Bluespec Compiler (BSC)
- pkgver = r3.cc623d8
+ pkgver = r285.9dfe8f5
pkgrel = 1
url = https://github.com/B-Lang-org/bsc
arch = x86_64
- license = custom
+ license = BSD
makedepends = git
makedepends = gperf
makedepends = ghc
- makedepends = haskell-regex-compat
- makedepends = haskell-syb
- makedepends = haskell-old-time
- makedepends = fontconfig
- makedepends = libxft
- source = git+https://github.com/B-Lang-org/bsc.git
- md5sums = SKIP
+ makedepends = xorg-server-xvfb
+ depends = tk-itk
+ depends = haskell-old-time
+ depends = haskell-syb
+ depends = haskell-regex-compat
+ depends = haskell-split
+ source = git+https://github.com/b-lang-org/bsc.git
+ source = archlinux.patch
+ sha256sums = SKIP
+ sha256sums = 32f1befc93b371c5a744cf01447c8386337641c2efae75090abea0a119e330aa
pkgname = bluespec-git
diff --git a/PKGBUILD b/PKGBUILD
index d055a927ce1c..d4f5ce99924c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,20 @@
# Maintainer: Jiuyang Liu <liujiuyang1994@gmail.com>
+# Maintainer: Paulo Matias <matias@ufscar.br>
pkgname=bluespec-git
-pkgver=r3.cc623d8
+pkgver=r285.9dfe8f5
pkgrel=1
pkgdesc='Bluespec Compiler (BSC)'
arch=('x86_64')
url='https://github.com/B-Lang-org/bsc'
-license=('custom')
-depends=()
-makedepends=('git' 'gperf' 'ghc' 'haskell-regex-compat' 'haskell-syb' 'haskell-old-time' 'fontconfig' 'libxft')
-source=("git+https://github.com/B-Lang-org/bsc.git")
-md5sums=('SKIP')
+license=('BSD')
+depends=('tk-itk' 'haskell-old-time' 'haskell-syb' 'haskell-regex-compat' 'haskell-split')
+makedepends=('git' 'gperf' 'ghc' 'xorg-server-xvfb')
+source=("git+https://github.com/b-lang-org/bsc.git"
+ "archlinux.patch")
+sha256sums=('SKIP'
+ '32f1befc93b371c5a744cf01447c8386337641c2efae75090abea0a119e330aa')
+_prefix="/opt/bluespec"
pkgver() {
cd "$srcdir/bsc"
@@ -20,14 +24,29 @@ pkgver() {
prepare() {
cd "$srcdir/bsc"
git submodule update --init --recursive
+ patch -p1 -i "${srcdir}/archlinux.patch"
+ sed -i "s,^BINDIR=.*$,BINDIR=${_prefix}/bin," src/comp/wrapper.sh
}
build(){
cd "$srcdir/bsc"
- make GHC="ghc -dynamic"
+ make GHC="ghc -dynamic" GHCJOBS=2 GHCRTSFLAGS='+RTS -M5G -A128m -RTS'
}
package() {
cd "$srcdir/bsc"
+ install -d "${pkgdir}${_prefix}"
+ cp -dr --preserve=mode,timestamp ./inst/* "${pkgdir}${_prefix}"
+
+ install -d "${pkgdir}/usr/share/vim/vimfiles"
+ cp -dr --preserve=mode,timestamp ./util/vim/{ftdetect,indent,syntax} "${pkgdir}/usr/share/vim/vimfiles"
+
+ install -d "${pkgdir}/usr/bin"
+ local _prog
+ for _prog in bsc bluetcl bluewish; do
+ ln -s "${_prefix}/bin/${_prog}" "${pkgdir}/usr/bin"
+ done
+
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/archlinux.patch b/archlinux.patch
new file mode 100644
index 000000000000..f51210dc63ba
--- /dev/null
+++ b/archlinux.patch
@@ -0,0 +1,50 @@
+diff --git a/src/comp/Makefile b/src/comp/Makefile
+index 5e38ec2..b832d80 100644
+--- a/src/comp/Makefile
++++ b/src/comp/Makefile
+@@ -63,6 +63,8 @@ TCL_LIBS = -ltcl$(TCL_VER) -ltk$(TCL_VER) -litcl$(ITCL_VER) \
+ ifeq ($(OSTYPE), Darwin)
+ TCL_ARGS += -I$(shell xcrun --show-sdk-path)/System/Library/Frameworks/Tk.framework/Headers
+ TCL_LIBS += -L"$(shell dirname $(shell $(FIND) /System/Library/Tcl -type f -name libitcl$(ITCL_VER).dylib))"
++else
++TCL_LIBS += -L/usr/lib/itcl$(ITCL_VER) -optl-Wl,-rpath,/usr/lib/itcl$(ITCL_VER)
+ endif
+
+ # STP
+@@ -94,6 +96,8 @@ WISHFLAGS = -litk$(ITK_VER) $(shell pkg-config --libs x11)
+ WISHFLAGS += $(EXTRAWISHLIBS)
+ ifeq ($(OSTYPE), Darwin)
+ WISHFLAGS += -L"$(shell dirname $(shell $(FIND) /System/Library/Tcl -type f -name libitk$(ITK_VER).dylib))"
++else
++WISHFLAGS += -L/usr/lib/itk$(ITK_VER) -optl-Wl,-rpath,/usr/lib/itk$(ITK_VER)
+ endif
+
+ # -----
+diff --git a/src/vendor/htcl/Makefile b/src/vendor/htcl/Makefile
+index a5deb63..ec51a6b 100644
+--- a/src/vendor/htcl/Makefile
++++ b/src/vendor/htcl/Makefile
+@@ -1,9 +1,9 @@
+-CFLAGS += -Wall $(shell pkg-config --silence-errors --cflags-only-I tcl || echo -I/usr/include/tcl)
++GHCFLAGS += -Wall $(shell pkg-config --silence-errors --cflags-only-I tcl || echo -I/usr/include/tcl)
+ GHC ?= ghc
+
+ # We use GHC to compile this, so it has the proper RTS includes
+ %.o: %.c
+- $(GHC) $(CFLAGS) -c $<
++ $(GHC) $(GHCFLAGS) -c $<
+
+ libhtcl.a: haskell.o
+ ar -r $@ $(filter %.o, $+)
+diff --git a/src/vendor/stp/src/sat/Makefile b/src/vendor/stp/src/sat/Makefile
+index 0d0937d..912f7b1 100644
+--- a/src/vendor/stp/src/sat/Makefile
++++ b/src/vendor/stp/src/sat/Makefile
+@@ -13,6 +13,7 @@ export COPTIMIZE=$(CFLAGS_M32) $(CFLAGS_FPIC) -O3
+ core: $(LIB)
+
+ # $(LIB) depends on */lib$(SUB)_release.a and will be rebuilt only if they have been updated
++.NOTPARALLEL:
+ $(LIB): core/libcore_release.a core_prop/libcore_prop_release.a simp/libsimp_release.a utils/libutils_release.a cryptominisat2/libminisat.a $(OBJS)
+ $(RM) $@
+ $(call arcat,$@,$(filter %.a,$^))