On 4/23/16, Michael Reed <[email protected]> wrote:
> On 04/23/16 19:12, Christian Weisgerber wrote:
>> On 2016-04-23, Michael Reed <[email protected]> wrote:
>>
>>> -FLAVORS =          symquotes
>>> +FLAVORS =          symquotes centered_tilde
>>>   FLAVOR ?=
>>
>> This (implicitly) allows combining the flavors...
>>
>>>   .if ${FLAVOR:Msymquotes}
>>>   post-patch:
>>>     ${PATCH} -d ${WRKSRC} < ${WRKSRC}/alt/gq2.diff
>>> +.elif ${FLAVOR:Mcentered_tilde}
>>> +post-patch:
>>> +   ${PATCH} -d ${WRKSRC} < ${WRKSRC}/alt/td1.diff
>>>   .endif
>>
>> ... but this doesn't.
>>
>
> Indeed, Patrick just pointed that out.  New patch is attached.

After sending my reply, i realized that to allow both flavors at
the same time, the post-patch needs to be a bit more sophisticated.
Not sure if make will like two targets with the same name if both
flavors are specified during make.

something like attached seems to work allowing both flavors
at the same time.

--patrick

> In the patch, I explicitly mention the compound flavor; should that be
> done?
Index: Makefile
===================================================================
RCS file: /cvs/obsd/ports/fonts/terminus-font/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- Makefile    13 Nov 2015 20:18:25 -0000      1.10
+++ Makefile    23 Apr 2016 23:33:32 -0000
@@ -4,6 +4,7 @@ COMMENT =               fixed width fonts especially 
 
 DISTNAME =             terminus-font-4.40
 CATEGORIES =           fonts x11
+REVISION =             0
 
 HOMEPAGE =             http://terminus-font.sourceforge.net/
 
@@ -24,12 +25,21 @@ FONTDIR =           ${PREFIX}/share/fonts/terminu
 
 USE_GMAKE =            Yes
 
-FLAVORS =              symquotes
+FLAVORS =              symquotes centered_tilde
 FLAVOR ?=
 
 .if ${FLAVOR:Msymquotes}
+FLAVOR_PATCHES += ${WRKSRC}/alt/gq2.diff
+.endif
+.if ${FLAVOR:Mcentered_tilde}
+FLAVOR_PATCHES += ${WRKSRC}/alt/td1.diff
+.endif
+
+.if !empty(FLAVOR_PATCHES)
 post-patch:
-       ${PATCH} -d ${WRKSRC} < ${WRKSRC}/alt/gq2.diff
+       for f in ${FLAVOR_PATCHES} ; do \
+               ${PATCH} -d ${WRKSRC} < $$f ; \
+       done
 .endif
 
 do-install:
Index: pkg/DESCR
===================================================================
RCS file: /cvs/obsd/ports/fonts/terminus-font/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 DESCR
--- pkg/DESCR   19 Jul 2011 09:16:08 -0000      1.1.1.1
+++ pkg/DESCR   23 Apr 2016 23:33:32 -0000
@@ -2,4 +2,6 @@ The Terminus font is a complete set of f
 especially for the usage in terms.
 
 Flavors:
-       symquotes - Build with symmetric single quotes.
+       symquotes                - Build with symmetric single quotes.
+       centered_tilde           - Build with centered ASCII tilde.
+       symquotes-centered_tilde - Build with both modifications.

Reply via email to