Add hxtools and libhx

- A lot of more or less useful tools
- Of interest in particular is git-forest, which is a command line tree
view for git, much faster than tig.
This commit is contained in:
Adrien Destugues
2016-02-07 16:51:36 +01:00
parent dc34f0f4cb
commit fb9d48218b
3 changed files with 343 additions and 0 deletions

View File

@@ -0,0 +1,141 @@
SUMMARY="Tools and scripts too small to warrant their own packages"
DESCRIPTION="A collection of tools and scripts that have accumulated over the \
years, and each of which seems to be too small to warrants its own project.
- bsvplay(1) — convert BASICA music files to PCM
- cctypeinfo(1)  show sizes of C types on the implementation it was compiled with
- checkbrack(1) — check parenthesis and bracket count
- cwdiff(1) — run wdiff with color
- declone(1) — break hardlinks
- diff2php(1) — transform patch to self-serving PHP file
- doxygen-kerneldoc-filter(1) — filter for Doxygen to support kerneldoc
- extract_d3pkg(1) — extract Descent3 PKG files
- extract_dxhog(1) — extract Descent HOG files
- extract_f3pod(1) — extract Fury3 POD files
- extract_qupak(1) — extract Quake2 PACK files
- fd0ssh(1) — pipe for password-over-stdin support to ssh
- fduphl(1)  find duplicate files and hardlink them
- filenameconv(1) — convert file name encoding
- flv2avi(1) — repackage Flash video into an AVI container with PCM audio
- fnt2bdf(1) — convert VGA raw fonts to X11 BDF
- fxterm(1) — start xterm with sane settings
- git-author-stat(1) — show commit author statistics of a git repository
- git-blame-stat(1)  show per-line author statistics of a git repository
- git-export-patch(1) — produce perfect patch from git commits for mail submission
- git-forest(1) — display the commit history forest
- git-lemon(1) — don't just pick cherries, but take it all (cherry- pick a commit range)
- git-new-root(1) — start a new root in the git history
- git-revert-stats(1) — show reverting statistics of a git repository
- git-track(1) — set up branch for tracking a remote
- gpsh(1) — grep in tracklists and play audio files
- graph-fanout(1)  fan a tree (for graphviz)
- graph-lchain(1)  remove circles in graphs using longest-chaining method
- logontime(8) — show cumulative logon time from wtmp
- mailsplit(1) — split an mbox into single files
- man2html(1) — convert nroff manpages to HTML
- mod2ogg(1) — wrapper for module to OggVorbis transcoding
- mpg2ogg(1) — wrapper for mass mp3 to OggVorbis transcoding
- netload(8) — show utilization of network interface
- newns(8) — clone current filesystem namespace and start a process
- ofl(1) — open file lister (replaces fuser and lsof -m)
- paddrspacesize(1)  print size of processes' address spaces
- pesubst(1) — perl-regexp stream substitution (replaces sed for sub stitutions)
- pmap_dirty(1) — display amount of RAM a process uses hard
- png2wx.pl(1) — transform arbitrary files into C++ files for wxWidgets
- printcaps(1) — print currently active process capabilities
- proc_iomem_count(1)  show MMIO region sizes
- proc_stat_signal(1)  decode /proc/self/stat for signal status
- pshtreads(1)  alternative experiment to ps(1) involving thread display
- qplay(1) — convert QBASIC play strings to PCM
- qtar(1)  faster interface to tar with file ordering
- raregetty(8) — local login program for remote hosts
- recursive_lower(1) — recursively lowercase all filenames
- rpmdep.pl(1)  read RPM dependencies and output a graph
- sourcefuncsize(1) — statistical analysis of code
- spec-beautifier(1) — program to clean up RPM .spec files
- stxdb(1) — A/V file database
- su1(8)  what sudo should have done
- sysinfo(1) — print IRC-style system information banner
- tailhex(1) — hex dumper with tail-following support
- utmp_register(1) — make entries in the utmp/wtmp database
- vcsaview(8) — display a screen dump in VCSA format
- vfontas(1) — VGA font file assembler
- wavdiff(1) — proof-of-concept raw PCM deltifier
- wktimer(1) — work timer
"
HOMEPAGE="http://inai.de/projects/hxtools/"
COPYRIGHT="2014 Developer Name"
LICENSE="
GNU GPL v2
GNU GPL v3
WTFPL v2.0
"
SOURCE_URI="http://jftp.inai.de/hxtools/hxtools-$portVersion.tar.xz"
CHECKSUM_SHA256="55265b16191831c4e332b0235b057e3f1e952298abf34734a8fa2ee9bb7be382"
PATCHES="hxtools-$portVersion.patchset"
REVISION="1"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
hxtools$secondaryArchSuffix = $portVersion
cmd:bin2c$secondaryArchSuffix
cmd:checkbrack$secondaryArchSuffix
cmd:clock_info$secondaryArchSuffix
cmd:clt2bdf$secondaryArchSuffix
cmd:cwdiff$secondaryArchSuffix
cmd:declone$secondaryArchSuffix
cmd:fxterm$secondaryArchSuffix
cmd:git_author_stat$secondaryArchSuffix
cmd:git_export_patch$secondaryArchSuffix
cmd:git_forest$secondaryArchSuffix
cmd:git_track$secondaryArchSuffix
cmd:googtts$secondaryArchSuffix
cmd:gpsh$secondaryArchSuffix
cmd:man2html$secondaryArchSuffix
cmd:move_moov$secondaryArchSuffix
cmd:ofl$secondaryArchSuffix
cmd:pesubst$secondaryArchSuffix
cmd:pmap_dirty$secondaryArchSuffix
cmd:qtar$secondaryArchSuffix
cmd:rot13$secondaryArchSuffix
cmd:spec_beautifier$secondaryArchSuffix
cmd:ssa2srt$secondaryArchSuffix
cmd:su1$secondaryArchSuffix
cmd:sysinfo$secondaryArchSuffix
cmd:tailhex$secondaryArchSuffix
cmd:wktimer$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libHX$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libHX$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
GLOBAL_WRITABLE_FILES="
settings/hxloginpref.conf keep-old
"
BUILD()
{
sh autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -0,0 +1,135 @@
From 4ca0152e3d8233bddfc206ed5de088f769c74c40 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 7 Feb 2016 16:48:26 +0100
Subject: Haiku hacks.
diff --git a/sadmin/Makefile.am b/sadmin/Makefile.am
index a5fd009..108163f 100644
--- a/sadmin/Makefile.am
+++ b/sadmin/Makefile.am
@@ -15,8 +15,8 @@ pkglibexec_PROGRAMS = \
fd0ssh \
proc_iomem_count \
proc_stat_parse \
- psthreads \
- utmp_register
+ psthreads
+# utmp_register
if HAVE_LIBCAP
pkglibexec_PROGRAMS += printcaps
endif
@@ -27,15 +27,15 @@ dist_pkglibexec_SCRIPTS = \
recursive_lower \
vcsaview
-noinst_PROGRAMS = \
- xfs_irecover
+#noinst_PROGRAMS = \
+# xfs_irecover
dist_noinst_SCRIPTS = \
filenameconv \
raregetty \
rpmdep.pl
-clock_info_LDADD = -lrt
+#clock_info_LDADD = -lrt
ofl_LDADD = ${libHX_LIBS}
printcaps_LDADD = ${libHX_LIBS} ${libcap_LIBS}
proc_iomem_count_LDADD = ${libHX_LIBS}
diff --git a/sdevel/cctypeinfo.c b/sdevel/cctypeinfo.c
index f0f27e2..66954ed 100644
--- a/sdevel/cctypeinfo.c
+++ b/sdevel/cctypeinfo.c
@@ -18,8 +18,10 @@
#else
# include <netinet/in.h>
# define SIZET_FMT "z"
+#ifndef __HAIKU__
# define HAVE_LOFF_T 1
#endif
+#endif
struct x16 {
uint8_t a;
diff --git a/smm/Makefile.am b/smm/Makefile.am
index d8099d6..1bf4d3d 100644
--- a/smm/Makefile.am
+++ b/smm/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = ${regular_CXXFLAGS}
CLEANFILES = omixer orec
bin_PROGRAMS = \
- clt2bdf hcdplay oplay
+ clt2bdf #hcdplay oplay
if HAVE_XBRZ
bin_PROGRAMS += cltxscale
endif
@@ -32,29 +32,29 @@ dist_pkglibexec_SCRIPTS = \
stxdb
bsvplay_SOURCES = bsvplay.c pcspkr_pcm.c
-bsvplay_LDADD = ${libHX_LIBS} -lm
+bsvplay_LDADD = ${libHX_LIBS} #-lm
clt2bdf_LDADD = ${libHX_LIBS}
clt2pbm_LDADD = ${libHX_LIBS}
cltxscale_SOURCES = cltxscale.c xbrz_call.cpp
cltxscale_LDADD = -lxbrz ${libHX_LIBS}
-hcdplay_LDADD = ${libHX_LIBS}
-oplay_LDADD = ${libHX_LIBS}
+#hcdplay_LDADD = ${libHX_LIBS}
+#oplay_LDADD = ${libHX_LIBS}
pcmdiff_LDADD = ${libHX_LIBS}
qplay_SOURCES = qplay.c pcspkr_pcm.c
-qplay_LDADD = ${libHX_LIBS} -lm
+qplay_LDADD = ${libHX_LIBS} #-lm
vfontas_LDADD = ${libHX_LIBS}
EXTRA_DIST = pcspkr.h
-omixer${EXEEXT}: oplay${EXEEXT}
- if [ ! -e omixer ]; then ln -s oplay omixer; fi;
+#omixer${EXEEXT}: oplay${EXEEXT}
+# if [ ! -e omixer ]; then ln -s oplay omixer; fi;
-orec${EXEEXT}: oplay${EXEEXT}
- if [ ! -e orec ]; then ln -s oplay orec; fi;
+#orec${EXEEXT}: oplay${EXEEXT}
+# if [ ! -e orec ]; then ln -s oplay orec; fi;
-all-local: omixer${EXEEXT} orec${EXEEXT}
+#all-local: omixer${EXEEXT} orec${EXEEXT}
-install-exec-local:
- test -z "${bindir}" || ${MKDIR_P} "${DESTDIR}${bindir}";
- ln -s "oplay${EXEEXT}" "${DESTDIR}${bindir}/orec${EXEEXT}";
- ln -s "oplay${EXEEXT}" "${DESTDIR}${bindir}/omixer${EXEEXT}";
+#install-exec-local:
+# test -z "${bindir}" || ${MKDIR_P} "${DESTDIR}${bindir}";
+# ln -s "oplay${EXEEXT}" "${DESTDIR}${bindir}/orec${EXEEXT}";
+# ln -s "oplay${EXEEXT}" "${DESTDIR}${bindir}/omixer${EXEEXT}";
diff --git a/suser/Makefile.am b/suser/Makefile.am
index 2c973a1..88d3a73 100644
--- a/suser/Makefile.am
+++ b/suser/Makefile.am
@@ -7,8 +7,8 @@ AM_CFLAGS = ${regular_CFLAGS}
bin_PROGRAMS = \
declone \
sysinfo \
- tailhex \
- xcp
+ tailhex
+# xcp
dist_bin_SCRIPTS = \
fxterm \
@@ -23,4 +23,4 @@ dist_pkglibexec_SCRIPTS = \
sysinfo_LDADD = ${libHX_LIBS} ${libmount_LIBS} ${libpci_LIBS} ${libxcb_LIBS}
tailhex_LDADD = ${libHX_LIBS}
-xcp_LDADD = ${libHX_LIBS}
+#xcp_LDADD = ${libHX_LIBS}
--
2.7.0

View File

@@ -0,0 +1,67 @@
SUMMARY="Common structures and low-level operations"
DESCRIPTION="A C library (with some C++ bindings available) that provides data \
structures and functions commonly needed, such as maps, deques, linked lists, \
string formatting and autoresizing, option and config file parsing, type \
checking casts and more.
libHX aids in quickly writing up C and C++ data processing programs, by \
consolidating tasks that often happen to be open-coded, such as (simple) \
config file reading, option parsing, directory traversal, and others, into a \
library. The focus is on reducing the amount of time (and secondarily, the \
amount of code) a developer has to spend for otherwise implementing such."
HOMEPAGE="http://libhx.sourceforge.net/"
COPYRIGHT="2007-2014 Jan Engelhardt"
LICENSE="GNU LGPL v2"
SOURCE_URI="http://sourceforge.net/projects/libhx/files/libHX/$portVersion/libHX-$portVersion.tar.xz"
CHECKSUM_SHA256="cc2087a964a82d2e50e8161cf458481ededebb7021e4660410cf53248a4c83a3"
SOURCE_DIR="libHX-$portVersion"
REVISION="1"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libhx$secondaryArchSuffix = $portVersion
lib:libHX$secondaryArchSuffix = 28.3.0 compat >= 28
lib:libHX_rtcheck$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libhx${secondaryArchSuffix}_devel = $portVersion
devel:libHX$secondaryArchSuffix = 28.3.0 compat >= 28
devel:libHX_rtcheck$secondaryArchSuffix
"
REQUIRES_devel="
haiku${secondaryArchSuffix}_devel
libhx$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
sh autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libHX libHX_rtcheck
fixPkgconfig
packageEntries devel \
$developDir
}