Bug 118331 - [NEW PORT] x11-fonts/indic-ttf
Summary: [NEW PORT] x11-fonts/indic-ttf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-29 18:20 UTC by Jacula Modyun
Modified: 2008-04-02 20:42 UTC (History)
0 users

See Also:


Attachments
indic-ttf.shar (10.43 KB, text/plain)
2007-11-29 18:20 UTC, Jacula Modyun
no flags Details
indic-ttf.shar (10.76 KB, text/plain; charset=us-ascii)
2008-03-31 12:02 UTC, Jacula Modyun
no flags Details
indic-ttf.diff (1.93 KB, patch)
2008-03-31 21:17 UTC, Thierry Thomas
no flags Details | Diff
patch-indic-ttf (1.71 KB, text/plain; charset=us-ascii)
2008-04-01 08:47 UTC, Jacula Modyun
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacula Modyun 2007-11-29 18:20:01 UTC
This ttf-indic-fonts is a set of TrueType and
OpenType fonts. It include:

- Bengali
- Devanagari
- Gujarati
- Kannada
- Malayalam
- Oriya
- Punjabi
- Tamil
- Telugu

By the Debian source ttf-indic-fonts.
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2008-03-30 19:50:47 UTC
State Changed
From-To: open->feedback


- sorry, there is a long time since your PR, and in the meantime this 
tarball has been removed from a lot of mirrors; could you please update 
it to the latest release, in order to make it fetchable easily? 

- mkfontdir and mkfontscale should not belong to RUN_DEPENDS; 

- fc-cache is run when you install the port, but it is not when you 
install it from a package (@exec fc-cache could be added in pkg-plist); 

- it seems that the sentence about `xset fp' in pkg-message is no more 
required with the modern Xorg. 

Best regards, 
--  
Th. Thomas. 



Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2008-03-30 19:50:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->thierry


Take it.
Comment 3 Jacula Modyun 2008-03-31 12:02:58 UTC
Hi Thierry,

thank you for taking it. I updated a little the port.

Giuseppe Pilichi aka Jacula Modyun
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2008-03-31 21:17:33 UTC
On Mon 31 mar 08 at 13:10:04 +0200, Jacula Modyun <jacula@gmail.com>
 wrote:

>  Hi Thierry,

Hello,

>  thank you for taking it. I updated a little the port.

Thanks for your quick reply!

You have added a dependency on fontutil, but it seems unused; is it
really required for some fonts? If not, I'd suggest to remove it.

I propose the attached patch, which remove fontutil, replace
bsd.port.pre.mk / bsd.port.post.mk by bsd.port.mk and some minor fixes.

Could you please review it?
-- 
Th. Thomas.
Comment 5 Jacula Modyun 2008-04-01 08:47:58 UTC
Hi Thierry,

Thank you for your quick check. I'm sorry, but I think your patch
introduces at least one new problem. I now try to review this one:

- The replace bsd.port.pre.mk/bsd.port.post.mk by bsd.port.mk breaks the
  package list, because the variable PLIST_SUB and the OPTIONS variables
  aren't setted correctly; you can find a note about the syntax for
  the OPTIONS variable in the ports/Mk/bsd.port.mk;

  cd /usr/ports/Mk; grep -C1 -e bsd.port.pre.mk bsd.port.mk:

#	into a single variable.  NOTE: To make options work, you need
#	to include bsd.port.pre.mk before you start testing the
#	WITH_xyz variables.

  or in the handbook:

- About the pkg_plist, I prefer to use the LOCALBASE ( or PREFIX or %D
  for port maintenance) and not X11BASE that is a link; but now I use the
  FCCACHE variable in PLIST_SUB that permit me a better maintenance, when
  I have to update the port.

- About the .SILENT command, it is OK to use also the "@" syntax; but generally
  I prefer to use the former for practical reasons; it is an on/off command for
  the silence.

You are right about the "fontutil"; the "USE_XORG= fontutil" is useless.
than I propose the attached patch. Thank you again for your attention.

Giuseppe Pilichi aka Jacula Modyun 
Comment 6 Jacula Modyun 2008-04-01 08:56:09 UTC
I'm sorry but I forgot to put the link to the handbook:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html#AEN2499

Bye

Giuseppe
Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2008-04-01 22:43:34 UTC
On Tue  1 apr 08 at 9:47:58 +0200, Jacula Modyun <jacula@gmail.com>
 wrote:

> Hi Thierry,

Hello,

> Thank you for your quick check. I'm sorry, but I think your patch
> introduces at least one new problem. I now try to review this one:
> 
> - The replace bsd.port.pre.mk/bsd.port.post.mk by bsd.port.mk breaks the
>   package list, because the variable PLIST_SUB and the OPTIONS variables
>   aren't setted correctly; you can find a note about the syntax for
>   the OPTIONS variable in the ports/Mk/bsd.port.mk;
> 
>   cd /usr/ports/Mk; grep -C1 -e bsd.port.pre.mk bsd.port.mk:
> 
> #	into a single variable.  NOTE: To make options work, you need
> #	to include bsd.port.pre.mk before you start testing the
> #	WITH_xyz variables.

As I understand it, it means that if you have to include
bsd.port.pre.mk, OPTIONS definition must appear before the inclusion of
bsd.port.pre.mk. The WITH_* and WITHOUT_* variables can only be tested
after the inclusion of bsd.port.pre.mk.

We have several ports in the tree which use OPTIONS and just include
bsd.port.mk (e.g. cad/geda, or graphics/swfdec).

I have tested x11-fonts/indic-ttf with bsd.port.mk and some options
turned off, and it was OK.

>   or in the handbook:
> 
> - About the pkg_plist, I prefer to use the LOCALBASE ( or PREFIX or %D
>   for port maintenance) and not X11BASE that is a link; but now I use the
>   FCCACHE variable in PLIST_SUB that permit me a better maintenance, when
>   I have to update the port.

Up to now, X11BASE and LOCALBASE could have been set to different
locations, but flz has just submitted a PR to remove this possibility,
then you are right ;-)

> - About the .SILENT command, it is OK to use also the "@" syntax; but generally
>   I prefer to use the former for practical reasons; it is an on/off command for
>   the silence.
> 
> You are right about the "fontutil"; the "USE_XORG= fontutil" is useless.
> than I propose the attached patch. Thank you again for your attention.

OK, thanks for your feedback. Let me know what you think about
bsd.port.mk.

Best regards,
-- 
Th. Thomas.
Comment 8 Jacula Modyun 2008-04-02 09:34:34 UTC
Hi Thierry,

I would start from the end:

> I have tested x11-fonts/indic-ttf with bsd.port.mk and some options
> turned off, and it was OK.

I don't know exactly how this is possible, because if you, with "bsd.port.mk"
at the end, unset, for example, every options except BENGALI, the port will
install every fonts, and not only the bengali fonts.

> 
> As I understand it, it means that if you have to include
> bsd.port.pre.mk, OPTIONS definition must appear before the inclusion of
> bsd.port.pre.mk. The WITH_* and WITHOUT_* variables can only be tested
> after the inclusion of bsd.port.pre.mk.

Yes, that's right, in fact I think the sentence is a little ambiguous, but
if you could check the Mk/bsd.port.mk and Mk/bsd.port.pre.mk you can resolve
quickly the ambiguity. Now I'm sorry for these long citations:

---------------------------------------------------------------------------
				START
---------------------------------------------------------------------------

In the Mk/bsd.port.pre.mk you can find:

---------------------------------------------------------------------------
# $FreeBSD: ports/Mk/bsd.port.pre.mk,v 1.3 1999/08/25 04:40:21 obrien Exp $

BEFOREPORTMK=	yes

.include "bsd.port.mk"

.undef BEFOREPORTMK
---------------------------------------------------------------------------
				END
---------------------------------------------------------------------------

---------------------------------------------------------------------------
				START
---------------------------------------------------------------------------
In the Mk/bsd.port.mk you can find:

---------------------------------------------------------------------------
# $FreeBSD: ports/Mk/bsd.port.mk,v 1.591 2008/03/11 23:45:04 pav Exp $
.
.
.
----- line 1114 -----
.if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) && \
	!defined(BEFOREPORTMK) && !defined(INOPTIONSMK)

.
.
.
.
----- line 1233 -----

OPTIONSFILE?=	${PORT_DBDIR}/${UNIQUENAME}/options
_OPTIONSFILE!=	${ECHO_CMD} "${OPTIONSFILE}"
.if defined(OPTIONS)
# include OPTIONSFILE first if exists
.	if exists(${_OPTIONSFILE}) && !make(rmconfig)
.	include "${_OPTIONSFILE}"
.	endif
.	if exists(${_OPTIONSFILE}.local)
.	include "${_OPTIONSFILE}.local"
.	endif
WITHOUT:=
WITH:=
.	if defined(OPTIONS)
REALOPTIONS=${OPTIONS:C/".*"//g}
.	for O in ${REALOPTIONS}
RO:=${O}
.	if ${RO:L} == off
WITHOUT:=	${WITHOUT} ${OPT}
.	endif
.	if ${RO:L} == on
WITH:=		${WITH} ${OPT}
.	endif
OPT:=${RO}
.	endfor
.	endif
# define only if NO WITH/WITHOUT_${W} is defined
.	for W in ${WITH}
.   if !defined(WITH_${W}) && !defined(WITHOUT_${W})
WITH_${W}:=	true
.   endif
.	endfor
.	for W in ${WITHOUT}
.   if !defined(WITH_${W}) && !defined(WITHOUT_${W})
WITHOUT_${W}:=	true
.   endif
.	endfor
.	undef WITH
.	undef WITHOUT
.	undef RO
.	undef REALOPTIONS
.endif

.endif
---------------------------------------------------------------------------
				END
---------------------------------------------------------------------------


Then if you don't put ".include <bsd.port.pre.mk>" at the right position, the
WITH_* WITHOUT_* variables won't be defined before the subsequent conditionals
in indic-ttf/Makefile:
.
.
.
.if defined(WITHOUT_BENGALI)
PLIST_SUB+=	BENGALI='@comment '
.else
FONTS=		bengali
PLIST_SUB+=	BENGALI=''
.endif
.
.
.

and the WITHOUT_* variables will be always unsetted, then in PLIST_SUB
it will be, for example, always BENGALI='' and never BENGALI='@comment '.

To see this, you can try: make -V PLIST_SUB with and without
bsd.port.pre.mk/bsd.port.post.mk or applying this patch:

---------------------------------------------------------------------------
diff -uNr indic-ttf.orig/Makefile indic-ttf/Makefile
--- indic-ttf.orig/Makefile	2008-04-01 08:06:55.000000000 +0000
+++ indic-ttf/Makefile	2008-04-02 07:54:46.000000000 +0000
@@ -35,7 +35,9 @@
 		TAMIL		"TAMIL font set" on \
 		TELUGU		"TELUGU font set" on
 
+EGO1!=	echo ${WITH_BENGALI}
 .include <bsd.port.pre.mk>
+EGO2!=	echo ${WITH_BENGALI}
 
 FONTSNAME=	${PORTNAME}
 FONTSDIR?=	${PREFIX}/lib/X11/fonts/${FONTSNAME}
---------------------------------------------------------------------------

and: cd /usr/ports/x11-fonts/indic-ttf; make -V EGO1; make -V EGHO2 

Now:

> We have several ports in the tree which use OPTIONS and just include
> bsd.port.mk (e.g. cad/geda, or graphics/swfdec).

Yes you are right, in fact they are broken; changing the settings doesn't
change nothing.

I'm sorry for this long mail but I hope this can help us to make a better
port for these very beautiful fonts, than it was at the born.

Best regards,

Giuseppe Pilichi
Comment 9 Jacula Modyun 2008-04-02 10:01:07 UTC
Sorry for the problem, but I forgot to pay attention to the patch, I hope
it's clear that my mail ended with:

and: cd /usr/ports/x11-fonts/indic-ttf; make -V EGO1; make -V EGHO2 

Now:

> We have several ports in the tree which use OPTIONS and just include
> bsd.port.mk (e.g. cad/geda, or graphics/swfdec).

Yes you are right, in fact they are broken; changing the settings doesn't
change nothing.

I'm sorry for this long mail but I hope this can help us to make a better port for
very beautiful fonts, than it was at the born.

Best regards,

Giuseppe Pilichi
Comment 10 dfilter service freebsd_committer freebsd_triage 2008-04-02 20:38:45 UTC
thierry     2008-04-02 19:38:37 UTC

  FreeBSD ports repository

  Modified files:
    x11-fonts            Makefile 
  Added files:
    x11-fonts/indic-ttf  Makefile distinfo pkg-descr pkg-plist 
    x11-fonts/indic-ttf/files pkg-message.in 
  Log:
  This ttf-indic-fonts is a set of TrueType and
  OpenType fonts. It includes:
  
  - Bengali
  - Devanagari
  - Gujarati
  - Kannada
  - Malayalam
  - Oriya
  - Punjabi
  - Tamil
  - Telugu
  
  By the Debian source ttf-indic-fonts.
  
  WWW:    http://debian-in.org
  URL:    http://packages.debian.org/unstable/x11/ttf-indic-fonts
  
  PR:             ports/118331
  Submitted by:   Giuseppe Pilichi aka Jacula Modyun <jacula at gmail.com>
  
  Revision  Changes    Path
  1.96      +1 -0      ports/x11-fonts/Makefile
  1.1       +152 -0    ports/x11-fonts/indic-ttf/Makefile (new)
  1.1       +3 -0      ports/x11-fonts/indic-ttf/distinfo (new)
  1.1       +29 -0     ports/x11-fonts/indic-ttf/files/pkg-message.in (new)
  1.1       +17 -0     ports/x11-fonts/indic-ttf/pkg-descr (new)
  1.1       +102 -0    ports/x11-fonts/indic-ttf/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 Thierry Thomas freebsd_committer freebsd_triage 2014-06-01 06:42:22 UTC
State Changed
From-To: feedback->closed


New port added! Thanks a lot for your feedback about options: now I'm 
really sure that I dislike them ;-) 

Best regards, 
--  
Th. Thomas.