httrack: add recipe

This commit is contained in:
Gerasim Troeglazov
2021-03-02 22:57:28 +10:00
parent f6058b2c52
commit 1a7ba509d3
2 changed files with 160 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
SUMMARY="An offline browser utility"
DESCRIPTION="HTTrack is an offline browser utility, allowing you to download a World Wide \
website from the Internet to a local directory, building recursively all directories, \
getting html, images, and other files from the server to your computer.
HTTrack arranges the original site's relative link-structure. Simply open a page of \
the \"mirrored\" website in your browser, and you can browse the site from link to link, \
as if you were viewing it online.
HTTrack can also update an existing mirrored site, and resume interrupted downloads. \
HTTrack is fully configurable, and has an integrated help system."
HOMEPAGE="https://www.httrack.com/"
COPYRIGHT="Xavier Roche"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://mirror.httrack.com/httrack-$portVersion.tar.gz"
CHECKSUM_SHA256="3477a0e5568e241c63c9899accbfcdb6aadef2812fcce0173688567b4c7d4025"
SOURCE_DIR="httrack-$portVersion"
PATCHES="httrack-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="2.0.49"
PROVIDES="
httrack$secondaryArchSuffix = $portVersion
cmd:webhttrack$commandSuffix = $portVersion
cmd:proxytrack$commandSuffix = $portVersion
cmd:httrack$commandSuffix = $portVersion
cmd:htsserver$commandSuffix = $portVersion
lib:libhttrack$secondaryArchSuffix = $libVersion compat >= 2
lib:libhtsjava$secondaryArchSuffix = $libVersion compat >= 2
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
httrack${secondaryArchSuffix}_devel = $portVersion
devel:libhttrack$secondaryArchSuffix = $libVersion compat >= 2
devel:libhtsjava$secondaryArchSuffix = $libVersion compat >= 2
"
REQUIRES_devel="
httrack${secondaryArchSuffix} == $portVersion base
"
BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
"
BUILD()
{
export LIBS="-lnetwork -liconv"
runConfigure ./configure --bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
rm -rf $libDir/*.{la,a} \
$libDir/httrack/*.{la,a} \
$prefix/share
prepareInstalledDevelLibs libhttrack libhtsjava
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,67 @@
From 5f2e9cd70cdb49dceffe9b9570f76734232fcb9f Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 2 Mar 2021 22:44:28 +1000
Subject: Fixes for Haiku
diff --git a/html/Makefile.am b/html/Makefile.am
old mode 100755
new mode 100644
index aa6a741..c8af33c
--- a/html/Makefile.am
+++ b/html/Makefile.am
@@ -37,8 +37,8 @@ EXTRA_DIST = $(HelpHtml_DATA) $(HelpHtmlimg_DATA) $(HelpHtmlimages_DATA) \
httrack.css
install-data-hook:
- if test ! -L $(DESTDIR)$(prefix)/share/httrack/html ; then \
- ( cd $(DESTDIR)$(prefix)/share/httrack \
+ if test ! -L $(DESTDIR)$(prefix)/data/httrack/html ; then \
+ ( cd $(DESTDIR)$(prefix)/data/httrack \
&& $(LN_S) $(htmldir) html \
) \
fi
diff --git a/html/Makefile.in b/html/Makefile.in
index 5da9b5d..1601b12 100644
--- a/html/Makefile.in
+++ b/html/Makefile.in
@@ -814,8 +814,8 @@ uninstall-am: uninstall-HelpHtmlDATA uninstall-HelpHtmlTxtDATA \
install-data-hook:
- if test ! -L $(DESTDIR)$(prefix)/share/httrack/html ; then \
- ( cd $(DESTDIR)$(prefix)/share/httrack \
+ if test ! -L $(DESTDIR)$(prefix)/data/httrack/html ; then \
+ ( cd $(DESTDIR)$(prefix)/data/httrack \
&& $(LN_S) $(htmldir) html \
) \
fi
diff --git a/src/htsweb.c b/src/htsweb.c
index 77ad1a0..e36b06c 100644
--- a/src/htsweb.c
+++ b/src/htsweb.c
@@ -178,7 +178,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr,
"usage: %s [--port <port>] [--ppid parent-pid] <path-to-html-root-dir> [key value [key value]..]\n",
argv[0]);
- fprintf(stderr, "example: %s /usr/share/httrack/\n", argv[0]);
+ fprintf(stderr, "example: %s /system/data/httrack/\n", argv[0]);
return 1;
}
diff --git a/src/minizip/ioapi.h b/src/minizip/ioapi.h
index a531284..12a1d93 100644
--- a/src/minizip/ioapi.h
+++ b/src/minizip/ioapi.h
@@ -50,7 +50,7 @@
#define ftello64 ftell
#define fseeko64 fseek
#else
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__HAIKU__)
#define fopen64 fopen
#define ftello64 ftello
#define fseeko64 fseeko
--
2.30.0