diff --git a/devel/simavr/Makefile b/devel/simavr/Makefile index b02b7250998a..ae794fd8d36d 100644 --- a/devel/simavr/Makefile +++ b/devel/simavr/Makefile @@ -1,90 +1,94 @@ # Created by: Felix Palmen PORTNAME= simavr -PORTVERSION= 1.6 -PORTREVISION= 2 +PORTVERSION= 1.7 DISTVERSIONPREFIX= v CATEGORIES= devel emulators -DIST_SUBDIR= ${PORTNAME} - -PATCH_DIST_STRIP= -p1 -PATCH_SITES= https://github.com/buserror/simavr/commit/ -PATCHFILES= 86264ad6d0b6b921130e293769d8ebaec512eecd.diff \ - e5ea627259daae64ddbe67402b6d121e0143cd21.diff \ - 082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff 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 USES= compiler:c11 gl gmake pathfix pkgconfig xorg USE_GL= gl glu glut PATHFIX_MAKEFILEIN= Makefile USE_XORG= xdamage xcb xext xfixes xrandr USE_GITHUB= yes GH_ACCOUNT= buserror USE_LDCONFIG= yes ALL_TARGET= build-parts -MAKE_ARGS= "RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX}" +DESTDIRNAME= DUMMYDESTDIR + # Avoid default DESTDIR handling, so we can set a custom + # one that includes PREFIX, as required by unusual upstream + # install targets +MAKE_ARGS= RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX} +MAKE_ENV= SIMAVR_VERSION=v${PORTVERSION} OPTIONS_DEFINE= DOCS EXAMPLES DOCS_ALL_TARGET= doc DOCS_USE= tex=latex:build tex=pdftex:build tex=texmf:build AVR_STRIP_CMD?= avr-strip DUMPMACHINE= ${CC} -dumpmachine OBJDIRNAME= obj-$$(${DUMPMACHINE}) +post-patch: + ${REINPLACE_CMD} -e 's:Linux:FreeBSD:' \ + -e 's:unknown:v${PORTVERSION}:' \ + ${WRKSRC}/simavr/Makefile \ + ${WRKSRC}/examples/parts/Makefile + post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/simavr ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavr.so.1 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavrparts.so.1 post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/manual/manual.pdf ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/simavr_callgraph.pdf ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: -.for BOARDELF in ds1338,ds1338demo hd44780,charlcd i2ctest ledramp simduino ssd1306,ssd1306demo timer_64led +.for BOARDELF in ds1338,ds1338demo hd44780,charlcd i2ctest ledramp rotenc,rotenc_test 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}/Makefile \ ${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/;\ ${TEST} -f ${WRKSRC}/examples/board_$${BOARD}/README && \ ${INSTALL_DATA} ${WRKSRC}/examples/board_$${BOARD}/README \ ${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/ || ${TRUE} .endfor .for AXF in \ ds1338/atmega32_ds1338 \ hd44780/atmega48_charlcd \ i2ctest/atmega1280_i2ctest \ ledramp/atmega48_ledramp \ + rotenc/atmega32_rotenc_test \ 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 diff --git a/devel/simavr/distinfo b/devel/simavr/distinfo index baade47ed258..0e845a139656 100644 --- a/devel/simavr/distinfo +++ b/devel/simavr/distinfo @@ -1,9 +1,3 @@ -TIMESTAMP = 1587070720 -SHA256 (simavr/buserror-simavr-v1.6_GH0.tar.gz) = a55ad04d055eef5656c49f78bc089968b059c6efb6a831618b8d7e67a840936d -SIZE (simavr/buserror-simavr-v1.6_GH0.tar.gz) = 3317397 -SHA256 (simavr/86264ad6d0b6b921130e293769d8ebaec512eecd.diff) = cc0b23d08f713bc450013f68df3e7cf2d329aa6eee6d66458e6101349aa10255 -SIZE (simavr/86264ad6d0b6b921130e293769d8ebaec512eecd.diff) = 313 -SHA256 (simavr/e5ea627259daae64ddbe67402b6d121e0143cd21.diff) = fef6af9400ad4abd5ad8f0272fb4d656815e289b42e8906476e6e0b0560ab25e -SIZE (simavr/e5ea627259daae64ddbe67402b6d121e0143cd21.diff) = 976 -SHA256 (simavr/082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff) = 70a0d68aa4768062d38e5b816d55506745ea2336b253ce4c275c263cc6ab4634 -SIZE (simavr/082939e64e1632d8ea0b1d6ebea93ca832c9e762.diff) = 394 +TIMESTAMP = 1617458891 +SHA256 (buserror-simavr-v1.7_GH0.tar.gz) = e7b3d5f0946e84fbe76a37519d0f146d162bbf88641ee91883b3970b02c77093 +SIZE (buserror-simavr-v1.7_GH0.tar.gz) = 3322387 diff --git a/devel/simavr/files/patch-Makefile b/devel/simavr/files/patch-Makefile deleted file mode 100644 index 41b90ce18b0a..000000000000 --- a/devel/simavr/files/patch-Makefile +++ /dev/null @@ -1,12 +0,0 @@ ---- Makefile.orig 2020-04-16 22:04:43 UTC -+++ Makefile -@@ -29,9 +29,6 @@ install: - doc: - $(MAKE) -C doc RELEASE=$(RELEASE) - --install: -- $(MAKE) -C simavr install -- - clean: - $(MAKE) -C simavr clean - $(MAKE) -C tests clean diff --git a/devel/simavr/files/patch-examples_parts_Makefile b/devel/simavr/files/patch-examples_parts_Makefile deleted file mode 100644 index 9e9993c90f7b..000000000000 --- a/devel/simavr/files/patch-examples_parts_Makefile +++ /dev/null @@ -1,12 +0,0 @@ ---- examples/parts/Makefile.orig 2020-04-16 21:45:08 UTC -+++ examples/parts/Makefile -@@ -44,9 +44,7 @@ ${target}: ${OBJ}/${target}.a - # - # Shared library (Linux only) - # --ifeq (${shell uname}, Linux) - ${target}: ${OBJ}/${target}.so --endif - - clean: clean-${OBJ} - rm -rf *.hex *.a *.axf *.vcd .*.swo .*.swp .*.swm .*.swn *.so *.o diff --git a/devel/simavr/files/patch-simavr_Makefile b/devel/simavr/files/patch-simavr_Makefile deleted file mode 100644 index 5a77180eb933..000000000000 --- a/devel/simavr/files/patch-simavr_Makefile +++ /dev/null @@ -1,34 +0,0 @@ ---- simavr/Makefile.orig 2020-04-16 21:45:08 UTC -+++ simavr/Makefile -@@ -19,7 +19,7 @@ - SHELL := ${shell which bash} - SIMAVR_VERSION := ${shell \ - git describe --abbrev=0 --tags || \ -- echo "unknown" } -+ echo "v1.6" } - SIMAVR_REVISION = 2 - - target = run_avr -@@ -54,9 +54,7 @@ ${OBJ}/libsimavr.a : ${sim_o} - - 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 : libsimavr - ${OBJ}/${target}.elf : ${OBJ}/${target}.o -@@ -94,12 +92,10 @@ install : all - simavr.pc >$(DESTDIR)/libdata/pkgconfig/simavr.pc - sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ - simavrparts.pc >$(DESTDIR)/libdata/pkgconfig/simavrparts.pc --ifeq (${shell uname}, Linux) - $(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/ - $(INSTALL) ../examples/parts/${OBJ}/libsimavrparts.so.1 $(DESTDIR)/lib/ - ln -sf libsimavr.so.1 $(DESTDIR)/lib/libsimavr.so - ln -sf libsimavrparts.so.1 $(DESTDIR)/lib/libsimavrparts.so --endif - $(MKDIR) $(DESTDIR)/bin - $(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)/bin/simavr - diff --git a/devel/simavr/files/patch-simavr_sim_run__avr.c b/devel/simavr/files/patch-simavr_sim_run__avr.c deleted file mode 100644 index 8e0f325bc374..000000000000 --- a/devel/simavr/files/patch-simavr_sim_run__avr.c +++ /dev/null @@ -1,11 +0,0 @@ ---- simavr/sim/run_avr.c.orig 2018-01-10 10:05:15 UTC -+++ simavr/sim/run_avr.c -@@ -106,7 +106,7 @@ main( - display_usage(basename(argv[0])); - } else if (!strcmp(argv[pi], "-m") || !strcmp(argv[pi], "--mcu")) { - if (pi < argc-1) -- strncpy(name, argv[++pi], sizeof(name)); -+ snprintf(name, sizeof(name), "%s", argv[++pi]); - else - display_usage(basename(argv[0])); - } else if (!strcmp(argv[pi], "-f") || !strcmp(argv[pi], "--freq")) { diff --git a/devel/simavr/pkg-plist b/devel/simavr/pkg-plist index b4a808d6aa2f..c6aeec745e0b 100644 --- a/devel/simavr/pkg-plist +++ b/devel/simavr/pkg-plist @@ -1,147 +1,156 @@ bin/simavr include/simavr/avr/avr_mcu_section.h include/simavr/avr_acomp.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/parts/ac_input.h include/simavr/parts/button.h include/simavr/parts/ds1338_virt.h include/simavr/parts/hc595.h include/simavr/parts/hd44780.h include/simavr/parts/hd44780_glut.h include/simavr/parts/i2c_eeprom.h include/simavr/parts/lcd_font.h +include/simavr/parts/rotenc.h include/simavr/parts/ssd1306_glut.h include/simavr/parts/ssd1306_virt.h include/simavr/parts/uart_pty.h include/simavr/parts/uart_udp.h include/simavr/parts/vhci_usb.h include/simavr/sim_avr.h include/simavr/sim_avr_types.h include/simavr/sim_cmds.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_utils.h include/simavr/sim_vcd_file.h lib/libsimavr.a lib/libsimavr.so lib/libsimavr.so.1 lib/libsimavrparts.a lib/libsimavrparts.so lib/libsimavrparts.so.1 libdata/pkgconfig/simavr-avr.pc libdata/pkgconfig/simavr.pc libdata/pkgconfig/simavrparts.pc %%PORTDOCS%%%%DOCSDIR%%/manual.pdf %%PORTDOCS%%%%DOCSDIR%%/simavr_callgraph.pdf %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.common %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.opengl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/Makefile %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/atmega32_ds1338.axf %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/atmega32_ds1338.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/ds1338.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/ds1338.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/ds1338demo %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/ds1338demo.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/i2cmaster.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_ds1338/twimaster.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/Makefile %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/README %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/atmega48_charlcd.axf %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/atmega48_charlcd.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/avr_hd44780.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/avr_hd44780.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/avr_hd44780_conf.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/charlcd %%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_hd44780/charlcd.c %%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_rotenc/Makefile +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/README +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/atmega32_rotenc_test.axf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/atmega32_rotenc_test.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/rotenc_test +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/board_rotenc/rotenc_test.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/ds1338_virt.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/ds1338_virt.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/lcd_font.h +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/rotenc.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/parts/rotenc.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