diff --git a/www/httrack/Makefile b/www/httrack/Makefile new file mode 100644 index 00000000000..29f90172475 --- /dev/null +++ b/www/httrack/Makefile @@ -0,0 +1,62 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ + +COMMENT = offline browser +DISTNAME = httrack-3.48.19 + +# "main" application libraries +SHARED_LIBS += htsjava 0.0 # 2.47 +SHARED_LIBS += httrack 0.0 # 2.47 + +# sample libraries, provided in a separate directory +SHARED_LIBS += baselinks 0.0 # 1.0 +SHARED_LIBS += changecontent 0.0 # 1.0 +SHARED_LIBS += contentfilter 0.0 # 1.0 +SHARED_LIBS += displayheader 0.0 # 1.0 +SHARED_LIBS += filename 0.0 # 1.0 +SHARED_LIBS += filename2 0.0 # 1.0 +SHARED_LIBS += filenameiisbug 0.0 # 1.0 +SHARED_LIBS += listlinks 0.0 # 1.0 +SHARED_LIBS += log 0.0 # 1.0 +SHARED_LIBS += simple 0.0 # 1.0 + +CATEGORIES = www + +HOMEPAGE = http://www.httrack.com/ + +# GPLv3+ +PERMIT_PACKAGE_CDROM = Yes + +WANTLIB = c crypto pthread ssl z + +MASTER_SITES = http://mirror.httrack.com/ + +MODULES = converters/libiconv + +RUN_DEPENDS = devel/desktop-file-utils \ + x11/gtk+2,-guic + +SEPARATE_BUILD = No +CONFIGURE_STYLE = gnu autoconf +CONFIGURE_ARGS += ${CONFIGURE_SHARED} \ + --enable-online-unit-tests=no \ + ICONV_LIBS="-liconv" + +CONFIGURE_ENV = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ + LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" + +AUTOCONF_VERSION = 2.69 + +PATCHORIG = .ports.orig + +# The online tests rely on bash features, but we don't want +# interactive tests that much. +BASH_FILES = ${WRKSRC}/tests/*.{sh,test} \ + ${WRKSRC}/src/webhttrack + +pre-configure: + perl -pi.bashfix \ + -e 's,\bbash\b,sh,g;' \ + -e 'close ARGV if eof;' \ + ${BASH_FILES} + +.include diff --git a/www/httrack/distinfo b/www/httrack/distinfo new file mode 100644 index 00000000000..7d2055b1fbe --- /dev/null +++ b/www/httrack/distinfo @@ -0,0 +1,2 @@ +SHA256 (httrack-3.48.19.tar.gz) = FvDNDqIQQhBoeSOP5IkrVgGOEGNH1p3LC5OBbuj2iv4= +SIZE (httrack-3.48.19.tar.gz) = 1818985 diff --git a/www/httrack/patches/patch-configure_ac b/www/httrack/patches/patch-configure_ac new file mode 100644 index 00000000000..3964df2d07d --- /dev/null +++ b/www/httrack/patches/patch-configure_ac @@ -0,0 +1,14 @@ +$OpenBSD: patch-configure_ac,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ +Fix SSL library detection. +--- configure.ac.ports.orig Tue Jul 29 01:02:04 2014 ++++ configure.ac Thu Aug 7 07:55:14 2014 +@@ -160,7 +160,8 @@ AC_CHECK_LIB(ssl, SSL_library_init, + else + AC_MSG_RESULT([not available]) + fi +- ] ++ ], ++ [-lcrypto] + ) + AC_SUBST(OPENSSL_LIBS) + fi diff --git a/www/httrack/patches/patch-src_htslib_c b/www/httrack/patches/patch-src_htslib_c new file mode 100644 index 00000000000..0972ef0f263 --- /dev/null +++ b/www/httrack/patches/patch-src_htslib_c @@ -0,0 +1,22 @@ +$OpenBSD: patch-src_htslib_c,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ +Fix build. +--- src/htslib.c.ports.orig Thu Aug 7 07:56:00 2014 ++++ src/htslib.c Thu Aug 7 07:58:27 2014 +@@ -71,7 +71,17 @@ static long int timezone = 0; + #endif + #include + ++#ifndef HTS_DO_NOT_USE_FTIME ++#ifdef _WIN32 ++#include ++#else ++#include ++#endif + #include ++#else ++#include ++#endif ++ + #include + + // pour utimbuf diff --git a/www/httrack/patches/patch-src_minizip_ioapi_h b/www/httrack/patches/patch-src_minizip_ioapi_h new file mode 100644 index 00000000000..cdcbb6de613 --- /dev/null +++ b/www/httrack/patches/patch-src_minizip_ioapi_h @@ -0,0 +1,13 @@ +$OpenBSD: patch-src_minizip_ioapi_h,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ +Fix build. +--- src/minizip/ioapi.h.ports.orig Thu Aug 7 08:02:32 2014 ++++ src/minizip/ioapi.h Thu Aug 7 08:01:59 2014 +@@ -50,7 +50,7 @@ + #define ftello64 ftell + #define fseeko64 fseek + #else +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + #define fopen64 fopen + #define ftello64 ftello + #define fseeko64 fseeko diff --git a/www/httrack/patches/patch-src_webhttrack b/www/httrack/patches/patch-src_webhttrack new file mode 100644 index 00000000000..72ca53dc6a6 --- /dev/null +++ b/www/httrack/patches/patch-src_webhttrack @@ -0,0 +1,63 @@ +$OpenBSD: patch-src_webhttrack,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ +1. Make it recognize SeaMonkey as a browser, too. +2. Get rid of some unnecessary bashisms. +3. Add a hack based on xmessage to avoid stopping WebHTTrack + right after starting in case of browser already running. +--- src/webhttrack.ports.orig Mon May 13 13:31:30 2013 ++++ src/webhttrack Thu Aug 21 17:32:33 2014 +@@ -4,7 +4,7 @@ + # Initializes the htsserver GUI frontend and launch the default browser + + BROWSEREXE= +-SRCHBROWSEREXE="x-www-browser www-browser iceape mozilla firefox icecat iceweasel abrowser firebird galeon konqueror opera chrome chromium chromium-browser netscape" ++SRCHBROWSEREXE="x-www-browser www-browser iceape seamonkey mozilla firefox icecat iceweasel abrowser firebird galeon konqueror opera chrome chromium chromium-browser netscape" + if test -n "${BROWSER}"; then + # sensible-browser will f up if BROWSER is not set + SRCHBROWSEREXE="xdg-open sensible-browser ${SRCHBROWSEREXE}" +@@ -33,6 +33,8 @@ function mozillabrowser { + # returns 0, if the browser is mozilla type + echo "$1" | grep -q "iceape" + [ $? -eq 0 ] && return 0 ++echo "$1" | grep -q "seamonkey" ++[ $? -eq 0 ] && return 0 + echo "$1" | grep -q "mozilla" + [ $? -eq 0 ] && return 0 + echo "$1" | grep -q "netscape" +@@ -90,7 +92,7 @@ fi + # this loop is the only reliable solution AFAIK + end_t=`date +%s` + if test -n "$start_t" -a -n "$end_t"; then +- int_t=$[$end_t-$start_t] ++ int_t=$((end_t - start_t)) + else + int_t=0 + fi +@@ -169,7 +171,7 @@ TMPSRVFILE="$(mktemp ${TMPDIR:-/tmp}/.webhttrack.XXXXX + SRVURL= + MAXCOUNT=60 + while ! test -n "$SRVURL"; do +-MAXCOUNT=$[$MAXCOUNT - 1] ++MAXCOUNT=$((MAXCOUNT - 1)) + test $MAXCOUNT -gt 0 || exit 1 + test $MAXCOUNT -lt 50 && echo "waiting for server to reply.." + SRVURL=`grep -E URL= ${TMPSRVFILE} | cut -f2- -d=` +@@ -191,7 +193,18 @@ return 0 + trap "cleanup now; exit" 1 2 3 4 5 6 7 8 9 11 13 14 15 16 19 24 25 + + # Got SRVURL, launch browser +-launch_browser "${BROWSEREXE}" "${SRVURL}" ++SRVURL="http://127.0.0.1:8080/" ++launch_browser "${BROWSEREXE}" "$SRVURL" ++ ++MSG="Happy browsing! ++ ++The WebHTTrack is started on $SRVURL ++ ++If you accidentally close browser window, just open a ++new one and point it to the same URL. ++ ++Return to this window when you're done with WebHTTrack." ++xmessage -buttons "Stop WebHTTrack" "$MSG" + + # That's all, folks! + trap "" 1 2 3 4 5 6 7 8 9 11 13 14 15 16 19 24 25 diff --git a/www/httrack/pkg/DESCR b/www/httrack/pkg/DESCR new file mode 100644 index 00000000000..9867fd46662 --- /dev/null +++ b/www/httrack/pkg/DESCR @@ -0,0 +1,9 @@ +HTTrack is an easy-to-use offline browser utility. It allows you to +download a World Wide Web site 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. diff --git a/www/httrack/pkg/PLIST b/www/httrack/pkg/PLIST new file mode 100644 index 00000000000..78a5c0b9240 --- /dev/null +++ b/www/httrack/pkg/PLIST @@ -0,0 +1,249 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2014/10/03 13:06:33 zhuk Exp $ +@bin bin/htsserver +@bin bin/httrack +@bin bin/proxytrack +bin/webhttrack +include/httrack/ +include/httrack/config.h +include/httrack/htsarrays.h +include/httrack/htsbasenet.h +include/httrack/htsbauth.h +include/httrack/htsconfig.h +include/httrack/htsdefines.h +include/httrack/htsglobal.h +include/httrack/htsmodules.h +include/httrack/htsnet.h +include/httrack/htsopt.h +include/httrack/htssafe.h +include/httrack/htsstrings.h +include/httrack/htswrap.h +include/httrack/httrack-library.h +lib/httrack/ +lib/httrack/libbaselinks.a +lib/httrack/libbaselinks.la +@lib lib/httrack/libbaselinks.so.${LIBbaselinks_VERSION} +lib/httrack/libchangecontent.a +lib/httrack/libchangecontent.la +@lib lib/httrack/libchangecontent.so.${LIBchangecontent_VERSION} +lib/httrack/libcontentfilter.a +lib/httrack/libcontentfilter.la +@lib lib/httrack/libcontentfilter.so.${LIBcontentfilter_VERSION} +lib/httrack/libdisplayheader.a +lib/httrack/libdisplayheader.la +@lib lib/httrack/libdisplayheader.so.${LIBdisplayheader_VERSION} +lib/httrack/libfilename.a +lib/httrack/libfilename.la +@lib lib/httrack/libfilename.so.${LIBfilename_VERSION} +lib/httrack/libfilename2.a +lib/httrack/libfilename2.la +@lib lib/httrack/libfilename2.so.${LIBfilename2_VERSION} +lib/httrack/libfilenameiisbug.a +lib/httrack/libfilenameiisbug.la +@lib lib/httrack/libfilenameiisbug.so.${LIBfilenameiisbug_VERSION} +lib/httrack/liblistlinks.a +lib/httrack/liblistlinks.la +@lib lib/httrack/liblistlinks.so.${LIBlistlinks_VERSION} +lib/httrack/liblog.a +lib/httrack/liblog.la +@lib lib/httrack/liblog.so.${LIBlog_VERSION} +lib/httrack/libsimple.a +lib/httrack/libsimple.la +@lib lib/httrack/libsimple.so.${LIBsimple_VERSION} +lib/libhtsjava.a +lib/libhtsjava.la +@lib lib/libhtsjava.so.${LIBhtsjava_VERSION} +lib/libhttrack.a +lib/libhttrack.la +@lib lib/libhttrack.so.${LIBhttrack_VERSION} +@man man/man1/htsserver.1 +@man man/man1/httrack.1 +@man man/man1/proxytrack.1 +@man man/man1/webhttrack.1 +share/applications/WebHTTrack-Websites.desktop +share/applications/WebHTTrack.desktop +share/doc/httrack/ +share/doc/httrack/abuse.html +share/doc/httrack/addurl.html +share/doc/httrack/cache.html +share/doc/httrack/cmddoc.html +share/doc/httrack/contact.html +share/doc/httrack/dev.html +share/doc/httrack/div/ +share/doc/httrack/div/search.sh +share/doc/httrack/faq.html +share/doc/httrack/fcguide.html +share/doc/httrack/filters.html +share/doc/httrack/greetings.txt +share/doc/httrack/history.txt +share/doc/httrack/httrack-doc.html +share/doc/httrack/httrack.man.html +share/doc/httrack/images/ +share/doc/httrack/images/bg_rings.gif +share/doc/httrack/images/header_title_4.gif +share/doc/httrack/images/screenshot_01.jpg +share/doc/httrack/images/screenshot_01b.jpg +share/doc/httrack/img/ +share/doc/httrack/img/addurl1.gif +share/doc/httrack/img/addurl2.gif +share/doc/httrack/img/addurl3.gif +share/doc/httrack/img/addurl4.gif +share/doc/httrack/img/addurl5.gif +share/doc/httrack/img/backblue.gif +share/doc/httrack/img/fade.gif +share/doc/httrack/img/httrack.gif +share/doc/httrack/img/snap1_a.gif +share/doc/httrack/img/snap1_b.gif +share/doc/httrack/img/snap1_c.gif +share/doc/httrack/img/snap2_a.gif +share/doc/httrack/img/snap2_b.gif +share/doc/httrack/img/snap3_a.gif +share/doc/httrack/img/snap4_a.gif +share/doc/httrack/img/snap5_a.gif +share/doc/httrack/img/snap9.gif +share/doc/httrack/img/snap9_a.gif +share/doc/httrack/img/snap9_b.gif +share/doc/httrack/img/snap9_c.gif +share/doc/httrack/img/snap9_d.gif +share/doc/httrack/img/snap9_d2.gif +share/doc/httrack/img/snap9_d3.gif +share/doc/httrack/img/snap9_d4.gif +share/doc/httrack/img/snap9_d5.gif +share/doc/httrack/img/snap9_d6.gif +share/doc/httrack/img/snap9_d7.gif +share/doc/httrack/img/snap9_d8.gif +share/doc/httrack/img/snap9_e.gif +share/doc/httrack/img/snap9_f.gif +share/doc/httrack/img/snap9_g.gif +share/doc/httrack/img/snap9_g2.gif +share/doc/httrack/img/snap9_g3.gif +share/doc/httrack/img/snap9_h.gif +share/doc/httrack/img/snap9_i.gif +share/doc/httrack/img/snap9_j.gif +share/doc/httrack/img/snap9_k.gif +share/doc/httrack/index.html +share/doc/httrack/library.html +share/doc/httrack/license.txt +share/doc/httrack/options.html +share/doc/httrack/overview.html +share/doc/httrack/plug.html +share/doc/httrack/plug_330.html +share/doc/httrack/scripting.html +share/doc/httrack/server/ +share/doc/httrack/server/about.html +share/doc/httrack/server/addurl.html +share/doc/httrack/server/error.html +share/doc/httrack/server/exit.html +share/doc/httrack/server/file.html +share/doc/httrack/server/finished.html +share/doc/httrack/server/help.html +share/doc/httrack/server/images/ +share/doc/httrack/server/images/bg_rings.gif +share/doc/httrack/server/images/fade.gif +share/doc/httrack/server/images/header_title_4.gif +share/doc/httrack/server/index.html +share/doc/httrack/server/option1.html +share/doc/httrack/server/option10.html +share/doc/httrack/server/option11.html +share/doc/httrack/server/option2.html +share/doc/httrack/server/option2b.html +share/doc/httrack/server/option3.html +share/doc/httrack/server/option4.html +share/doc/httrack/server/option5.html +share/doc/httrack/server/option6.html +share/doc/httrack/server/option7.html +share/doc/httrack/server/option8.html +share/doc/httrack/server/option9.html +share/doc/httrack/server/refresh.html +share/doc/httrack/server/sfx/ +share/doc/httrack/server/sfx/finished.wav +share/doc/httrack/server/sfx/silent.wav +share/doc/httrack/server/step2.html +share/doc/httrack/server/step3.html +share/doc/httrack/server/step4.html +share/doc/httrack/shelldoc.html +share/doc/httrack/start.html +share/doc/httrack/step.html +share/doc/httrack/step1.html +share/doc/httrack/step2.html +share/doc/httrack/step3.html +share/doc/httrack/step4.html +share/doc/httrack/step5.html +share/doc/httrack/step9.html +share/doc/httrack/step9_opt1.html +share/doc/httrack/step9_opt10.html +share/doc/httrack/step9_opt11.html +share/doc/httrack/step9_opt2.html +share/doc/httrack/step9_opt3.html +share/doc/httrack/step9_opt4.html +share/doc/httrack/step9_opt5.html +share/doc/httrack/step9_opt6.html +share/doc/httrack/step9_opt7.html +share/doc/httrack/step9_opt8.html +share/doc/httrack/step9_opt9.html +share/httrack/ +share/httrack/html +share/httrack/lang/ +share/httrack/lang.def +share/httrack/lang.indexes +share/httrack/lang/Bulgarian.txt +share/httrack/lang/Castellano.txt +share/httrack/lang/Cesky.txt +share/httrack/lang/Chinese-BIG5.txt +share/httrack/lang/Chinese-Simplified.txt +share/httrack/lang/Croatian.txt +share/httrack/lang/Dansk.txt +share/httrack/lang/Deutsch.txt +share/httrack/lang/Eesti.txt +share/httrack/lang/English.txt +share/httrack/lang/Finnish.txt +share/httrack/lang/Francais.txt +share/httrack/lang/Greek.txt +share/httrack/lang/Italiano.txt +share/httrack/lang/Japanese.txt +share/httrack/lang/Macedonian.txt +share/httrack/lang/Magyar.txt +share/httrack/lang/Nederlands.txt +share/httrack/lang/Norsk.txt +share/httrack/lang/Polski.txt +share/httrack/lang/Portugues-Brasil.txt +share/httrack/lang/Portugues.txt +share/httrack/lang/Romanian.txt +share/httrack/lang/Russian.txt +share/httrack/lang/Slovak.txt +share/httrack/lang/Slovenian.txt +share/httrack/lang/Svenska.txt +share/httrack/lang/Turkish.txt +share/httrack/lang/Ukrainian.txt +share/httrack/libtest/ +share/httrack/libtest/callbacks-example-baselinks.c +share/httrack/libtest/callbacks-example-changecontent.c +share/httrack/libtest/callbacks-example-contentfilter.c +share/httrack/libtest/callbacks-example-displayheader.c +share/httrack/libtest/callbacks-example-filename.c +share/httrack/libtest/callbacks-example-filename2.c +share/httrack/libtest/callbacks-example-filenameiisbug.c +share/httrack/libtest/callbacks-example-listlinks.c +share/httrack/libtest/callbacks-example-log.c +share/httrack/libtest/callbacks-example-simple.c +share/httrack/libtest/example-main.c +share/httrack/libtest/example-main.h +share/httrack/libtest/readme.txt +share/httrack/templates/ +share/httrack/templates/index-body.html +share/httrack/templates/index-footer.html +share/httrack/templates/index-header.html +share/httrack/templates/topindex-body.html +share/httrack/templates/topindex-bodycat.html +share/httrack/templates/topindex-footer.html +share/httrack/templates/topindex-header.html +share/icons/hicolor/16x16/apps/httrack.png +share/icons/hicolor/32x32/apps/httrack.png +share/icons/hicolor/48x48/apps/httrack.png +share/pixmaps/ +share/pixmaps/httrack16x16.xpm +share/pixmaps/httrack32x32.xpm +share/pixmaps/httrack48x48.xpm +@exec %D/bin/update-desktop-database +@unexec-delete %D/bin/update-desktop-database +@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor +@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor