View | Details | Raw Unified | Return to bug 254761 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/simavr/Makefile (-11 / +15 lines)
Lines 1-17 Link Here
1
# Created by: Felix Palmen <felix@palmen-it.de>
1
# Created by: Felix Palmen <felix@palmen-it.de>
2
2
3
PORTNAME=	simavr
3
PORTNAME=	simavr
4
PORTVERSION=	1.6
4
PORTVERSION=	1.7
5
PORTREVISION=	2
6
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
7
CATEGORIES=	devel emulators
6
CATEGORIES=	devel emulators
8
DIST_SUBDIR=	${PORTNAME}
9
10
PATCH_DIST_STRIP=	-p1
11
PATCH_SITES=	https://github.com/buserror/simavr/commit/
12
PATCHFILES=	86264ad6d0b6b921130e293769d8ebaec512eecd.diff \
13
		e5ea627259daae64ddbe67402b6d121e0143cd21.diff \
14
		082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff
15
7
16
MAINTAINER=	felix@palmen-it.de
8
MAINTAINER=	felix@palmen-it.de
17
COMMENT=	Simulator for several Atmel AVR chips
9
COMMENT=	Simulator for several Atmel AVR chips
Lines 31-37 GH_ACCOUNT= buserror Link Here
31
USE_LDCONFIG=	yes
23
USE_LDCONFIG=	yes
32
24
33
ALL_TARGET=	build-parts
25
ALL_TARGET=	build-parts
34
MAKE_ARGS=	"RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX}"
26
DESTDIRNAME=	DUMMYDESTDIR
27
		# Avoid default DESTDIR handling, so we can set a custom
28
		# one that includes PREFIX, as required by unusual upstream
29
		# install targets
30
MAKE_ARGS=	RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX}
31
MAKE_ENV=	SIMAVR_VERSION=v${PORTVERSION}
35
32
36
OPTIONS_DEFINE=		DOCS EXAMPLES
33
OPTIONS_DEFINE=		DOCS EXAMPLES
37
34
Lines 42-47 AVR_STRIP_CMD?= avr-strip Link Here
42
DUMPMACHINE=	${CC} -dumpmachine
39
DUMPMACHINE=	${CC} -dumpmachine
43
OBJDIRNAME=	obj-$$(${DUMPMACHINE})
40
OBJDIRNAME=	obj-$$(${DUMPMACHINE})
44
41
42
post-patch:
43
	${REINPLACE_CMD} -e 's:Linux:FreeBSD:' \
44
		-e 's:unknown:v${PORTVERSION}:' \
45
		${WRKSRC}/simavr/Makefile \
46
		${WRKSRC}/examples/parts/Makefile
47
45
post-install:
48
post-install:
46
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/simavr
49
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/simavr
47
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavr.so.1
50
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavr.so.1
Lines 53-59 post-install-DOCS-on: Link Here
53
	${INSTALL_DATA} ${WRKSRC}/doc/simavr_callgraph.pdf ${STAGEDIR}${DOCSDIR}
56
	${INSTALL_DATA} ${WRKSRC}/doc/simavr_callgraph.pdf ${STAGEDIR}${DOCSDIR}
54
57
55
post-install-EXAMPLES-on:
58
post-install-EXAMPLES-on:
56
.for BOARDELF in ds1338,ds1338demo hd44780,charlcd i2ctest ledramp simduino ssd1306,ssd1306demo timer_64led
59
.for BOARDELF in ds1338,ds1338demo hd44780,charlcd i2ctest ledramp rotenc,rotenc_test simduino ssd1306,ssd1306demo timer_64led
57
	BOARDELF=${BOARDELF}; \
60
	BOARDELF=${BOARDELF}; \
58
	BOARD=$${BOARDELF%%,*}; \
61
	BOARD=$${BOARDELF%%,*}; \
59
	ELF=$${BOARDELF##*,}; \
62
	ELF=$${BOARDELF##*,}; \
Lines 73-78 post-install-EXAMPLES-on: Link Here
73
		hd44780/atmega48_charlcd \
76
		hd44780/atmega48_charlcd \
74
		i2ctest/atmega1280_i2ctest \
77
		i2ctest/atmega1280_i2ctest \
75
		ledramp/atmega48_ledramp \
78
		ledramp/atmega48_ledramp \
79
		rotenc/atmega32_rotenc_test \
76
		ssd1306/atmega32_ssd1306 \
80
		ssd1306/atmega32_ssd1306 \
77
		timer_64led/atmega168_timer_64led
81
		timer_64led/atmega168_timer_64led
78
	${AVR_STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/board_${AXF}.axf
82
	${AVR_STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/board_${AXF}.axf
(-)b/devel/simavr/distinfo (-9 / +3 lines)
Lines 1-9 Link Here
1
TIMESTAMP = 1587070720
1
TIMESTAMP = 1617458891
2
SHA256 (simavr/buserror-simavr-v1.6_GH0.tar.gz) = a55ad04d055eef5656c49f78bc089968b059c6efb6a831618b8d7e67a840936d
2
SHA256 (buserror-simavr-v1.7_GH0.tar.gz) = e7b3d5f0946e84fbe76a37519d0f146d162bbf88641ee91883b3970b02c77093
3
SIZE (simavr/buserror-simavr-v1.6_GH0.tar.gz) = 3317397
3
SIZE (buserror-simavr-v1.7_GH0.tar.gz) = 3322387
4
SHA256 (simavr/86264ad6d0b6b921130e293769d8ebaec512eecd.diff) = cc0b23d08f713bc450013f68df3e7cf2d329aa6eee6d66458e6101349aa10255
5
SIZE (simavr/86264ad6d0b6b921130e293769d8ebaec512eecd.diff) = 313
6
SHA256 (simavr/e5ea627259daae64ddbe67402b6d121e0143cd21.diff) = fef6af9400ad4abd5ad8f0272fb4d656815e289b42e8906476e6e0b0560ab25e
7
SIZE (simavr/e5ea627259daae64ddbe67402b6d121e0143cd21.diff) = 976
8
SHA256 (simavr/082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff) = 70a0d68aa4768062d38e5b816d55506745ea2336b253ce4c275c263cc6ab4634
9
SIZE (simavr/082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff) = 394
(-)a/devel/simavr/files/patch-Makefile (-12 lines)
Removed Link Here
1
--- Makefile.orig	2020-04-16 22:04:43 UTC
2
+++ Makefile
3
@@ -29,9 +29,6 @@ install:
4
 doc:
5
 	$(MAKE) -C doc RELEASE=$(RELEASE)
6
 
7
-install:
8
-	$(MAKE) -C simavr install
9
-
10
 clean:
11
 	$(MAKE) -C simavr clean
12
 	$(MAKE) -C tests clean
(-)a/devel/simavr/files/patch-examples_parts_Makefile (-12 lines)
Removed Link Here
1
--- examples/parts/Makefile.orig	2020-04-16 21:45:08 UTC
2
+++ examples/parts/Makefile
3
@@ -44,9 +44,7 @@ ${target}: ${OBJ}/${target}.a
4
 #
5
 # Shared library (Linux only)
6
 #
7
-ifeq (${shell uname}, Linux)
8
 ${target}: ${OBJ}/${target}.so
9
-endif
10
 
11
 clean: clean-${OBJ}
12
 	rm -rf *.hex *.a *.axf *.vcd .*.swo .*.swp .*.swm .*.swn *.so *.o
(-)a/devel/simavr/files/patch-simavr_Makefile (-34 lines)
Removed Link Here
1
--- simavr/Makefile.orig	2020-04-16 21:45:08 UTC
2
+++ simavr/Makefile
3
@@ -19,7 +19,7 @@
4
 SHELL 			:= ${shell which bash}
5
 SIMAVR_VERSION	:= ${shell \
6
 	git describe --abbrev=0 --tags || \
7
-	echo "unknown" }
8
+	echo "v1.6" }
9
 SIMAVR_REVISION	= 2
10
 
11
 target	= run_avr
12
@@ -54,9 +54,7 @@ ${OBJ}/libsimavr.a	:	${sim_o}
13
 
14
 libsimavr	: config ${OBJ}/libsimavr.a
15
 # shared library won't work that easily on non-linux
16
-ifeq (${shell uname}, Linux)
17
 libsimavr	: ${OBJ}/libsimavr.so
18
-endif
19
 
20
 ${OBJ}/${target}.elf	: libsimavr
21
 ${OBJ}/${target}.elf	: ${OBJ}/${target}.o
22
@@ -94,12 +92,10 @@ install : all
23
 		simavr.pc >$(DESTDIR)/libdata/pkgconfig/simavr.pc
24
 	sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
25
 		simavrparts.pc >$(DESTDIR)/libdata/pkgconfig/simavrparts.pc
26
-ifeq (${shell uname}, Linux)
27
 	$(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/
28
 	$(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.so.1 $(DESTDIR)/lib/
29
 	ln -sf libsimavr.so.1 $(DESTDIR)/lib/libsimavr.so
30
 	ln -sf libsimavrparts.so.1 $(DESTDIR)/lib/libsimavrparts.so
31
-endif
32
 	$(MKDIR) $(DESTDIR)/bin
33
 	$(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)/bin/simavr
34
 
(-)a/devel/simavr/files/patch-simavr_sim_run__avr.c (-11 lines)
Removed Link Here
1
--- simavr/sim/run_avr.c.orig	2018-01-10 10:05:15 UTC
2
+++ simavr/sim/run_avr.c
3
@@ -106,7 +106,7 @@ main(
4
 			display_usage(basename(argv[0]));
5
 		} else if (!strcmp(argv[pi], "-m") || !strcmp(argv[pi], "--mcu")) {
6
 			if (pi < argc-1)
7
-				strncpy(name, argv[++pi], sizeof(name));
8
+				snprintf(name, sizeof(name), "%s", argv[++pi]);
9
 			else
10
 				display_usage(basename(argv[0]));
11
 		} else if (!strcmp(argv[pi], "-f") || !strcmp(argv[pi], "--freq")) {
(-)b/devel/simavr/pkg-plist (+9 lines)
Lines 23-28 include/simavr/parts/hd44780.h Link Here
23
include/simavr/parts/hd44780_glut.h
23
include/simavr/parts/hd44780_glut.h
24
include/simavr/parts/i2c_eeprom.h
24
include/simavr/parts/i2c_eeprom.h
25
include/simavr/parts/lcd_font.h
25
include/simavr/parts/lcd_font.h
26
include/simavr/parts/rotenc.h
26
include/simavr/parts/ssd1306_glut.h
27
include/simavr/parts/ssd1306_glut.h
27
include/simavr/parts/ssd1306_virt.h
28
include/simavr/parts/ssd1306_virt.h
28
include/simavr/parts/uart_pty.h
29
include/simavr/parts/uart_pty.h
Lines 90-95 libdata/pkgconfig/simavrparts.pc Link Here
90
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/atmega48_ledramp.c
91
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/atmega48_ledramp.c
91
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp
92
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp
92
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp.c
93
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ledramp/ledramp.c
94
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/Makefile
95
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/README
96
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/atmega32_rotenc_test.axf
97
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/atmega32_rotenc_test.c
98
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/rotenc_test
99
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/rotenc_test.c
93
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/ATmegaBOOT_168_atmega328.ihex
100
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/ATmegaBOOT_168_atmega328.ihex
94
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/Makefile
101
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/Makefile
95
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/README
102
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_simduino/README
Lines 129-134 libdata/pkgconfig/simavrparts.pc Link Here
129
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.c
136
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.c
130
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.h
137
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/i2c_eeprom.h
131
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/lcd_font.h
138
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/lcd_font.h
139
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/rotenc.c
140
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/rotenc.h
132
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.c
141
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.c
133
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.h
142
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_glut.h
134
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_virt.c
143
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ssd1306_virt.c

Return to bug 254761