Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2016 16:09:05 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r412631 - in head/devel: . simavr simavr/files
Message-ID:  <201604061609.u36G955P096274@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Wed Apr  6 16:09:05 2016
New Revision: 412631
URL: https://svnweb.freebsd.org/changeset/ports/412631

Log:
  New port: devel/simavr
  
  This is a port of simavr, an AVR simulator using avr-gcc's register
  definitions.
  
  WWW: https://github.com/buserror/simavr
  
  PR:		208475
  Submitted by:	Felix Palmen <felix@palmen-it.de>

Added:
  head/devel/simavr/
  head/devel/simavr/Makefile   (contents, props changed)
  head/devel/simavr/distinfo   (contents, props changed)
  head/devel/simavr/files/
  head/devel/simavr/files/patch-examples_Makefile.opengl   (contents, props changed)
  head/devel/simavr/files/patch-examples_parts_uart__pty.c   (contents, props changed)
  head/devel/simavr/files/patch-simavr_Makefile   (contents, props changed)
  head/devel/simavr/pkg-descr   (contents, props changed)
  head/devel/simavr/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Wed Apr  6 16:02:57 2016	(r412630)
+++ head/devel/Makefile	Wed Apr  6 16:09:05 2016	(r412631)
@@ -5240,6 +5240,7 @@
     SUBDIR += sigslot
     SUBDIR += silc-toolkit
     SUBDIR += silentbob
+    SUBDIR += simavr
     SUBDIR += simgear
     SUBDIR += simian
     SUBDIR += simple_components

Added: head/devel/simavr/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/Makefile	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,87 @@
+# Created by: Felix Palmen <felix@palmen-it.de>
+# $FreeBSD$
+
+PORTNAME=	simavr
+PORTVERSION=	1.3
+CATEGORIES=	devel
+
+PATCH_DIST_STRIP=	-p1
+
+MAINTAINER=	felix@palmen-it.de
+COMMENT=	Simulator for several Atmel AVR chips
+
+LICENSE=	GPLv3
+
+BUILD_DEPENDS=	avr-gcc:devel/avr-gcc \
+		bash:shells/bash \
+		${LOCALBASE}/avr/lib/libc.a:devel/avr-libc
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	buserror
+GH_TAGNAME=	v${PORTVERSION}
+
+USES=		gmake pkgconfig
+ALL_TARGET=	build-simavr
+MAKE_ARGS=	"RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX}"
+
+USE_LDCONFIG=	yes
+
+OPTIONS_DEFINE=		DOCS EXAMPLES THREADSAFE
+THREADSAFE_DESC=	Add a patch to make debugging output thread-safe
+
+DOCS_ALL_TARGET=	doc
+DOCS_USE=		tex=latex:build tex=pdftex:build tex=texmf:build
+
+EXAMPLES_ALL_TARGET=	build-examples
+EXAMPLES_USE=		xorg=xdamage xorg=xcb xorg=xext xorg=xfixes \
+			xorg=xrandr gl=glut
+
+THREADSAFE_PATCH_SITES=	https://github.com/zirias/simavr/commit/
+THREADSAFE_PATCHFILES=	4b7c8c5245e1bbb8cac04948564622f47178b5f0.diff
+
+AVR_STRIP_CMD?=	avr-strip
+DUMPMACHINE=	${CC} -dumpmachine
+OBJDIRNAME=	obj-$$(${DUMPMACHINE})
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/simavr
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavr.so.1
+
+post-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/manual/manual.pdf ${STAGEDIR}${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/simavr_callgraph.pdf ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+.for BOARDELF in hd77480,charlcd i2ctest ledramp simduino ssd1306,ssd1306demo timer_64led
+	BOARDELF=${BOARDELF}; \
+	BOARD=$${BOARDELF%%,*}; \
+	ELF=$${BOARDELF##*,}; \
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}; \
+	${INSTALL_PROGRAM} \
+		${WRKSRC}/examples/board_$${BOARD}/${OBJDIRNAME}/$${ELF}.elf \
+		${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/$${ELF}; \
+	${INSTALL_DATA} ${WRKSRC}/examples/board_$${BOARD}/*.[aihc]* \
+			${WRKSRC}/examples/board_$${BOARD}/README \
+			${WRKSRC}/examples/board_$${BOARD}/Makefile \
+			${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/
+.endfor
+.for AXF in \
+		hd77480/atmega48_charlcd \
+		i2ctest/atmega1280_i2ctest \
+		ledramp/atmega48_ledramp \
+		ssd1306/atmega32_ssd1306 \
+		timer_64led/atmega168_timer_64led
+	${AVR_STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/board_${AXF}.axf
+.endfor
+.for EXDIR in parts shared
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${EXDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/${EXDIR}/*.[hc] \
+			${STAGEDIR}${EXAMPLESDIR}/${EXDIR}
+.endfor
+	${INSTALL_DATA} ${WRKSRC}/Makefile.common ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/Makefile ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/Makefile.opengl \
+			${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>

Added: head/devel/simavr/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/distinfo	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,4 @@
+SHA256 (buserror-simavr-1.3-v1.3_GH0.tar.gz) = ddaaf9745b62b0c032a773365375a6f1b12c50ff4a89ae4d531e7b516846e357
+SIZE (buserror-simavr-1.3-v1.3_GH0.tar.gz) = 741336
+SHA256 (4b7c8c5245e1bbb8cac04948564622f47178b5f0.diff) = 0bb3af41d9a64a372b64d2849bcfb9da00a685f54a31ee70fd7caf26d7db9c6c
+SIZE (4b7c8c5245e1bbb8cac04948564622f47178b5f0.diff) = 1551

Added: head/devel/simavr/files/patch-examples_Makefile.opengl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/files/patch-examples_Makefile.opengl	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,13 @@
+--- examples/Makefile.opengl.orig	2016-01-19 09:41:55 UTC
++++ examples/Makefile.opengl
+@@ -11,8 +11,8 @@ else
+ ifeq (${shell uname -o}, Msys)
+ LDFLAGS 	+= -mwindows -lopengl32 -lfreeglut
+ else
+-CPPFLAGS	+= ${shell pkg-config --cflags glu glut} -DFREEBSD=1
+-LDFLAGS 	+= ${shell pkg-config --libs glu glut}
++CPPFLAGS	+= ${shell pkg-config --cflags glu} -DFREEBSD=1
++LDFLAGS 	+= ${shell pkg-config --libs glu} -lglut
+ endif
+ endif
+ endif

Added: head/devel/simavr/files/patch-examples_parts_uart__pty.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/files/patch-examples_parts_uart__pty.c	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,18 @@
+--- examples/parts/uart_pty.c.orig	2016-01-19 09:41:55 UTC
++++ examples/parts/uart_pty.c
+@@ -30,8 +30,15 @@
+ #ifdef __APPLE__
+ #include <util.h>
+ #else
++#ifdef FREEBSD
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <termios.h>
++#include <libutil.h>
++#else
+ #include <pty.h>
+ #endif
++#endif
+ 
+ #include "uart_pty.h"
+ #include "avr_uart.h"

Added: head/devel/simavr/files/patch-simavr_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/files/patch-simavr_Makefile	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,35 @@
+--- simavr/Makefile.orig	2016-01-19 09:41:55 UTC
++++ simavr/Makefile
+@@ -73,12 +73,9 @@ ${OBJ}/libsimavr.so		: ${OBJ}/libsimavr.
+ 	ln -sf libsimavr.so.1 $@
+ 
+ libsimavr	: config ${OBJ}/libsimavr.a
+-# shared library won't work that easily on non-linux
+-ifeq (${shell uname}, Linux)
+ libsimavr	:	${OBJ}/libsimavr.so
+-endif
+ 
+-${OBJ}/${target}.elf	: ${OBJ}/${target}.o
++${OBJ}/${target}.elf	: ${OBJ}/${target}.o | libsimavr
+ 
+ ${target}	: ${OBJ}/${target}.elf
+ 
+@@ -103,15 +100,13 @@ install : all
+ 	$(INSTALL) -m644 sim/avr/*.h $(DESTDIR)/include/simavr/avr/
+ 	$(MKDIR) $(DESTDIR)/lib
+ 	$(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/
+-	$(MKDIR) $(DESTDIR)/lib/pkgconfig/
++	$(MKDIR) $(DESTDIR)/libdata/pkgconfig/
+ 	sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
+-		simavr-avr.pc >$(DESTDIR)/lib/pkgconfig/simavr-avr.pc
++		simavr-avr.pc >$(DESTDIR)/libdata/pkgconfig/simavr-avr.pc
+ 	sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
+-		simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc
+-ifeq (${shell uname}, Linux)
++		simavr.pc >$(DESTDIR)/libdata/pkgconfig/simavr.pc
+ 	$(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/
+ 	ln -sf libsimavr.so.1 $(DESTDIR)/lib/libsimavr.so
+-endif
+ 	$(MKDIR) $(DESTDIR)/bin
+ 	$(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)/bin/simavr
+ 

Added: head/devel/simavr/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/pkg-descr	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,4 @@
+This is a port of simavr, an AVR simulator using avr-gcc's register
+definitions.
+
+WWW: https://github.com/buserror/simavr

Added: head/devel/simavr/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/simavr/pkg-plist	Wed Apr  6 16:09:05 2016	(r412631)
@@ -0,0 +1,116 @@
+bin/simavr
+include/simavr/avr/avr_mcu_section.h
+include/simavr/avr_adc.h
+include/simavr/avr_bitbang.h
+include/simavr/avr_eeprom.h
+include/simavr/avr_extint.h
+include/simavr/avr_flash.h
+include/simavr/avr_ioport.h
+include/simavr/avr_lin.h
+include/simavr/avr_spi.h
+include/simavr/avr_timer.h
+include/simavr/avr_twi.h
+include/simavr/avr_uart.h
+include/simavr/avr_usb.h
+include/simavr/avr_watchdog.h
+include/simavr/fifo_declare.h
+include/simavr/sim_avr.h
+include/simavr/sim_avr_types.h
+include/simavr/sim_core.h
+include/simavr/sim_core_config.h
+include/simavr/sim_core_decl.h
+include/simavr/sim_cycle_timers.h
+include/simavr/sim_elf.h
+include/simavr/sim_gdb.h
+include/simavr/sim_hex.h
+include/simavr/sim_interrupts.h
+include/simavr/sim_io.h
+include/simavr/sim_irq.h
+include/simavr/sim_network.h
+include/simavr/sim_regbit.h
+include/simavr/sim_time.h
+include/simavr/sim_vcd_file.h
+lib/libsimavr.a
+lib/libsimavr.so
+lib/libsimavr.so.1
+libdata/pkgconfig/simavr-avr.pc
+libdata/pkgconfig/simavr.pc
+%%PORTDOCS%%%%DOCSDIR%%/manual.pdf
+%%PORTDOCS%%%%DOCSDIR%%/simavr_callgraph.pdf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.common
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.opengl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/atmega48_charlcd.axf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/atmega48_charlcd.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/avr_hd44780.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/avr_hd44780.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/avr_hd44780_conf.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/charlcd
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/charlcd.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd77480/font.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/atmega1280_i2ctest.axf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/atmega1280_i2ctest.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/i2ctest
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_i2ctest/i2ctest.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/atmega48_ledramp.axf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/atmega48_ledramp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/ATmegaBOOT_168_atmega328.ihex
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/atmega328p_dummy_blinky.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/atmega328p_dummy_blinky.hex
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/simduino
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/simduino.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/atmega32_ssd1306.axf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/atmega32_ssd1306.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/images.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/images.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/ssd1306.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/ssd1306.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/ssd1306demo
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ssd1306/ssd1306demo.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/atmega168_timer_64led.axf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/atmega168_timer_64led.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/atmega168_timer_64led.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/timer_64led
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_timer_64led/timer_64led.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ac_input.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ac_input.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/button.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/button.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hc595.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hc595.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hd44780.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hd44780.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hd44780_glut.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/hd44780_glut.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_virt.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_virt.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/uart_pty.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/uart_pty.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/uart_udp.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/uart_udp.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/vhci_usb.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/vhci_usb.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/arduidiot_pins.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/arduidiot_pins.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/avr_twi_master.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/avr_twi_master.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/twimaster.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared/twimaster.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604061609.u36G955P096274>