new package: fte
This commit is contained in:
parent
9be3f7148b
commit
7632ffe0a8
11
packages/fte/Makefile.patch
Normal file
11
packages/fte/Makefile.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
PREFIX=/usr/local
|
||||
|
||||
BINDIR=$(PREFIX)/bin
|
||||
-LIBDIR=$(PREFIX)/lib/fte
|
||||
+LIBDIR=$(PREFIX)/share/fte
|
||||
CONFIGDIR=$(LIBDIR)/config
|
||||
|
||||
.PHONY: all install
|
39
packages/fte/build.sh
Normal file
39
packages/fte/build.sh
Normal file
@ -0,0 +1,39 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://fte.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="A free text editor for developers"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=20110708
|
||||
TERMUX_PKG_SRCURL=(https://downloads.sourceforge.net/fte/fte-${TERMUX_PKG_VERSION}-src.zip
|
||||
https://downloads.sourceforge.net/fte/fte-${TERMUX_PKG_VERSION}-common.zip)
|
||||
TERMUX_PKG_SHA256=(d6311c542d3f0f2890a54a661c3b67228e27b894b4164e9faf29f014f254499e
|
||||
58411578b31958765f42d2bf29b7aedd9f916955c2c19c96909a1c03e0246af7)
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="
|
||||
TARGETS=nfte
|
||||
INSTALL_NONROOT=1
|
||||
PREFIX=$TERMUX_PREFIX
|
||||
"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_extract_src_archive() {
|
||||
rm -Rf fte
|
||||
for i in $(seq 0 $(( ${#TERMUX_PKG_SRCURL[@]}-1 ))); do
|
||||
unzip -q "$TERMUX_PKG_CACHEDIR/$(basename "${TERMUX_PKG_SRCURL[$i]}")"
|
||||
done
|
||||
mv fte "$TERMUX_PKG_SRCDIR"
|
||||
}
|
||||
|
||||
termux_step_host_build() {
|
||||
find "$TERMUX_PKG_SRCDIR" -mindepth 1 -maxdepth 1 -exec cp -a \{\} ./ \;
|
||||
make CC="gcc -m${TERMUX_ARCH_BITS}" LDFLAGS="-m${TERMUX_ARCH_BITS}" \
|
||||
TARGETS=cfte
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export PATH=$TERMUX_PKG_HOSTBUILD_DIR/src:$PATH
|
||||
|
||||
CPPFLAGS+=" -DHAVE_STRLCPY -DHAVE_STRLCAT"
|
||||
|
||||
echo '#include_next <ncurses.h>' > "$TERMUX_PKG_SRCDIR"/src/ncurses.h
|
||||
}
|
24
packages/fte/install.patch
Normal file
24
packages/fte/install.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- a/install
|
||||
+++ b/install
|
||||
@@ -12,10 +12,10 @@
|
||||
# INSTALLATION CODE (do not touch):
|
||||
|
||||
BINDIR=$PREFIX/bin
|
||||
-LIBDIR=$PREFIX/lib/fte
|
||||
+LIBDIR=$PREFIX/share/fte
|
||||
CONFIGDIR=$LIBDIR/config
|
||||
|
||||
-LOCALCONFIGDIR=$LIBDIR/localconfig
|
||||
+LOCALCONFIGDIR=$PREFIX/etc/fte/localconfig
|
||||
|
||||
# To do some of this stuff, you should be root...
|
||||
if [ -z "$INSTALL_NONROOT" ]
|
||||
@@ -96,7 +96,7 @@
|
||||
fi
|
||||
|
||||
# Set up the system default rc file.
|
||||
-(cd $CONFIGDIR; $BINDIR/cfte main.fte $LIBDIR/system.fterc)
|
||||
+(cd $CONFIGDIR; cfte main.fte $PREFIX/etc/fte/system.fterc)
|
||||
|
||||
# Done.
|
||||
exit 0
|
11
packages/fte/src-cfte.cpp.patch
Normal file
11
packages/fte/src-cfte.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/cfte.cpp
|
||||
+++ b/src/cfte.cpp
|
||||
@@ -1887,7 +1887,7 @@
|
||||
//fprintf(stderr, "Looking for %s\n", Cfg);
|
||||
if (!FileExists(Cfg)) {
|
||||
// 3. /usr/share/fte
|
||||
- sprintf(tmp, "/usr/share/fte/%s", CfgName);
|
||||
+ sprintf(tmp, "@TERMUX_PREFIX@/share/fte/config/%s", CfgName);
|
||||
ExpandPath(tmp, Cfg, sizeof(Cfg));
|
||||
if (!FileExists(Cfg)) {
|
||||
sprintf(tmp, "%sconfig/%s", StartDir, CfgName);
|
11
packages/fte/src-e_cvslog.cpp.patch
Normal file
11
packages/fte/src-e_cvslog.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/e_cvslog.cpp
|
||||
+++ b/src/e_cvslog.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
// Create filename for message
|
||||
#ifdef UNIX
|
||||
// Use this in Unix - it says more to user
|
||||
- sprintf (msgFile,"/tmp/fte%d-cvs-msg", (int)getpid());
|
||||
+ sprintf (msgFile,"@TERMUX_PREFIX@/tmp/fte%d-cvs-msg", (int)getpid());
|
||||
#else
|
||||
tmpnam (msgFile);
|
||||
#endif
|
11
packages/fte/src-e_svnlog.cpp.patch
Normal file
11
packages/fte/src-e_svnlog.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/e_svnlog.cpp
|
||||
+++ b/src/e_svnlog.cpp
|
||||
@@ -33,7 +33,7 @@
|
||||
// Create filename for message
|
||||
#ifdef UNIX
|
||||
// Use this in Unix - it says more to user
|
||||
- sprintf(msgFile,"/tmp/fte%d-svn-msg",getpid());
|
||||
+ sprintf(msgFile,"@TERMUX_PREFIX@/tmp/fte%d-svn-msg",getpid());
|
||||
#else
|
||||
tmpnam(msgFile);
|
||||
#endif
|
11
packages/fte/src-e_unix.cpp.patch
Normal file
11
packages/fte/src-e_unix.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/e_unix.cpp
|
||||
+++ b/src/e_unix.cpp
|
||||
@@ -44,7 +44,7 @@
|
||||
word = wordAsk;
|
||||
}
|
||||
|
||||
- snprintf(file, sizeof(file)-1, "/tmp/fte%d-man-%s", getpid(), word);
|
||||
+ snprintf(file, sizeof(file)-1, "@TERMUX_PREFIX@/tmp/fte%d-man-%s", getpid(), word);
|
||||
snprintf(command, sizeof(command)-1, "%s %s %s >'%s' 2>&1", HelpCommand, options, word, file);
|
||||
|
||||
/// !!! why is this needed ???
|
20
packages/fte/src-fte-unix.mak.patch
Normal file
20
packages/fte/src-fte-unix.mak.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/src/fte-unix.mak
|
||||
+++ b/src/fte-unix.mak
|
||||
@@ -128,7 +128,7 @@
|
||||
#OPTIMIZE = -O2 -s
|
||||
|
||||
CCFLAGS = $(CPPOPTIONS) $(OPTIMIZE) $(NOEXCEPTION) $(INCDIRS) -DUNIX $(UOS)
|
||||
-LDFLAGS = $(OPTIMIZE) $(LIBDIRS)
|
||||
+LDFLAGS += $(OPTIMIZE) $(LIBDIRS)
|
||||
|
||||
|
||||
.SUFFIXES: .cpp .o .moc
|
||||
@@ -180,7 +180,7 @@
|
||||
#DEFAULT_FTE_CONFIG = ../config/main.fte
|
||||
|
||||
defcfg.cnf: $(DEFAULT_FTE_CONFIG) cfte
|
||||
- ./cfte $(DEFAULT_FTE_CONFIG) defcfg.cnf
|
||||
+ cfte $(DEFAULT_FTE_CONFIG) defcfg.cnf
|
||||
|
||||
xfte: .depend $(OBJS) $(XOBJS)
|
||||
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(XOBJS) $(XLIBS)
|
14
packages/fte/src-fte.cpp.patch
Normal file
14
packages/fte/src-fte.cpp.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/src/fte.cpp
|
||||
+++ b/src/fte.cpp
|
||||
@@ -25,9 +25,8 @@
|
||||
#if defined(UNIX)
|
||||
/* default locations for the configuration files */
|
||||
static const char * const Unix_RCPaths[] = {
|
||||
- "/usr/local/etc/fte/system.fterc",
|
||||
- "/etc/fte/system.fterc",
|
||||
- "/usr/X11R6/lib/X11/fte/system.fterc",
|
||||
+ "@TERMUX_PREFIX@/local/etc/fte/system.fterc",
|
||||
+ "@TERMUX_PREFIX@/etc/fte/system.fterc",
|
||||
};
|
||||
|
||||
// variables used by vfte
|
Loading…
x
Reference in New Issue
Block a user