fix(heyu): patch Makefile
to make it use our CC
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
1b23194997
commit
3460aa6e84
35
packages/heyu/Configure.diff
Normal file
35
packages/heyu/Configure.diff
Normal file
@ -0,0 +1,35 @@
|
||||
--- heyu-2.10.3/Configure 2021-04-30 22:37:54.000000000 +0530
|
||||
+++ heyu-patch/Configure 2022-04-07 19:47:06.868579932 +0530
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
# paths:
|
||||
cat >> Makefile <<EoF
|
||||
-BIN = /usr/local/bin
|
||||
-MAN = /usr/local/man/man1
|
||||
-MAN5 = /usr/local/man/man5
|
||||
+BIN = @TERMUX_PREFIX@/bin
|
||||
+MAN = @TERMUX_PREFIX@/man/man1
|
||||
+MAN5 = @TERMUX_PREFIX@/man/man5
|
||||
|
||||
# set DFLAGS equal to:
|
||||
# -DSYSV if using SYSTEM V
|
||||
@@ -145,16 +145,14 @@
|
||||
SYS=`uname -s | tr '[A-Z]' '[a-z]'`
|
||||
fi
|
||||
|
||||
-CC=gcc #Set default for later
|
||||
+CC="@TERMUX_CC@" #Set default for later
|
||||
|
||||
echo "#This makefile is built for $SYS" >> Makefile
|
||||
case "$SYS" in
|
||||
linux)
|
||||
cat >> Makefile <<-EoF
|
||||
- OWNER = root
|
||||
- GROUP = root
|
||||
- CC = gcc
|
||||
- CFLAGS = -g -O \$(DFLAGS) -Wall
|
||||
+ CC ?= gcc
|
||||
+ CFLAGS += -g -O \$(DFLAGS) -Wall
|
||||
DFLAGS = -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASTZ $CM17AFLAG $EXT0FLAG $RFXSENFLAG $RFXMETFLAG $DMXFLAG $OREFLAG $KAKUFLAG $FLAGS_FLAG $TIMERS_FLAG $COUNTERS_FLAG
|
||||
LIBS = -lm -lc
|
||||
EoF
|
32
packages/heyu/Makefile.in.patch
Normal file
32
packages/heyu/Makefile.in.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- heyu-2.10.3/Makefile.in 2021-04-30 22:37:54.000000000 +0530
|
||||
+++ heyu-patch/Makefile.in 2022-04-07 20:17:28.648579237 +0530
|
||||
@@ -36,11 +36,11 @@
|
||||
history.txt version.h heyufaq.txt x10sched.5 process.h sun.h \
|
||||
x10scripts.5 Configure Makefile.in install.sh AUTHORS COPYING INSTALL \
|
||||
README.cm10a x10aux.5 x10state.h rfxcom.h digimax.h oregon.h x10rfxsensors.5\
|
||||
- x10rfxmeters.5 x10digimax.5 x10oregon.5 x10kaku.5 README.webhook
|
||||
+ x10rfxmeters.5 x10digimax.5 x10oregon.5 x10kaku.5 README.webhook
|
||||
|
||||
EVERYTHING = $(OTHERSRC) $(SRCS)
|
||||
|
||||
-all: heyu
|
||||
+all: heyu
|
||||
|
||||
heyu: $(OBJS) version.h
|
||||
$(CC) $(LDFLAGS) -o heyu $(OBJS) $(LIBS)
|
||||
@@ -90,10 +90,7 @@
|
||||
$(BIN)/heyu: heyu
|
||||
mkdir -p -m 755 $(BIN)
|
||||
cp heyu $(BIN)
|
||||
- chgrp $(GROUP) $(BIN)/heyu
|
||||
chmod 755 $(BIN)/heyu
|
||||
- chown $(OWNER) $(BIN)/heyu
|
||||
- ./install.sh
|
||||
|
||||
$(MAN)/heyu.1: heyu.1
|
||||
mkdir -p -m 755 $(MAN)
|
||||
@@ -256,4 +253,3 @@
|
||||
|
||||
$(EVERYTHING):
|
||||
## co -r$(revision) $@
|
||||
-
|
@ -11,6 +11,9 @@ TERMUX_PKG_BUILD_IN_SRC=true
|
||||
termux_step_pre_configure() {
|
||||
# rindex is an obsolete version of strrchr which is not available in Android:
|
||||
CFLAGS+=" -Drindex=strrchr"
|
||||
sed -e "s|@TERMUX_CC@|${CC}|g" \
|
||||
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
|
||||
"${TERMUX_PKG_BUILDER_DIR}"/Configure.diff | patch -p1
|
||||
}
|
||||
|
||||
termux_step_configure() {
|
||||
|
26
packages/heyu/termux-paths.patch
Normal file
26
packages/heyu/termux-paths.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- heyu-2.10.3/x10.h 2021-04-30 22:37:54.000000000 +0530
|
||||
+++ heyu-patch/x10.h 2022-04-07 21:08:06.054258327 +0530
|
||||
@@ -59,12 +59,12 @@
|
||||
|
||||
/* directory for spool file */
|
||||
#ifndef SPOOLDIR
|
||||
-#define SPOOLDIR "/var/tmp/heyu"
|
||||
+#define SPOOLDIR "@TERMUX_PREFIX@/var/tmp/heyu"
|
||||
#endif
|
||||
|
||||
/* directory used for locks, specified in the Filesystem Hierarchy Standard */
|
||||
#ifndef LOCKDIR
|
||||
-#define LOCKDIR "/var/lock"
|
||||
+#define LOCKDIR "@TERMUX_PREFIX@/var/lock"
|
||||
#endif
|
||||
|
||||
/* Base directory under user $HOME */
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/* system-wide Heyu base directory */
|
||||
#ifndef SYSBASEDIR
|
||||
-#define SYSBASEDIR "/etc/heyu"
|
||||
+#define SYSBASEDIR "@TERMUX_PREFIX@/etc/heyu"
|
||||
#endif
|
||||
|
||||
#define SPOOLFILE "heyu.out"
|
Loading…
Reference in New Issue
Block a user