pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/magicpoint Allow to select font rendering eng...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/127ed3e6ffc5
branches:  trunk
changeset: 484889:127ed3e6ffc5
user:      taca <taca%pkgsrc.org@localhost>
date:      Tue Nov 30 17:29:30 2004 +0000

description:
Allow to select font rendering engines with PKG_OPTION.  Possible
options are freetype, vflib and xft2.  Default is xft2 which is the
same as previous magicpoint package.

This work is written by Kouichirou Hiratsuka and I modified to use
bsd.options.mk framework.

Bump package revision.

diffstat:

 graphics/magicpoint/Makefile         |  50 +++++++++++++++++++++++++----------
 graphics/magicpoint/distinfo         |   5 ++-
 graphics/magicpoint/patches/patch-ah |  41 +++++++++++++++++++++++++++++
 graphics/magicpoint/patches/patch-ai |  50 ++++++++++++++++++++++++++++++++++++
 graphics/magicpoint/patches/patch-aj |  41 +++++++++++++++++++++++++++++
 5 files changed, 172 insertions(+), 15 deletions(-)

diffs (245 lines):

diff -r a2b9d1abaf37 -r 127ed3e6ffc5 graphics/magicpoint/Makefile
--- a/graphics/magicpoint/Makefile      Tue Nov 30 17:20:10 2004 +0000
+++ b/graphics/magicpoint/Makefile      Tue Nov 30 17:29:30 2004 +0000
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.40 2004/10/03 00:14:56 tv Exp $
+# $NetBSD: Makefile,v 1.41 2004/11/30 17:29:30 taca Exp $
 
 DISTNAME=              magicpoint-1.10a
-PKGREVISION=           3
+PKGREVISION=           4
+#DISTNAME=             magicpoint-1.11b.tar.gz
 CATEGORIES=            x11 graphics
-MASTER_SITES=          ftp://ftp.mew.org/pub/MagicPoint/
+MASTER_SITES=          ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/ \
+                       ftp://ftp.mew.org/pub/MagicPoint/
 
 MAINTAINER=            itojun%itojun.org@localhost
 HOMEPAGE=              http://www.Mew.org/mgp/
@@ -16,25 +18,39 @@
 USE_IMAKE=             yes
 USE_PERL5=             build
 
+PKG_OPTIONS_VAR=       PKG_OPTIONS.magicpoint
+PKG_DEFAULT_OPTIONS+=  xft2
+PKG_SUPPORTED_OPTIONS+=        freetype vflib xft2
+
+.include "../../mk/bsd.options.mk"
+
 CONFIGURE_ARGS+=       --enable-freetype-charset16
-CONFIGURE_ARGS+=       --disable-vflib
 CONFIGURE_ARGS+=       --enable-locale
 CONFIGURE_ARGS+=       --enable-gif
 CONFIGURE_ENV+=                BUILDLINK_DIR=${BUILDLINK_DIR}
 
+MGP_RENDERING_ENGINES= freetype        graphics/freetype-lib \
+                       xft2            fonts/Xft2 \
+                       vflib           print/ja-vflib-lib
+
 # We need to perform the steps normally done by ``xmkmf -a'' since some
 # files need to be created before ``make depend''.
 #
 XMKMF=                 ${XMKMF_CMD} ${XMKMF_FLAGS}
 
+MGP_PRE_STAGE=         ctlwords.h grammar.c scanner.c tokdefs.h \
+                       Makefiles includes depend
+
 post-configure:
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ctlwords.h
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} grammar.c
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} scanner.c
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} tokdefs.h
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} Makefiles
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} includes
-       cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} depend
+.for s in ${MGP_PRE_STAGE}
+       cd ${WRKSRC}; \
+               ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} $s
+.endfor
+
+pre-install:
+       ${SED} -e "/^%% Default.*${MGP_RENDERING_ENGINE}\./,/^%%%/s/^%% %/%/" \
+               ${WRKSRC}/sample/default.mgp.template > \
+               ${WRKSRC}/sample/default.mgp
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mgp
@@ -47,9 +63,15 @@
        ${INSTALL_DATA} README* *.jpg *.eps *.mgp *.xbm mgprc-sample \
                ${PREFIX}/share/examples/mgp
 
-.include "../../fonts/Xft2/buildlink3.mk"
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
+.for engine pkg in ${MGP_RENDERING_ENGINES}
+.  if !empty(PKG_OPTIONS:M${engine})
+CONFIGURE_ARGS+=       --enable-${engine}
+.include "../../${pkg}/buildlink3.mk"
+.  else
+CONFIGURE_ARGS+=       --disable-${engine}
+.  endif
+.endfor
+
 .include "../../graphics/libungif/buildlink3.mk"
 .include "../../graphics/mng/buildlink3.mk"
 .include "../../graphics/netpbm/buildlink3.mk"
diff -r a2b9d1abaf37 -r 127ed3e6ffc5 graphics/magicpoint/distinfo
--- a/graphics/magicpoint/distinfo      Tue Nov 30 17:20:10 2004 +0000
+++ b/graphics/magicpoint/distinfo      Tue Nov 30 17:29:30 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2004/05/25 01:30:22 danw Exp $
+$NetBSD: distinfo,v 1.12 2004/11/30 17:29:30 taca Exp $
 
 SHA1 (magicpoint-1.10a.tar.gz) = 7510ee965316cb52eac7a430f0e19a87a337fe5c
 Size (magicpoint-1.10a.tar.gz) = 843657 bytes
@@ -9,3 +9,6 @@
 SHA1 (patch-ae) = b8c48eddee83f78b24cd10e864e94c3dd39c552f
 SHA1 (patch-af) = b52455c3018d5de4ee7d20c42680df8978f15b55
 SHA1 (patch-ag) = 02e53e3e498b150d528349c9712978f164e8836f
+SHA1 (patch-ah) = 2cd87d9697be2ebd9d7c0a936d49583286de62d3
+SHA1 (patch-ai) = 809b2cf509bab0ee1bed1fecb2cf2d8df912ce8b
+SHA1 (patch-aj) = 07ed5e995bf35dcbe65fc7c0ab800d1b8905e004
diff -r a2b9d1abaf37 -r 127ed3e6ffc5 graphics/magicpoint/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/magicpoint/patches/patch-ah      Tue Nov 30 17:29:30 2004 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-ah,v 1.1 2004/11/30 17:29:30 taca Exp $
+
+--- sample/default.mgp.template.orig   2004-10-20 00:33:13.000000000 +0900
++++ sample/default.mgp.template
+@@ -0,0 +1,36 @@
++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
++%%
++%% Default font settings for xft2.
++%%
++%% %deffont "standard"   xfont "serif" "iso8859-1", xfont "serif" "jisx0208.1983"
++%% %deffont "thick"      xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983"
++%% %deffont "typewriter" xfont "sans-serif" "iso8859-1", xfont "sans-serif" "jisx0208.1983"
++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
++%%
++%% Default font settings for vflib.
++%%
++%% %deffont "standard"   vfont "min"
++%% %deffont "thick"      vfont "goth"
++%% %deffont "typewriter" vfont "goth"
++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
++%%
++%% Default font settings for freetype.
++%%
++%% %deffont "standard"   tfont "standard.ttf",   tmfont "kochi-mincho.ttf"
++%% %deffont "thick"      tfont "thick.ttf",      tmfont "goth.ttf"
++%% %deffont "typewriter" tfont "typewriter.ttf", tmfont "goth.ttf"
++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
++%%
++%% Default settings per each line numbers.
++%%
++%default 1 area 90 90, leftfill, size 2, fore "white", back "black", font "thick"
++%default 2 size 7, vgap 10, prefix " "
++%default 3 size 2, bar "gray70", vgap 10
++%default 4 size 5, fore "white", vgap 30, prefix " ", font "standard"
++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
++%%
++%% Default settings that are applied to TAB-indented lines.
++%%
++%tab 1 size 5, vgap 40, prefix "  ", icon box "green" 50
++%tab 2 size 4, vgap 40, prefix "      ", icon arc "yellow" 50
++%tab 3 size 3, vgap 40, prefix "            ", icon delta3 "white" 40
diff -r a2b9d1abaf37 -r 127ed3e6ffc5 graphics/magicpoint/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/magicpoint/patches/patch-ai      Tue Nov 30 17:29:30 2004 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-ai,v 1.1 2004/11/30 17:29:30 taca Exp $
+
+--- sample/sample-jp.mgp.orig  2001-08-11 18:53:53.000000000 +0900
++++ sample/sample-jp.mgp
+@@ -1,35 +1,4 @@
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% This default.mgp is "TrueType fonts" oriented.
+-%% First, you should create "~/.mgprc" whose contents are:
+-%%    tfdir "/path/to/truetype/fonts"
+-%%
+-%% To visualize English, install "times.ttf", "arial.ttf", and "cour.ttf"
+-%% into the "tfdir" directory above:
+-%%    http://microsoft.com/typography/fontpack/default.htm
+-%%
+-%% To visualize Japanese, install "MSMINCHO.ttf" and 
+-%% "watanabenabe-mincho.ttf" into the "tfdir" directory above:
+-%%    http://www.mew.org/mgp/xtt-fonts_0.19981020-3.tar.gz
+-%%
+-%deffont "thick" xfont "helvetica-bold-r", tfont "thick.ttf", tmfont "goth.ttf"
+-%deffont "standard" xfont "helvetica-medium-r", tfont "standard.ttf", tmfont "kochi-mincho.ttf"
+-%deffont "typewriter" xfont "courier-medium-r", tfont "typewriter.ttf", tmfont "goth.ttf"
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% Default settings per each line numbers.
+-%%
+-%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
+-%default 2 size 5, hgap 20, vgap 10, prefix " ", ccolor "black"
+-%default 3 size 2, hgap 10, bar "gray70", vgap 10
+-%default 4 size 4, hgap 10, fore "gray20", vgap 30, prefix " ", font "standard"
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% Default settings that are applied to TAB-indented lines.
+-%%
+-%tab 1 size 4, vgap 40, prefix "  ", icon box "green" 50
+-%tab 2 size 3.5, vgap 40, prefix "      ", icon arc "yellow" 50
+-%tab 3 size 3, vgap 40, prefix "            ", icon delta3 "white" 40
++%include "default.mgp"
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %page
+ %nodefault
+@@ -202,7 +171,7 @@ UNIX$B$H$$$&$/$i$$$G!"%=!<%9$N9T$O%P%C%
+ 
+ 
+       ($BB?J,(B)$BI=<(2DG=$J%$%a!<%8!&%U%)!<%^%C%H$O0J2<$NDL$j$G$9(B
+-%CENTER,SIZE 3,FORE "red", xfont "times-medium-r", tfont "times.ttf"
++%CENTER,SIZE 3,FORE "red", font "typewriter"
+ 
+   FBM Image
+   Sun Rasterfile
diff -r a2b9d1abaf37 -r 127ed3e6ffc5 graphics/magicpoint/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/magicpoint/patches/patch-aj      Tue Nov 30 17:29:30 2004 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-aj,v 1.1 2004/11/30 17:29:30 taca Exp $
+
+--- sample/sample.mgp.orig     2001-08-11 18:53:53.000000000 +0900
++++ sample/sample.mgp
+@@ -1,35 +1,4 @@
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% This default.mgp is "TrueType fonts" oriented.
+-%% First, you should create "~/.mgprc" whose contents are:
+-%%    tfdir "/path/to/truetype/fonts"
+-%%
+-%% To visualize English, install "times.ttf", "arial.ttf", and "cour.ttf"
+-%% into the "tfdir" directory above:
+-%%    http://microsoft.com/typography/fontpack/default.htm
+-%%
+-%% To visualize Japanese, install "MSMINCHO.ttf" and 
+-%% "watanabenabe-mincho.ttf" into the "tfdir" directory above:
+-%%    http://www.mew.org/mgp/xtt-fonts_0.19981020-3.tar.gz
+-%%
+-%deffont "standard" xfont "helvetica-medium-r", tfont "standard.ttf", tmfont "hoso6.ttf"
+-%deffont "thick" xfont "helvetica-bold-r", tfont "thick.ttf", tmfont "hoso6.ttf"
+-%deffont "typewriter" xfont "courier-medium-r", tfont "typewriter.ttf", tmfont "hoso6.ttf"
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% Default settings per each line numbers.
+-%%
+-%default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
+-%default 2 size 7, vgap 10, prefix " ", ccolor "black"
+-%default 3 size 2, bar "gray70", vgap 10
+-%default 4 size 5, fore "gray20", vgap 30, prefix " ", font "standard"
+-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-%%
+-%% Default settings that are applied to TAB-indented lines.
+-%%
+-%tab 1 size 5, vgap 40, prefix "  ", icon box "green" 50
+-%tab 2 size 4, vgap 40, prefix "      ", icon arc "yellow" 50
+-%tab 3 size 3, vgap 40, prefix "            ", icon delta3 "white" 40
++%include "default.mgp"
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %page
+ %nodefault



Home | Main Index | Thread Index | Old Index