Bug 253782

Summary: New port: www/py-adblock Brave's adblock library in Python
Product: Ports & Packages Reporter: Adam Jimerson <vendion>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: nimaje+fbz, pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
New port www/py-adblock
none
Add port www/py-adblock, use dns/public_suffix_list, and allow debug builds vendion: maintainer-approval+

Description Adam Jimerson 2021-02-23 03:49:33 UTC
Created attachment 222739 [details]
New port www/py-adblock

This add a new port py-adblock with is a python wrapper around Brave's adblock library for use with www/qutebrowser (and any other application that may make use of this library).
Comment 1 Benjamin Takacs 2021-02-23 06:35:57 UTC
Why not using dns/public_suffix_list instead of maintaining a public suffix list in this port?
Using dns/public_suffix_list would also mean this port agrees with other ports about public suffixes
Comment 2 Benjamin Takacs 2021-02-23 07:38:59 UTC
To better support WITH_DEBUG you should avoid stripping when WITH_DEBUG is set (${STRIP_CMD} already does that, so the only place I see that would need to change is do-build)

Maybe use ${WITH_DEBUG:D:U--strip} instead of --strip there (as suggested by make(1) for values that are only needed when a variable is undefined)
Comment 3 Adam Jimerson 2021-02-23 11:45:01 UTC
Thanks for the feedback!

> Why not using dns/public_suffix_list instead of maintaining a public suffix list in this port?
Using dns/public_suffix_list would also mean this port agrees with other ports about public suffixes

I was not aware that dns/public_suffix_list existed, that is certainly better than having to patch in my own list.

> Maybe use ${WITH_DEBUG:D:U--strip} instead of --strip there (as suggested by make(1) for values that are only needed when a variable is undefined)

Good point, I'll add that to my do-build target, so those wont get stripped if WITH_DEBUG is set for the port.
Comment 4 Adam Jimerson 2021-02-24 03:39:09 UTC
Created attachment 222780 [details]
Add port www/py-adblock, use dns/public_suffix_list, and allow debug builds

Replaced the patched in public suffix list with dns/public_suffix_list, and allow for debug builds.
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2021-03-03 11:29:53 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-03-03 11:29:56 UTC
A commit references this bug:

Author: pi
Date: Wed Mar  3 11:29:51 UTC 2021
New revision: 567071
URL: https://svnweb.freebsd.org/changeset/ports/567071

Log:
  New port: www/py-adblock

  Python wrapper for Brave's adblocking library, which is written in Rust.

  WWW: https://pypi.org/project/adblock/

  PR:		253782
  Submitted by:	Adam Jimerson <vendion@gmail.com>
  Reviewed by:	nimaje+fbz@bureaucracy.de

Changes:
  head/www/Makefile
  head/www/py-adblock/
  head/www/py-adblock/Makefile
  head/www/py-adblock/distinfo
  head/www/py-adblock/pkg-descr