Bug 253782 - New port: www/py-adblock Brave's adblock library in Python
Summary: New port: www/py-adblock Brave's adblock library in Python
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 03:49 UTC by Adam Jimerson
Modified: 2021-03-03 11:29 UTC (History)
2 users (show)

See Also:


Attachments
New port www/py-adblock (274.66 KB, application/x-shellscript)
2021-02-23 03:49 UTC, Adam Jimerson
no flags Details
Add port www/py-adblock, use dns/public_suffix_list, and allow debug builds (23.30 KB, application/x-shellscript)
2021-02-24 03:39 UTC, Adam Jimerson
vendion: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
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