svn commit: r402928 - in head/dns: . libpsl libpsl/files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Fri Dec 4 12:23:14 UTC 2015
Author: sunpoet
Date: Fri Dec 4 12:23:12 2015
New Revision: 402928
URL: https://svnweb.freebsd.org/changeset/ports/402928
Log:
- Add libpsl 0.11.0
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
Added:
head/dns/libpsl/
head/dns/libpsl/Makefile (contents, props changed)
head/dns/libpsl/distinfo (contents, props changed)
head/dns/libpsl/files/
head/dns/libpsl/files/patch-configure.ac (contents, props changed)
head/dns/libpsl/files/patch-src-psl.c (contents, props changed)
head/dns/libpsl/files/patch-src-psl2c.c (contents, props changed)
head/dns/libpsl/pkg-descr (contents, props changed)
head/dns/libpsl/pkg-plist (contents, props changed)
Modified:
head/dns/Makefile
Modified: head/dns/Makefile
==============================================================================
--- head/dns/Makefile Fri Dec 4 12:22:22 2015 (r402927)
+++ head/dns/Makefile Fri Dec 4 12:23:12 2015 (r402928)
@@ -85,6 +85,7 @@
SUBDIR += libdjbdns
SUBDIR += libidn
SUBDIR += libidn2
+ SUBDIR += libpsl
SUBDIR += linux-c6-libasyncns
SUBDIR += linux-f10-libasyncns
SUBDIR += mDNSResponder_nss
Added: head/dns/libpsl/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/Makefile Fri Dec 4 12:23:12 2015 (r402928)
@@ -0,0 +1,54 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= libpsl
+PORTVERSION= 0.11.0
+DISTVERSIONPREFIX= ${PORTNAME}-
+CATEGORIES= dns
+
+MAINTAINER= sunpoet at 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>
Added: head/dns/libpsl/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/distinfo Fri Dec 4 12:23:12 2015 (r402928)
@@ -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
Added: head/dns/libpsl/files/patch-configure.ac
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/files/patch-configure.ac Fri Dec 4 12:23:12 2015 (r402928)
@@ -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],
Added: head/dns/libpsl/files/patch-src-psl.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/files/patch-src-psl.c Fri Dec 4 12:23:12 2015 (r402928)
@@ -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)))
Added: head/dns/libpsl/files/patch-src-psl2c.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/files/patch-src-psl2c.c Fri Dec 4 12:23:12 2015 (r402928)
@@ -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;
Added: head/dns/libpsl/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/pkg-descr Fri Dec 4 12:23:12 2015 (r402928)
@@ -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
Added: head/dns/libpsl/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/libpsl/pkg-plist Fri Dec 4 12:23:12 2015 (r402928)
@@ -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
More information about the svn-ports-head
mailing list