2013/8/21 Stuart Henderson <st...@openbsd.org>:
>>                                  Unfortunately, I did not found any
>> way to make "pkg_add -u" handle transition from one FLAVOR to
>> another - probably, this could be done by something complicated in
>> devel/quirks/files/Quirks.pm?
>
> The normal "stem_extensions" part of Quirks.pm doesn't handle flavours,
> it's theoretically possible to add but going to be fiddly.
>
>> Or should I just override the FULLPKGPATH and be done with it?
>
> What would you override it with?
>
>> +@pkgpath games/heroes,-ggi
>> +@pkgpath games/heroes,-sdl
>
> This is incorrect pkg_create(1) @pkgpath syntax; you don't want the "-" here.

E-ek! Thanks... Well, now pkg_add -u sees the heroes-0.21p3 as
possible update candidate, so the diff below should do the trick.

--
  WBR,
  Vadim Zhukov


Index: games/heroes/Makefile
===================================================================
RCS file: /cvs/ports/games/heroes/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- games/heroes/Makefile       11 Mar 2013 11:07:39 -0000      1.25
+++ games/heroes/Makefile       20 Aug 2013 22:59:08 -0000
@@ -7,7 +7,7 @@ DATAVERSION=    1.5
 SOUNDVERSION=  1.0
 MUSICVERSION=  1.0
 DISTNAME=      heroes-${VERSION}
-REVISION =     2
+REVISION =     3
 CATEGORIES=    games x11
 
 DISTFILES=     ${DISTNAME}${EXTRACT_SUFX} \
@@ -21,7 +21,7 @@ HOMEPAGE=     http://heroes.sourceforge.net/
 MAINTAINER=    Peter Valchev <pvalc...@openbsd.org>
 
 PERMIT_PACKAGE_CDROM=   Yes
-WANTLIB=               c m
+WANTLIB=       SDL SDL_mixer c m pthread
 
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=heroes/}
 
@@ -30,39 +30,14 @@ USE_GROFF = Yes
 
 MODULES=       devel/gettext
 
-FLAVORS=       sdl ggi
-FLAVOR?=       sdl
-
-.if empty(FLAVOR:Msdl) && empty(FLAVOR:Mggi)
-ERRORS+=       "Fatal: Must choose one flavor: sdl or ggi"
-.endif
-
-.if ${FLAVOR:Msdl} && ${FLAVOR:Mggi}
-ERRORS+=       "Fatal: Choose only one flavor: sdl or ggi"
-.endif
-
-.if ${FLAVOR:Msdl}
-LIB_DEPENDS += devel/sdl \
+LIB_DEPENDS=   devel/sdl \
                devel/sdl-mixer
-WANTLIB +=     SDL SDL_mixer
 
-CONFIGURE_ARGS+= --with-sdl="${LOCALBASE}"
-WANTLIB +=     X11 Xext pthread pthread-stubs usbhid xcb
-.else
-CONFIGURE_ARGS+= --without-sdl --without-sdl-mixer
-WANTLIB +=     gii
-.endif
-
-.if ${FLAVOR:Mggi}
-# Sound support is disabled with the ggi flavor since it is dependent
-# on sdl-mixer.  No alternatives for now.
-LIB_DEPENDS += graphics/ggi
-WANTLIB +=     ggi>=2.0
-CONFIGURE_ARGS += --with-ggi="${LOCALBASE}"
-FULLPKGNAME =  heroes-${VERSION}
-.else
-CONFIGURE_ARGS += --without-ggi
-.endif
+CONFIGURE_ARGS= --disable-debug \
+               --disable-optimizations \
+               --with-sdl="${LOCALBASE}" \
+               --without-ggi \
+               --without-mikmod
 
 SEPARATE_BUILD=        Yes
 CONFIGURE_STYLE= gnu
@@ -70,9 +45,6 @@ MODGNU_CONFIG_GUESS_DIRS=     ${WRKSRC}/tool
 CONFIGURE_ENV+=        CPPFLAGS="-I${LOCALBASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib -lm -lintl -liconv" \
                ac_cv_header_io_h=no
-CONFIGURE_ARGS+= --disable-optimizations \
-                --disable-debug \
-                --without-mikmod
 
 post-install:
 .for dir in levels pics tilesets
Index: games/heroes/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/heroes/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST
--- games/heroes/pkg/PLIST      15 Sep 2004 00:46:09 -0000      1.7
+++ games/heroes/pkg/PLIST      20 Aug 2013 22:59:08 -0000
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.7 2004/09/15 00:46:09 espie Exp $
+@pkgpath games/heroes,ggi
+@pkgpath games/heroes,sdl
 bin/heroes
 bin/heroeslvl
 @info info/heroes.info

Reply via email to