* Use pkg-install/pkg-deinstall scripts instead of pkg-req. * Add staging support. * Use OPTIONS_DEFINE=DOCS instead of NOPORTDOCS. * Remove a URL which has gone from MASTER_SITES. * Remove a verbose dependency from RUN_DEPENDS. * Remove fonts.alias update command (@unexec) from pkg-plist. It's done by pkg-deinstall. * Remove fonts.alias from pkg-plist. It's handled by pkg-install/pkg-deinstall. These modification are derived from japanese/elisa8x8. Thanks!
Thank you for the patch. I believe pkg-install and pkg-deinstall are superfluous here -- replacing all the manual mkfont{dir,scale} handling with the @fontsdir keyword as described in http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-keywords.html should allow you to trim even more fat from the port.
in other words, a new patch is expected to be submitted in order to progress.
rakuco, if it's up to me I'd close the PR as the port is going to be removed in 2 weeks. Maybe you want to salvage it?
Nah, I already have way too many things to do. Closing.
Created attachment 146212 [details] a new patch for japanese/k12 that uses @fontsdir
Hello. I've created (and posted) a new patch that uses @fontsdir in pkg-plist. And I want to take ownership of this port. Would you consider committing the new patch? Sorry for my slow reply.
change you paste output of "make check-plist" followed by "make stage-qa" ?
With the old patch the following tests are finished normally. Only with the new patch (@fontsdir in pkg-plist) "make check-plist" says error like this: root@aquarius-vm:/usr/ports/japanese/k12 # make check-plist ===> Found saved configuration for ja-kaname12-1.1_3 ===> ja-kaname12-1.1_3 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by ja-kaname12-1.1_3 for building ===> Extracting for ja-kaname12-1.1_3 ===> Found saved configuration for ja-kaname12-1.1_3 ===> ja-kaname12-1.1_3 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by ja-kaname12-1.1_3 for building => SHA256 Checksum OK for kaname_k12_bdf.tar.gz. => SHA256 Checksum OK for knm_new_linux.tar.gz. ===> Patching for ja-kaname12-1.1_3 ===> Applying FreeBSD patches for ja-kaname12-1.1_3 ===> ja-kaname12-1.1_3 depends on executable: bdftopcf - found ===> Configuring for ja-kaname12-1.1_3 ===> Building for ja-kaname12-1.1_3 bdftopcf knmhn12x.bdf > knmhn12x.pcf gzip -9 -nf knmhn12x.pcf ===> Staging for ja-kaname12-1.1_3 ===> ja-kaname12-1.1_3 depends on executable: mkfontdir - found ===> Generating temporary packing list if [ ! -d /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local ] ; then /bin/mkdir -p /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local ; fi install -o root -g wheel -m 444 kaname-latin1.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local install -o root -g wheel -m 444 knm12p.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local install -o root -g wheel -m 444 knm12pb.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local install -o root -g wheel -m 444 knmhn12x.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local install -o root -g wheel -m 444 knmzn12x.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local install -o root -g wheel -m 444 knmzn12xb.pcf.gz /FreeBSD/ports/japanese/k12/work/stage/usr/local/lib/X11/fonts/local ====> Compressing man pages (compress-man) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for directories owned by MTREEs Error: Owned by MTREE: @dirrmtry %%FONTSDIR%% ===> Checking for directories handled by dependencies ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** [check-plist] Error code 1 Stop in /FreeBSD/ports/japanese/k12. root@aquarius-vm:/usr/ports/japanese/k12 # make stage-qa ====> Running Q/A tests (stage-qa) root@aquarius-vm:/usr/ports/japanese/k12 #
I suspect you can remove these lines now: @exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir @unexec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir @unexec if [ `wc -c %D/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ]; then rm -f %D/%%FONTSDIR%%/fonts.dir; fi @unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f %D/%%FONTSDIR%%/fonts.alias; fi and it should build without stage-qa errors
Created attachment 146253 [details] poudriere ja-kaname12-1.1_3.log (with the new patch) First, thanks for your many fix about japanese/alias-fonts! BTW... (In reply to John Marino from comment #9) > I suspect you can remove these lines now: > > @exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir > @unexec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir > @unexec if [ `wc -c %D/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ]; > then rm -f %D/%%FONTSDIR%%/fonts.dir; fi > @unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f > %D/%%FONTSDIR%%/fonts.alias; fi > > and it should build without stage-qa errors Of course it has been done by the new patch. I attach a poudriere's log (testport with the new patch). It says the same error.
Try restoring this: RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \ mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale I see this in x11-fonts/montecarlo_fonts and emulators/pcemu, two ports that use @fontsdir.
(In reply to John Marino from comment #11) > Try restoring this: (snip) > I see this in x11-fonts/montecarlo_fonts and emulators/pcemu, two ports that > use @fontsdir. There is no difference. Same error. FreeBSD Porter's Handbook say: | 7.6.3. @fontsdir directory | | Add a @dirrmtry entry for the directory passed as an argument, and run | mkfontscale and mkfontdir on that directory after installation and | deinstallation. Additionally, on deinstallation, it removes the | fonts.scale and fonts.dir cache files if they are empty. Ports that uses @fontsdir, @fc and @fcfontsdir (currently 24 ports are found) creates its own directory (e.g. ${PREFIX}/lib/X11/fonts/${PORTNAME}/), and install fonts to it. If the ports are deleted, that directory should be deleted (via @dirrmtry described above). The k12 port installs fonts to ${PREFIX}/lib/X11/fonts/local/. It's a standard (?) X11 site-local font directory. Even if this port is deleted, this directory should not be deleted. So "make check-plist" said "Error: Owned by MTREE: @dirrmtry %%FONTSDIR%%". I think the use of "@fontsdir %%FONTSDIR%%" in this port is a bit difficult. It may be a better choice to run mkfontdir manually (like my previous patch).
so you are saying the problem is that the directory fontsdir is defined as happens to be an MTREE directory, correct? In other words, if the port used a different directory for fontsdir, we wouldn't see the error. Is K12 correct to use a standard directory?
When I setup FreeBSD with X, I always find the lib/X11/fonts/local directory. So I have believed that the directory is a part of X11. But it seems that it isn't. It seems that this directory appears a generally-created directory in many cases on the web. In the FreeBSD ports collection many ports install fonts to the directory. This directory is shared with these ports. In fact the FreeBSD Porter's Handbook say: | 6.9.3. X11 Fonts | If your port installs fonts for the X Window System, put them in | LOCALBASE/lib/X11/fonts/local. (But this description is old..?) (In reply to John Marino from comment #13) > so you are saying the problem is that the directory fontsdir is defined as > happens to be an MTREE directory, correct? Only this directory has been described in BSD.local.dist since 2007 [1], and the other similar directories (misc, TTF, etc.) are not described. I cannot find any discussion about this without [2]. As a result, @fontsdir for the directory always causes a mtree-related error by @dirrmtry (spawned by @fontsdir) with "make check-plist". > In other words, if the port used a different directory for fontsdir, we > wouldn't see the error. > > Is K12 correct to use a standard directory? In recent FreeBSD, many of ports that installs fonts, especially TrueType fonts, create its own directory and install fonts to it (manually or automatically by bsd.xorg.mk). I don't mind changing the install directory. Do you want me to do it? If so, I'll create a new patch. [1] http://lists.freebsd.org/pipermail/freebsd-x11/2005-February/001646.html [2] http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-February/272418.h tml
(In reply to WATANABE Kazuhiro from comment #14) > When I setup FreeBSD with X, I always find the lib/X11/fonts/local directory. > So I have believed that the directory is a part of X11. > But it seems that it isn't. Actually, it is. See /usr/ports/Templates/BSD.local.dist You don't attempt to remove files installed by mtree. > Only this directory has been described in BSD.local.dist since 2007 [1], > and the other similar directories (misc, TTF, etc.) are not described. > I cannot find any discussion about this without [2]. > > As a result, @fontsdir for the directory always causes a mtree-related error > by @dirrmtry (spawned by @fontsdir) with "make check-plist". okay, so you already figured that out. > I don't mind changing the install directory. Do you want me to do it? > If so, I'll create a new patch. Sure, why not? Especially if all the other ports that use @fontsdir use it with no-mtree directories. If the directory is not sacred then it's nice if the port builds cleanly.
Created attachment 146683 [details] Update patch for japanese/k12 * Remove pkg-req. * Add staging support. * Change the install directory. * Use @fontsdir in pkg-plist. * Remove fonts.alias update command (@unexec) from pkg-plist. Simply install it via Makefile. * Use OPTIONS_DEFINE=DOCS instead of NOPORTDOCS. * Remove a URL which has gone from MASTER_SITES. * Remove a verbose dependency from RUN_DEPENDS. * Take maintainership.
Created attachment 146684 [details] poudriere testport log (9.1-RELEASE amd64)
Thanks, that looks much better. I'm moving this to the patch-ready pool now.
A commit references this bug: Author: marino Date: Sat Sep 6 17:54:32 UTC 2014 New revision: 367460 URL: http://svnweb.freebsd.org/changeset/ports/367460 Log: Stage and revamp japanese/k12, assign maintainership to submitter * Add stage support * Replace NOPORTDOCS with option DOCS * Remove bad URL from MASTER_SITES * Convert to @fontsdir keywork (affects dependencies and pkg-plist) * Remove pkg-req (@fontsdir takes over its task) * Install directory has changed as a result (lib/X11/fonts/kaname12) PR: 190071 Submitted by: WATANABE Kazuhiro Changes: head/japanese/k12/Makefile head/japanese/k12/files/fonts.alias head/japanese/k12/files/patch-aa head/japanese/k12/files/pkg-message.in head/japanese/k12/pkg-plist head/japanese/k12/pkg-req
All the post-install commands were masked so I unsuppressed them and wrapped at 80-columns in one case. Thanks for the contribution!