aboutsummaryrefslogtreecommitdiffstats
path: root/audio/dumb
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2015-08-19 21:29:59 +0800
committermat <mat@FreeBSD.org>2015-08-19 21:29:59 +0800
commit9d30f78a00bed11384c7259f662e9352754275db (patch)
treeac5a462edc3d85d5f0b20a594802ce4b12f0bf9f /audio/dumb
parent996088dedaf9d22bcd7c90caa96d33c0f68b08e7 (diff)
downloadfreebsd-ports-gnome-9d30f78a00bed11384c7259f662e9352754275db.tar.gz
freebsd-ports-gnome-9d30f78a00bed11384c7259f662e9352754275db.tar.zst
freebsd-ports-gnome-9d30f78a00bed11384c7259f662e9352754275db.zip
Convert ports to use the options helpers in categories [abc]*, and minor fixes.
Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3412?
Diffstat (limited to 'audio/dumb')
-rw-r--r--audio/dumb/Makefile32
1 files changed, 12 insertions, 20 deletions
diff --git a/audio/dumb/Makefile b/audio/dumb/Makefile
index 9cf4697b7af3..959da04e5cad 100644
--- a/audio/dumb/Makefile
+++ b/audio/dumb/Makefile
@@ -13,26 +13,19 @@ COMMENT= IT, XM, S3M, and MOD player library
USES= gmake
OPTIONS_DEFINE= ALLEGRO
+OPTIONS_SUB= yes
ALLEGRO_DESC= Enable allegro support
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MALLEGRO}
-LIB_DEPENDS+= liballeg.so:${PORTSDIR}/devel/allegro
-PLIST_SUB+= ALLEGRO=""
-MAKE_ARGS= _PORT_ALLEGRO_CFLAGS="`allegro-config --cflags`"
-MAKE_ARGS+= LINK_ALLEGRO="`allegro-config --libs` -lm"
-PKGNAMESUFFIX= -allegro
-CONFLICTS= dumb-[0-9]*
-.else
-PLIST_SUB+= ALLEGRO="@comment "
-MAKE_ARGS= _PORT_ALLEGRO_CFLAGS=
-CONFLICTS= dumb-allegro-[0-9]*
-.endif
-
-.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
-CFLAGS+= -fPIC
-.endif
+ALLEGRO_LIB_DEPENDS= liballeg.so:${PORTSDIR}/devel/allegro
+ALLEGRO_MAKE_ARGS= _PORT_ALLEGRO_CFLAGS="`allegro-config --cflags`" \
+ LINK_ALLEGRO="`allegro-config --libs` -lm"
+ALLEGRO_CONFLICTS= dumb-[0-9]*
+ALLEGRO_MAKE_ARGS_OFF= _PORT_ALLEGRO_CFLAGS=
+ALLEGRO_CONFLICTS_OFF= dumb-allegro-[0-9]*
+
+CFLAGS_amd64= -fPIC
+CFLAGS_ia64= -fPIC
+CFLAGS_sparc64= -fPIC
post-patch:
@${REINPLACE_CMD} -e 's|_INSTALL_PATH := |&$${DESTDIR}|' ${WRKSRC}/Makefile
@@ -40,8 +33,7 @@ post-patch:
do-configure:
@${ECHO_CMD} 'include make/unix.inc' > ${WRKSRC}/make/config.txt
@${ECHO_CMD} 'ALL_TARGETS := core core-examples core-headers' >> ${WRKSRC}/make/config.txt
-.if ${PORT_OPTIONS:MALLEGRO}
+do-configure-ALLEGRO-on:
@${ECHO_CMD} 'ALL_TARGETS += allegro allegro-examples allegro-headers' >> ${WRKSRC}/make/config.txt
-.endif
.include <bsd.port.mk>