New package: Brainfunk-0.9.0

closes #4415
This commit is contained in:
misuchiru03 2018-10-18 22:06:37 -05:00 committed by maxice8
parent dbb6fa1cb1
commit bdaeea31f8
No known key found for this signature in database
GPG Key ID: 543B9D4F4299F06B
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,48 @@
--- Makefile 2018-11-04 13:26:07.744752852 -0700
+++ Makefile 2018-11-04 13:27:46.074222441 -0700
@@ -1,25 +1,26 @@
-CFLAGS=-O3 --std=gnu++11
-LFLAGS=-s -lpng
+CFLAGS+= -O3 --std=gnu++11
+LFLAGS+= -s -lpng
SRCD = source
SRC = $(wildcard $(SRCD)/*.cpp)
OBJD = obj
OBJ = $(patsubst $(SRCD)/%.cpp,$(OBJD)/%.o,$(SRC))
TSTD = tests
-INSTALL_PATH=/usr/local
+PREFIX?=/usr/local
+target=$(DESTDIR)$(PREFIX)
$(shell mkdir -p $(OBJD) >/dev/null)
bfk: $(OBJD) $(OBJ)
@echo Linking: $@
- @g++ -o bfk $(OBJ) $(LFLAGS)
+ @$(CXX) -o bfk $(OBJ) $(LFLAGS)
$(OBJD)/%.o: $(SRCD)/%.cpp
@echo Compiling: $(<F)
- @g++ $(CFLAGS) -c -o $@ $<
+ @$(CXX) $(CFLAGS) -c -o $@ $<
$(OBJD)/%.d: $(SRCD)/%.cpp
@set -e; rm -f $@; \
- g++ --std=gnu++11 -MM -MT $(OBJD)/$(*F).o $(CPPFLAGS) $< > $@.$$$$; \
+ $(CXX) --std=gnu++11 -MM -MT $(OBJD)/$(*F).o $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
@@ -34,10 +35,10 @@
@$(MAKE) --silent -C $(TSTD)/ clean
install: bfk
- @install -m 0755 bfk $(INSTALL_PATH)/bin/
+ @install -m 0755 bfk $(target)/bin
remove:
- @rm -fv $(INSTALL_PATH)/bin/bfk
+ @rm -fv $(target)/bin/bfk
test: bfk
@sync bfk

View File

@ -0,0 +1,18 @@
# Template file for 'Brainfunk'
pkgname=Brainfunk
version=0.9.0
revision=1
wrksrc=${pkgname}-${version}-beta
build_style=gnu-makefile
make_use_env=yes
makedepends="png++"
short_desc="Brainfuck optimizing interpreter and compiler"
maintainer="misuchiru03 <misuchiru03+void@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/GReaperEx/Brainfunk"
distfiles="${homepage}/archive/v${version}-beta.tar.gz"
checksum=6b48bd1fbe0dbce20f3e8af5c799023ea820ddc45aca8fac0ccecfa2de359ee2
do_install() {
vbin bfk
}