Initial commit

main
Clément FRÉVILLE 2 years ago
commit 1cb64e3aeb

5
.gitignore vendored

@ -0,0 +1,5 @@
.debhelper
examples
lib
src

26
debian/changelog vendored

@ -0,0 +1,26 @@
asix (0.1.4-1) jammy; urgency=medium
* Merge with source
* Remove bash completion
-- Clément Fréville <clement.freville2@etu.uca.fr> Sat, 06 May 2023 15:31:25 +0200
asix (1.1.3) jammy; urgency=low
* Merge with source
-- Clément Fréville <clement.freville2@etu.uca.fr> Wed, 18 May 2022 17:16:51 +0200
asix (1.1.2) jammy; urgency=medium
* Merge with source
-- Clément Fréville <clement.freville2@etu.uca.fr> Tue, 17 May 2022 07:22:35 +0200
asix (1.1.1) jammy; urgency=medium
* Merge with source
* Add bash completion
* Change installation folders
-- Clément Fréville <clement.freville2@etu.uca.fr> Sat, 14 May 2022 11:20:17 +0200

12
debian/control vendored

@ -0,0 +1,12 @@
Source: asix
Section: electronics
Priority: optional
Maintainer: Clément Fréville <clement.freville2@etu.uca.fr>
Build-Depends: debhelper-compat (= 11), libsdl2-dev
Standards-Version: 4.6.0
Rules-Requires-Root: no
Package: asix
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, g++, inotify-tools, exuberant-ctags, x11-utils, libsdl2-dev, libsdl2-2.0-0
Description: An Arduino simulator for POSIX

30
debian/copyright vendored

@ -0,0 +1,30 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: asix
Upstream-Contact: Guénal Davalan
Source: <https://opale.iut-clermont.uca.fr>
Files: *
Copyright: 2023
License: GPL-3.0+
Files: debian/*
Copyright: 2023 Clément Fréville <clement.freville2@etu.uca.fr>
License: GPL-3.0+
License: GPL-3.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

@ -0,0 +1,90 @@
--- a/Makefile
+++ b/Makefile
@@ -18,3 +18,24 @@
tgz:
make clean
( cd .. && tar --exclude=rgeany -cvzf asix.tgz asix )
+
+prefix := /usr/local
+exec_prefix := $(prefix)
+bindir := $(exec_prefix)/bin
+libdir := $(exec_prefix)/lib
+includedir := $(prefix)/include
+datarootdir := $(prefix)/share
+INSTALL_BIN_DIR := $(DESTDIR)/$(bindir)
+INSTALL_LIB_DIR := $(DESTDIR)/$(libdir)/asix
+INSTALL_INCLUDE_DIR := $(DESTDIR)/$(includedir)/asix
+INSTALL_SHARE_DIR := $(DESTDIR)/$(datarootdir)/asix
+
+install: all
+ install -d $(INSTALL_BIN_DIR)
+ install -m 755 asix $(INSTALL_BIN_DIR)
+ install -d $(INSTALL_LIB_DIR)
+ cp -r lib/. $(INSTALL_LIB_DIR)
+ install -d $(INSTALL_INCLUDE_DIR)
+ cp -r src/. $(INSTALL_INCLUDE_DIR)
+ install -d $(INSTALL_SHARE_DIR)
+ cp -r examples $(INSTALL_SHARE_DIR)
--- a/asix
+++ b/asix
@@ -20,7 +20,8 @@
PROG_NAME=$(readlink -f $0)
#INSTALL_DIR=$(readlink -f $(dirname $(dirname $PROG_NAME)))
-INSTALL_DIR=$(readlink -f $(dirname $PROG_NAME))
+INSTALL_DIR="/usr/include/asix"
+LIB_DIR="/usr/lib/asix"
[ -d /home/IUT/gudavala/bin ] && PATH="$PATH:/home/IUT/gudavala/bin"
@@ -134,8 +135,8 @@
while [ $# -gt 1 ]; do
case "$1" in
-b|-board|--board) [ $2 = "list" ] && {
- cd $INSTALL_DIR/src/boards; ls -1; exit 0; }
- [ ! -d $INSTALL_DIR/src/boards/$2 ] && \
+ cd $INSTALL_DIR/boards; ls -1; exit 0; }
+ [ ! -d $INSTALL_DIR/boards/$2 ] && \
error "Board $2 not defined !"
BOARD=$2
shift
@@ -159,7 +160,7 @@
shift
done
- set -a; . $INSTALL_DIR/src/boards/$BOARD/$BOARD.sh; set +a
+ set -a; . $INSTALL_DIR/boards/$BOARD/$BOARD.sh; set +a
case "$1" in
-h|-help|--help) help; exit 0;;
@@ -249,9 +250,9 @@
ORIENTATION=$o
fi
- INCLUDE_DIRS="-I$INSTALL_DIR/src -I$INSTALL_DIR/src/tone -I$INSTALL_DIR/src/rtc \
- -I$INSTALL_DIR/src/x11 -I$INSTALL_DIR/src/boards/$BOARD -I$INSTALL_DIR/src/tft \
- -I$INSTALL_DIR/src/Adafruit_ZeroTimer -I$INSTALL_DIR/src/LIS3DHTR
+ INCLUDE_DIRS="-I$INSTALL_DIR -I$INSTALL_DIR/tone -I$INSTALL_DIR/rtc \
+ -I$INSTALL_DIR/x11 -I$INSTALL_DIR/boards/$BOARD -I$INSTALL_DIR/tft \
+ -I$INSTALL_DIR/Adafruit_ZeroTimer -I$INSTALL_DIR/LIS3DHTR
"
#-I$INSTALL_DIR/src/lvgl -I$INSTALL_DIR/src/lvgl/src \
@@ -285,7 +286,7 @@
#ls -l $TMP_OBJ
#nm $TMP_OBJ
- cmd="$CC -o $TMP_EXE $TMP_OBJ -flto -Wl,-rpath,$INSTALL_DIR/lib -L$INSTALL_DIR/lib $LIBS"
+ cmd="$CC -o $TMP_EXE $TMP_OBJ -flto -Wl,-rpath,$LIB_DIR -L$LIB_DIR $LIBS"
echo $cmd
$cmd
r=$?
@@ -304,7 +305,7 @@
#echo
#echo "done"
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL_DIR/lib"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_DIR"
}
return $r

@ -0,0 +1,48 @@
--- a/src/Arduino.h
+++ b/src/Arduino.h
@@ -208,8 +208,8 @@
//#endif /* __cplusplus */
-#define min(a,b) ((a)<(b)?(a):(b))
-#define max(a,b) ((a)>(b)?(a):(b))
+#define _min(a,b) ((a)<(b)?(a):(b))
+#define _max(a,b) ((a)>(b)?(a):(b))
#include "pins_arduino.h"
--- a/src/rtc/DateTime.cpp
+++ b/src/rtc/DateTime.cpp
@@ -319,7 +319,7 @@
/**************************************************************************/
DateTime::DateTime(const char *iso8601dateTime) {
char ref[] = "2000-01-01T00:00:00";
- memcpy(ref, iso8601dateTime, min(strlen(ref), strlen(iso8601dateTime)));
+ memcpy(ref, iso8601dateTime, _min(strlen(ref), strlen(iso8601dateTime)));
yOff = conv2d(ref + 2);
m = conv2d(ref + 5);
d = conv2d(ref + 8);
--- a/src/tft/TFT_eSPI.h
+++ b/src/tft/TFT_eSPI.h
@@ -17,7 +17,7 @@
#define _TFT_eSPIH_
#include "Arduino.h"
-#undef min
+#undef _min
#include <stdint.h>
//#include <sstream>
@@ -316,9 +316,9 @@
b = t;
}
-#ifndef min
-// Return minimum of two numbers, may already be defined
-#define min(a, b) (((a) < (b)) ? (a) : (b))
+#ifndef _min
+// Return _minimum of two numbers, may already be defined
+#define _min(a, b) (((a) < (b)) ? (a) : (b))
#endif
// This structure allows sketches to retrieve the user setup parameters at runtime

@ -0,0 +1,2 @@
add-install-target.patch
fix-macro-conflict.patch

7
debian/rules vendored

@ -0,0 +1,7 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_install:
dh_auto_install -- prefix=/usr

@ -0,0 +1 @@
3.0 (quilt)
Loading…
Cancel
Save