diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2015-12-04 12:23:12 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2015-12-04 12:23:12 +0000 |
commit | c1e77152ecec42f345a8209bef4af99c6f1c7454 (patch) | |
tree | ae27847241e7ac6b54db0ab6fcd646d9ecec2679 /dns | |
parent | e937d78a4699350b75a23e7243a7727b94da1b3b (diff) | |
download | ports-c1e77152ecec42f345a8209bef4af99c6f1c7454.tar.gz ports-c1e77152ecec42f345a8209bef4af99c6f1c7454.zip |
Notes
Diffstat (limited to 'dns')
-rw-r--r-- | dns/Makefile | 1 | ||||
-rw-r--r-- | dns/libpsl/Makefile | 54 | ||||
-rw-r--r-- | dns/libpsl/distinfo | 2 | ||||
-rw-r--r-- | dns/libpsl/files/patch-configure.ac | 27 | ||||
-rw-r--r-- | dns/libpsl/files/patch-src-psl.c | 22 | ||||
-rw-r--r-- | dns/libpsl/files/patch-src-psl2c.c | 11 | ||||
-rw-r--r-- | dns/libpsl/pkg-descr | 23 | ||||
-rw-r--r-- | dns/libpsl/pkg-plist | 8 |
8 files changed, 148 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile index 91612192f0bd..4287d634ec25 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -85,6 +85,7 @@ SUBDIR += libdjbdns SUBDIR += libidn SUBDIR += libidn2 + SUBDIR += libpsl SUBDIR += linux-c6-libasyncns SUBDIR += linux-f10-libasyncns SUBDIR += mDNSResponder_nss diff --git a/dns/libpsl/Makefile b/dns/libpsl/Makefile new file mode 100644 index 000000000000..c385f702e6fc --- /dev/null +++ b/dns/libpsl/Makefile @@ -0,0 +1,54 @@ +# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= libpsl +PORTVERSION= 0.11.0 +DISTVERSIONPREFIX= ${PORTNAME}- +CATEGORIES= dns + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= C library to handle the Public Suffix List + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= public_suffix_list>=0:${PORTSDIR}/dns/public_suffix_list \ + xsltproc:${PORTSDIR}/textproc/libxslt + +OPTIONS_DEFINE= NLS +OPTIONS_SINGLE= IDNA +OPTIONS_SINGLE_IDNA= ICU IDN IDN2 +OPTIONS_DEFAULT=ICU +ICU_DESC= Use devel/icu (IDNA2008 UTS\#46 library) +IDN_DESC= Use dns/libidn (IDNA2003 library) +IDN2_DESC= Use dns/libidn2 (IDNA2008 library) + +CONFIGURE_ARGS= --enable-man \ + --with-psl-file=${LOCALBASE}/share/public_suffix_list/public_suffix_list.dat \ + --with-psl-testfile=${LOCALBASE}/share/public_suffix_list/test_psl.txt +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip +PATHFIX_MAKEFILEIN= Makefile.am +USE_LDCONFIG= yes +USES= autoreconf libtool pathfix pkgconfig + +GH_ACCOUNT= rockdaboot +USE_GITHUB= yes + +ICU_CONFIGURE_ON= --enable-builtin=libicu --enable-runtime=libicu +ICU_LIB_DEPENDS= libicuuc.so:${PORTSDIR}/devel/icu +IDN_CONFIGURE_ON= --enable-builtin=libidn --enable-runtime=libidn +IDN_LIB_DEPENDS= libidn.so:${PORTSDIR}/dns/libidn \ + libunistring.so:${PORTSDIR}/devel/libunistring +IDN_USES= iconv +IDN2_CONFIGURE_ON= --enable-builtin=libidn2 --enable-runtime=libidn2 +IDN2_LIB_DEPENDS= libidn2.so:${PORTSDIR}/dns/libidn2 \ + libunistring.so:${PORTSDIR}/devel/libunistring +IDN2_USES= iconv +NLS_CPPFLAGS= -DENABLE_NLS=1 +NLS_USES= gettext + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/psl2c ${STAGEDIR}${PREFIX}/bin/ + +.include <bsd.port.mk> diff --git a/dns/libpsl/distinfo b/dns/libpsl/distinfo new file mode 100644 index 000000000000..2870b5312bd9 --- /dev/null +++ b/dns/libpsl/distinfo @@ -0,0 +1,2 @@ +SHA256 (rockdaboot-libpsl-libpsl-0.11.0_GH0.tar.gz) = 60d0fea883f5bbe141542b53e7fedc7f6d1713c0789474fc2ccd67fd06563398 +SIZE (rockdaboot-libpsl-libpsl-0.11.0_GH0.tar.gz) = 43866 diff --git a/dns/libpsl/files/patch-configure.ac b/dns/libpsl/files/patch-configure.ac new file mode 100644 index 000000000000..9ac60c7fa5de --- /dev/null +++ b/dns/libpsl/files/patch-configure.ac @@ -0,0 +1,27 @@ +--- configure.ac.orig 2015-09-23 12:52:04 UTC ++++ configure.ac +@@ -33,24 +33,6 @@ AM_GNU_GETTEXT([external],[need-ngettext + AM_GNU_GETTEXT_VERSION([0.18.1]) + + # +-# check for gtk-doc +-# +-m4_ifdef([GTK_DOC_CHECK], [ +-GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) +-],[ +-AM_CONDITIONAL([ENABLE_GTK_DOC], false) +-]) +-# needed for some older versions of gtk-doc +-m4_ifdef([GTK_DOC_USE_LIBTOOL], [], [ +-AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], false) +-]) +- +-if test x"$have_gtk_doc" = xyes -a x"$enable_gtk_doc" = xyes; then +- AC_CONFIG_FILES([docs/libpsl/Makefile docs/libpsl/version.xml]) +- AC_SUBST([LIBPSL_DOCS], [docs/libpsl]) +-fi +- +-# + # enable creation of man pages + # + AC_ARG_ENABLE(man,[AC_HELP_STRING([--enable-man], diff --git a/dns/libpsl/files/patch-src-psl.c b/dns/libpsl/files/patch-src-psl.c new file mode 100644 index 000000000000..b059a867f372 --- /dev/null +++ b/dns/libpsl/files/patch-src-psl.c @@ -0,0 +1,22 @@ +--- src/psl.c.orig 2015-09-23 12:52:04 UTC ++++ src/psl.c +@@ -54,8 +54,10 @@ + # define ngettext(STRING1,STRING2,N) STRING2 + #endif + +-#include <sys/types.h> ++#include <netinet/in.h> ++#include <sys/socket.h> + #include <sys/stat.h> ++#include <sys/types.h> + #include <unistd.h> + #include <stdio.h> + #include <stdlib.h> +@@ -87,7 +89,6 @@ + #endif + + #include <libpsl.h> +-#include <bits/stat.h> + + /* number of elements within an array */ + #define countof(a) (sizeof(a)/sizeof(*(a))) diff --git a/dns/libpsl/files/patch-src-psl2c.c b/dns/libpsl/files/patch-src-psl2c.c new file mode 100644 index 000000000000..a8bb7fbc5326 --- /dev/null +++ b/dns/libpsl/files/patch-src-psl2c.c @@ -0,0 +1,11 @@ +--- src/psl2c.c.orig 2015-09-23 12:52:04 UTC ++++ src/psl2c.c +@@ -246,7 +246,7 @@ int main(int argc, const char **argv) + + _print_psl_entries(fpout, psl->suffixes, "suffixes"); + +- snprintf(cmd, cmdsize, "sha1sum %s", argv[1]); ++ snprintf(cmd, cmdsize, "sha1 %s", argv[1]); + if ((pp = popen(cmd, "r"))) { + if (fscanf(pp, "%63[0-9a-zA-Z]", checksum) < 1) + *checksum = 0; diff --git a/dns/libpsl/pkg-descr b/dns/libpsl/pkg-descr new file mode 100644 index 000000000000..8234d91ac9e6 --- /dev/null +++ b/dns/libpsl/pkg-descr @@ -0,0 +1,23 @@ +A "public suffix" is a domain name under which Internet users can directly +register own names. + +Browsers and other web clients can use it to +- avoid privacy-leaking "supercookies" +- avoid privacy-leaking "super domain" certificates [1] +- domain highlighting parts of the domain in a user interface +- sorting domain lists by site + +Libpsl... +- has built-in PSL data for fast access +- allows to load PSL data from files +- checks if a given domain is a "public suffix" +- provides immediate cookie domain verification +- finds the longest public part of a given domain +- finds the shortest private part of a given domain +- works with international domains (UTF-8 and IDNA2008 Punycode) +- is thread-safe +- handles IDNA2008 UTS#46 (libicu is used by psl2c if installed) + +[1] http://lists.gnu.org/archive/html/bug-wget/2014-03/msg00093.html + +WWW: https://github.com/rockdaboot/libpsl diff --git a/dns/libpsl/pkg-plist b/dns/libpsl/pkg-plist new file mode 100644 index 000000000000..0c9eacb354d7 --- /dev/null +++ b/dns/libpsl/pkg-plist @@ -0,0 +1,8 @@ +bin/psl +bin/psl2c +include/libpsl.h +lib/libpsl.a +lib/libpsl.so +lib/libpsl.so.0 +lib/libpsl.so.0.4.0 +libdata/pkgconfig/libpsl.pc |