diff options
author | John Marino <marino@FreeBSD.org> | 2014-05-30 23:16:06 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-05-30 23:16:06 +0000 |
commit | 2dd72908d0443ccd6854e6bcd5e0158ab45e462b (patch) | |
tree | 2072905eed37d3370dde3c98f7d8f8693ecc4f01 /vietnamese | |
parent | a7a73047d357a3b163541c859470a5e30ee23660 (diff) | |
download | ports-2dd72908d0443ccd6854e6bcd5e0158ab45e462b.tar.gz ports-2dd72908d0443ccd6854e6bcd5e0158ab45e462b.zip |
vietnamese/unicode-uhoai: Fix deinstall and add stage support
This port had a few problems:
* The package list tried to remove the wrong directory
* The pkg-install script installs font.dir and font.scale files but
never tries to remove them. This causes orphan checks to fail
* The EXTRACTS_BEFORE_ARGS may not be additive (don't use +=)
* The EXTRACTS_BEFORE_ARGS definition came after <bsd.port.mk> so it
was never seen anyway
* The latter may mean that the font never installed properly if the
file didn't get transformed to lower case.
After staging, I added a pkg-deinstall script. I'm not 100% sure it's
correct if there are more than one Truetype font installed, but it's a
lot better than it was and it removes the font.* stuff upon deinstall.
This passes testport in poudriere.
Notes
Notes:
svn path=/head/; revision=355921
Diffstat (limited to 'vietnamese')
-rw-r--r-- | vietnamese/unicode-uhoai/Makefile | 14 | ||||
-rw-r--r-- | vietnamese/unicode-uhoai/pkg-deinstall | 13 | ||||
-rw-r--r-- | vietnamese/unicode-uhoai/pkg-plist | 2 |
3 files changed, 19 insertions, 10 deletions
diff --git a/vietnamese/unicode-uhoai/Makefile b/vietnamese/unicode-uhoai/Makefile index b176dc5044c0..492830e329ca 100644 --- a/vietnamese/unicode-uhoai/Makefile +++ b/vietnamese/unicode-uhoai/Makefile @@ -3,9 +3,8 @@ PORTNAME= unicode-uhoai PORTVERSION= 2.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= vietnamese x11-fonts -#MASTER_SITES= http://www.geocities.com/~starkville/mozilla/ MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= obrien DISTNAME= uhoaiw21 @@ -21,14 +20,11 @@ BUILD_DEPENDS= ttmkfdir:${PORTSDIR}/x11-fonts/ttmkfdir \ bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir -NO_STAGE= yes +EXTRACT_BEFORE_ARGS= -qoL + do-install: - @${MKDIR} ${PREFIX}/lib/X11/fonts/TrueType + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/fonts/TrueType ${INSTALL_DATA} ${WRKSRC}/uhoaiw21.ttf \ - ${PREFIX}/lib/X11/fonts/TrueType - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + ${STAGEDIR}${PREFIX}/lib/X11/fonts/TrueType .include <bsd.port.mk> - -EXTRACT_BEFORE_ARGS+= -L diff --git a/vietnamese/unicode-uhoai/pkg-deinstall b/vietnamese/unicode-uhoai/pkg-deinstall new file mode 100644 index 000000000000..a4eff4621184 --- /dev/null +++ b/vietnamese/unicode-uhoai/pkg-deinstall @@ -0,0 +1,13 @@ +#!/bin/sh +# $FreeBSD$ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +cd ${PKG_PREFIX}/lib/X11/fonts/TrueType +${PKG_PREFIX}/bin/ttmkfdir -o fonts.scale +if [ `cat fonts.scale` = "0" ]; then + rm -f fonts.scale + rm -f fonts.dir +fi diff --git a/vietnamese/unicode-uhoai/pkg-plist b/vietnamese/unicode-uhoai/pkg-plist index 9894e632eb88..cd62927cd827 100644 --- a/vietnamese/unicode-uhoai/pkg-plist +++ b/vietnamese/unicode-uhoai/pkg-plist @@ -1,2 +1,2 @@ lib/X11/fonts/TrueType/uhoaiw21.ttf -@dirrm lib/X11/fonts/TrueType/vietnamese-unicode +@dirrmtry lib/X11/fonts/TrueType |